home *** CD-ROM | disk | FTP | other *** search
- #ifndef GIMMELIB_PICTURE_H
- #define GIMMELIB_PICTURE_H
-
- #include "gimmelib/bitplane.h"
-
- #ifdef I_AM_PICTURE
- #define Mk(a,b,c,d) (((ULONG)(a)<<24) | ((ULONG)(b)<<16) \
- | ((ULONG)(c)<<8) | (ULONG)(d))
- #define EVEN(p) ((p+1) & ~1)
-
- #define ID_FORM Mk('F', 'O', 'R', 'M')
- #define ID_ILBM Mk('I', 'L', 'B', 'M')
- #define ID_BMHD Mk('B', 'M', 'H', 'D')
- #define ID_CMAP Mk('C', 'M', 'A', 'P')
- #define ID_DEST Mk('D', 'E', 'S', 'T')
- #define ID_SPRT Mk('S', 'P', 'R', 'T')
- #define ID_CAMG Mk('C', 'A', 'M', 'G')
- #define ID_CRNG Mk('C', 'R', 'N', 'G')
- #define ID_CCRT Mk('C', 'C', 'R', 'T')
- #define ID_BODY Mk('B', 'O', 'D', 'Y')
- #endif I_AM_PICTURE
-
-
- typedef UBYTE Masking;
-
- #define mskNone 0
- #define mskHasMask 1
- #define mskHasTranCol 2
- #define mskLasso 3
-
- typedef UBYTE Compression;
-
- #define cmpNone 0
- #define cmpByteRun1 1
-
- typedef struct _gim_bmh {
- UWORD w,h; /* raster width, height */
- WORD x,y; /* pixel position for this image */
- UBYTE nPlanes; /* number of bit planes */
- Masking masking;
- Compression compression;
- UBYTE pad1; /* unused */
- UWORD transparentColour; /* transparent colour number */
- UBYTE xAspect, yAspect; /* pixel aspect, a ratio width:height */
- WORD pageWidth, pageHeight; /* source page size in pixels */
- } BitMapHeader;
-
- typedef struct {
- UBYTE red,green,blue;
- } ColourRegister;
-
- typedef struct {
- ColourRegister *luts; /* pointer to look up table */
- WORD numLuts; /* number of luts entries */
- } LutTable;
-
- typedef struct {
- WORD x,y; /* relative coordinates */
- } Point2D;
-
- typedef struct {
- UBYTE depth; /* # of bitplanes in original source */
- UBYTE pad1; /* unused... put zero here */
- UWORD planePick; /* how to scatter src into dest */
- UWORD planeOnOff; /* default bitplane data for above */
- UWORD planeMask; /* which bitplanes to store into */
- } DestMerge;
-
- typedef UWORD SpritePrecedence; /* relative precedence, 0 is highest */
-
-
- typedef struct _gim_pic {
- BitMapHeader bmh; /* info for this bitmap */
- SHORT xsize; /* actual width in pixels */
- void *memhead; /* memory-chain allocated for this picture */
- struct BitMap *bm; /* pointer to bitmap struct */
- struct ColorMap colormap; /* actual instance; .ColorTable -> colours */
- ULONG myflags; /* flags about the bitmap */
- struct _gim_pic *next; /* next picture (for future use) */
- } PICTURE;
-
-
- /***
- flags for gimmePicture()
- ==> see flags for gimmeBitPlanes() in <gimmelib/bitplane.h>
- ***/
-
- #endif !GIMMELIB_PICTURE_H
-