CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

LOADPAL.CPP (4217B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /***************************************************************************
     17  **   C O N F I D E N T I A L --- W E S T W O O D   A S S O C I A T E S   **
     18  ***************************************************************************
     19  *                                                                         *
     20  *                 Project Name : Load_Palette                             *
     21  *                                                                         *
     22  *                    File Name : LOADPAL.CPP                              *
     23  *                                                                         *
     24  *                   Programmer : Scott K. Bowen                           *
     25  *                                                                         *
     26  *                   Start Date : April 25, 1994                           *
     27  *                                                                         *
     28  *                  Last Update : April 27, 1994   [BR]                    *
     29  *                                                                         *
     30  *-------------------------------------------------------------------------*
     31  * Note: This module contains dependencies upon the file I/O system,			*
     32  * specifically Load_Data().																*
     33  *-------------------------------------------------------------------------*
     34  * Functions:                                                              *
     35  *	  Load_Palette -- Loads a palette file into the given palette buffer.	*
     36  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     37 /*
     38 ********************************* Includes **********************************
     39 */
     40 //#include <wwstd.h>
     41 #include "wwstd.h"
     42 #include "iff.h"
     43 #include "palette.h"
     44 
     45 /*
     46 ********************************* Constants *********************************
     47 */
     48 
     49 /*
     50 ********************************** Globals **********************************
     51 */
     52 
     53 /*
     54 ******************************** Prototypes *********************************
     55 */
     56 
     57 /***************************************************************************
     58  *	Load_Palette -- Loads a palette file into the given palette buffer.		*
     59  *                                                                         *
     60  * INPUT:      																				*
     61  *		BYTE * file_name 			- name of the file to load.						*
     62  *		BYTE * palette_pointer	- pointer to palette buffer.	      			*
     63  *																									*
     64  * OUTPUT:     																				*
     65  *		none                                                        			*
     66  *                                                                         *
     67  * WARNINGS:   	                                                         *
     68  *                                                                         *
     69  * HISTORY:                                                                *
     70  *   06/20/1991 BS : Created.                                              *
     71  *   04/27/1994 BR : Converted to 32-bit                                   *
     72  *=========================================================================*/
     73 void __cdecl Load_Palette(char *palette_file_name, void *palette_pointer)
     74 {
     75 	#if(IBM)
     76 		Load_Data(palette_file_name, palette_pointer, 768);
     77 	#else
     78 		Load_Data(palette_file_name, palette_pointer, (ULONG)(2<<BIT_PLANES));
     79 	#endif
     80 }
     81 
     82 /**************************** End of loadpal.cpp ***************************/