PCX.H 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * $Source: f:/miner/source/2d/rcs/pcx.h $
  3. * $Revision: 1.4 $
  4. * $Author: john $
  5. * $Date: 1995/01/21 17:07:34 $
  6. *
  7. * Routines to read/write pcx images.
  8. *
  9. * $Log: pcx.h $
  10. * Revision 1.4 1995/01/21 17:07:34 john
  11. * Added out of memory error.
  12. *
  13. * Revision 1.3 1994/11/29 02:53:10 john
  14. * Added error messages; made call be more similiar to iff.
  15. *
  16. * Revision 1.2 1994/11/28 20:03:48 john
  17. * Added PCX functions.
  18. *
  19. * Revision 1.1 1994/11/28 19:57:45 john
  20. * Initial revision
  21. *
  22. *
  23. */
  24. #ifndef _PCX_H
  25. #define _PCX_H
  26. #define PCX_ERROR_NONE 0
  27. #define PCX_ERROR_OPENING 1
  28. #define PCX_ERROR_NO_HEADER 2
  29. #define PCX_ERROR_WRONG_VERSION 3
  30. #define PCX_ERROR_READING 4
  31. #define PCX_ERROR_NO_PALETTE 5
  32. #define PCX_ERROR_WRITING 6
  33. #define PCX_ERROR_MEMORY 7
  34. // Reads filename into bitmap bmp, and fills in palette. If bmp->bm_data==NULL,
  35. // then bmp->bm_data is allocated and the w,h are filled.
  36. // If palette==NULL the palette isn't read in. Returns error code.
  37. extern int pcx_read_bitmap( char * filename, grs_bitmap * bmp, int bitmap_type, ubyte * palette );
  38. // Writes the bitmap bmp to filename, using palette. Returns error code.
  39. extern int pcx_write_bitmap( char * filename, grs_bitmap * bmp, ubyte * palette );
  40. extern char *pcx_errormsg(int error_number);
  41. #endif
  42.