Reply-To: From: "Arthur" To: "DJGPP Mailing List" , Subject: RE: BitMap Address Date: Fri, 11 Sep 1998 16:30:22 +0100 Message-ID: <000d01bddd99$176d0f40$664d08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: <6t94il$h2i$1@nnrp1.dejanews.com> Importance: Normal Precedence: bulk > Hi all, > > A guy I work with wants me to do the following: > > " To optimize the project, I need this: every bitmap will be > 128x128 pixels. > I need them to be packed in memory 4 of them in a 64K chunk. The first > bitmap in the group will be at a 64K aligned address, so that the 32bit > pointers will look like this in hex ( xxxx0000 - address of first pixel in > 1'st bitmap) (xxxx0010 - address of first pixel in 2'nd bitmap) > (xxxx1000 > - address of first pixel in 3'rd bitmap) (yyyy0000 - address of > first pixel > in 4'th bitmap) " > > Is this even possible. The screen will be 640x480x8. So > if I read my > documentation correctly, if we used 16, 24, or 32 bit, the > bitmaps will not > be aligned in memory in the first place. We are using Allegro, but I can't > find anyway to load a bitmap at a specific address. So I would > like to know > if the above is possible, and if it is, where should I start > looking. I an > clue-less, Thanks A BITMAP structure contains more than just the raw image data (such as clipping, and the width and height of the image). You'll need to copy the raw image data from inside the structure to a memory space reserved using malloc or similar. The address of the raw image data is your_image->data (where your_image is the BITMAP structure of your choosing). James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819