diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java index 2736eb883..5574c7f82 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -81,6 +83,14 @@ public class CSMTextSettingsTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public CSMTextSettingsTag(SWF swf) { + super(swf, ID, "CSMTextSettings", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java index 0c997c57a..42d55b448 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -54,6 +56,15 @@ public class DebugIDTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DebugIDTag(SWF swf) { + super(swf, ID, "DebugID", null); + debugId = new byte[16]; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index fb518ad9a..c978eea46 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -56,6 +58,15 @@ public class DefineButtonCxformTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineButtonCxformTag(SWF swf) { + super(swf, ID, "DefineButtonCxform", null); + buttonColorTransform = new CXFORM(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index 67ff40a90..5f406be10 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.tags.base.CharacterIdTag; @@ -96,6 +98,14 @@ public class DefineButtonSoundTag extends CharacterIdTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineButtonSoundTag(SWF swf) { + super(swf, ID, "DefineButtonSound", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java index c3612d4b9..1b8a57ab0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -42,6 +44,15 @@ public class DefineFontAlignZonesTag extends Tag { public List zoneTable; public static final int ID = 73; + /** + * Constructor + * @param swf + */ + public DefineFontAlignZonesTag(SWF swf) { + super(swf, ID, "DefineFontAlignZones", null); + zoneTable = new ArrayList<>(); + } + public DefineFontAlignZonesTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineFontAlignZones", data); fontID = sis.readUI16("fontID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index 29f339807..153e98784 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -26,6 +28,7 @@ import com.jpexs.helpers.utf8.Utf8Helper; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; +import java.util.AbstractList; import java.util.ArrayList; import java.util.List; @@ -85,6 +88,17 @@ public class DefineFontInfo2Tag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineFontInfo2Tag(SWF swf) { + super(swf, ID, "DefineFontInfo2", null); + fontName = "New Font Info Name"; + languageCode = new LANGCODE(); + codeTable = new ArrayList<>(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index ad6a79456..f668076f2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -86,6 +88,16 @@ public class DefineFontInfoTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineFontInfoTag(SWF swf) { + super(swf, ID, "DefineFontInfo", null); + fontName = "New Font Info Name"; + codeTable = new ArrayList<>(); + } + /** * Constructor * @@ -110,12 +122,12 @@ public class DefineFontInfoTag extends Tag { fontFlagsBold = sis.readUB(1, "fontFlagsBold") == 1; fontFlagsWideCodes = sis.readUB(1, "fontFlagsWideCodes") == 1; codeTable = new ArrayList<>(); - do { + while (sis.available() > 0) { if (fontFlagsWideCodes) { codeTable.add(sis.readUI16("code")); } else { codeTable.add(sis.readUI8("code")); } - } while (sis.available() > 0); + } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java index bccafad1f..116e50ea9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -32,6 +34,16 @@ public class DefineFontNameTag extends Tag { public String fontCopyright; public static final int ID = 88; + /** + * Constructor + * @param swf + */ + public DefineFontNameTag(SWF swf) { + super(swf, ID, "DefineFontName", null); + fontName = "New Font Name"; + fontCopyright = "Copyright text"; + } + public DefineFontNameTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineFontName", data); fontId = sis.readUI16("fontId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index d6946c38e..b6e80da3d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -35,6 +37,15 @@ public class DefineScalingGridTag extends Tag { public RECT splitter; public static final int ID = 78; + /** + * Constructor + * @param swf + */ + public DefineScalingGridTag(SWF swf) { + super(swf, ID, "DefineScalingGrid", null); + splitter = new RECT(); + } + public DefineScalingGridTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineScalingGrid", data); characterId = sis.readUI16("characterId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index c31faac55..65dd8848a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -75,6 +77,18 @@ public class DefineSceneAndFrameLabelDataTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineSceneAndFrameLabelDataTag(SWF swf) { + super(swf, ID, "DefineSceneAndFrameLabelData", null); + sceneOffsets = new long[0]; + sceneNames = new String[0]; + frameNums= new long[0]; + frameNames = new String[0]; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index 3126c2f96..fc99e7e92 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -65,6 +65,16 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { return "DoABCDefine (" + name + ")"; } + /** + * Constructor + * @param swf + */ + public DoABCDefineTag(SWF swf) { + super(swf, ID, "DoABCDefine", null); + name = "New DoABC"; + abc = new ABC(swf); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index bc7a45fbb..cc8e632b4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -52,6 +52,15 @@ public class DoABCTag extends Tag implements ABCContainerTag { return "DoABC"; } + /** + * Constructor + * @param swf + */ + public DoABCTag(SWF swf) { + super(swf, ID, "DoABC", null); + abc = new ABC(swf); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index 6e3812105..4a9d47f3d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -48,6 +48,14 @@ public class DoActionTag extends Tag implements ASMSource { public ByteArrayRange actionBytes; public static final int ID = 12; + /** + * Constructor + * @param swf + */ + public DoActionTag(SWF swf) { + super(swf, ID, "DoAction", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 99b8147a0..282bb859f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.DisassemblyListener; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.action.Action; @@ -53,6 +54,14 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { public ByteArrayRange actionBytes; public static final int ID = 59; + /** + * Constructor + * @param swf + */ + public DoInitActionTag(SWF swf) { + super(swf, ID, "DoInitAction", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index 2af82adf0..97ddb1d6a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -61,6 +63,15 @@ public class EnableDebugger2Tag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public EnableDebugger2Tag(SWF swf) { + super(swf, ID, "EnableDebugger2", null); + passwordHash = "PasswordHash"; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index 3106589a9..d6589275e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.helpers.ByteArrayRange; @@ -55,6 +57,15 @@ public class EnableDebuggerTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public EnableDebuggerTag(SWF swf) { + super(swf, ID, "EnableDebugger", null); + passwordHash = "PasswordHash"; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java index 5e2c40323..4548708d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -64,6 +66,15 @@ public class EnableTelemetryTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public EnableTelemetryTag(SWF swf) { + super(swf, ID, "EnableTelemetry", null); + passwordHash = new byte[32]; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java index 182d4c745..fccc4fcf4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java @@ -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.tags; import com.jpexs.decompiler.flash.SWF; @@ -38,6 +39,14 @@ public class EndTag extends Tag { public static final int ID = 0; + /** + * Constructor + * @param swf + */ + public EndTag(SWF swf) { + super(swf, ID, "End", null); + } + /** * Constructor * @@ -49,8 +58,4 @@ public class EndTag extends Tag { super(swf, ID, "End", data); } - - public EndTag(SWF swf) { - super(swf, ID, "End", null); - } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index 81d671dd3..42308430b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -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.tags; import com.jpexs.decompiler.flash.SWF; @@ -46,6 +47,10 @@ public class ExportAssetsTag extends Tag { public List names; public static final int ID = 56; + /** + * Constructor + * @param swf + */ public ExportAssetsTag(SWF swf) { super(swf, ID, "ExportAssets", null); tags = new ArrayList<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java index 25f638120..d1d3c8b80 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java @@ -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.tags; import com.jpexs.decompiler.flash.SWF; @@ -44,6 +45,10 @@ public class FileAttributesTag extends Tag { public int reserved3; public static final int ID = 69; + /** + * Constructor + * @param swf + */ public FileAttributesTag(SWF swf) { super(swf, ID, "FileAttributes", null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 68f4530a5..196e124b5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.tags.base.ImportTag; @@ -55,6 +57,16 @@ public class ImportAssets2Tag extends Tag implements ImportTag { public List names; public static final int ID = 71; + /** + * Constructor + * @param swf + */ + public ImportAssets2Tag(SWF swf) { + super(swf, ID, "ImportAssets2", null); + url = ""; + tags = new ArrayList<>(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index 61f92d494..523becd6e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.tags.base.ImportTag; @@ -48,6 +50,16 @@ public class ImportAssetsTag extends Tag implements ImportTag { public List names; public static final int ID = 57; + /** + * Constructor + * @param swf + */ + public ImportAssetsTag(SWF swf) { + super(swf, ID, "ImportAssets", null); + url = ""; + tags = new ArrayList<>(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java index 0e88e1e8f..3f8199252 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.annotations.Internal; @@ -29,6 +31,15 @@ public class JPEGTablesTag extends Tag { @Internal public byte[] jpegData; + /** + * Constructor + * @param swf + */ + public JPEGTablesTag(SWF swf) { + super(swf, ID, "JPEGTables", null); + jpegData = new byte[0]; + } + public JPEGTablesTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "JPEGTables", data); jpegData = sis.readBytesEx(sis.available(), "jpegData"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index ac63c4be1..1af4c2fa7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.annotations.Multiline; @@ -29,6 +31,15 @@ public class MetadataTag extends Tag { public String xmlMetadata; public static final int ID = 77; + /** + * Constructor + * @param swf + */ + public MetadataTag(SWF swf) { + super(swf, ID, "Metadata", null); + xmlMetadata = ""; + } + public MetadataTag(SWFInputStream sis, ByteArrayRange data) { super(sis.getSwf(), ID, "Metadata", data); try { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java index 62661e2f2..3e9b185ba 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -44,6 +46,14 @@ public class ProductInfoTag extends Tag { public long compilationDateHigh; public static final int ID = 41; + /** + * Constructor + * @param swf + */ + public ProductInfoTag(SWF swf) { + super(swf, ID, "ProductInfo", null); + } + public ProductInfoTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "ProductInfo", data); /* diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index 8f4a91f85..6bd70a8ef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.helpers.ByteArrayRange; @@ -55,6 +57,15 @@ public class ProtectTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public ProtectTag(SWF swf) { + super(swf, ID, "Protect", null); + passwordHash = ""; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java index 82559d80e..0361e57f8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -34,6 +36,14 @@ public class ScriptLimitsTag extends Tag { public static final int ID = 65; + /** + * Constructor + * @param swf + */ + public ScriptLimitsTag(SWF swf) { + super(swf, ID, "ScriptLimits", null); + } + public ScriptLimitsTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "ScriptLimits", data); maxRecursionDepth = sis.readUI16("maxRecursionDepth"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java index 889ba2b4e..66f391632 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java @@ -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.tags; import com.jpexs.decompiler.flash.SWF; @@ -28,6 +29,15 @@ public class SetBackgroundColorTag extends Tag { public RGB backgroundColor; public static final int ID = 9; + /** + * Constructor + * @param swf + */ + public SetBackgroundColorTag(SWF swf) { + super(swf, ID, "SetBackgroundColor", null); + backgroundColor = new RGB(); + } + public SetBackgroundColorTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "SetBackgroundColor", data); backgroundColor = sis.readRGB("backgroundColor"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java index 8a5b2594c..2c987d996 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -62,6 +64,14 @@ public class SetTabIndexTag extends Tag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public SetTabIndexTag(SWF swf) { + super(swf, ID, "SetTabIndex", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java index 348a775f2..774179c7c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java @@ -48,6 +48,14 @@ public class ShowFrameTag extends Tag { } }; + /** + * Constructor + * @param swf + */ + public ShowFrameTag(SWF swf) { + super(swf, ID, "ShowFrame", null); + } + /** * Constructor * @@ -58,14 +66,6 @@ public class ShowFrameTag extends Tag { super(swf, ID, "ShowFrame", data); } - /** - * Constructor - * @param swf - */ - public ShowFrameTag(SWF swf) { - super(swf, ID, "ShowFrame", null); - } - /** * Gets data bytes * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java index d9ae99f7d..31273e4f7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java @@ -12,9 +12,11 @@ * 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.tags; +import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.SWFOutputStream; import com.jpexs.decompiler.flash.types.BasicType; @@ -34,6 +36,16 @@ public class SymbolClassTag extends Tag { public String[] names; public static final int ID = 76; + /** + * Constructor + * @param swf + */ + public SymbolClassTag(SWF swf) { + super(swf, ID, "SymbolClass", null); + tags = new int[0]; + names = new String[0]; + } + public SymbolClassTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "SymbolClass", data); int numSymbols = sis.readUI16("numSymbols"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index 10547f5df..d57c2e18b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -548,7 +548,7 @@ public class Timeline { return true; } - private boolean isSingleFrame(int frame) { + public boolean isSingleFrame(int frame) { Frame frameObj = frames.get(frame); int maxDepth = getMaxDepthInternal(); for (int i = 1; i <= maxDepth; i++) { diff --git a/src/com/jpexs/decompiler/flash/gui/ExportDialog.java b/src/com/jpexs/decompiler/flash/gui/ExportDialog.java index 6c74b0a66..8ded352ef 100644 --- a/src/com/jpexs/decompiler/flash/gui/ExportDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/ExportDialog.java @@ -159,12 +159,11 @@ public class ExportDialog extends AppDialog { cnt.setLayout(new BorderLayout()); JPanel comboPanel = new JPanel(null); combos = new JComboBox[optionNames.length]; - JLabel[] labels = new JLabel[optionNames.length]; int labWidth = 0; for (int i = 0; i < optionNames.length; i++) { - labels[i] = new JLabel(optionNames[i]); - if (labels[i].getPreferredSize().width > labWidth) { - labWidth = labels[i].getPreferredSize().width; + JLabel label = new JLabel(optionNames[i]); + if (label.getPreferredSize().width > labWidth) { + labWidth = label.getPreferredSize().width; } } String exportFormatsStr = Configuration.lastSelectedExportFormats.get(); diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index 2bfe0751b..d7ecf7e1b 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -594,7 +594,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis img = image; } - if (drawable.getTimeline().isSingleFrame()) { + if (drawable.getTimeline().isSingleFrame(frame)) { SWF.putToCache(key, img); } } diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java index 9cd1871c2..07c1f75a4 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java @@ -25,6 +25,8 @@ import com.jpexs.decompiler.flash.gui.MainFrameRibbonMenu; import com.jpexs.decompiler.flash.gui.MainPanel; import com.jpexs.decompiler.flash.gui.TreeNodeType; import com.jpexs.decompiler.flash.gui.View; +import com.jpexs.decompiler.flash.tags.CSMTextSettingsTag; +import com.jpexs.decompiler.flash.tags.DebugIDTag; import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; import com.jpexs.decompiler.flash.tags.DefineBitsJPEG2Tag; import com.jpexs.decompiler.flash.tags.DefineBitsJPEG3Tag; @@ -33,14 +35,22 @@ import com.jpexs.decompiler.flash.tags.DefineBitsLossless2Tag; import com.jpexs.decompiler.flash.tags.DefineBitsLosslessTag; import com.jpexs.decompiler.flash.tags.DefineBitsTag; import com.jpexs.decompiler.flash.tags.DefineButton2Tag; +import com.jpexs.decompiler.flash.tags.DefineButtonCxformTag; +import com.jpexs.decompiler.flash.tags.DefineButtonSoundTag; import com.jpexs.decompiler.flash.tags.DefineButtonTag; import com.jpexs.decompiler.flash.tags.DefineEditTextTag; import com.jpexs.decompiler.flash.tags.DefineFont2Tag; import com.jpexs.decompiler.flash.tags.DefineFont3Tag; import com.jpexs.decompiler.flash.tags.DefineFont4Tag; +import com.jpexs.decompiler.flash.tags.DefineFontAlignZonesTag; +import com.jpexs.decompiler.flash.tags.DefineFontInfo2Tag; +import com.jpexs.decompiler.flash.tags.DefineFontInfoTag; +import com.jpexs.decompiler.flash.tags.DefineFontNameTag; import com.jpexs.decompiler.flash.tags.DefineFontTag; import com.jpexs.decompiler.flash.tags.DefineMorphShape2Tag; import com.jpexs.decompiler.flash.tags.DefineMorphShapeTag; +import com.jpexs.decompiler.flash.tags.DefineScalingGridTag; +import com.jpexs.decompiler.flash.tags.DefineSceneAndFrameLabelDataTag; import com.jpexs.decompiler.flash.tags.DefineShape2Tag; import com.jpexs.decompiler.flash.tags.DefineShape3Tag; import com.jpexs.decompiler.flash.tags.DefineShape4Tag; @@ -50,19 +60,38 @@ import com.jpexs.decompiler.flash.tags.DefineSpriteTag; import com.jpexs.decompiler.flash.tags.DefineText2Tag; import com.jpexs.decompiler.flash.tags.DefineTextTag; import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag; +import com.jpexs.decompiler.flash.tags.DoABCDefineTag; +import com.jpexs.decompiler.flash.tags.DoABCTag; +import com.jpexs.decompiler.flash.tags.DoActionTag; +import com.jpexs.decompiler.flash.tags.DoInitActionTag; +import com.jpexs.decompiler.flash.tags.EnableDebugger2Tag; +import com.jpexs.decompiler.flash.tags.EnableDebuggerTag; +import com.jpexs.decompiler.flash.tags.EnableTelemetryTag; +import com.jpexs.decompiler.flash.tags.ExportAssetsTag; +import com.jpexs.decompiler.flash.tags.FileAttributesTag; import com.jpexs.decompiler.flash.tags.FrameLabelTag; +import com.jpexs.decompiler.flash.tags.ImportAssets2Tag; +import com.jpexs.decompiler.flash.tags.ImportAssetsTag; +import com.jpexs.decompiler.flash.tags.JPEGTablesTag; +import com.jpexs.decompiler.flash.tags.MetadataTag; import com.jpexs.decompiler.flash.tags.PlaceObject2Tag; import com.jpexs.decompiler.flash.tags.PlaceObject3Tag; import com.jpexs.decompiler.flash.tags.PlaceObject4Tag; import com.jpexs.decompiler.flash.tags.PlaceObjectTag; +import com.jpexs.decompiler.flash.tags.ProductInfoTag; +import com.jpexs.decompiler.flash.tags.ProtectTag; import com.jpexs.decompiler.flash.tags.RemoveObject2Tag; import com.jpexs.decompiler.flash.tags.RemoveObjectTag; +import com.jpexs.decompiler.flash.tags.ScriptLimitsTag; +import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag; +import com.jpexs.decompiler.flash.tags.SetTabIndexTag; import com.jpexs.decompiler.flash.tags.ShowFrameTag; import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag; import com.jpexs.decompiler.flash.tags.SoundStreamHead2Tag; import com.jpexs.decompiler.flash.tags.SoundStreamHeadTag; import com.jpexs.decompiler.flash.tags.StartSound2Tag; import com.jpexs.decompiler.flash.tags.StartSoundTag; +import com.jpexs.decompiler.flash.tags.SymbolClassTag; import com.jpexs.decompiler.flash.tags.Tag; import com.jpexs.decompiler.flash.tags.VideoFrameTag; import com.jpexs.decompiler.flash.tags.base.ASMSource; @@ -360,7 +389,14 @@ public class TagTree extends JTree implements ActionListener { ret = new ArrayList<>(); break; case TagTreeModel.FOLDER_OTHERS: - ret = new ArrayList<>(); + ret = Arrays.asList(CSMTextSettingsTag.ID, DebugIDTag.ID, DefineButtonCxformTag.ID, DefineButtonSoundTag.ID, + DefineFontAlignZonesTag.ID, DefineFontInfoTag.ID, DefineFontInfo2Tag.ID, DefineFontNameTag.ID, + DefineScalingGridTag.ID, DefineSceneAndFrameLabelDataTag.ID, + DoABCDefineTag.ID, DoABCTag.ID, DoActionTag.ID, DoInitActionTag.ID, + EnableDebuggerTag.ID, EnableDebugger2Tag.ID, EnableTelemetryTag.ID, + ExportAssetsTag.ID, FileAttributesTag.ID, ImportAssetsTag.ID, ImportAssets2Tag.ID, + JPEGTablesTag.ID, MetadataTag.ID, ProductInfoTag.ID, ProtectTag.ID, ScriptLimitsTag.ID, + SetBackgroundColorTag.ID, SetTabIndexTag.ID, SymbolClassTag.ID); break; }