mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 20:04:37 +00:00
small fixes
This commit is contained in:
@@ -2186,10 +2186,10 @@ public final class SWF implements TreeItem, Timelined {
|
||||
sb.append("\tvar frame_cnt = ").append(timeline.getFrameCount()).append(";\r\n");
|
||||
sb.append("\tframe = frame % frame_cnt;\r\n");
|
||||
sb.append("\tswitch(frame){\r\n");
|
||||
int maxDepth = timeline.getMaxDepth();
|
||||
for (int frame = 0; frame < frames.size(); frame++) {
|
||||
sb.append("\t\tcase ").append(frame).append(":\r\n");
|
||||
Frame frameObj = timeline.frames.get(frame);
|
||||
int maxDepth = timeline.getMaxDepth();
|
||||
for (int i = 1; i <= maxDepth; i++) {
|
||||
if (!frameObj.layers.containsKey(i)) {
|
||||
continue;
|
||||
@@ -2246,7 +2246,8 @@ public final class SWF implements TreeItem, Timelined {
|
||||
List<SvgClip> clips = new ArrayList<>();
|
||||
List<String> prevClips = new ArrayList<>();
|
||||
|
||||
for (int i = 1; i <= timeline.getMaxDepth(); i++) {
|
||||
int maxDepth = timeline.getMaxDepth();
|
||||
for (int i = 1; i <= maxDepth; i++) {
|
||||
for (int c = 0; c < clips.size(); c++) {
|
||||
if (clips.get(c).depth == i) {
|
||||
exporter.setClip(prevClips.get(c));
|
||||
@@ -2386,7 +2387,8 @@ public final class SWF implements TreeItem, Timelined {
|
||||
List<Clip> clips = new ArrayList<>();
|
||||
List<Shape> prevClips = new ArrayList<>();
|
||||
|
||||
for (int i = 1; i <= timeline.getMaxDepth(); i++) {
|
||||
int maxDepth = timeline.getMaxDepth();
|
||||
for (int i = 1; i <= maxDepth; i++) {
|
||||
for (int c = 0; c < clips.size(); c++) {
|
||||
if (clips.get(c).depth == i) {
|
||||
g.setClip(prevClips.get(c));
|
||||
@@ -2424,7 +2426,7 @@ public final class SWF implements TreeItem, Timelined {
|
||||
Matrix drawMatrix = new Matrix();
|
||||
int drawableFrameCount = drawable.getNumFrames();
|
||||
if (drawableFrameCount == 0) {
|
||||
continue;
|
||||
drawableFrameCount = 1;
|
||||
}
|
||||
int dframe = (time + layer.time) % drawableFrameCount;
|
||||
if (character instanceof ButtonTag) {
|
||||
|
||||
@@ -465,7 +465,7 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
|
||||
return Kernel32.INSTANCE.GetLastError();
|
||||
}
|
||||
int readNow = ibr.getValue();
|
||||
System.arraycopy(data, readNow, res, read, readNow);
|
||||
System.arraycopy(data, 0, res, read, readNow);
|
||||
read += readNow;
|
||||
}
|
||||
return 0;
|
||||
@@ -475,7 +475,7 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
|
||||
// ignore
|
||||
}
|
||||
if (result != 0) {
|
||||
if (result == Kernel32.ERROR_BROKEN_PIPE) {
|
||||
if (result == Kernel32.ERROR_BROKEN_PIPE || result == -1) {
|
||||
restartFlashPlayer();
|
||||
throw new IOException("Pipe read error.");
|
||||
} else {
|
||||
|
||||
@@ -248,8 +248,9 @@ public class TimelineBodyPanel extends JPanel implements MouseListener {
|
||||
if (p.x >= timeLine.getFrameCount()) {
|
||||
p.x = timeLine.getFrameCount() - 1;
|
||||
}
|
||||
if (p.y > timeLine.getMaxDepth()) {
|
||||
p.y = timeLine.getMaxDepth();
|
||||
int maxDepth = timeLine.getMaxDepth();
|
||||
if (p.y > maxDepth) {
|
||||
p.y = maxDepth;
|
||||
}
|
||||
frameSelect(p.x, p.y);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,8 @@ public class Timeline {
|
||||
Frame fr = this.frames.get(frame);
|
||||
sounds.addAll(fr.sounds);
|
||||
soundClasses.addAll(fr.soundClasses);
|
||||
for (int d = this.getMaxDepth(); d >= 0; d--) {
|
||||
int maxDepth = this.getMaxDepth();
|
||||
for (int d = maxDepth; d >= 0; d--) {
|
||||
DepthState ds = fr.layers.get(d);
|
||||
if (ds != null) {
|
||||
CharacterTag c = swf.characters.get(ds.characterId);
|
||||
@@ -208,7 +209,8 @@ public class Timeline {
|
||||
public void getObjectsOutlines(int frame, int time, int ratio, DepthState stateUnderCursor, int mouseButton, Matrix transformation, List<DepthState> objs, List<Shape> outlines) {
|
||||
Frame fr = this.frames.get(frame);
|
||||
Stack<Clip> clips = new Stack<>();
|
||||
for (int d = this.getMaxDepth(); d >= 0; d--) {
|
||||
int maxDepth = this.getMaxDepth();
|
||||
for (int d = maxDepth; d >= 0; d--) {
|
||||
Clip currentClip = null;
|
||||
for (int i = clips.size() - 1; i >= 0; i--) {
|
||||
Clip cl = clips.get(i);
|
||||
@@ -277,7 +279,8 @@ public class Timeline {
|
||||
Frame fr = this.frames.get(frame);
|
||||
Area area = new Area();
|
||||
Stack<Clip> clips = new Stack<>();
|
||||
for (int d = this.getMaxDepth(); d >= 0; d--) {
|
||||
int maxDepth = this.getMaxDepth();
|
||||
for (int d = maxDepth; d >= 0; d--) {
|
||||
Clip currentClip = null;
|
||||
for (int i = clips.size() - 1; i >= 0; i--) {
|
||||
Clip cl = clips.get(i);
|
||||
@@ -345,7 +348,8 @@ public class Timeline {
|
||||
|
||||
private boolean isSingleFrame(int frame) {
|
||||
Frame frameObj = frames.get(frame);
|
||||
for (int i = 1; i <= getMaxDepth(); i++) {
|
||||
int maxDepth = this.getMaxDepth();
|
||||
for (int i = 1; i <= maxDepth; i++) {
|
||||
if (!frameObj.layers.containsKey(i)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user