Allegro and transparency
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.
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.
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
==================
/* 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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement