diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 89e1c376b..2fbe0f600 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -359,6 +359,10 @@ public class Configuration { @ConfigurationCategory("script") public static final ConfigurationItem getLocalNamesFromDebugInfo = null; + @ConfigurationDefaultBoolean(false) + @ConfigurationCategory("ui") + public static final ConfigurationItem tagTreeShowEmptyFolders = null; + private enum OSId { WINDOWS, OSX, UNIX diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java index b076f65b3..c3c2b7709 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java @@ -65,6 +65,14 @@ public class DefineBinaryDataTag extends CharacterTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineBinaryDataTag(SWF swf) { + super(swf, ID, "DefineBinaryData", null); + } + public DefineBinaryDataTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBinaryData", data); tag = sis.readUI16("tag"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java index d708d4dc3..c40d03b58 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.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; @@ -68,6 +69,16 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { return null; } + /** + * Constructor + * @param swf + */ + public DefineBitsJPEG2Tag(SWF swf) { + super(swf, ID, "DefineBitsJPEG2", null); + characterID = swf.getNextCharacterId(); + imageData = new byte[0]; + } + public DefineBitsJPEG2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBitsJPEG2", data); characterID = sis.readUI16("characterID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java index e2617d1ab..4690eae65 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.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; @@ -107,6 +108,16 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { return null; } + /** + * Constructor + * @param swf + */ + public DefineBitsJPEG3Tag(SWF swf) { + super(swf, ID, "DefineBitsJPEG3", null); + characterID = swf.getNextCharacterId(); + imageData = new byte[0]; + } + public DefineBitsJPEG3Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBitsJPEG3", data); characterID = sis.readUI16("characterID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java index 9a88666e6..66ca034d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.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.AloneTag; @@ -130,6 +132,16 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineBitsJPEG4Tag(SWF swf) { + super(swf, ID, "DefineBitsJPEG4", null); + characterID = swf.getNextCharacterId(); + imageData = new byte[0]; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java index 5f01f42f1..ce4b4a77f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.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.AloneTag; @@ -107,6 +109,17 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { setModified(true); } + /** + * Constructor + * @param swf + */ + public DefineBitsLossless2Tag(SWF swf) { + super(swf, ID, "DefineBitsLossless2", null); + characterID = swf.getNextCharacterId(); + bitmapWidth = 1; + bitmapHeight = 1; + } + public DefineBitsLossless2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBitsLossless2", data); characterID = sis.readUI16("characterID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java index 4a5fbdd2b..2fbaf4661 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.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.AloneTag; @@ -181,6 +183,17 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { decompressed = true; } + /** + * Constructor + * @param swf + */ + public DefineBitsLosslessTag(SWF swf) { + super(swf, ID, "DefineBitsLossless", null); + characterID = swf.getNextCharacterId(); + bitmapWidth = 1; + bitmapHeight = 1; + } + public DefineBitsLosslessTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBitsLossless", data); characterID = sis.readUI16("characterID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java index 0888d4d8a..8099602b9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.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; @@ -54,6 +55,16 @@ public class DefineBitsTag extends ImageTag { return true; } + /** + * Constructor + * @param swf + */ + public DefineBitsTag(SWF swf) { + super(swf, ID, "DefineBits", null); + characterID = swf.getNextCharacterId(); + jpegData = new byte[0]; + } + public DefineBitsTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBits", data); characterID = sis.readUI16("characterID"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index 9e0a64cb0..fbcec6f0d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -16,6 +16,7 @@ */ 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.abc.CopyOutputStream; @@ -93,6 +94,14 @@ public class DefineButton2Tag extends ButtonTag implements Container { return characters; } + /** + * Constructor + * @param swf + */ + public DefineButton2Tag(SWF swf) { + super(swf, ID, "DefineButton2", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 97fc1acb6..9777d50bb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.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.abc.CopyOutputStream; @@ -93,6 +94,14 @@ public class DefineButtonTag extends ButtonTag implements ASMSource { return characters; } + /** + * Constructor + * @param swf + */ + public DefineButtonTag(SWF swf) { + super(swf, ID, "DefineButton", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index 241232a99..7c0241dcf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -701,6 +701,16 @@ public class DefineEditTextTag extends TextTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineEditTextTag(SWF swf) { + super(swf, ID, "DefineEditText", null); + characterID = swf.getNextCharacterId(); + bounds = new RECT(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 76741195e..e341d8b12 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -198,6 +198,7 @@ public class DefineFont2Tag extends FontTag { public DefineFont2Tag(SWF swf) { super(swf, ID, "DefineFont2", null); fontId = swf.getNextCharacterId(); + languageCode = new LANGCODE(); fontName = "New font"; glyphShapeTable = new ArrayList<>(); codeTable = new ArrayList<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index b771fd6f2..45aba523d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -118,6 +118,7 @@ public class DefineFont3Tag extends FontTag { public DefineFont3Tag(SWF swf) { super(swf, ID, "DefineFont3", null); fontId = swf.getNextCharacterId(); + languageCode = new LANGCODE(); fontName = "New font"; glyphShapeTable = new ArrayList<>(); codeTable = new ArrayList<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java index 850c74ce3..ef42b5b83 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java @@ -56,6 +56,7 @@ public class DefineFont4Tag extends CharacterTag { super(swf, ID, "DefineFont4", null); fontID = swf.getNextCharacterId(); fontName = "New font"; + fontData = new byte[0]; } public DefineFont4Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index d8bc2b06c..fbaba4f60 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -16,6 +16,7 @@ */ 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.exporters.commonshape.Matrix; @@ -147,6 +148,15 @@ public class DefineMorphShape2Tag extends CharacterTag implements MorphShapeTag return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineMorphShape2Tag(SWF swf) { + super(swf, ID, "DefineMorphShape2", null); + characterId = swf.getNextCharacterId(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index 96bd9d466..99a969601 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -16,6 +16,7 @@ */ 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.exporters.commonshape.Matrix; @@ -125,6 +126,15 @@ public class DefineMorphShapeTag extends CharacterTag implements MorphShapeTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineMorphShapeTag(SWF swf) { + super(swf, ID, "DefineMorphShape", null); + characterId = swf.getNextCharacterId(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index c7f51c07e..5882e6744 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.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.BoundedTag; @@ -71,6 +73,17 @@ public class DefineShape2Tag extends ShapeTag { return shapeBounds; } + /** + * Constructor + * @param swf + */ + public DefineShape2Tag(SWF swf) { + super(swf, ID, "DefineShape2", null); + shapeId = swf.getNextCharacterId(); + shapeBounds = new RECT(); + shapes = new SHAPEWITHSTYLE(); + } + public DefineShape2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineShape2", data); shapeId = sis.readUI16("shapeId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index 6d11e199d..1c8ab932c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.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.BoundedTag; @@ -71,6 +73,16 @@ public class DefineShape3Tag extends ShapeTag { return shapeId; } + /** + * Constructor + * @param swf + */ + public DefineShape3Tag(SWF swf) { + super(swf, ID, "DefineShape3", null); + shapeId = swf.getNextCharacterId(); + shapeBounds = new RECT(); + } + public DefineShape3Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineShape3", data); shapeId = sis.readUI16("shapeId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index 9dc9917b3..a2f17a8b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.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.BoundedTag; @@ -79,6 +81,15 @@ public class DefineShape4Tag extends ShapeTag { return shapeBounds; } + /** + * Constructor + * @param swf + */ + public DefineShape4Tag(SWF swf) { + super(swf, ID, "DefineShape4", null); + shapeId = swf.getNextCharacterId(); + } + public DefineShape4Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineShape4", data); shapeId = sis.readUI16("shapeId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index b4e6b9b71..e85bbb013 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.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.BoundedTag; @@ -65,6 +67,16 @@ public class DefineShapeTag extends ShapeTag { return shapeBounds; } + /** + * Constructor + * @param swf + */ + public DefineShapeTag(SWF swf) { + super(swf, ID, "DefineShape", null); + shapeId = swf.getNextCharacterId(); + shapeBounds = new RECT(); + } + public DefineShapeTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineShape", data); shapeId = sis.readUI16("shapeId"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index 287bd2b4b..258bca14e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -96,6 +96,14 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineSoundTag(SWF swf) { + super(swf, ID, "DefineSound", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index 183a82a9b..ce0804b00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -188,6 +188,16 @@ public class DefineSpriteTag extends CharacterTag implements Container, Drawable return ret; } + /** + * Constructor + * @param swf + */ + public DefineSpriteTag(SWF swf) { + super(swf, ID, "DefineSprite", null); + spriteId = swf.getNextCharacterId(); + subTags = new ArrayList<>(); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java index 724a24cae..cec16e2c5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java @@ -180,7 +180,7 @@ public class DefineText2Tag extends TextTag { try { TextLexer lexer = new TextLexer(new StringReader(formattedText)); ParsedSymbol s = null; - textRecords = new ArrayList<>(); + List textRecords = new ArrayList<>(); RGBA colorA = null; int fontId = -1; int textHeight = -1; @@ -473,6 +473,18 @@ public class DefineText2Tag extends TextTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineText2Tag(SWF swf) { + super(swf, ID, "DefineText2", null); + characterID = swf.getNextCharacterId(); + textBounds = new RECT(); + glyphBits = 0; + advanceBits = 0; + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index 3af72df65..f1ff53aa4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -434,6 +434,18 @@ public class DefineTextTag extends TextTag { return characterID; } + /** + * Constructor + * @param swf + */ + public DefineTextTag(SWF swf) { + super(swf, ID, "DefineText", null); + characterID = swf.getNextCharacterId(); + textBounds = new RECT(); + glyphBits = 0; + advanceBits = 0; + } + public DefineTextTag(SWF swf, int characterID, RECT textBounds, MATRIX textMatrix, List textRecords) { super(swf, ID, "DefineText", null); this.characterID = characterID; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index 13a7b1d22..5ca744c62 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.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; @@ -97,6 +98,14 @@ public class DefineVideoStreamTag extends CharacterTag implements BoundedTag { return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public DefineVideoStreamTag(SWF swf) { + super(swf, ID, "DefineVideoStream", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java index 7f79351dd..4ea2caa3c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java @@ -16,6 +16,7 @@ */ 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; @@ -136,6 +137,14 @@ public class SoundStreamHead2Tag extends CharacterIdTag implements SoundStreamHe return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public SoundStreamHead2Tag(SWF swf) { + super(swf, ID, "SoundStreamHead2", null); + } + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index be9fc7bca..b895605e6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -16,6 +16,7 @@ */ 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; @@ -129,6 +130,14 @@ public class SoundStreamHeadTag extends CharacterIdTag implements SoundStreamHea return baos.toByteArray(); } + /** + * Constructor + * @param swf + */ + public SoundStreamHeadTag(SWF swf) { + super(swf, ID, "SoundStreamHead", null); + } + /** * Constructor * diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 2cee4d885..e4a88f7ce 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -596,7 +596,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec for (SWF swf : newSwfs) { - tagTree.setModel(new TagTreeModel(swfs)); + tagTree.setModel(new TagTreeModel(swfs, Configuration.tagTreeShowEmptyFolders.get())); dumpTree.setModel(new DumpTreeModel(swfs)); if (swf.isAS3) { @@ -1882,7 +1882,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec showCard(CARDEMPTYPANEL); TreeItem treeItem = tagTree.getCurrentTreeItem(); DumpInfo dumpInfo = (DumpInfo) dumpTree.getLastSelectedPathComponent(); - View.refreshTree(tagTree, new TagTreeModel(swfs)); + View.refreshTree(tagTree, new TagTreeModel(swfs, Configuration.tagTreeShowEmptyFolders.get())); View.refreshTree(dumpTree, new DumpTreeModel(swfs)); if (treeItem != null) { setTagTreeSelectedNode(treeItem); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index b0eb07cfd..67872cb14 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -286,4 +286,7 @@ config.name.lastDebuggerReplaceFunction = (Internal) Last selected trace replace config.description.lastDebuggerReplaceFunction = Function name which was last selected in replace trace function with debugger config.name.getLocalNamesFromDebugInfo = AS3: Get local register names from debug info -config.description.getLocalNamesFromDebugInfo = If debug info present, renames local registers from _loc_x_ to real names. This can be turned off because some obfuscators use invalid register names there. \ No newline at end of file +config.description.getLocalNamesFromDebugInfo = If debug info present, renames local registers from _loc_x_ to real names. This can be turned off because some obfuscators use invalid register names there. + +config.name.tagTreeShowEmptyFolders = Show empty folders +config.description.tagTreeShowEmptyFolders = Show empty folders in tag tree. diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java index 64b5b74f4..d8c565ce4 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java @@ -68,10 +68,12 @@ public class TagTreeModel implements TreeModel { private final TagTreeRoot root = new TagTreeRoot(); private final List swfs; private final Map> swfFolders; + private final boolean addAllFolders; - public TagTreeModel(List swfs) { + public TagTreeModel(List swfs, boolean addAllFolders) { this.swfs = new ArrayList<>(); this.swfFolders = new HashMap<>(); + this.addAllFolders = addAllFolders; for (SWFList swfList : swfs) { if (swfList.isBundle) { this.swfs.add(swfList); @@ -177,43 +179,43 @@ public class TagTreeModel implements TreeModel { nodeList.add(new HeaderItem(swf, translate("node.header"))); - if (!shapes.isEmpty()) { + if (addAllFolders || !shapes.isEmpty()) { FolderItem shapesNode = new FolderItem(translate("node.shapes"), FOLDER_SHAPES, swf, shapes); nodeList.add(shapesNode); } - if (!morphShapes.isEmpty()) { + if (addAllFolders || !morphShapes.isEmpty()) { FolderItem morphShapesNode = new FolderItem(translate("node.morphshapes"), FOLDER_MORPHSHAPES, swf, morphShapes); nodeList.add(morphShapesNode); } - if (!sprites.isEmpty()) { + if (addAllFolders || !sprites.isEmpty()) { FolderItem spritesNode = new FolderItem(translate("node.sprites"), FOLDER_SPRITES, swf, sprites); nodeList.add(spritesNode); } - if (!texts.isEmpty()) { + if (addAllFolders || !texts.isEmpty()) { FolderItem textsNode = new FolderItem(translate("node.texts"), FOLDER_TEXTS, swf, texts); nodeList.add(textsNode); } - if (!images.isEmpty()) { + if (addAllFolders || !images.isEmpty()) { FolderItem imagesNode = new FolderItem(translate("node.images"), FOLDER_IMAGES, swf, images); nodeList.add(imagesNode); } - if (!movies.isEmpty()) { + if (addAllFolders || !movies.isEmpty()) { FolderItem moviesNode = new FolderItem(translate("node.movies"), FOLDER_MOVIES, swf, movies); nodeList.add(moviesNode); } - if (!sounds.isEmpty()) { + if (addAllFolders || !sounds.isEmpty()) { FolderItem soundsNode = new FolderItem(translate("node.sounds"), FOLDER_SOUNDS, swf, sounds); nodeList.add(soundsNode); } - if (!buttons.isEmpty()) { + if (addAllFolders || !buttons.isEmpty()) { FolderItem buttonsNode = new FolderItem(translate("node.buttons"), FOLDER_BUTTONS, swf, buttons); nodeList.add(buttonsNode); } - if (!fonts.isEmpty()) { + if (addAllFolders || !fonts.isEmpty()) { FolderItem fontsNode = new FolderItem(translate("node.fonts"), FOLDER_FONTS, swf, fonts); nodeList.add(fontsNode); } - if (!binaryData.isEmpty()) { + if (addAllFolders || !binaryData.isEmpty()) { FolderItem binaryDataNode = new FolderItem(translate("node.binaryData"), FOLDER_BINARY_DATA, swf, binaryData); nodeList.add(binaryDataNode); }