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
@@ -184,7 +184,11 @@ public class Timeline {
if (ds != null) {
CharacterTag c = swf.characters.get(ds.characterId);
if (c instanceof Timelined) {
int dframe = (time + ds.time) % ((Timelined) c).getTimeline().frames.size();
int frameCount = ((Timelined) c).getTimeline().frames.size();
if (frameCount == 0) {
continue;
}
int dframe = (time + ds.time) % frameCount;
if (c instanceof ButtonTag) {
ButtonTag bt = (ButtonTag) c;
dframe = ButtonTag.FRAME_UP;
@@ -230,7 +234,11 @@ public class Timeline {
int dframe = 0;
if (c instanceof Timelined) {
dframe = ds.time % ((Timelined) c).getTimeline().frames.size();
int frameCount = ((Timelined) c).getTimeline().frames.size();
if (frameCount == 0) {
return;
}
dframe = ds.time % frameCount;
if (c instanceof ButtonTag) {
ButtonTag bt = (ButtonTag) c;
dframe = ButtonTag.FRAME_HITTEST;