Advertisement

Allegro and transparency

Started by November 15, 2000 02:19 PM
2 comments, last by whiteLightning 24 years, 1 month ago
I was wondering how you can set a certain color as transparent when using the allegro graphics library. I''m makina a platform game and i want the background to show through my sprites. What should I do?
If you''re using 8 bit mode, you''ll need to make the transparent areas filled with the color 0 (this is 0 as in palette index). If you''re using true color modes, you''ll need to make the transparent areas bright pink (r = 255, g = 0, b = 255).

instead of using blit, you''ll need to use draw_sprite.

Hope that helps.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Advertisement
Hey, thank you very much, i''ll try that out!
I''ll just add that you can use masked_blit() instead of draw_sprite(), if you want.

==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers

This topic is closed to new replies.

Advertisement