Show in Hex dump for BUTTONCONDACTION, BUTTONRECORD, CLIPACTIONRECORD

This commit is contained in:
Jindra Petřík
2022-11-12 16:16:33 +01:00
parent 032a4880f8
commit 382cd6eebf
10 changed files with 102 additions and 21 deletions

View File

@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.action.ConstantPoolTooBigException;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.types.HasSwfAndTag;
import com.jpexs.helpers.ByteArrayRange;
import java.util.List;
@@ -31,7 +32,7 @@ import java.util.List;
*
* @author JPEXS
*/
public interface ASMSource extends Exportable {
public interface ASMSource extends Exportable, HasSwfAndTag {
/**
* Converts actions to ASM source

View File

@@ -200,7 +200,7 @@ public abstract class ButtonTag extends DrawableTag implements Timelined {
public void setSwf(SWF swf, boolean deep) {
this.swf = swf;
for(BUTTONRECORD record:getRecords()) {
record.setSwfAndTag(swf, this);
record.setSourceTag(this);
}
}

View File

@@ -43,7 +43,7 @@ import java.util.List;
*
* @author JPEXS
*/
public class BUTTONCONDACTION implements ASMSource, Serializable {
public class BUTTONCONDACTION implements ASMSource, Serializable, HasSwfAndTag {
private SWF swf;
@@ -357,4 +357,9 @@ public class BUTTONCONDACTION implements ASMSource, Serializable {
this.tag = t;
this.swf = t.getSwf();
}
@Override
public Tag getTag() {
return tag;
}
}

View File

@@ -153,8 +153,8 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag, HasCh
}
@Override
public void setSwfAndTag(SWF swf, Tag tag) {
this.swf = swf;
public void setSourceTag(Tag tag) {
this.swf = tag.getSwf();
this.tag = (ButtonTag) tag;
}

View File

@@ -145,8 +145,8 @@ public class CLIPACTIONRECORD implements ASMSource, Serializable, HasSwfAndTag {
}
@Override
public void setSwfAndTag(SWF swf, Tag tag) {
this.swf = swf;
public void setSourceTag(Tag tag) {
this.swf = tag.getSwf();
this.tag = tag;
}
@@ -344,10 +344,4 @@ public class CLIPACTIONRECORD implements ASMSource, Serializable, HasSwfAndTag {
public Tag getSourceTag() {
return tag;
}
@Override
public void setSourceTag(Tag t) {
this.tag = t;
this.swf = t.getSwf();
}
}

View File

@@ -8,7 +8,7 @@ import com.jpexs.decompiler.flash.tags.Tag;
* @author JPEXS
*/
public interface HasSwfAndTag {
public void setSwfAndTag(SWF swf, Tag tag);
public void setSourceTag(Tag tag);
public SWF getSwf();