From: "Tony O'Bryan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Accessing BITMAP *bmp under DJGPP Date: Thu, 08 Jan 1998 13:33:06 -0600 Organization: Southwest Missouri State University Lines: 18 Message-ID: <34B529F2.77B@nic.smsu.edu> References: <34B4AEF1 DOT 34CA AT ns DOT sympatico DOT ca> Reply-To: aho450s AT nic DOT smsu DOT edu NNTP-Posting-Host: clark.a46.smsu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Dave Nugent wrote: > some of the Allegro graphics functions. Is there a way I can use > the BITMAP setup and still allow my routines to draw in this array? > Or is there a way I can point BITMAP *bmp to my buffer? Or does it > have to be created through create_bitmap? The BITMAP structure contains two ways to directly access the bitmap memory. You can use the void *data pointer or the unsigned char *line[0] pointers. The data pointer points to the first byte of the linear bitmap memory, and the line[] pointers point to the first byte of each scanline. line[0] and data both point to the first byte of the buffer, so take your pick which one you want to use. They both are useful for different approaches. -- Tony O'Bryan http://www.geocities.com/SiliconValley/Park/7201