cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/14/23:16:51

From: ludvig <ludvig AT club-internet DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro - PALLETE and BITMAP
Date: Mon, 15 Sep 1997 00:28:38 +0200
Organization: Grolier Interactive Europe
Lines: 25
Message-ID: <341C6515.34F7@club-internet.fr>
References: <QVfuBCAC0XC0EwLe AT mcoolie DOT demon DOT co DOT uk>
Reply-To: ludvig AT club-internet DOT fr
NNTP-Posting-Host: ppp-108-144.villette.club-internet.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mike Coulson wrote:
> 
>         At the start of the Allegro example program number 18, the
> following lines appear:
> 
>         PALLETE my_pallete;
>         BITMAP *scr_buffer;
> 
> Can someone tell me why the BITMAP has to be a pointer to the buffer
> scr_buffer, whereas my_pallete is not a pointer?
> 
> Yes.
> I am a beginner.
> 
> Thanks,
> --
> Mike Coulson

I just guess that PALLETE is a struct with a special size(3*256bytes)
where a ordinary bitmap might be as big or small as you wish(if you got
enough memory ofcourse:) therefore a pointer is nessecary to the bitmap
as it's size might be decided at runtime=compiler can't make room for
something with the size "unknown".

Ludvig

- Raw text -


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