Newsgroups: comp.os.msdos.djgpp From: tob AT world DOT std DOT com Subject: Re: allegro quetion Message-ID: Sender: tob AT world DOT std DOT com (Tom Breton) Reply-To: tob AT world DOT std DOT com Organization: BREnterprises References: <01bca9d7$9a404fa0$5bf141c2 AT liquid-machine> Date: Sun, 17 Aug 1997 16:45:32 GMT Lines: 39 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk "Filipe Marques de Almeida" writes: > sorry for the dumb question but i am kind of new to djgpp and allegro It's not a dumb question, especially compared to another question I just saw... }:) > is there a problem of using something like this for memory bitmaps > > BITMAP *bitmap; > unsigned char *map; > > map = bitmap->line[0]; > > and then using map for accessing in a linear way. > > my question is: > are the memory bitmaps always one chunk (like graph mode 0x13) or is there > the danger of the bitmaps getting fragmented Generally one chunk but not always. Memory bitmaps (What you make with create_bitmap) will always AFAIK be a single contiguous chunk. Screen bitmaps will depend on what mode you are in. The standard VGA modes will be linear, AFAIK. Banked modes -- generally, any screen-size so big that you need SVGA to display it -- are not linear. Shawn already provided some support for what you want. This function will tell you what you want to know: [From allegro.txt] int is_linear_bitmap(BITMAP *bmp); Returns TRUE if bmp is a linear bitmap, ie. a memory bitmap, mode 13h screen, or SVGA screen. Linear bitmaps can be used with the _putpixel(), _getpixel(), bmp_write_line(), and bmp_read_line() functions. [End inclusion from allegro.txt] Tom