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

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/2d/rcs/pcx.h $
  15.  * $Revision: 1.4 $
  16.  * $Author: john $
  17.  * $Date: 1995/01/21 17:07:34 $
  18.  * 
  19.  * Routines to read/write pcx images.
  20.  * 
  21.  * $Log: pcx.h $
  22.  * Revision 1.4  1995/01/21  17:07:34  john
  23.  * Added out of memory error.
  24.  * 
  25.  * Revision 1.3  1994/11/29  02:53:10  john
  26.  * Added error messages; made call be more similiar to iff.
  27.  * 
  28.  * Revision 1.2  1994/11/28  20:03:48  john
  29.  * Added PCX functions.
  30.  * 
  31.  * Revision 1.1  1994/11/28  19:57:45  john
  32.  * Initial revision
  33.  * 
  34.  * 
  35.  */
  36.  
  37.  
  38.  
  39. #ifndef _PCX_H
  40. #define _PCX_H
  41.  
  42. #define PCX_ERROR_NONE                 0
  43. #define PCX_ERROR_OPENING            1
  44. #define PCX_ERROR_NO_HEADER        2
  45. #define PCX_ERROR_WRONG_VERSION    3
  46. #define PCX_ERROR_READING            4
  47. #define PCX_ERROR_NO_PALETTE        5
  48. #define PCX_ERROR_WRITING            6
  49. #define PCX_ERROR_MEMORY            7
  50.  
  51. // Reads filename into bitmap bmp, and fills in palette.  If bmp->bm_data==NULL, 
  52. // then bmp->bm_data is allocated and the w,h are filled.  
  53. // If palette==NULL the palette isn't read in.  Returns error code.
  54.  
  55. extern int pcx_read_bitmap( char * filename, grs_bitmap * bmp, int bitmap_type, ubyte * palette );
  56.  
  57. // Writes the bitmap bmp to filename, using palette. Returns error code.
  58.  
  59. extern int pcx_write_bitmap( char * filename, grs_bitmap * bmp, ubyte * palette );
  60.  
  61. extern char *pcx_errormsg(int error_number);
  62.  
  63. #endif
  64. 
  65.