Jump to content
  • Advertisement
Sign in to follow this  
cNoob

Transparent on Image Surfaces

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

Hey all i was just mucking around with my computer reading the internet looking for sprites and most of them are animated gif so i thought of a nice little project i could do. It was to make an animation of a smily face look left then right then pause and pull a tounge and just keep looping. The animation looks as follows: Smiley(looks center)->Smiley(looks left)->Smiley(looks center)->Smiley(looks right)->Smiley(looks center)->Smiley(pulls tounge) (Very Artistic) So i first designed a bitmap 384x64 six frames of 64x64 i then added my faces and changed the background from white to black. Then in my code i create a image surface and load my bitmap to it and use RECT to copy a certain part of my bitmap and display it at the center of the screen Sleep for 100ms(I know its not the best for timing) then go onto the next frame. In my code i clear the screen black and it all works great and looks good. But if i change the background from black to another color i have to change the color of the bitmaps background. So is it possible to have transparent with an image surface or will i have to use a texture instead. Thanx for your time cNoob [Edited by - cNoob on November 27, 2005 3:32:17 PM]

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!