pattern animation matrix (the values are not yet ok), small fixes

This commit is contained in:
Honfika
2014-04-27 00:02:35 +02:00
parent 85d793bf64
commit f1374aca6f
4 changed files with 78 additions and 56 deletions

View File

@@ -2413,7 +2413,11 @@ public final class SWF implements TreeItem, Timelined {
DrawableTag drawable = (DrawableTag) character;
SerializableImage img;
Matrix drawMatrix = new Matrix();
int dframe = (time + layer.time) % drawable.getNumFrames();
int drawableFrameCount = drawable.getNumFrames();
if (drawableFrameCount == 0) {
continue;
}
int dframe = (time + layer.time) % drawableFrameCount;
if (character instanceof ButtonTag) {
ButtonTag bt = (ButtonTag) character;
dframe = ButtonTag.FRAME_UP;