Jump to content
  • Advertisement
Sign in to follow this  
u235

Allegro transparency

This topic is 4852 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

I haven't used Allegro in years, so I am a bit rusty with it, but I have a quick question. I am using Allegro 4.2.0 and I remember reading in the docs from 4.0 that in 32-bit bitmaps, all the hot pink(max red, max blue) pixels would be skipped however it doesn't seem to be working. I have tried both the load_bmp and load_bitmap functions with same results. Anyone know what could be going on? And for all the smart asses out there, yes I am sure the bitmaps are 32-bit, lol [wink]. Thanks for the help. -AJ

Share this post


Link to post
Share on other sites
Advertisement
Umm! Did you tell your program what color depth to be using. Because if you don't I believe allegro defaults in 8 bit.

Example:

//Set up screen properties
set_color_depth(32);
int ret = set_gfx_mode(MODE, WIDTH, HEIGHT, 0, 0);
if (ret != 0) {
allegro_message(allegro_error);
return 1;
}

Share this post


Link to post
Share on other sites
Seems obvious, but make sure you're calling a draw_sprite function or one of its derivatives -- regular blitting doesn't account for transparency. (Sans masked_blit)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!