Mail Archives: djgpp/2000/06/30/16:45:15
On Thu, 29 Jun 2000 22:48:11 -0400, Radical NetSurfer
<radsmail AT juno DOT com> wrote:
>This whole entire discussion was started, when I kept getting
>SEGFAULTS (what I called "core-dumps")
>
>What my projected needed (needs) is to be able to dynamically,
>on-the-fly, create an ARRAY of BITMAP*'s and an equal number
>of PALETTE's....
If they're in an equal number, why not just make a new class?
/********** 8< **********/
typedef struct PalBmp
{
PALETTE pal; /* 256 RGB[A] records */
BITMAP *bmp; /*
}
PalBmp *images;
void AllocImages(int nImages)
{
images = malloc(sizeof(PalBmp) * nImages);
}
/********** 8< **********/
But you still can't display more than one 256-color palette on a
256-color screen.
>THEN to properly reference
images[123].bmp
images[123].pal
>and when done, of course, a convenient way to destroy them.
free(images);
images = NULL;
>Fortunately, for 1600x1200 screen modes, this comes to less
>than 4000 bitmaps (most of which are small, but all true color).
If they're truecolor, you don't need PALETTEs at all! In that case,
you can just make an array of BITMAP *.
--
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -