mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-27 17:25:48 +00:00
swf reference removed from ABC class
This commit is contained in:
@@ -90,8 +90,6 @@ public class ABC {
|
||||
private static final Logger logger = Logger.getLogger(ABC.class.getName());
|
||||
private AVM2Deobfuscation deobfuscation;
|
||||
@Internal
|
||||
public SWF swf;
|
||||
@Internal
|
||||
public ABCContainerTag parentTag;
|
||||
|
||||
/* Map from multiname index of namespace value to namespace name**/
|
||||
@@ -99,7 +97,6 @@ public class ABC {
|
||||
|
||||
public ABC(SWF swf) {
|
||||
this.deobfuscation = null;
|
||||
this.swf = swf;
|
||||
constants.constant_double.add(null);
|
||||
constants.constant_int.add(null);
|
||||
constants.constant_uint.add(null);
|
||||
@@ -109,6 +106,10 @@ public class ABC {
|
||||
constants.constant_namespace_set.add(null);
|
||||
}
|
||||
|
||||
public SWF getSwf() {
|
||||
return parentTag.getSwf();
|
||||
}
|
||||
|
||||
public int addMethodBody(MethodBody body) {
|
||||
bodies.add(body);
|
||||
bodyIdxFromMethodIdx = null;
|
||||
@@ -339,7 +340,6 @@ public class ABC {
|
||||
}
|
||||
|
||||
public ABC(ABCInputStream ais, SWF swf, ABCContainerTag tag) throws IOException {
|
||||
this.swf = swf;
|
||||
this.parentTag = tag;
|
||||
minor_version = ais.readU16("minor_version");
|
||||
major_version = ais.readU16("major_version");
|
||||
@@ -1207,7 +1207,7 @@ public class ABC {
|
||||
String scriptName = pack.getPathScriptName() + ".as";
|
||||
int oldIndex = pack.scriptIndex;
|
||||
int newIndex = script_info.size();
|
||||
String documentClass = swf.getDocumentClass();
|
||||
String documentClass = getSwf().getDocumentClass();
|
||||
boolean isDocumentClass = documentClass != null && documentClass.equals(pack.getClassPath().toString());
|
||||
|
||||
ScriptInfo si = script_info.get(oldIndex);
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -54,7 +55,7 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
|
||||
@Override
|
||||
public SWF getSwf() {
|
||||
public SWF getSwf() {
|
||||
return abc.getSwf();
|
||||
}
|
||||
|
||||
public ClassPath getClassPath() {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
|
||||
/**
|
||||
@@ -25,4 +26,6 @@ import com.jpexs.decompiler.flash.abc.ABC;
|
||||
public interface ABCContainerTag extends Comparable<ABCContainerTag> {
|
||||
|
||||
public ABC getABC();
|
||||
|
||||
public SWF getSwf();
|
||||
}
|
||||
|
||||
@@ -38,16 +38,13 @@ import java.io.OutputStream;
|
||||
*/
|
||||
public class DoABCDefineTag extends Tag implements ABCContainerTag {
|
||||
|
||||
@Override
|
||||
public ABC getABC() {
|
||||
return abc;
|
||||
}
|
||||
/**
|
||||
* ActionScript 3 bytecodes
|
||||
*/
|
||||
@HideInRawEdit
|
||||
@SWFField
|
||||
private final ABC abc;
|
||||
|
||||
/**
|
||||
* A 32-bit flags value, which may contain the following bits set:
|
||||
* kDoAbcLazyInitializeFlag = 1: Indicates that the ABC block should not be
|
||||
@@ -56,12 +53,18 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag {
|
||||
*/
|
||||
@SWFType(BasicType.UI32)
|
||||
public long flags;
|
||||
|
||||
/**
|
||||
* The name assigned to the bytecode.
|
||||
*/
|
||||
public String name;
|
||||
public static final int ID = 82;
|
||||
|
||||
@Override
|
||||
public ABC getABC() {
|
||||
return abc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DoABCDefine (" + name + ")";
|
||||
@@ -96,12 +99,6 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag {
|
||||
abc = new ABC(ais, swf, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSwf(SWF swf) {
|
||||
super.setSwf(swf);
|
||||
abc.swf = swf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data bytes
|
||||
*
|
||||
|
||||
@@ -106,11 +106,4 @@ public class DoABCTag extends Tag implements ABCContainerTag {
|
||||
public int compareTo(ABCContainerTag o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSwf(SWF swf) {
|
||||
super.setSwf(swf);
|
||||
abc.swf = swf;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user