Reply-To: From: "Arthur" To: "DJGPP Mailing List" Subject: RE: Allegro Bitmap Question 2 Date: Sun, 2 Aug 1998 17:58:12 +0100 Message-ID: <000001bdbe36$bbf5c700$d14e08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: <35c48784.1351913@nntp.ix.netcom.com> Importance: Normal Precedence: bulk > Argh! Ok, so I've learned that an 8 pixel by 8 pixel bitmap takes up > 64 bytes in memory...great. Yet for some reason, even if I feed two > identical tiles into memcmp, it claims that they are different. Could > someone please look at the following code and tell me what I'm doing > wrong? This is a program for ripping unique 8 by 8 tiles from a pcx > file. A BITMAP is a structure containing the various elements of the bitmap (including width, height, clipping details etc). You need to access the data part of the structure directly, not the structure itself. The actual picture data is not stored inside the BITMAP structure itself, just pointers to that data. I think this is detailed in the Allegro manual? If you have a BITMAP called fresh_tile, fresh_tile->line[0] will return the address of the start of raw bitmap data in memory (if I remember correctly). James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819