Redefined animations and support multiple simultaneous animations
This is a breaking PR that changes how sprite animations are defined. The new change removes the previous limitation of a simple start and end frame pair, and replaces it with the ability to use sequential and out-of-order frames, frame ranges, and variable frame times, all in the same animation.
An example of the new system might look like this
animations = {
myAnimation = {
frame1, frame2, { from = frame3, to = frame7 }, ...
}
}
Single frame animations can be simplified to just myAnimation = 10 and variable frame times can be achieved by using
animations = {
idleclosed = 1,
idleopen = 8,
opening = {
{ from = 2, to = 7 },
{
frameTime = 0.4,
frames = 8
}
},
closing = {
{ from = 8, to = 3 },
{
frameTime = 0.4,
frames = 2
}
}
}
frames here is either a single frame, frame range, or sequence, or combination of those.
This PR also enables support for frame events firing multiple event names. For example:
events = {
[ 33 ] = "rightfootstep",
[ 35 ] = "leftfootstep",
[ 65 ] = { "rightfootstep", "leftfootstep" },
[ 67 ] = { "leftfootstep", "rightfootstep" }
}
This is scheduled for Grid Engine 10 early next year.
I have needed to step away from active development for a while, but this is now pending merge. I'm cleaning upstream up before we add this. Sorry it took two years, @GamerGambit!
What a bad two years.