mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 15:14:49 +00:00
various small fixes
This commit is contained in:
@@ -194,7 +194,7 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
public List<Tag> tags = new ArrayList<>();
|
||||
|
||||
@Internal
|
||||
public boolean hasEndTag;
|
||||
public boolean hasEndTag = true;
|
||||
|
||||
/**
|
||||
* ExportRectangle for the display
|
||||
|
||||
@@ -313,18 +313,6 @@ public class DefineSpriteTag extends CharacterTag implements DrawableTag, Timeli
|
||||
return getTimeline().getFrameCount(); // frameCount
|
||||
}
|
||||
|
||||
private int getRealFrameCount() {
|
||||
int cnt = 1;
|
||||
Timeline timeline = getTimeline();
|
||||
for (int i = 1; i < timeline.getFrameCount(); i++) {
|
||||
if (timeline.getFrame(i).layersChanged) {
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSingleFrame() {
|
||||
if (!isSingleFrameInitialized) {
|
||||
@@ -335,7 +323,7 @@ public class DefineSpriteTag extends CharacterTag implements DrawableTag, Timeli
|
||||
|
||||
private synchronized void initialiteIsSingleFrame() {
|
||||
if (!isSingleFrameInitialized) {
|
||||
if (getRealFrameCount() > 1) {
|
||||
if (getTimeline().getRealFrameCount() > 1) {
|
||||
isSingleFrameInitialized = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,6 +159,19 @@ public class Timeline {
|
||||
return frames.size();
|
||||
}
|
||||
|
||||
public int getRealFrameCount() {
|
||||
ensureInitialized();
|
||||
|
||||
int cnt = 1;
|
||||
for (int i = 1; i < frames.size(); i++) {
|
||||
if (frames.get(i).layersChanged) {
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
public int getFrameForAction(ASMSource asm) {
|
||||
Integer frame = actionFrames.get(asm);
|
||||
if (frame == null) {
|
||||
|
||||
Reference in New Issue
Block a user