Rotating Images in Classic

Posts: 608
Joined: 2002.04
Post: #1
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...
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
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
Quote this message in a reply
Posts: 337
Joined: 2002.04
Post: #3
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).
Quote this message in a reply
Posts: 522
Joined: 2002.04
Post: #4
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Classic console development kits, samples (Atari, Nintendo, Sega, Neo Geo, etc.) smccd 18 30,826 Mar 26, 2016 03:40 PM
Last Post: smccd
  Rotating a triangle to vertical. Joseph Duchesne 5 5,411 Apr 14, 2006 05:18 PM
Last Post: unknown
  Disfigurement When Rotating Objects Nick 19 12,590 Mar 18, 2005 10:08 PM
Last Post: tigakub