iDevGames Forums
Rotating Images in Classic - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Rotating Images in Classic (/thread-7665.html)



Rotating Images in Classic - Josh - Jul 12, 2002 07:50 PM

Anyone know of a way to rotate images in Classic? I would rather not have to include a few million (ok, maybe a hundred or so) rotated images with my app...


Rotating Images in Classic - OneSadCookie - Jul 12, 2002 08:07 PM

QuickTime can rotate images... maybe just in the GraphicsImporter, but that should be good enough. I doubt it would be fast enough that you could rotate them on the fly anyway.

You need to manipulate the matrix it uses to draw the images. The functions are in ImageCompression.h


Rotating Images in Classic - Zwilnik - Jul 13, 2002 11:39 AM

If it's a 2D game, then OpenGL is probably the ideal route if you want to rotate the sprites a lot. If it's a tool/art app etc. then OneSadCookie's suggestion of Quicktime may well be the fastest (that or your own custom routine).


Rotating Images in Classic - aarku - Jul 18, 2002 09:01 AM

There are some routines in SpriteWorld to do that. In version 2.3 they are under BlitPixieRotated.c and I think they could be modified with a little effort for non-SW projects. The are also very fast -meant to be part of animation. But I'd look at the code section about rotating a frame (GWorld) into a new frame. It's a function called CreateRotatedFrameFromFrame I believe.

Good luck.
-Jon