Mail Archives: djgpp/2000/06/30/04:21:18
Sinan_Unur AT mail DOT com (A. Sinan Unur) writes:
> as for BITMAP and PALLETE, all one should care about is the API
> through which you access these structures (that is the whole point
> why you are provided with a BITMAP data type rather than an array of
> int.) further, BITMAP and PALLETE are logically separate concepts
> regardless of any affinity that might exist between their underlying
> implementations.
And in fact, there isn't any.
typedef struct BITMAP /* a bitmap structure */
{
int w, h; /* width and height in pixels */
int clip; /* flag if clipping is turned on */
int cl, cr, ct, cb; /* clip left, right, top and bottom values */
GFX_VTABLE *vtable; /* drawing functions */
void (*write_bank)(); /* write bank selector, see bank.s */
void (*read_bank)(); /* read bank selector, see bank.s */
void *dat; /* the memory we allocated for the bitmap */
int bitmap_id; /* for identifying sub-bitmaps */
void *extra; /* points to a structure with more info */
int line_ofs; /* line offset (for screen sub-bitmaps) */
int seg; /* bitmap segment */
unsigned char *line[0]; /* pointers to the start of each line */
} BITMAP;
vs.
typedef struct RGB
{
unsigned char r, g, b;
unsigned char filler;
} RGB;
typedef RGB PALLETE[PAL_SIZE];
No similarities whatever.
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -