Mail Archives: djgpp/2001/01/28/08:51:31
23yrold3yrold schreef:
> Hello. I've been trying to find the BITMAP structure in Allegro's source
> code, is it in there somewhere? I'm interested in writing my own blitting
> routines (as well as writing my own graphics file format) but I can't find
> all the information I need in those source files; I've been using them to
> learn this stuff. Any help anyone?
In any case, it's documented in the documentation that comes with
Allegro, but here it is, from the allegro.h header file:
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)(void); /* write bank selector, see bank.s */
void (*read_bank)(void); /* 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 x_ofs; /* horizontal offset (for sub-bitmaps)
*/
int y_ofs; /* vertical offset (for sub-bitmaps) */
int seg; /* bitmap segment */
unsigned char *line[0]; /* pointers to the start of each line
*/
} BITMAP;
Ye might want to look in there for any other stuff you're looking for as
well - it was pretty easy to find..
Greetz!
Ronald
- Raw text -