home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilss / sprtools / h / sb < prev    next >
Text File  |  1994-07-18  |  3KB  |  64 lines

  1. /************************************************************************
  2.  *                                    *
  3.  * sb.h                                    *
  4.  *                                    *
  5.  * Version 2.00 (24-Jun-1992)                                           *
  6.  *                                                                      *
  7.  * Starbase bitmap file                            *
  8.  * ======== ====== ====                            *
  9.  *                                    *
  10.  *       byte offset    contents                    *
  11.  *       -----------    --------                    *
  12.  *       0              header structure (see below)            *
  13.  *       256            color map (if present)                *
  14.  *       arbitrary +    bitmap data                    *
  15.  *       arbitrary ++   user data (if present)                *
  16.  *                                    *
  17.  *       +  depends upon size of the color map                *
  18.  *       ++ depends upon size of color map and bitmap data        *
  19.  *                                    *
  20.  ************************************************************************/
  21.  
  22.  
  23. typedef struct {
  24.         char file_id[16];       /* "Bitmapfile" */
  25.         int rev;                /* revision of file format */
  26.         char device_id[16];     /* device or driver name (e.g. hp300h) */
  27.         int bm_loc;             /* offset in bytes to start of bitmap
  28.                                    information bytes measured from the start of
  29.                                    the file */
  30.         int eod_loc;            /* byte offset of last byte of HP data in the
  31.                                    file.  User data may be appended after this
  32.                                    point. */
  33.         int xstart,ystart;      /* upper left corner of source in pixels
  34.                                    (This is pixel 0,0 in the file */
  35.         int xlen,ylen;          /* x,y dimensions of bitmap in pixels */
  36.         int bm_mode;            /* format of bitmap data:
  37.                                          -1 -- pixel major full depth,
  38.                                          -2 -- plane major full depth,
  39.                                         >=0 -- plane major, single plane
  40.                                         (source plane was this number.)
  41.                                         (plane 0 = least significant.) */
  42.         int depth;              /* number of bits stored per pixel.  This
  43.                                    indicates how many planes were stored. */
  44.         int pixel_align;        /* alignment of pixel data in the file.
  45.                                    Allowable values are 1 and 8.
  46.                                         1 means every bit is a pixel,
  47.                                         8 means every byte is a pixel. */
  48.         int num_banks;          /* Number of banks. Only relevant for pixel-
  49.                                    major format. */
  50.         int disp_en;            /* display enable mask of source */
  51.         int cmap_mode;          /* color map mode:
  52.                                         0 = normal color mode.
  53.                                         1 = monotonic color mode.
  54.                                         4 = full color mode. */
  55.         int csize;              /* Number of color map entries */
  56.         int back_index;         /* Index value of background color entry in
  57.                                    the color map */
  58.         char hp_extend[100];    /* Reserved for HP extensions */
  59.         char user_extend[64];   /* Reserved for user extensions */
  60. } bf_header;
  61.  
  62. int bf_header_descr[] =
  63.                 { 16,4,16, 4,4, 4,4, 4,4, 4,4,4,4, 4, 4,4, 4, 100,64, -1 };
  64.