mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 22:54:52 +00:00
Added #2066 AS3 Support for api-versioned SWFs
This commit is contained in:
BIN
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.abc
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.abc
vendored
Normal file
Binary file not shown.
50
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.cpp
vendored
Normal file
50
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.cpp
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
const int as3_versioned_abc_length = 718;
|
||||
const int as3_versioned_abc_method_count = 0;
|
||||
const int as3_versioned_abc_class_count = 3;
|
||||
const int as3_versioned_abc_script_count = 2;
|
||||
const unsigned char as3_versioned_abc_data[718] = {
|
||||
0x10, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x18, 0x00, 0x04, 0x76, 0x6f, 0x69, 0x64, 0x06, 0x4f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x05, 0x6d, 0x79, 0x70,
|
||||
0x6b, 0x67, 0x07, 0x4d, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x0d, 0x6d, 0x79, 0x70, 0x6b, 0x67,
|
||||
0x3a, 0x4d, 0x79, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x04, 0x74, 0x65, 0x73, 0x74, 0x03, 0xee, 0x80,
|
||||
0x80, 0x08, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x36, 0x36, 0x32, 0x03, 0xee, 0x8a, 0x96, 0x08, 0x74,
|
||||
0x65, 0x73, 0x74, 0x5f, 0x36, 0x37, 0x34, 0x03, 0xee, 0x8a, 0xa2, 0x0c, 0x74, 0x65, 0x73, 0x74,
|
||||
0x5f, 0x36, 0x36, 0x32, 0x5f, 0x36, 0x37, 0x34, 0x03, 0x41, 0x53, 0x33, 0x21, 0x68, 0x74, 0x74,
|
||||
0x70, 0x3a, 0x2f, 0x2f, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x53,
|
||||
0x33, 0x2f, 0x32, 0x30, 0x30, 0x36, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x03, 0x4e,
|
||||
0x61, 0x4e, 0x08, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x09, 0x75, 0x6e, 0x64, 0x65,
|
||||
0x66, 0x69, 0x6e, 0x65, 0x64, 0x08, 0x6d, 0x79, 0x70, 0x6b, 0x67, 0xee, 0x8a, 0x95, 0x08, 0x6d,
|
||||
0x79, 0x70, 0x6b, 0x67, 0xee, 0x8a, 0x96, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x0b, 0x48, 0x65,
|
||||
0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x11, 0x16, 0x01, 0x18, 0x03, 0x18, 0x04,
|
||||
0x16, 0x05, 0x18, 0x07, 0x16, 0x09, 0x16, 0x0b, 0x16, 0x0d, 0x08, 0x10, 0x16, 0x14, 0x16, 0x15,
|
||||
0x05, 0x00, 0x05, 0x00, 0x17, 0x05, 0x1a, 0x07, 0x17, 0x01, 0x0b, 0x01, 0x06, 0x01, 0x07, 0x01,
|
||||
0x08, 0x02, 0x07, 0x08, 0x02, 0x0a, 0x0b, 0x07, 0x01, 0x0c, 0x0d, 0x04, 0x0e, 0x05, 0x0f, 0x01,
|
||||
0x01, 0x03, 0x01, 0x0d, 0x10, 0x01, 0x04, 0x04, 0x01, 0x0d, 0x04, 0x0e, 0x1a, 0x07, 0x01, 0x02,
|
||||
0x07, 0x01, 0x03, 0x07, 0x01, 0x04, 0x07, 0x04, 0x06, 0x09, 0x08, 0x01, 0x09, 0x0a, 0x02, 0x09,
|
||||
0x0c, 0x03, 0x09, 0x0e, 0x04, 0x09, 0x0f, 0x01, 0x09, 0x11, 0x01, 0x09, 0x12, 0x01, 0x09, 0x13,
|
||||
0x01, 0x09, 0x03, 0x01, 0x09, 0x04, 0x01, 0x09, 0x06, 0x05, 0x09, 0x16, 0x06, 0x09, 0x0c, 0x06,
|
||||
0x09, 0x03, 0x07, 0x09, 0x04, 0x07, 0x09, 0x03, 0x08, 0x09, 0x06, 0x09, 0x09, 0x03, 0x0a, 0x07,
|
||||
0x01, 0x11, 0x07, 0x01, 0x12, 0x07, 0x01, 0x13, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x09, 0x02, 0x00,
|
||||
0x01, 0x00, 0x03, 0x02, 0x09, 0x03, 0x00, 0x03, 0x00, 0x04, 0x02, 0x09, 0x05, 0x00, 0x09, 0x04,
|
||||
0x05, 0x01, 0x02, 0x05, 0x06, 0x01, 0x03, 0x06, 0x07, 0x01, 0x04, 0x07, 0x08, 0x01, 0x05, 0x08,
|
||||
0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x02, 0x0b, 0x04, 0x09, 0x06, 0x01, 0x00, 0x09, 0x08, 0x0a,
|
||||
0x06, 0x02, 0x03, 0x01, 0x06, 0x0b, 0x06, 0x03, 0x03, 0x02, 0x06, 0x0c, 0x06, 0x04, 0x00, 0x00,
|
||||
0x0a, 0x03, 0x0d, 0x04, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x01, 0x0f, 0x04, 0x00, 0x02, 0x0c, 0x00,
|
||||
0x01, 0x01, 0x02, 0x03, 0x03, 0xd0, 0x30, 0x47, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x04, 0x03,
|
||||
0xd0, 0x30, 0x47, 0x00, 0x00, 0x02, 0x01, 0x01, 0x03, 0x04, 0x03, 0xd0, 0x30, 0x47, 0x00, 0x00,
|
||||
0x03, 0x01, 0x01, 0x04, 0x05, 0x06, 0xd0, 0x30, 0xd0, 0x49, 0x00, 0x47, 0x00, 0x00, 0x04, 0x01,
|
||||
0x01, 0x03, 0x04, 0x03, 0xd0, 0x30, 0x47, 0x00, 0x00, 0x05, 0x02, 0x01, 0x04, 0x05, 0x0a, 0xd0,
|
||||
0x30, 0x5d, 0x10, 0x2c, 0x17, 0x4f, 0x10, 0x01, 0x47, 0x00, 0x00, 0x06, 0x02, 0x01, 0x04, 0x05,
|
||||
0x0a, 0xd0, 0x30, 0x5d, 0x10, 0x2c, 0x17, 0x4f, 0x10, 0x01, 0x47, 0x00, 0x00, 0x07, 0x02, 0x01,
|
||||
0x04, 0x05, 0x0a, 0xd0, 0x30, 0x5d, 0x10, 0x2c, 0x17, 0x4f, 0x10, 0x01, 0x47, 0x00, 0x00, 0x08,
|
||||
0x02, 0x01, 0x04, 0x05, 0x0e, 0xd0, 0x30, 0xd0, 0x4f, 0x11, 0x00, 0x5d, 0x10, 0x2c, 0x17, 0x4f,
|
||||
0x10, 0x01, 0x47, 0x00, 0x00, 0x09, 0x01, 0x01, 0x04, 0x05, 0x06, 0xd0, 0x30, 0xd0, 0x49, 0x00,
|
||||
0x47, 0x00, 0x00, 0x0a, 0x02, 0x01, 0x01, 0x03, 0x22, 0xd0, 0x30, 0x5d, 0x12, 0x20, 0x58, 0x00,
|
||||
0x68, 0x02, 0x5d, 0x13, 0x60, 0x02, 0x30, 0x60, 0x14, 0x58, 0x01, 0x1d, 0x68, 0x03, 0x5d, 0x15,
|
||||
0x60, 0x02, 0x30, 0x60, 0x16, 0x58, 0x02, 0x1d, 0x68, 0x04, 0x47, 0x00, 0x00, 0x0b, 0x03, 0x01,
|
||||
0x01, 0x02, 0x19, 0xd0, 0x30, 0x65, 0x00, 0x24, 0x00, 0x2a, 0xa3, 0x68, 0x17, 0x65, 0x00, 0x24,
|
||||
0x01, 0x24, 0x00, 0xa3, 0x68, 0x18, 0x65, 0x00, 0x21, 0x68, 0x19, 0x47, 0x00, 0x00 };
|
||||
10
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.h
vendored
Normal file
10
libsrc/ffdec_lib/testdata/as3_versioned/bin/as3_versioned.h
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const int abcclass_Object = 0;
|
||||
const int abcclass_Number = 1;
|
||||
const int abcclass_mypkg_MyClass = 2;
|
||||
const int abcpackage_Toplevel_as = 0;
|
||||
const int abcpackage_stubs_as = 1;
|
||||
extern const int as3_versioned_abc_length;
|
||||
extern const int as3_versioned_abc_method_count;
|
||||
extern const int as3_versioned_abc_class_count;
|
||||
extern const int as3_versioned_abc_script_count;
|
||||
extern const unsigned char as3_versioned_abc_data[];
|
||||
7
libsrc/ffdec_lib/testdata/as3_versioned/build_air_debug.bat
vendored
Normal file
7
libsrc/ffdec_lib/testdata/as3_versioned/build_air_debug.bat
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
set COMPILERKIND=flex
|
||||
set SWFNAME=as3_versioned
|
||||
rem call c:\air\bin\mxmlc.bat -debug=true -builtin -apiversioning -output bin/%SWFNAME%.%COMPILERKIND%.swf src/Main.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
java -classpath c:\flex\lib\asc.jar macromedia.asc.embedding.ScriptCompiler -optimize -builtin -apiversioning -outdir bin/ -out as3_versioned src/stubs.as src/Toplevel.as
|
||||
pause
|
||||
rem -warnings=false
|
||||
4
libsrc/ffdec_lib/testdata/as3_versioned/src/Number.as
vendored
Normal file
4
libsrc/ffdec_lib/testdata/as3_versioned/src/Number.as
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class Number {
|
||||
}
|
||||
}
|
||||
6
libsrc/ffdec_lib/testdata/as3_versioned/src/Object.as
vendored
Normal file
6
libsrc/ffdec_lib/testdata/as3_versioned/src/Object.as
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package
|
||||
{
|
||||
public class Object
|
||||
{
|
||||
}
|
||||
}
|
||||
9
libsrc/ffdec_lib/testdata/as3_versioned/src/Toplevel.as
vendored
Normal file
9
libsrc/ffdec_lib/testdata/as3_versioned/src/Toplevel.as
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package {
|
||||
public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
|
||||
|
||||
public const NaN: Number = 0 / 0;
|
||||
|
||||
public const Infinity: Number = 1 / 0;
|
||||
|
||||
public const undefined = void 0;
|
||||
}
|
||||
33
libsrc/ffdec_lib/testdata/as3_versioned/src/mypkg/MyClass.as
vendored
Normal file
33
libsrc/ffdec_lib/testdata/as3_versioned/src/mypkg/MyClass.as
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package mypkg
|
||||
{
|
||||
[API("661")]
|
||||
[API("662")]
|
||||
public class MyClass
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
trace("Hello world");
|
||||
}
|
||||
|
||||
[API("662")]
|
||||
public function test_662(): void
|
||||
{
|
||||
trace("Hello world");
|
||||
}
|
||||
|
||||
[API("674")]
|
||||
public function test_674(): void
|
||||
{
|
||||
trace("Hello world");
|
||||
}
|
||||
|
||||
[API("662")]
|
||||
[API("674")]
|
||||
public function test_662_674(): void
|
||||
{
|
||||
this.test_674();
|
||||
trace("Hello world");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
3
libsrc/ffdec_lib/testdata/as3_versioned/src/stubs.as
vendored
Normal file
3
libsrc/ffdec_lib/testdata/as3_versioned/src/stubs.as
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
include "Object.as"
|
||||
include "Number.as"
|
||||
include "mypkg/MyClass.as"
|
||||
Reference in New Issue
Block a user