home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / 2d / pcx.h < prev    next >
Text File  |  1998-06-08  |  1KB  |  52 lines

  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.  
  25.  
  26.  
  27. #ifndef _PCX_H
  28. #define _PCX_H
  29.  
  30. #define PCX_ERROR_NONE                 0
  31. #define PCX_ERROR_OPENING            1
  32. #define PCX_ERROR_NO_HEADER        2
  33. #define PCX_ERROR_WRONG_VERSION    3
  34. #define PCX_ERROR_READING            4
  35. #define PCX_ERROR_NO_PALETTE        5
  36. #define PCX_ERROR_WRITING            6
  37. #define PCX_ERROR_MEMORY            7
  38.  
  39. // Reads filename into bitmap bmp, and fills in palette.  If bmp->bm_data==NULL, 
  40. // then bmp->bm_data is allocated and the w,h are filled.  
  41. // If palette==NULL the palette isn't read in.  Returns error code.
  42.  
  43. extern int pcx_read_bitmap( char * filename, grs_bitmap * bmp, int bitmap_type, ubyte * palette );
  44.  
  45. // Writes the bitmap bmp to filename, using palette. Returns error code.
  46.  
  47. extern int pcx_write_bitmap( char * filename, grs_bitmap * bmp, ubyte * palette );
  48.  
  49. extern char *pcx_errormsg(int error_number);
  50.  
  51. #endif
  52.