www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/02/22:15:51

From: wavemist AT ix DOT netcom DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro Bitmap Question 2
Date: Mon, 03 Aug 1998 01:57:50 GMT
Organization: ICGNetcom
Lines: 20
Message-ID: <35c518fc.142745@nntp.ix.netcom.com>
References: <000001bdbe36$bbf5c700$d14e08c3 AT arthur>
NNTP-Posting-Host: prv-ri4-14.ix.netcom.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, 2 Aug 1998 17:58:12 +0100, "Arthur" <arfa AT clara DOT net> wrote:

>> 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).
>

That was the problem.  Thank you very much for your help.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019