• Advertisement

Archived

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

Rotating images with DirectDraw

This topic is 6251 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

Call me old fashioned, but I still use DD and DX 7... I have never gotten far enough in a worthwhile game to use the rotation member of the bltfx struct (read: all my other finished games didn''t require it). I just wrote a simple test becase I have never used it, and it doesn''t work! I can blt my image plain, but not with the rotationangle flag specified. I still get the FPS counter on the screen, just no tilted image. I use code that looks like this:
lpddsback->Blt(&DestRect, TestImage, NULL, DDBLT_ROTATIONANGLE | DDBLT_WAIT, &ddbltfx);
 
When I omit the DDBLT_ROTATIONANGLE flag, everything works normally, when I use it I get a blank screen and an FPS counter Any ideas? --------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming

You are unique. Just like everybody else.

Yanroy@usa.com

Visit the ROAD Programming Website for more programming help.

Share this post


Link to post
Share on other sites
Advertisement
Most hardware does not support the DDBLT_ROTATIONANGLE flag. If you want to rotate an image you must do it through software (you need to look the surface and take care of the blitting yourself). I have an example of this on my webpage.


Useless Code

Share this post


Link to post
Share on other sites
You can use other flags to flip an image horizontally or vertically (or both) for the blit, but you can''t use DDBLT_ROTATIONANGLE, unfortunately. I had the misfortune to find that out myself, a while back. I thought the DD programmers would at least have written code for HEL support...

-----------

C++ is the language of the not-so-ancients.
Learn to speak it well.


BeamMeUp

Share this post


Link to post
Share on other sites

  • Advertisement