Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gak

SetPalette, DDReLoadBitmap and SetScreenMode problems

This topic is 6917 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hmm, I'm having a bit of trouble setting palette. I have this code:
ddrval = g_pDD->SetDisplayMode(640, 480, 8, 0, 0);
 

Then further down:

ddrval = lpDDSPrimary->SetPalette(lpDDPal);
 

And:

ddrval = DDReloadBitmap(lpDDSBack, szBackground);

Now, my problem is that I want to have a higher number of colours available to my screen mode, say 16-bit colour.
However, I cannot save 16-bit colour bitmaps in PSP5. 
Also, when I lower the number of colours in a 16-bit colour bitmap to 8-bit color I get a SetPalette error. 
Hmm, I'm not sure how to make bitmaps from fresh in 16-bit (or even 8-bit) colour and then load them into my prog.
Please help me.
Thanks



Edited by - Gak on 5/7/00 8:01:55 AM     
Edited by - Gak on 5/7/00 8:10:18 AM

Share this post


Link to post
Share on other sites
Advertisement
Well, you can load a 24-bit or 8-bit bitmap on to a 16-bit surface. What I knew is, there''s no 16-bit/15-bit bitmap since hi-color isn''t quite the standard. That''s why you cannot save it in PSP5 or in PhotoShop too.

Anyway, 16-bit color don''t need a palette.

Change your display mode to 16-bit and comment out your ''set palette'' code. The DDLoadBitmap, DDReloadBitmap should work fine.

Share this post


Link to post
Share on other sites
Unfortunately, this is not so. I have commented out the lines which load and set the palette but I'm still getting DDReLoadBitmap errors, even thought the display mode is 640x480x16 and the bitmap is 640x480x24. I've even tried the screen mode as 640x480x32 but to no avail.
Plz help.

Edited by - Gak on 5/7/00 9:26:27 AM

Share this post


Link to post
Share on other sites
It''s been a long time.... I can''t think of anything could be done now. Anyone out here?......... Why not list out some of the codes??

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!