Fixed FLA export - Sprites which do not end with ShowFrame tag

This commit is contained in:
Jindra Petřík
2023-09-09 20:13:24 +02:00
parent 61b73c6db6
commit ee70e1e3bb
2 changed files with 8 additions and 0 deletions

View File

@@ -3079,6 +3079,7 @@ public class XFLConverter {
Map<Integer, PlaceObjectTypeTag> depthToClipPlace = new HashMap<>();
Map<PlaceObjectTypeTag, Integer> clipFinishFrames = new HashMap<>();
Tag lastTag = null;
for (Tag t : timelineTags) {
if (t instanceof ShowFrameTag) {
f++;
@@ -3103,7 +3104,13 @@ public class XFLConverter {
depthToClipPlace.remove(re.getDepth());
}
}
lastTag = t;
}
//Some sprites do not end with ShowFrame:
if (lastTag != null && !(lastTag instanceof ShowFrameTag)) {
f++;
}
int frameCount = f;