FILEPCX.H 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /***************************************************************************
  15. ;** 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 **
  16. ;***************************************************************************
  17. ;* *
  18. ;* Project Name : iff *
  19. ;* *
  20. ;* File Name : FILEPCX.H *
  21. ;* *
  22. ;* Programmer : Julio R. Jerez *
  23. ;* *
  24. ;* Start Date : May 2, 1995 *
  25. ;* *
  26. ;* Last Update : May 2, 1995 [JRJ] *
  27. ;* *
  28. ;*-------------------------------------------------------------------------*
  29. ;* Functions: *
  30. ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette,void *buff, long size);
  31. ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette, BufferClass& Buff);
  32. ;* int Write_PCX_File (char* name, GraphicViewPortClass& pic, BYTE* palette );*
  33. ;*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
  34. #include <gbuffer.h>
  35. #include <string.h>
  36. #include <buffer.h>
  37. #include <file.h>
  38. #ifndef PCX_H
  39. #define PCX_H
  40. typedef struct {
  41. char red ;
  42. char green ;
  43. char blue ;
  44. } RGB ;
  45. typedef struct {
  46. char id ;
  47. char version ;
  48. char encoding ;
  49. char pixelsize ;
  50. short x ;
  51. short y ;
  52. short width ;
  53. short height ;
  54. short xres ;
  55. short yres ;
  56. RGB ega_palette [ 16 ] ;
  57. char nothing ;
  58. char color_planes ;
  59. short byte_per_line ;
  60. short palette_type ;
  61. char filler [ 58 ] ;
  62. } PCX_HEADER ;
  63. GraphicBufferClass* Read_PCX_File (char* name, char* palette= NULL,void *buff=NULL, long size=0);
  64. GraphicBufferClass* Read_PCX_File (char* name, BufferClass& Buff,char* palette= NULL) ;
  65. int Write_PCX_File (char* name, GraphicViewPortClass& pic, unsigned char* palette );
  66. #endif