Skip to main content
gamedev.net
🔒 Locked

Rotating Bitmaps with Directdraw

Started by TMoney Jul 23, 2003 at 2:05 PM 1 replies 200+ views
Original Post
TMoney
TMoney
I''ve searched some on this subject but I didn''t find anything that was definitive. How do I rotate my 2D sprite? My sprite class conatins a CSurface object and a pointer to the GameWorlds CDisplay object. I don''t want to use direct3d stuff. Thanks
EDI
EDI
You will need to lock the surface, read data from the surface
*possibly resize the surface through reallocation* do a rotation function on the image''s original pixels than write the pixels back to the surface memory.

this is going to be very slow,

directdraw was ''supposed'' to have support for rotation but like most things in directdraw support for it is spotty at best.

best to go with Direct3D or some other 3D API,

otherwise your in for a painful journey
and substandard performance at the end of the road.

Raymond Jacobs,
Profesional Web Applications Developer,
Weekend Game Developer,
www.EtherealDarkness.com
TMoney
TMoney
Thanks.

I''ve just looked a a few games using directdraw and it seems they have seperate frames for each increment of the rotation. Yuck. Since this is my first, I will go ahead and take that route and save the 3d stuff for the next project.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.