PDA

View Full Version : oslAnimLib - Animation Class for OSlib Users



wraggster
March 27th, 2008, 20:06
News/release from sg57:


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 just as amount of control as an image does - rotation, scaling, etc. and then some.

Credits:
Inspired by Grimfate's animLib in Lua
yaustar for his help with a troubling vector situation
Brunni (@ ps2dev) for Oslib

If you do use this, I only ask you state that you used this, by me (sg57), to handle animations.

thanks and I hope this comes in handy

DOWNLOAD (http://jordansg57.googlepages.com/oslAnimLib.rar)
(like 500kb - the animations in the sample give it it's size)

via sg57 (http://forums.qj.net/f-psp-development-forum-11/t-oslanimlib-animation-class-for-oslib-users-137672.html)

gmiscool
March 28th, 2008, 06:32
tenx

phosphorous
March 29th, 2008, 02:46
I also wrote an animation library for OSLib a while back.
Old School Library (OSLib) Sprite Animation Lib (http://www.dcemu.co.uk/vbulletin/showthread.php?t=56726)