home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / GameSmith1-Hisoft-System.DMS / in.adf / GDS_System.lha / include / graphics / loadILBM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-11  |  2.2 KB  |  51 lines

  1. #ifndef GS_LOADILBM
  2. #define GS_LOADILBM
  3.  
  4. #include <exec/types.h>
  5.  
  6. /* The BitMapHeader defined by Commodore: */
  7.  
  8. #ifndef BitMapHeader
  9.  
  10. typedef struct {
  11.   UWORD w,h;                  /* raster width & height in pixels */
  12.   WORD x,y;                   /* pixel position for image (same as xoff & yoff) */
  13.   UBYTE nPlanes;              /* number of bitplanes (without mask if any) */
  14.   UBYTE masking;              /* mask value (see CBM documentation on ILBMs) */
  15.   UBYTE compression;          /* compression algorithm used on image data */
  16.   UBYTE reserved;             /* reserved; ignore on read, write as 0 */
  17.   UWORD transparentColor;     /* transparent color number, usually 0 (background) */
  18.   UBYTE xAspect, yAspect;     /* pixel aspect, a ratio of width to height */
  19.   WORD pageWidth, pageHeight; /* source "page" size in pixels (same as dwidth & dheight) */
  20. } BitMapHeader;
  21.  
  22. #endif
  23.  
  24. struct loadILBM_struct
  25.   {
  26.   unsigned char *file;        /* ptr to ASCIIZ file name to load */
  27.   struct BitMap *bitmap1;       /* ptr to 1st bitmap struct */
  28.   struct BitMap *bitmap2;     /* ptr to 2nd bitmap struct (if any) */
  29.   unsigned long *color_table; /* ptr to color table for image */
  30.   int num_colors;             /* number of color entries in color_table */
  31.   int dheight;                /* display height (filled from file) */
  32.   int dwidth;                 /* display width (filled) */
  33.   int xoff,yoff;              /* X & Y display offsets (filled) */
  34.   int modes;                  /* display modes (filled) */
  35.   int loadx;                  /* X load offset (from left) in bytes */
  36.   int loady;                  /* Y load offset (from top) in rows */
  37.   int flags;                  /* flags */
  38.   unsigned int fill;          /* mask of planes to fill in bitmap(s) */
  39.   unsigned int select;        /* mask of planes to use from file */
  40.   BitMapHeader *bmh;          /* if not NULL, this must point to a valid */
  41.                               /* BitMapHeader defined by Commodore */
  42.   };
  43.  
  44. /* the loadILBM flags: */
  45.  
  46. #define ILBM_COLOR    0x01    /* fill color map with colors from file */
  47. #define ILBM_ALLOC1   0x02    /* allocate one bitmap before loading */
  48. #define ILBM_ALLOC2   0x04    /* allocate two bitmaps before loading */
  49.  
  50. #endif
  51.