home *** CD-ROM | disk | FTP | other *** search
- /*
- splash.h
-
- % declarations for PC display stuff
-
- 5/16/89 by Ted.
-
- OWL-PC 1.2
- Copyright (c) 1989 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 3/28/90 jmd ansi-fied
- 9/24/90 ted Added structure tags in struct - defining macros.
- */
- /* -------------------------------------------------------------------------- */
- /* Splash Image File I/O related definitions */
-
- typedef unsigned long S_LoadMask;
-
- #define ID_SPLASH 0x3250 /* 'P2' */
-
- #define T_PIXMAP 0x4D50 /* 'PM' */
- #define T_COLMAP 0x4D43 /* 'CM' */
-
- #define B_PIXMAP 0x0001L
- #define B_COLMAP 0x0008L
-
- /* Pixmap compression types */
- #define PMC_None 0
- #define PMC_Brun 1
- /* -------------------------------------------------------------------------- */
-
- typedef struct _STifPtr {
- unsigned short tag;
- unsigned long foffset;
- } S_TifPtr;
-
- typedef byte S_RGB[3]; /* red, green, blue: normalized color triplet */
-
- #define S_MAXTAGS 20
-
- #define S_FileHdr_def(n) \
- { unsigned short ident; unsigned short nentries; S_TifPtr tags[n]; }
- typedef struct _S_FileHdr S_FileHdr_def(S_MAXTAGS) S_FileHdr;
- typedef struct _S_FileHdr1 S_FileHdr_def(1) S_FileHdr1;
-
- #define S_MAXCOLORS 256
-
- #define S_Colmap_def(n) \
- { unsigned short firstpix; unsigned short nentries; S_RGB rgblevs[n]; }
- typedef struct _S_Colmap S_Colmap_def(S_MAXCOLORS) S_Colmap;
-
- typedef struct _SPixmap {
- unsigned long pixbuf; /* pointer to pixel map memory buffer. */
- unsigned short bytewidth; /* number of bytes in a line of image. */
- unsigned short width, height; /* width and height of pixel image. */
- byte nshift; /* number of unused pixels at left of each line */
- byte onboard; /* flag for pixbuf in display memory */
- byte nplanes; /* number of bitplanes in image. */
- byte pixbits; /* number of bits per pixel in a plane. */
- byte rbits; /* number of bits per pixel of red value */
- byte gbits; /* number of bits per pixel of green value */
- byte bbits; /* number of bits per pixel of blue value */
- byte comptype; /* type of compression applied to pixbuf */
- } S_Pixmap;
-
- #define S_pmwidth(pm) (pm)->width
- #define S_pmheight(pm) (pm)->height
- #define S_pmcomptype(pm) (pm)->comptype
-
- /* PCSPLASH.C - Note: for PC only */
- extern pmap_type pmap_LoadSplash(FILE *fd, ocolmap_type crange);
- /* -------------------------------------------------------------------------- */
-