CnC_Remastered_Collection

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

FILEPCX.H (3364B)


      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 : iff                                      *
     21 ;*                                                                         *
     22 ;*                    File Name : FILEPCX.H                                *
     23 ;*                                                                         *
     24 ;*                   Programmer : Julio R. Jerez                           *
     25 ;*                                                                         *
     26 ;*                   Start Date : May 2, 1995                              *
     27 ;*                                                                         *
     28 ;*                  Last Update : May 2, 1995   [JRJ]                      *
     29 ;*                                                                         *
     30 ;*-------------------------------------------------------------------------*
     31 ;* Functions:                                                              *
     32 ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette,void *buff, long size);
     33 ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette, BufferClass& Buff); 
     34 ;* int Write_PCX_File (char* name, GraphicViewPortClass& pic, BYTE* palette );*
     35 ;*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
     36 #include <gbuffer.h>
     37 #include <string.h>
     38 #include <buffer.h>
     39 #include	<file.h>
     40 
     41 #ifndef PCX_H
     42 #define PCX_H
     43 
     44 
     45 typedef	struct {
     46 						  char	red ;
     47 						  char	green ;
     48 						  char	blue ;
     49 					} RGB ;
     50 
     51 typedef	struct	{
     52 						  char      id ;
     53 						  char	   version ;
     54 						  char	   encoding ;
     55 						  char	   pixelsize ;
     56 						  short 	   x ;
     57 						  short		y ;
     58 						  short     width ;
     59 						  short		height ;
     60 						  short 	   xres ;
     61 						  short		yres ;
     62 						  RGB       ega_palette [ 16 ] ;
     63 						  char	   nothing ;
     64 						  char      color_planes ;
     65 						  short 		byte_per_line ;
     66 						  short 	 	palette_type ;
     67 						  char	   filler [ 58 ] ;
     68 						} PCX_HEADER ;
     69 
     70 GraphicBufferClass* Read_PCX_File (char* name, char* palette= NULL,void *buff=NULL, long size=0);
     71 GraphicBufferClass* Read_PCX_File (char* name, BufferClass& Buff,char* palette= NULL) ;
     72 int Write_PCX_File (char* name, GraphicViewPortClass& pic, unsigned char* palette );
     73 
     74 #endif