Sign in to follow this  

GDI Image help pls...

This topic is 3952 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 am creating a pong game and it is in GDI++. I am using VS2005 and currently started implementing the GDI bitmaps. I currently have one starry image loaded in the background, however I created some images in photoshop where I moved the front layer of stars to make it look as if the background is moving. Now in class we went over using sprite sheets, however I was wondering if there was a way to rotate through images for the background of my game using a flip option or something. I rememeber in VB, when I played around with it, I was able to load up a number of bitmaps and then it would cycle through them. This is essentially what I am trying to do using bitblt or something. Any direction would be great. Thanks all! X

Share this post


Link to post
Share on other sites
Well, you could just create a vector<HBITMAP> Bitmaps; and int iCurrentBitmap; and each animation frame increase current bitmap by one. Then, when drawing calls, you would just call SelectObject(HDC, Birtmaps[iCurrentBitmap]); and blit that.

I hope I understood your inquiry correctly.

Share this post


Link to post
Share on other sites
Koobazaur you understood perfectly and that sounds great. going to go implement it now. Thanks so much for the help.

Share this post


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