FILEPCX.H 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***************************************************************************
  19. ;** 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 **
  20. ;***************************************************************************
  21. ;* *
  22. ;* Project Name : iff *
  23. ;* *
  24. ;* File Name : FILEPCX.H *
  25. ;* *
  26. ;* Programmer : Julio R. Jerez *
  27. ;* *
  28. ;* Start Date : May 2, 1995 *
  29. ;* *
  30. ;* Last Update : May 2, 1995 [JRJ] *
  31. ;* *
  32. ;*-------------------------------------------------------------------------*
  33. ;* Functions: *
  34. ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette,void *buff, long size);
  35. ;* GraphicBufferClass* Read_PCX_File (char* name, BYTE* palette, BufferClass& Buff);
  36. ;* int Write_PCX_File (char* name, GraphicViewPortClass& pic, BYTE* palette );*
  37. ;*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
  38. #include <gbuffer.h>
  39. #include <string.h>
  40. #include <buffer.h>
  41. #include <file.h>
  42. #ifndef PCX_H
  43. #define PCX_H
  44. typedef struct {
  45. char red ;
  46. char green ;
  47. char blue ;
  48. } RGB ;
  49. typedef struct {
  50. char id ;
  51. char version ;
  52. char encoding ;
  53. char pixelsize ;
  54. short x ;
  55. short y ;
  56. short width ;
  57. short height ;
  58. short xres ;
  59. short yres ;
  60. RGB ega_palette [ 16 ] ;
  61. char nothing ;
  62. char color_planes ;
  63. short byte_per_line ;
  64. short palette_type ;
  65. char filler [ 58 ] ;
  66. } PCX_HEADER ;
  67. GraphicBufferClass* Read_PCX_File (char* name, char* palette= NULL,void *buff=NULL, long size=0);
  68. GraphicBufferClass* Read_PCX_File (char* name, BufferClass& Buff,char* palette= NULL) ;
  69. int Write_PCX_File (char* name, GraphicViewPortClass& pic, unsigned char* palette );
  70. #endif