From: Ronald Landheer Newsgroups: comp.os.msdos.djgpp Subject: Re: BITMAP info Date: Sat, 27 Jan 2001 19:31:47 -0100 Lines: 38 Message-ID: <3A734C53.E2D23501@libertysurf.fr> References: <3a730d46_3 AT corp DOT newsfeeds DOT com> NNTP-Posting-Host: dyn-213-36-108-153.ppp.libertysurf.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news4.isdnet.net 980689648 8554 213.36.108.153 (28 Jan 2001 13:47:28 GMT) X-Complaints-To: abuse AT isdnet DOT net NNTP-Posting-Date: 28 Jan 2001 13:47:28 GMT X-Mailer: Mozilla 4.7 [nl] (Win98; U) X-Accept-Language: nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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