Windows GDI
Hi, me and my friend are writing a Tetris clone game using Windows GDI, or at least trying to, we need to find out how to display a Bitmap on the screen, we have read examples everywhere, but they get to complicated, can someone please help us? We can get the blocks and everything to fall but we need a block to fall, please someone help.
Make a backbuffer with an HBITMAP.
Load your tiles onto another HBITMAP.
Use PatBlt to clear the backbuffer : PatBlt(WinDC,0,0,Width,Height,BLACKNESS);
Use BitBlt to copy your tiles to the blackbuffer.
Use BitBlt or CopyRect to transfer the backbuffer to the window.
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..."
"When you are willing to do that which others are ashamed to do, therein lies an advantage."
Load your tiles onto another HBITMAP.
Use PatBlt to clear the backbuffer : PatBlt(WinDC,0,0,Width,Height,BLACKNESS);
Use BitBlt to copy your tiles to the blackbuffer.
Use BitBlt or CopyRect to transfer the backbuffer to the window.
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..."
"When you are willing to do that which others are ashamed to do, therein lies an advantage."
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement