home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / SPLASH.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  2.2 KB  |  68 lines

  1. /*
  2.     splash.h
  3.  
  4.     % declarations for PC display stuff
  5.  
  6.     5/16/89  by Ted.
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1989 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14. /* -------------------------------------------------------------------------- */
  15. /* Splash Image File I/O related definitions */
  16.  
  17. typedef unsigned long S_LoadMask;
  18.  
  19. #define ID_SPLASH        0x3250    /* 'P2' */
  20.  
  21. #define T_PIXMAP        0x4D50    /* 'PM' */
  22. #define T_COLMAP        0x4D43    /* 'CM' */
  23.  
  24. #define B_PIXMAP        0x0001L
  25. #define B_COLMAP        0x0008L
  26.  
  27. /* Pixmap compression types */
  28. #define PMC_None    0
  29. #define PMC_Brun    1
  30.  
  31. #define S_MaxColors        256
  32. /* -------------------------------------------------------------------------- */
  33. typedef struct {
  34.     unsigned short tag;
  35.     unsigned long foffset;
  36. } S_TifPtr;
  37. /* -------------------------------------------------------------------------- */
  38. typedef byte S_RGB[3];        /* red, green, blue: normalized color triplet */
  39.  
  40. #define S_FileHdr(n)    \
  41.  struct { unsigned short ident; unsigned short nentries; S_TifPtr tags[n]; }
  42.  
  43. #define S_Colmap(n)            \
  44.  struct { unsigned short firstpix; unsigned short nentries; S_RGB rgblevs[n]; }
  45.  
  46. typedef struct {
  47.     unsigned long    pixbuf;        /* pointer to pixel map memory buffer. */
  48.     unsigned short    bytewidth;    /* number of bytes in a line of image. */
  49.     unsigned short    width, height; /* width and height of pixel image. */
  50.     byte    nshift;                /* number of unused pixels at left of each line */
  51.     byte    onboard;            /* flag for pixbuf in display memory */
  52.     byte    nplanes;            /* number of bitplanes in image. */
  53.     byte    pixbits;            /* number of bits per pixel in a plane. */
  54.     byte    rbits;                /* number of bits per pixel of red value */
  55.     byte    gbits;                /* number of bits per pixel of green value */
  56.     byte    bbits;                /* number of bits per pixel of blue value */
  57.     byte    comptype;            /* type of compression applied to pixbuf */
  58. } S_Pixmap;
  59.  
  60. #define S_pmwidth(pm)        (pm)->width
  61. #define S_pmheight(pm)        (pm)->height
  62. #define S_pmcomptype(pm)    (pm)->comptype
  63.  
  64. /* pcsplash.c - Note: for PC only */
  65. extern pmap_type pmap_LoadSplash(_arg2(FILE *fd, ocolmap_type crange));
  66. /* -------------------------------------------------------------------------- */
  67.  
  68.