Rotating Images in Classic
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...
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
You need to manipulate the matrix it uses to draw the images. The functions are in ImageCompression.h
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).
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
Good luck.
-Jon
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Classic console development kits, samples (Atari, Nintendo, Sega, Neo Geo, etc.) | smccd | 12 | 10,201 |
Jul 4, 2012 04:34 AM Last Post: smccd |
|
| Rotating a triangle to vertical. | Joseph Duchesne | 5 | 3,228 |
Apr 14, 2006 05:18 PM Last Post: unknown |
|
| Disfigurement When Rotating Objects | Nick | 19 | 6,741 |
Mar 18, 2005 10:08 PM Last Post: tigakub |
|

