2D DirectDraw BMP-Rotation

Started by
5 comments, last by SlimShady38 24 years, 3 months ago
How do you rotate a Bitmap thats been loaded into an offscreen buffer by using an arbitrary angle. I NEED THIS ANSWER FOR A 2D FLYING GAME THAT''S DUE NEXT THURSDAY ON MY BOSS(father)''S DESK FOR HIM TO BUNDLE WITH NEW PC''S. THANKS!!!!!!!
Advertisement
Your still trying to figure out how to rotate a bitmap, and you have to have the game done by thursday?

must be some game.

How did you want to rotate the bitmap? DirectX? OpenGL? Glide? or software rotation?
William Reiach - Human Extrodinaire

Marlene and Me


Ok, if you''re 3d card can handle 2d hardware rotation, you could use that with the Blt function in Direct Draw.
But if you don''t have that you''ll have to use software. Take a look at this article which explains what you have to do:

http://www.gamedev.net/reference/programming/graphics/article811.asp
You should render each frame of your plane''s rotation, like it is done in the DX SDK sample programs. It is the easiest and fastest way...

Bye
Hey I''m Using DX (So use Hardware). It''s for the Missile graphics. They don''t need to change after I start rendering them. I just need to turn the surface it''s loaded in to the angle the ship shoots at. I got it to shoot pixels right but you don''t need to rotate a pixel. The missile will fly in a straight line.
Hey I''m Using DX (So use Hardware). It''s for the Missile graphics. They don''t need to change after I start rendering them. I just need to turn the surface it''s loaded in to the angle the ship shoots at. I got it to shoot pixels right but you don''t need to rotate a pixel. The missile will fly in a straight line.
Related Question: How do you use lpDDSBack->Blt();

I figured out it can be rotated from there, but i can even get it to render from here.

thanks

This topic is closed to new replies.

Advertisement