How do I get a good palette using Allegro?
Ok, here''s my problem:
I have just downloaded DJGPP and Allegro. And I have gotten a bitmap to appear on the screen. But the problem is when I trid to get two bitmaps to appear. I get them to appear bu only one looks good. The otherone has the same palette as the first one, witch screw things up.
How do I get a good palette?
"To some its a six-pack, to me it's a support group."
I usually just make one large picture in Paint Shop Pro that contains all of my backgrounds, sprites, and information displays that I want to show on the screen at the same time and then save this "super Image''s" palette and use it for everything.
Amazon babes are cool.
Let me illustrate Tenshi's idea with some code::
BITMAP *bmp1, *bmp2, *pal_bmp;
PALLETE the_pal;
set_gfx_mod(blablabla);
bmp1 = load_bitmap("bmp1.bmp", the_pal);
bmp2 = load_bitmap("bmp2.bmp", the_pal);
pal_bmp = load_bitmap("palette.bmp", the_pal);
set_palette(the_pal);
Notice that you load the palette bmp last. This is important.
Or you can just go with 16, 24 or 32 bit color modes.
/. Muzzafarath
Edited by - Muzzafarath on 3/25/00 2:10:11 PM
BITMAP *bmp1, *bmp2, *pal_bmp;
PALLETE the_pal;
set_gfx_mod(blablabla);
bmp1 = load_bitmap("bmp1.bmp", the_pal);
bmp2 = load_bitmap("bmp2.bmp", the_pal);
pal_bmp = load_bitmap("palette.bmp", the_pal);
set_palette(the_pal);
Notice that you load the palette bmp last. This is important.
Or you can just go with 16, 24 or 32 bit color modes.
/. Muzzafarath
Edited by - Muzzafarath on 3/25/00 2:10:11 PM
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement