mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 21:08:08 +00:00
@@ -1533,6 +1533,11 @@ public final class SWF implements TreeItem, Timelined {
|
||||
return fframes.size() > pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage next() {
|
||||
if (!hasNext()) {
|
||||
|
||||
@@ -1758,7 +1758,7 @@ public class ActionScriptParser {
|
||||
}
|
||||
}
|
||||
if (lexer.lex().type != SymbolType.EOF) {
|
||||
throw new ParseException("Parsing finisned before end of the file", lexer.yyline());
|
||||
throw new ParseException("Parsing finished before end of the file", lexer.yyline());
|
||||
}
|
||||
return retTree;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,9 @@ config.description.openMultipleFiles = Allows opening multiple files at once in
|
||||
config.name.decompile = Show ActionScript source
|
||||
config.description.decompile = You can disable AS decompilation, then only P-code is shown
|
||||
|
||||
config.name.dumpView = Dump View
|
||||
config.description.dumpView = View raw data dump
|
||||
|
||||
config.name.parallelSpeedUp = Parallel SpeedUp
|
||||
config.description.parallelSpeedUp = Parallelism can speed up decompilation
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ActionScript2AssemblerTest extends ActionStript2TestBase {
|
||||
String decompiled = writer.toString();
|
||||
|
||||
assertEquals(actualResult.trim(), "ok = false;");
|
||||
assertTrue(decompiled.contains("Push \"ok\" false"));
|
||||
assertTrue(decompiled.contains("Push \"ok\" false") || decompiled.contains("Push constant0 false"));
|
||||
} catch (IOException | ParseException | InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SWFStreamTest {
|
||||
sos.writeFB(20, f);
|
||||
}
|
||||
try (SWFInputStream sis = new SWFInputStream(null, baos.toByteArray())) {
|
||||
assertTrue(Double.compare(f, sis.readFB(20)) == 0);
|
||||
assertTrue(Double.compare(f, sis.readFB(20, "test")) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,11 +72,11 @@ public class SWFStreamTest {
|
||||
sos.writeUB(9, 5);
|
||||
}
|
||||
try (SWFInputStream sis = new SWFInputStream(null, baos.toByteArray())) {
|
||||
assertEquals(1, sis.readUB(5));
|
||||
assertEquals(2, sis.readUB(6));
|
||||
assertEquals(3, sis.readUB(7));
|
||||
assertEquals(4, sis.readUB(8));
|
||||
assertEquals(5, sis.readUB(9));
|
||||
assertEquals(1, sis.readUB(5, "test"));
|
||||
assertEquals(2, sis.readUB(6, "test"));
|
||||
assertEquals(3, sis.readUB(7, "test"));
|
||||
assertEquals(4, sis.readUB(8, "test"));
|
||||
assertEquals(5, sis.readUB(9, "test"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,11 +91,11 @@ public class SWFStreamTest {
|
||||
sos.writeSB(9, -5);
|
||||
}
|
||||
try (SWFInputStream sis = new SWFInputStream(null, baos.toByteArray())) {
|
||||
assertEquals(-1, sis.readSB(5));
|
||||
assertEquals(2, sis.readSB(6));
|
||||
assertEquals(-3, sis.readSB(7));
|
||||
assertEquals(4, sis.readSB(8));
|
||||
assertEquals(-5, sis.readSB(9));
|
||||
assertEquals(-1, sis.readSB(5, "test"));
|
||||
assertEquals(2, sis.readSB(6, "test"));
|
||||
assertEquals(-3, sis.readSB(7, "test"));
|
||||
assertEquals(4, sis.readSB(8, "test"));
|
||||
assertEquals(-5, sis.readSB(9, "test"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class SWFStreamTest {
|
||||
sos.writeFLOAT(f);
|
||||
sos.close();
|
||||
SWFInputStream sis = new SWFInputStream(null, baos.toByteArray());
|
||||
assertEquals(f, sis.readFLOAT());
|
||||
assertEquals(f, sis.readFLOAT("test"));
|
||||
sis.close();
|
||||
|
||||
baos = new ByteArrayOutputStream();
|
||||
@@ -116,7 +116,7 @@ public class SWFStreamTest {
|
||||
sos.writeFLOAT16(f);
|
||||
sos.close();
|
||||
sis = new SWFInputStream(null, baos.toByteArray());
|
||||
assertEquals(f, sis.readFLOAT16());
|
||||
assertEquals(f, sis.readFLOAT16("test"));
|
||||
sis.close();
|
||||
|
||||
baos = new ByteArrayOutputStream();
|
||||
@@ -125,7 +125,7 @@ public class SWFStreamTest {
|
||||
sos.writeDOUBLE(d);
|
||||
sos.close();
|
||||
sis = new SWFInputStream(null, baos.toByteArray());
|
||||
assertEquals(d, sis.readDOUBLE());
|
||||
assertEquals(d, sis.readDOUBLE("test"));
|
||||
sis.close();
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class SWFStreamTest {
|
||||
//example from specification
|
||||
byte[] data = new byte[]{(byte) 0x00, (byte) 0x80, (byte) 0x07, (byte) 0x00};
|
||||
SWFInputStream sis = new SWFInputStream(null, data);
|
||||
assertTrue(Double.compare(7.5, sis.readFIXED()) == 0);
|
||||
assertTrue(Double.compare(7.5, sis.readFIXED("test")) == 0);
|
||||
sis.close();
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
@@ -143,7 +143,7 @@ public class SWFStreamTest {
|
||||
sos.writeFIXED(dd);
|
||||
sos.close();
|
||||
sis = new SWFInputStream(null, baos.toByteArray());
|
||||
assertTrue(Double.compare(dd, sis.readFIXED()) == 0);
|
||||
assertTrue(Double.compare(dd, sis.readFIXED("test")) == 0);
|
||||
sis.close();
|
||||
|
||||
baos = new ByteArrayOutputStream();
|
||||
@@ -152,7 +152,7 @@ public class SWFStreamTest {
|
||||
sos.writeFIXED8(ff);
|
||||
sos.close();
|
||||
sis = new SWFInputStream(null, baos.toByteArray());
|
||||
assertEquals(ff, sis.readFIXED8());
|
||||
assertEquals(ff, sis.readFIXED8("test"));
|
||||
sis.close();
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class SWFStreamTest {
|
||||
sos.writeRECT(rect);
|
||||
}
|
||||
try (SWFInputStream sis = new SWFInputStream(null, baos.toByteArray())) {
|
||||
RECT readRECT = sis.readRECT();
|
||||
RECT readRECT = sis.readRECT("test");
|
||||
assertEquals(readRECT.Xmin, -0x3FFFFFFF);
|
||||
assertEquals(readRECT.Xmax, 0x3FFFFFFF);
|
||||
assertEquals(readRECT.Ymin, -0x3FFFFFFF);
|
||||
|
||||
Reference in New Issue
Block a user