View Single Post
 
Old 03-27-2008, 11:25 PM
SG57's Avatar
SG57 SG57 is offline
Homebrew Idol 2 Winner
PSP Guru
 

Join Date: Apr 2007
Location: Washington
Posts: 1,568
SG57 Has a Beginner Reputation
Default

Hey guys, here's a class I made to make handling animations in OSlib much easier.

oslAnimLib

Here's a class for you OSlib users, capable of handling multiple image and spritesheet animations - any size, your only limit is the RAM and OSlib's PNG-format-only restriction. As a benchmark for you - about 175 160x172 PNG images is where it'll fill up either completely or be very close to.

The documentation and example usage is in the header itself (on the important stuff, some of the stuff is a given) so no need for some online documenation, however it would be nice. (i may do it later) The sample should also aid in your understanding (not really that hard though)

It's a C++ class so for you C users out there do the following to use it, note this information is also in the header file so you don't need to reference back here each time:

Add -lstdc++ to your LIBS makefile line
Change your source file's extension to .cpp INSTEAD of .c

That should do it (you may find using a C/C++ combo better then just C).

Didn't take long at all to write, but debugging took some time

The sample is straightforward and easy to follow. You'll find using this for animations gives you the same amount of control as an image does - rotation, scaling, etc. and then things like animation speed, looping, reversed animation, etc.

Credits:
Inspired by Grimfate's animLib in Lua
yaustar for his help with a troubling vector situation
Brunni for Oslib (PSdonkey for keeping oslib alive :D)

thanks and I hope this comes in handy :bucktooth:

DOWNLOAD

Screens of the sample (hopefully my bandwidth is ok from the neoflash competition :S):




Tell me what you think and what should be changed and if you are more experienced maybe add on to it...?

Thanks
__________________
...at what speed must I live.. to be able to see you again?...

Win money while playing Kitten Cannon!

Check out all my work on my new site - from Kitten Cannon to Boxhead to Light Cycle 3D
Reply With Quote