Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Neff

2-D Sprite Rotation in DX8 (C++)

This topic is 6087 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 want to be able to rotate a sprite in my DirectDraw program at ANY angle. I don''t want to have a big file with all the rotated images; I need some code to do that. If anyone out there knows how to do this, please tell me! I do have some code: //blah, blah... C[0] = Bitmap_DC.GetPixel(c1x + p1x,c1y + p1y); if(C[0] !=clrBack&&C[0] !=CLR_INVALID) ::SetPixel(theHDC,c1x + p2x+XX+modX, c1y + p2y+YY+modY, C[0]); //etc... But I want to do that using DirectX. So, please help! Thanks. neffpc@hotmail.com

Share this post


Link to post
Share on other sites
Advertisement
The easiest way is to probably use 2d textured polys for sprites and use the D3DX matrix rotation functions on them.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!