Date: Thu, 26 Jun 1997 13:04:28 -0500 (CDT) From: Adam W Lee Message-Id: <199706261804.NAA03968@sendit.sendit.NoDak.edu> To: djgpp AT delorie DOT com Subject: Re: Allegro (bitmap) Precedence: bulk >Adam writes: >>What's the fastest way to get an 'unsigned char Screen[resx*resy]' into an >>Allegro BITMAP? > >The best way is to make them share a region of memory. Either allocate >the buffer as an Allegro BITMAP (by calling create_bitmap()) and then >use bmp->line[0] as the base address of your array, or construct a new >bitmap object around your existing array. That would require a fair >amount of messing with the internals of the BITMAP structure, though, >which is obviously more likely to break with future versions of the >code: look at the source for the create_sub_bitmap() routine (in >graphics.c) to get an idea what you'd have to do... So I'd just say something like char *dat; dat = (char *) screen->line[0]; or something?