PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Simpler BlitRotated function for 90deg rotates

At the moment I'm blitting static pieces of scenery to my background using BlitRotated to make them look more varied. This is overkill really and just having them rotated by 90 degree increments would be enough and would free up a lot of processor time. So I want to add a function called BlitRotate90 to my library to allow me to rotate surfaces by 90 degrees faster than using BlitRotated.

I'm lazy so has anybody got any source code to do this? Is it worth adding this function into the official PocketFrog build? Any advice?

Rich

PS. Development of my game Nova Dawn is coming along great at the moment. I can drive around randomly generated maps and I'm going to put in highways to drive along this evening.
Have you received any response to this tread? (maybe in a private message). I have searched in this forum for something similar without results.
If someone has a function like this (and he/she want to share it of course), it will be very usefull for all the PocketFrog comunity.

Thanks in advance folks !!! :D
Please feel free to post a patch on the PocketFrog SourceForge site if you wind up doing this and would like to contribute it.

http://pocketfrog.sourceforge.net

My own personal feeling is that little utility functions like this don't add enough to the library to justify NOT adding it... might as well have the extra convenience, so I for one have no issue with adding it.
I haven't written code to do quick 90 degree rotates yet. What I've done for the moment is modified my copy of PocketFrog as discussed in this thread:

http://www.pocketmatrix.com/forums/view ... tch+mirror

That lets me do flips and mirrors on my sprites as I blit them so I can give them a little more variety.

Rich