From 24bc3880742b539654ba0d2d0959e1951bf9935e Mon Sep 17 00:00:00 2001 From: Honfika Date: Sun, 2 Mar 2014 20:27:46 +0100 Subject: [PATCH] stop animation when it is not visible, redundant version argument removed, use internal viewer for showing texts (only when internal viewer is selected) --- .../decompiler/flash/SWFInputStream.java | 172 +++++++++--------- .../parser/script/ActionScriptLexer.java | 9 +- .../flash/action/swf5/ActionDelete.java | 2 - .../flash/action/swf5/ActionDelete2.java | 2 - .../flash/gui/GenericTagTreePanel.java | 8 +- .../decompiler/flash/gui/MainFrameRibbon.java | 11 -- .../jpexs/decompiler/flash/gui/MainPanel.java | 41 +++-- .../gui/MyRibbonApplicationMenuButtonUI.java | 12 +- ...FPreviwPanel.java => SWFPreviewPanel.java} | 12 +- .../flash/tags/CSMTextSettingsTag.java | 5 +- .../decompiler/flash/tags/DebugIDTag.java | 5 +- .../flash/tags/DefineBinaryDataTag.java | 4 +- .../flash/tags/DefineBitsJPEG2Tag.java | 6 +- .../flash/tags/DefineBitsJPEG3Tag.java | 4 +- .../flash/tags/DefineBitsJPEG4Tag.java | 5 +- .../flash/tags/DefineBitsLossless2Tag.java | 4 +- .../flash/tags/DefineBitsLosslessTag.java | 4 +- .../decompiler/flash/tags/DefineBitsTag.java | 4 +- .../flash/tags/DefineButton2Tag.java | 5 +- .../flash/tags/DefineButtonCxformTag.java | 5 +- .../flash/tags/DefineButtonSoundTag.java | 5 +- .../flash/tags/DefineButtonTag.java | 5 +- .../flash/tags/DefineEditTextTag.java | 7 +- .../decompiler/flash/tags/DefineFont2Tag.java | 7 +- .../decompiler/flash/tags/DefineFont3Tag.java | 6 +- .../decompiler/flash/tags/DefineFont4Tag.java | 4 +- .../flash/tags/DefineFontAlignZonesTag.java | 4 +- .../flash/tags/DefineFontInfo2Tag.java | 7 +- .../flash/tags/DefineFontInfoTag.java | 7 +- .../flash/tags/DefineFontNameTag.java | 4 +- .../decompiler/flash/tags/DefineFontTag.java | 5 +- .../flash/tags/DefineMorphShape2Tag.java | 5 +- .../flash/tags/DefineMorphShapeTag.java | 5 +- .../flash/tags/DefineScalingGridTag.java | 4 +- .../tags/DefineSceneAndFrameLabelDataTag.java | 5 +- .../flash/tags/DefineShape2Tag.java | 4 +- .../flash/tags/DefineShape3Tag.java | 4 +- .../flash/tags/DefineShape4Tag.java | 4 +- .../decompiler/flash/tags/DefineShapeTag.java | 4 +- .../decompiler/flash/tags/DefineSoundTag.java | 5 +- .../flash/tags/DefineSpriteTag.java | 5 +- .../decompiler/flash/tags/DefineText2Tag.java | 7 +- .../decompiler/flash/tags/DefineTextTag.java | 7 +- .../flash/tags/DefineVideoStreamTag.java | 5 +- .../decompiler/flash/tags/DoABCDefineTag.java | 5 +- .../jpexs/decompiler/flash/tags/DoABCTag.java | 3 +- .../decompiler/flash/tags/DoActionTag.java | 3 +- .../flash/tags/DoInitActionTag.java | 5 +- .../flash/tags/EnableDebugger2Tag.java | 5 +- .../flash/tags/EnableDebuggerTag.java | 5 +- .../flash/tags/EnableTelemetryTag.java | 5 +- .../jpexs/decompiler/flash/tags/EndTag.java | 3 +- .../flash/tags/ExportAssetsTag.java | 5 +- .../flash/tags/FileAttributesTag.java | 4 +- .../decompiler/flash/tags/FrameLabelTag.java | 4 +- .../flash/tags/ImportAssets2Tag.java | 5 +- .../flash/tags/ImportAssetsTag.java | 5 +- .../decompiler/flash/tags/MetadataTag.java | 4 +- .../flash/tags/PlaceObject2Tag.java | 5 +- .../flash/tags/PlaceObject3Tag.java | 5 +- .../flash/tags/PlaceObject4Tag.java | 5 +- .../decompiler/flash/tags/PlaceObjectTag.java | 5 +- .../decompiler/flash/tags/ProductInfoTag.java | 4 +- .../decompiler/flash/tags/ProtectTag.java | 5 +- .../flash/tags/RemoveObject2Tag.java | 4 +- .../flash/tags/RemoveObjectTag.java | 5 +- .../flash/tags/ScriptLimitsTag.java | 4 +- .../flash/tags/SetBackgroundColorTag.java | 4 +- .../decompiler/flash/tags/SetTabIndexTag.java | 5 +- .../flash/tags/SoundStreamBlockTag.java | 3 +- .../flash/tags/SoundStreamHead2Tag.java | 5 +- .../flash/tags/SoundStreamHeadTag.java | 5 +- .../decompiler/flash/tags/StartSound2Tag.java | 5 +- .../decompiler/flash/tags/StartSoundTag.java | 5 +- .../decompiler/flash/tags/SymbolClassTag.java | 4 +- .../jpexs/decompiler/flash/tags/TagStub.java | 5 +- .../decompiler/flash/tags/VideoFrameTag.java | 5 +- .../decompiler/flash/tags/base/TextTag.java | 2 +- .../flash/tags/dynamictext/Paragraph.java | 2 +- .../tags/dynamictext/SameStyleTextRecord.java | 1 - .../flash/tags/dynamictext/Word.java | 2 +- .../flash/tags/gfx/DefineCompactedFont.java | 5 +- .../tags/gfx/DefineExternalGradient.java | 5 +- .../flash/tags/gfx/DefineExternalImage.java | 5 +- .../flash/tags/gfx/DefineExternalImage2.java | 5 +- .../flash/tags/gfx/DefineExternalSound.java | 5 +- .../tags/gfx/DefineExternalStreamSound.java | 5 +- .../flash/tags/gfx/DefineGradientMap.java | 5 +- .../flash/tags/gfx/DefineSubImage.java | 5 +- .../flash/tags/gfx/ExporterInfoTag.java | 3 +- .../flash/tags/gfx/FontTextureInfo.java | 5 +- .../flash/types/BUTTONCONDACTION.java | 4 +- .../flash/types/CLIPACTIONRECORD.java | 4 +- 93 files changed, 301 insertions(+), 356 deletions(-) rename trunk/src/com/jpexs/decompiler/flash/gui/{SWFPreviwPanel.java => SWFPreviewPanel.java} (89%) diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 2728423b9..a325e2565 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -803,16 +803,14 @@ public class SWFInputStream extends InputStream { private class TagResolutionTask implements Callable { private final Tag tag; - private final int version; private final int level; private final boolean parallel; private final boolean skipUnusualTags; private final SWF swf; private final boolean gfx; - public TagResolutionTask(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags, boolean gfx) { + public TagResolutionTask(SWF swf, Tag tag, int level, boolean parallel, boolean skipUnusualTags, boolean gfx) { this.tag = tag; - this.version = version; this.level = level; this.parallel = parallel; this.skipUnusualTags = skipUnusualTags; @@ -823,7 +821,7 @@ public class SWFInputStream extends InputStream { @Override public Tag call() throws Exception { try { - return SWFInputStream.resolveTag(swf, tag, version, level, parallel, skipUnusualTags, gfx); + return SWFInputStream.resolveTag(swf, tag, level, parallel, skipUnusualTags, gfx); } catch (EndOfStreamException ex) { Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, null, ex); return tag; @@ -888,7 +886,7 @@ public class SWFInputStream extends InputStream { } else { switch (tag.getId()) { case FileAttributesTag.ID: //FileAttributes - FileAttributesTag fileAttributes = (FileAttributesTag) resolveTag(swf, tag, version, level, parallel, skipUnusualTags, gfx); + FileAttributesTag fileAttributes = (FileAttributesTag) resolveTag(swf, tag, level, parallel, skipUnusualTags, gfx); if (fileAttributes.actionScript3) { isAS3 = true; } @@ -932,7 +930,7 @@ public class SWFInputStream extends InputStream { if (doParse) { if (parallel) { - Future future = executor.submit(new TagResolutionTask(swf, tag, version, level, parallel, skipUnusualTags, gfx)); + Future future = executor.submit(new TagResolutionTask(swf, tag, level, parallel, skipUnusualTags, gfx)); futureResults.add(future); } } @@ -954,7 +952,7 @@ public class SWFInputStream extends InputStream { return tags; } - public static Tag resolveTag(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags, boolean gfx) throws InterruptedException { + public static Tag resolveTag(SWF swf, Tag tag, int level, boolean parallel, boolean skipUnusualTags, boolean gfx) throws InterruptedException { Tag ret; byte[] data = tag.getData(); @@ -962,127 +960,127 @@ public class SWFInputStream extends InputStream { try { switch (tag.getId()) { case 0: - ret = new EndTag(swf, data, version, pos); + ret = new EndTag(swf, data, pos); break; case 1: ret = new ShowFrameTag(swf, pos); break; case 2: - ret = new DefineShapeTag(swf, data, version, pos); + ret = new DefineShapeTag(swf, data, pos); break; //case 3: FreeCharacter case 4: - ret = new PlaceObjectTag(swf, data, version, pos); + ret = new PlaceObjectTag(swf, data, pos); break; case 5: - ret = new RemoveObjectTag(swf, data, version, pos); + ret = new RemoveObjectTag(swf, data, pos); break; case 6: - ret = new DefineBitsTag(swf, data, version, pos); + ret = new DefineBitsTag(swf, data, pos); break; case 7: - ret = new DefineButtonTag(swf, data, version, pos); + ret = new DefineButtonTag(swf, data, pos); break; case 8: ret = new JPEGTablesTag(swf, data, pos); break; case 9: - ret = new SetBackgroundColorTag(swf, data, version, pos); + ret = new SetBackgroundColorTag(swf, data, pos); break; case 10: - ret = new DefineFontTag(swf, data, version, pos); + ret = new DefineFontTag(swf, data, pos); break; case 11: - ret = new DefineTextTag(swf, data, version, pos); + ret = new DefineTextTag(swf, data, pos); break; case 12: - ret = new DoActionTag(swf, data, version, pos); + ret = new DoActionTag(swf, data, pos); break; case 13: - ret = new DefineFontInfoTag(swf, data, version, pos); + ret = new DefineFontInfoTag(swf, data, pos); break; case 14: - ret = new DefineSoundTag(swf, data, version, pos); + ret = new DefineSoundTag(swf, data, pos); break; case 15: - ret = new StartSoundTag(swf, data, version, pos); + ret = new StartSoundTag(swf, data, pos); break; //case 16: case 17: - ret = new DefineButtonSoundTag(swf, data, version, pos); + ret = new DefineButtonSoundTag(swf, data, pos); break; case 18: - ret = new SoundStreamHeadTag(swf, data, version, pos); + ret = new SoundStreamHeadTag(swf, data, pos); break; case 19: - ret = new SoundStreamBlockTag(swf, data, version, pos); + ret = new SoundStreamBlockTag(swf, data, pos); break; case 21: - ret = new DefineBitsJPEG2Tag(swf, data, version, pos); + ret = new DefineBitsJPEG2Tag(swf, data, pos); break; case 20: - ret = new DefineBitsLosslessTag(swf, data, version, pos); + ret = new DefineBitsLosslessTag(swf, data, pos); break; case 22: - ret = new DefineShape2Tag(swf, data, version, pos); + ret = new DefineShape2Tag(swf, data, pos); break; case 23: - ret = new DefineButtonCxformTag(swf, data, version, pos); + ret = new DefineButtonCxformTag(swf, data, pos); break; case 24: - ret = new ProtectTag(swf, data, version, pos); + ret = new ProtectTag(swf, data, pos); break; //case 25: PathsArePostscript case 26: - ret = new PlaceObject2Tag(swf, data, version, pos); + ret = new PlaceObject2Tag(swf, data, pos); break; //case 27: case 28: - ret = new RemoveObject2Tag(swf, data, version, pos); + ret = new RemoveObject2Tag(swf, data, pos); break; //case 29: SyncFrame //case 30: //case 31: FreeAll case 32: - ret = new DefineShape3Tag(swf, data, version, pos); + ret = new DefineShape3Tag(swf, data, pos); break; case 33: - ret = new DefineText2Tag(swf, data, version, pos); + ret = new DefineText2Tag(swf, data, pos); break; case 34: - ret = new DefineButton2Tag(swf, data, version, pos); + ret = new DefineButton2Tag(swf, data, pos); break; case 35: - ret = new DefineBitsJPEG3Tag(swf, data, version, pos); + ret = new DefineBitsJPEG3Tag(swf, data, pos); break; case 36: - ret = new DefineBitsLossless2Tag(swf, data, version, pos); + ret = new DefineBitsLossless2Tag(swf, data, pos); break; case 37: - ret = new DefineEditTextTag(swf, data, version, pos); + ret = new DefineEditTextTag(swf, data, pos); break; //case 38: DefineVideo case 39: - ret = new DefineSpriteTag(swf, data, version, level, pos, parallel, skipUnusualTags); + ret = new DefineSpriteTag(swf, data, level, pos, parallel, skipUnusualTags); break; //case 40: NameCharacter case 41: - ret = new ProductInfoTag(swf, data, version, pos); + ret = new ProductInfoTag(swf, data, pos); break; //case 42: DefineTextFormat case 43: - ret = new FrameLabelTag(swf, data, version, pos); + ret = new FrameLabelTag(swf, data, pos); break; //case 44: case 45: - ret = new SoundStreamHead2Tag(swf, data, version, pos); + ret = new SoundStreamHead2Tag(swf, data, pos); break; case 46: - ret = new DefineMorphShapeTag(swf, data, version, pos); + ret = new DefineMorphShapeTag(swf, data, pos); break; //case 47: GenerateFrame case 48: - ret = new DefineFont2Tag(swf, data, version, pos); + ret = new DefineFont2Tag(swf, data, pos); break; //case 49: GeneratorCommand //case 50: DefineCommandObject @@ -1090,137 +1088,137 @@ public class SWFInputStream extends InputStream { //case 52: ExternalFont //case 53-55 case 56: - ret = new ExportAssetsTag(swf, data, version, pos); + ret = new ExportAssetsTag(swf, data, pos); break; case 57: - ret = new ImportAssetsTag(swf, data, version, pos); + ret = new ImportAssetsTag(swf, data, pos); break; case 58: - ret = new EnableDebuggerTag(swf, data, version, pos); + ret = new EnableDebuggerTag(swf, data, pos); break; case 59: - ret = new DoInitActionTag(swf, data, version, pos); + ret = new DoInitActionTag(swf, data, pos); break; case 60: - ret = new DefineVideoStreamTag(swf, data, version, pos); + ret = new DefineVideoStreamTag(swf, data, pos); break; case 61: - ret = new VideoFrameTag(swf, data, version, pos); + ret = new VideoFrameTag(swf, data, pos); break; case 62: - ret = new DefineFontInfo2Tag(swf, data, version, pos); + ret = new DefineFontInfo2Tag(swf, data, pos); break; case 63: - ret = new DebugIDTag(swf, data, version, pos); + ret = new DebugIDTag(swf, data, pos); break; case 64: - ret = new EnableDebugger2Tag(swf, data, version, pos); + ret = new EnableDebugger2Tag(swf, data, pos); break; case 65: - ret = new ScriptLimitsTag(swf, data, version, pos); + ret = new ScriptLimitsTag(swf, data, pos); break; case 66: - ret = new SetTabIndexTag(swf, data, version, pos); + ret = new SetTabIndexTag(swf, data, pos); break; //case 67-68: case 69: - ret = new FileAttributesTag(swf, data, version, pos); + ret = new FileAttributesTag(swf, data, pos); break; case 70: - ret = new PlaceObject3Tag(swf, data, version, pos); + ret = new PlaceObject3Tag(swf, data, pos); break; case 71: - ret = new ImportAssets2Tag(swf, data, version, pos); + ret = new ImportAssets2Tag(swf, data, pos); break; case 72: - ret = new DoABCTag(swf, data, version, pos); + ret = new DoABCTag(swf, data, pos); break; case 73: - ret = new DefineFontAlignZonesTag(swf, data, version, pos); + ret = new DefineFontAlignZonesTag(swf, data, pos); break; case 74: - ret = new CSMTextSettingsTag(swf, data, version, pos); + ret = new CSMTextSettingsTag(swf, data, pos); break; case 75: - ret = new DefineFont3Tag(swf, data, version, pos); + ret = new DefineFont3Tag(swf, data, pos); break; case 76: - ret = new SymbolClassTag(swf, data, version, pos); + ret = new SymbolClassTag(swf, data, pos); break; case 77: - ret = new MetadataTag(swf, data, version, pos); + ret = new MetadataTag(swf, data, pos); break; case 78: - ret = new DefineScalingGridTag(swf, data, version, pos); + ret = new DefineScalingGridTag(swf, data, pos); break; //case 79-81: case 82: - ret = new DoABCDefineTag(swf, data, version, pos); + ret = new DoABCDefineTag(swf, data, pos); break; case 83: - ret = new DefineShape4Tag(swf, data, version, pos); + ret = new DefineShape4Tag(swf, data, pos); break; case 84: - ret = new DefineMorphShape2Tag(swf, data, version, pos); + ret = new DefineMorphShape2Tag(swf, data, pos); break; //case 85: case 86: - ret = new DefineSceneAndFrameLabelDataTag(swf, data, version, pos); + ret = new DefineSceneAndFrameLabelDataTag(swf, data, pos); break; case 87: - ret = new DefineBinaryDataTag(swf, data, version, pos); + ret = new DefineBinaryDataTag(swf, data, pos); break; case 88: - ret = new DefineFontNameTag(swf, data, version, pos); + ret = new DefineFontNameTag(swf, data, pos); break; case 89: - ret = new StartSound2Tag(swf, data, version, pos); + ret = new StartSound2Tag(swf, data, pos); break; case 90: - ret = new DefineBitsJPEG4Tag(swf, data, version, pos); + ret = new DefineBitsJPEG4Tag(swf, data, pos); break; case 91: - ret = new DefineFont4Tag(swf, data, version, pos); + ret = new DefineFont4Tag(swf, data, pos); break; //case 92: certificate case 93: - ret = new EnableTelemetryTag(swf, data, version, pos); + ret = new EnableTelemetryTag(swf, data, pos); break; case 94: - ret = new PlaceObject4Tag(swf, data, version, pos); + ret = new PlaceObject4Tag(swf, data, pos); break; default: if (gfx) { //GFX tags only in GFX files. There may be incorrect GFX tags in non GFX files switch (tag.getId()) { case 1000: - ret = new ExporterInfoTag(swf, data, version, pos); + ret = new ExporterInfoTag(swf, data, pos); break; case 1001: - ret = new DefineExternalImage(swf, data, version, pos); + ret = new DefineExternalImage(swf, data, pos); break; case 1002: - ret = new FontTextureInfo(swf, data, version, pos); + ret = new FontTextureInfo(swf, data, pos); break; case 1003: - ret = new DefineExternalGradient(swf, data, version, pos); + ret = new DefineExternalGradient(swf, data, pos); break; case 1004: - ret = new DefineGradientMap(swf, data, version, pos); + ret = new DefineGradientMap(swf, data, pos); break; case 1005: - ret = new DefineCompactedFont(swf, data, version, pos); + ret = new DefineCompactedFont(swf, data, pos); break; case 1006: - ret = new DefineExternalSound(swf, data, version, pos); + ret = new DefineExternalSound(swf, data, pos); break; case 1007: - ret = new DefineExternalStreamSound(swf, data, version, pos); + ret = new DefineExternalStreamSound(swf, data, pos); break; case 1008: - ret = new DefineSubImage(swf, data, version, pos); + ret = new DefineSubImage(swf, data, pos); break; case 1009: - ret = new DefineExternalImage2(swf, data, version, pos); + ret = new DefineExternalImage2(swf, data, pos); break; default: ret = new UnknownTag(swf, tag.getId(), data, pos); @@ -1306,7 +1304,7 @@ public class SWFInputStream extends InputStream { } if (resolve) { try { - return resolveTag(swf, ret, version, level, parallel, skipUnusualTags, gfx); + return resolveTag(swf, ret, level, parallel, skipUnusualTags, gfx); } catch (EndOfStreamException ex) { Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, null, ex); return ret; @@ -1683,7 +1681,7 @@ public class SWFInputStream extends InputStream { * @throws IOException */ public CLIPACTIONRECORD readCLIPACTIONRECORD(SWF swf) throws IOException { - CLIPACTIONRECORD ret = new CLIPACTIONRECORD(swf, this, version, getPos()); + CLIPACTIONRECORD ret = new CLIPACTIONRECORD(swf, this, getPos()); if (ret.eventFlags.isClear()) { return null; } @@ -2057,7 +2055,7 @@ public class SWFInputStream extends InputStream { * @throws IOException */ public BUTTONCONDACTION readBUTTONCONDACTION(SWF swf) throws IOException { - BUTTONCONDACTION ret = new BUTTONCONDACTION(swf, this, version, getPos()); + BUTTONCONDACTION ret = new BUTTONCONDACTION(swf, this, getPos()); //ret.actions = readActionList(); return ret; } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 414fed133..719d87334 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -1191,12 +1191,12 @@ public final class ActionScriptLexer { return yychar; } - private Stack pushedBack = new Stack(); + private final Stack pushedBack = new Stack<>(); public int yyline() { return yyline + 1; } - private List listeners = new ArrayList<>(); + private final List listeners = new ArrayList<>(); public void addListener(LexListener listener) { listeners.add(listener); @@ -1333,6 +1333,7 @@ public final class ActionScriptLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -1373,6 +1374,7 @@ public final class ActionScriptLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -1389,6 +1391,7 @@ public final class ActionScriptLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -1410,6 +1413,7 @@ public final class ActionScriptLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -1461,6 +1465,7 @@ public final class ActionScriptLexer { * * @return the next token * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.action.parser.ParseException */ public ParsedSymbol yylex() throws java.io.IOException, ParseException { int zzInput; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java index 195f56d19..a9f80a10f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete.java @@ -18,9 +18,7 @@ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DeleteActionItem; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Stack; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java index 402027bf0..e7dd9ab3d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDelete2.java @@ -18,9 +18,7 @@ package com.jpexs.decompiler.flash.action.swf5; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.DeleteActionItem; -import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.graph.GraphTargetItem; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Stack; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java index dd17377ca..05742228f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java @@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.flash.AppStrings; import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.SWFInputStream; import com.jpexs.decompiler.flash.gui.generictageditors.BooleanEditor; import com.jpexs.decompiler.flash.gui.generictageditors.ColorEditor; import com.jpexs.decompiler.flash.gui.generictageditors.GenericTagEditor; @@ -36,7 +37,6 @@ import com.jpexs.decompiler.flash.types.annotations.SWFArray; import com.jpexs.decompiler.flash.types.annotations.SWFType; import com.jpexs.decompiler.flash.types.annotations.parser.ConditionEvaluator; import com.jpexs.decompiler.flash.types.annotations.parser.ParseException; -import com.jpexs.helpers.Helper; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -646,7 +646,11 @@ public class GenericTagTreePanel extends GenericTagPanel { tag = this.tag; } this.tag = tag; - this.editedTag = (Tag) Helper.deepCopy(tag); + SWF swf = tag.getSwf(); + try { + this.editedTag = SWFInputStream.resolveTag(swf, tag, 0, false, true, swf.gfx); + } catch (InterruptedException ex) { + } tree.setEditable(edit); if (!edit) { tree.stopEditing(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java index b533a4e88..b9cd92157 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbon.java @@ -22,24 +22,13 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Point; -import java.awt.Rectangle; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowStateListener; -import java.beans.PropertyChangeEvent; -import java.util.ArrayList; import java.util.List; -import java.util.Timer; -import java.util.TimerTask; import javax.swing.JFrame; -import org.pushingpixels.flamingo.api.common.AbstractCommandButton; -import org.pushingpixels.flamingo.api.common.CommandButtonDisplayState; -import org.pushingpixels.flamingo.api.common.CommandButtonLayoutManager; -import org.pushingpixels.flamingo.api.common.icon.ResizableIcon; import org.pushingpixels.flamingo.api.ribbon.JRibbon; import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationMenuButton; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 162859ccb..45833f15e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -214,7 +214,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec private BinaryPanel binaryPanel; private GenericTagPanel genericTagPanel; private final ImagePanel previewImagePanel; - private final SWFPreviwPanel swfPreviewPanel; + private final SWFPreviewPanel swfPreviewPanel; private boolean isWelcomeScreen = true; private static final String CARDFLASHPANEL = "Flash card"; private static final String CARDSWFPREVIEWPANEL = "SWF card"; @@ -791,7 +791,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec shapesCard.add(previewPanel, BorderLayout.CENTER); displayPanel.add(shapesCard, CARDDRAWPREVIEWPANEL); - swfPreviewPanel = new SWFPreviwPanel(); + swfPreviewPanel = new SWFPreviewPanel(); displayPanel.add(swfPreviewPanel, CARDSWFPREVIEWPANEL); displayPanel.add(new JPanel(), CARDEMPTYPANEL); @@ -891,6 +891,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } public void load(SWFList newSwfs, boolean first) { + + swfPreviewPanel.stop(); + swfs.add(newSwfs); for (SWF swf : newSwfs) { @@ -2105,7 +2108,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec try { SWF swf = it.getSwf(); if (it instanceof DefineBitsTag) { - DefineBitsJPEG2Tag jpeg2Tag = new DefineBitsJPEG2Tag(swf, it.getOriginalData(), swf.version, it.getPos(), it.getCharacterId(), data); + DefineBitsJPEG2Tag jpeg2Tag = new DefineBitsJPEG2Tag(swf, it.getOriginalData(), it.getPos(), it.getCharacterId(), data); swf.tags.set(swf.tags.indexOf(it), jpeg2Tag); showCard(CARDEMPTYPANEL); refreshTree(); @@ -2449,6 +2452,10 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec Tag tag = (Tag) tagObj; showCard(CARDFLASHPANEL); showFontTag((FontTag) tagObj); + } else if ((tagObj instanceof TextTag) && (mainMenu.isInternalFlashViewerSelected())) { + Tag tag = (Tag) tagObj; + showCard(CARDFLASHPANEL); + showTextTag((TextTag) tagObj); } else if (tagObj instanceof FrameNodeItem && ((FrameNodeItem) tagObj).isDisplayed() && (mainMenu.isInternalFlashViewerSelected())) { showCard(CARDDRAWPREVIEWPANEL); FrameNodeItem fn = (FrameNodeItem) tagObj; @@ -2469,14 +2476,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec createAndShowTempSwf(tagObj); if (tagObj instanceof TextTag) { - TextTag textTag = (TextTag) tagObj; - parametersPanel.setVisible(true); - previewSplitPane.setDividerLocation(Configuration.guiPreviewSplitPaneDividerLocation.get(previewSplitPane.getWidth() / 2)); - showDetailWithPreview(CARDTEXTPANEL); - textValue.setContentType("text/swf_text"); - //textValue.setFont(new Font("Monospaced", Font.PLAIN, 13)); - textValue.setText(textTag.getFormattedText()); - textValue.setCaretPosition(0); + showTextTag((TextTag) tagObj); } else if (tagObj instanceof FontTag) { showFontTag((FontTag) tagObj); } else { @@ -2719,7 +2719,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec List actions; DoActionTag doa; - doa = new DoActionTag(null, new byte[]{}, swf.version, 0); + doa = new DoActionTag(null, new byte[]{}, 0); actions = ASMParser.parse(0, 0, false, "ConstantPool \"_root\" \"my_sound\" \"Sound\" \"my_define_sound\" \"attachSound\"\n" + "Push \"_root\"\n" @@ -2885,6 +2885,23 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec showDetailWithPreview(CARDFONTPANEL); } + private void showTextTag(TextTag textTag) { + if (mainMenu.isInternalFlashViewerSelected() /*|| ft instanceof GFxDefineCompactedFont*/) { + ((CardLayout) viewerCards.getLayout()).show(viewerCards, INTERNAL_VIEWER_CARD); + internelViewerPanel.setDrawable(textTag, textTag.getSwf(), textTag.getSwf().characters, 1); + } else { + ((CardLayout) viewerCards.getLayout()).show(viewerCards, FLASH_VIEWER_CARD); + } + + parametersPanel.setVisible(true); + previewSplitPane.setDividerLocation(Configuration.guiPreviewSplitPaneDividerLocation.get(previewSplitPane.getWidth() / 2)); + showDetailWithPreview(CARDTEXTPANEL); + textValue.setContentType("text/swf_text"); + //textValue.setFont(new Font("Monospaced", Font.PLAIN, 13)); + textValue.setText(textTag.getFormattedText()); + textValue.setCaretPosition(0); + } + public void expandSwfNodes() { TreeModel model = tagTree.getModel(); Object node = model.getRoot(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java b/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java index 619bda3a1..cd9b1d8b3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java @@ -19,27 +19,17 @@ package com.jpexs.decompiler.flash.gui; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.Point; -import java.awt.Rectangle; import java.awt.event.MouseEvent; -import java.awt.image.BufferedImage; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; import org.pushingpixels.flamingo.api.common.model.PopupButtonModel; import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.BasicRibbonApplicationMenuButtonUI; import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationMenuButton; -import org.pushingpixels.lafwidget.LafWidgetUtilities; -import org.pushingpixels.lafwidget.animation.effects.GhostPaintingUtils; import org.pushingpixels.lafwidget.animation.effects.GhostingListener; -import org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter; -import org.pushingpixels.substance.api.painter.fill.SubstanceFillPainter; import org.pushingpixels.substance.flamingo.common.ui.ActionPopupTransitionAwareUI; -import org.pushingpixels.substance.flamingo.utils.CommandButtonBackgroundDelegate; import org.pushingpixels.substance.flamingo.utils.CommandButtonVisualStateTracker; -import org.pushingpixels.substance.flamingo.utils.RibbonApplicationMenuButtonBackgroundDelegate; import org.pushingpixels.substance.internal.animation.StateTransitionTracker; -import org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities; /** * UI for {@link JRibbonApplicationMenuButton} components in Substance @@ -57,7 +47,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB private MyResizableIcon hoverIcon = null; private MyResizableIcon clickIcon = null; private MyResizableIcon normalIcon = null; - private boolean buttonResized = false; + private final boolean buttonResized = false; public MyResizableIcon getClickIcon() { return clickIcon; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviewPanel.java similarity index 89% rename from trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java rename to trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviewPanel.java index fc92df98a..a8ca8c94f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviwPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SWFPreviewPanel.java @@ -38,15 +38,15 @@ import javax.swing.SwingConstants; * * @author JPEXS */ -public class SWFPreviwPanel extends JPanel implements FlashDisplay { +public class SWFPreviewPanel extends JPanel implements FlashDisplay { ImagePanel pan; Timer timer; int frame = 1; - List frameImages = new ArrayList<>(); + List frameImages; JLabel buffering = new JLabel(AppStrings.translate("work.buffering") + "..."); - public SWFPreviwPanel() { + public SWFPreviewPanel() { pan = new ImagePanel(); pan.setBackground(View.swfBackgroundColor); setLayout(new BorderLayout()); @@ -64,6 +64,9 @@ public class SWFPreviwPanel extends JPanel implements FlashDisplay { public void load(final SWF swf) { this.swf = swf; + List frames = new ArrayList<>(); + frame = 0; + frameImages = frames; new Thread() { @Override public void run() { @@ -96,8 +99,7 @@ public class SWFPreviwPanel extends JPanel implements FlashDisplay { @Override public void run() { int newframe = (frame == swf.frameCount ? 1 : frame + 1); - if (frameImages.size() >= newframe) { - //pan.setImage(frameImages.get(newframe - 1)); + if (frameImages != null && frameImages.size() >= newframe) { frame = newframe; drawFrame(); pan.setBackground(View.swfBackgroundColor); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java index 834951094..d847e88a1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java @@ -87,13 +87,12 @@ public class CSMTextSettingsTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public CSMTextSettingsTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public CSMTextSettingsTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "CSMTextSettings", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); textID = sis.readUI16(); useFlashType = (int) sis.readUB(2); gridFit = (int) sis.readUB(3); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java index afd9dac9f..76bc1faea 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java @@ -60,13 +60,12 @@ public class DebugIDTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DebugIDTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DebugIDTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DebugID", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); debugId = sis.readBytesEx(16); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java index 1b8c4e1a5..2186268a1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java @@ -60,9 +60,9 @@ public class DefineBinaryDataTag extends CharacterTag { return baos.toByteArray(); } - public DefineBinaryDataTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBinaryDataTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBinaryData", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); tag = sis.readUI16(); reserved = sis.readUI32(); binaryData = sis.readBytesEx(sis.available()); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java index ef41dd86f..6d6af604c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java @@ -69,14 +69,14 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { return null; } - public DefineBitsJPEG2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsJPEG2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); imageData = sis.readBytesEx(sis.available()); } - public DefineBitsJPEG2Tag(SWF swf, byte[] data, int version, long pos, int characterID, byte[] imageData) throws IOException { + public DefineBitsJPEG2Tag(SWF swf, byte[] data, long pos, int characterID, byte[] imageData) throws IOException { super(swf, ID, "DefineBitsJPEG2", data, pos); this.characterID = characterID; this.imageData = imageData; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java index ddbd861e0..dd482e593 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java @@ -107,9 +107,9 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { return null; } - public DefineBitsJPEG3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsJPEG3Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG3", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); long alphaDataOffset = sis.readUI32(); imageData = sis.readBytesEx(alphaDataOffset); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java index 0ed517805..1abce854c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java @@ -136,13 +136,12 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineBitsJPEG4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsJPEG4Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG4", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); long alphaDataOffset = sis.readUI32(); deblockParam = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java index 1994ac520..08bd0b7bc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java @@ -107,9 +107,9 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { decompressed = false; } - public DefineBitsLossless2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsLossless2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBitsLossless2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); bitmapFormat = sis.readUI8(); bitmapWidth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java index ce9ac901c..7c74bee61 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java @@ -181,9 +181,9 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { decompressed = true; } - public DefineBitsLosslessTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsLosslessTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBitsLossless", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); bitmapFormat = sis.readUI8(); bitmapWidth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java index dc27a33e0..a10bef05d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java @@ -55,9 +55,9 @@ public class DefineBitsTag extends ImageTag { return true; } - public DefineBitsTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineBitsTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineBits", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); jpegData = sis.readBytesEx(sis.available()); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index 03df87899..39f860a1d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -101,13 +101,12 @@ public class DefineButton2Tag extends CharacterTag implements Container, Bounded * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineButton2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineButton2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineButton2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); buttonId = sis.readUI16(); reserved = (int) sis.readUB(7); trackAsMenu = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index 2003c71a5..a3da65d39 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -62,13 +62,12 @@ public class DefineButtonCxformTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineButtonCxformTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineButtonCxformTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineButtonCxform", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); buttonId = sis.readUI16(); buttonColorTransform = sis.readCXFORM(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index 75599388a..6679a41c1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -102,13 +102,12 @@ public class DefineButtonSoundTag extends CharacterIdTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineButtonSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineButtonSoundTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineButtonSound", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); buttonId = sis.readUI16(); buttonSoundChar0 = sis.readUI16(); if (buttonSoundChar0 != 0) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index ccac8cafb..bb731cdf1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -99,13 +99,12 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineButtonTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineButtonTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineButton", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); buttonId = sis.readUI16(); characters = sis.readBUTTONRECORDList(false); //actions = sis.readActionList(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index 27d75aa2b..c458826e4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -74,7 +74,7 @@ import org.xml.sax.helpers.DefaultHandler; * * @author JPEXS */ -public class DefineEditTextTag extends TextTag implements DrawableTag { +public class DefineEditTextTag extends TextTag { @SWFType(BasicType.UI16) public int characterID; @@ -693,13 +693,12 @@ public class DefineEditTextTag extends TextTag implements DrawableTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineEditTextTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineEditTextTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineEditText", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); bounds = sis.readRECT(); hasText = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index ea6c16098..898223e1b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -194,13 +194,12 @@ public class DefineFont2Tag extends FontTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineFont2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFont2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFont2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); fontFlagsHasLayout = sis.readUB(1) == 1; fontFlagsShiftJIS = sis.readUB(1) == 1; @@ -212,7 +211,7 @@ public class DefineFont2Tag extends FontTag { fontFlagsBold = sis.readUB(1) == 1; languageCode = sis.readLANGCODE(); int fontNameLen = sis.readUI8(); - if (version >= 6) { + if (swf.version >= 6) { fontName = new String(sis.readBytesEx(fontNameLen), Utf8Helper.charset); } else { fontName = new String(sis.readBytesEx(fontNameLen)); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index f85189fb5..4df3150e5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -110,9 +110,9 @@ public class DefineFont3Tag extends FontTag { return codeTable.indexOf((Integer) (int) c); } - public DefineFont3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFont3Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFont3", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); fontFlagsHasLayout = sis.readUB(1) == 1; fontFlagsShiftJIS = sis.readUB(1) == 1; @@ -124,7 +124,7 @@ public class DefineFont3Tag extends FontTag { fontFlagsBold = sis.readUB(1) == 1; languageCode = sis.readLANGCODE(); int fontNameLen = sis.readUI8(); - if (version >= 6) { + if (swf.version >= 6) { fontName = new String(sis.readBytesEx(fontNameLen), Utf8Helper.charset); } else { fontName = new String(sis.readBytesEx(fontNameLen)); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java index 0b65c4a1d..c4b1ada30 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java @@ -48,9 +48,9 @@ public class DefineFont4Tag extends CharacterTag { return fontID; } - public DefineFont4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFont4Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFont4", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontID = sis.readUI16(); reserved = (int) sis.readUB(5); fontFlagsHasFontData = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java index 780570652..902a11502 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java @@ -44,9 +44,9 @@ public class DefineFontAlignZonesTag extends Tag { public List zoneTable; public static final int ID = 73; - public DefineFontAlignZonesTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFontAlignZonesTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFontAlignZones", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontID = sis.readUI16(); CSMTableHint = (int) sis.readUB(2); reserved = (int) sis.readUB(6); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index ba74ecb51..0acc2b630 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -91,16 +91,15 @@ public class DefineFontInfo2Tag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineFontInfo2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFontInfo2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFontInfo2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontID = sis.readUI16(); int fontNameLen = sis.readUI8(); - if (version >= 6) { + if (swf.version >= 6) { fontName = new String(sis.readBytesEx(fontNameLen), Utf8Helper.charset); } else { fontName = new String(sis.readBytesEx(fontNameLen)); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index 5747b9c10..a90c1b95d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -92,16 +92,15 @@ public class DefineFontInfoTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineFontInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFontInfoTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFontInfo", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); int fontNameLen = sis.readUI8(); - if (version >= 6) { + if (swf.version >= 6) { fontName = new String(sis.readBytesEx(fontNameLen), Utf8Helper.charset); } else { fontName = new String(sis.readBytesEx(fontNameLen)); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java index 2bb842324..4a6167f71 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java @@ -31,9 +31,9 @@ public class DefineFontNameTag extends Tag { public String fontCopyright; public static final int ID = 88; - public DefineFontNameTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFontNameTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFontName", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); fontName = sis.readString(); fontCopyright = sis.readString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java index be056f762..348e77bfa 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java @@ -139,13 +139,12 @@ public class DefineFontTag extends FontTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineFontTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineFontTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineFont", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); int firstOffset = sis.readUI16(); int nGlyphs = firstOffset / 2; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index 6450bbc3b..1d9d272b2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -140,13 +140,12 @@ public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag, Mo * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineMorphShape2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineMorphShape2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineMorphShape2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); startBounds = sis.readRECT(); endBounds = sis.readRECT(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index cd1d32177..f66fe444c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -118,13 +118,12 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Mor * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineMorphShapeTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineMorphShapeTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineMorphShape", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); startBounds = sis.readRECT(); endBounds = sis.readRECT(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index 536920e72..42540b2f9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -37,9 +37,9 @@ public class DefineScalingGridTag extends Tag { public RECT splitter; public static final int ID = 78; - public DefineScalingGridTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineScalingGridTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineScalingGrid", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); splitter = sis.readRECT(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index ed5aea087..007f59d6b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -81,13 +81,12 @@ public class DefineSceneAndFrameLabelDataTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineSceneAndFrameLabelDataTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineSceneAndFrameLabelDataTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineSceneAndFrameLabelData", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); int sceneCount = (int) sis.readEncodedU32(); sceneOffsets = new long[sceneCount]; sceneNames = new String[sceneCount]; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index 593037c35..b717d4ec3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -92,9 +92,9 @@ public class DefineShape2Tag extends CharacterTag implements ShapeTag { return shapeBounds; } - public DefineShape2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineShape2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineShape2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); shapeId = sis.readUI16(); shapeBounds = sis.readRECT(); shapes = sis.readSHAPEWITHSTYLE(2); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index 68b6bd594..215bac15d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java @@ -92,9 +92,9 @@ public class DefineShape3Tag extends CharacterTag implements ShapeTag { return shapeId; } - public DefineShape3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineShape3Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineShape3", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); shapeId = sis.readUI16(); shapeBounds = sis.readRECT(); shapes = sis.readSHAPEWITHSTYLE(3); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index 9db07e917..dab106691 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java @@ -100,9 +100,9 @@ public class DefineShape4Tag extends CharacterTag implements ShapeTag { return shapeBounds; } - public DefineShape4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineShape4Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineShape4", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); shapeId = sis.readUI16(); shapeBounds = sis.readRECT(); edgeBounds = sis.readRECT(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index bfd3e140c..da11b1156 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -67,9 +67,9 @@ public class DefineShapeTag extends CharacterTag implements ShapeTag { return shapeBounds; } - public DefineShapeTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineShapeTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineShape", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); shapeId = sis.readUI16(); shapeBounds = sis.readRECT(); shapes = sis.readSHAPEWITHSTYLE(1); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index 0f38d8cf8..61c0879d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -93,13 +93,12 @@ public class DefineSoundTag extends CharacterTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineSoundTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineSound", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); soundId = sis.readUI16(); soundFormat = (int) sis.readUB(4); soundRate = (int) sis.readUB(2); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index b720b53b1..d06983763 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -192,7 +192,6 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT * * @param swf * @param data Data bytes - * @param version SWF version * @param level * @param pos * @param parallel @@ -200,9 +199,9 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT * @throws IOException * @throws java.lang.InterruptedException */ - public DefineSpriteTag(SWF swf, byte[] data, int version, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException, InterruptedException { + public DefineSpriteTag(SWF swf, byte[] data, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException, InterruptedException { super(swf, ID, "DefineSprite", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version, pos); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version, pos); spriteId = sis.readUI16(); frameCount = sis.readUI16(); subTags = sis.readTagList(swf, level + 1, parallel, skipUnusualTags, true, swf.gfx); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java index f12316967..4e79ab463 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java @@ -58,7 +58,7 @@ import java.util.regex.Pattern; * * @author JPEXS */ -public class DefineText2Tag extends TextTag implements DrawableTag { +public class DefineText2Tag extends TextTag { @SWFType(BasicType.UI16) public int characterID; @@ -461,13 +461,12 @@ public class DefineText2Tag extends TextTag implements DrawableTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineText2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineText2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineText2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); textBounds = sis.readRECT(); textMatrix = sis.readMatrix(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index 27342fc88..fa2018d64 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -59,7 +59,7 @@ import java.util.regex.Pattern; * * @author JPEXS */ -public class DefineTextTag extends TextTag implements DrawableTag { +public class DefineTextTag extends TextTag { @SWFType(BasicType.UI16) public int characterID; @@ -472,13 +472,12 @@ public class DefineTextTag extends TextTag implements DrawableTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineTextTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineTextTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineText", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); textBounds = sis.readRECT(); textMatrix = sis.readMatrix(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index 03cab36dc..43e99fafc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java @@ -103,13 +103,12 @@ public class DefineVideoStreamTag extends CharacterTag implements BoundedTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineVideoStreamTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineVideoStreamTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineVideoStream", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterID = sis.readUI16(); numFrames = sis.readUI16(); width = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index b20bbf9cf..d9b1011d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -69,14 +69,13 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DoABCDefineTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DoABCDefineTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DoABCDefine", data, pos); InputStream is = new ByteArrayInputStream(data); - SWFInputStream sis = new SWFInputStream(is, version); + SWFInputStream sis = new SWFInputStream(is, swf.version); flags = sis.readUI32(); name = sis.readString(); abc = new ABC(is, swf); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index 86980bb8d..83fed28a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -55,11 +55,10 @@ public class DoABCTag extends Tag implements ABCContainerTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DoABCTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DoABCTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DoABC", data, pos); InputStream is = new ByteArrayInputStream(data); abc = new ABC(is, swf); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index dbf9f5700..0ec28cd53 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -52,10 +52,9 @@ public class DoActionTag extends Tag implements ASMSource { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos */ - public DoActionTag(SWF swf, byte[] data, int version, long pos) { + public DoActionTag(SWF swf, byte[] data, long pos) { super(swf, ID, "DoAction", data, pos); actionBytes = data; } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 4b9f99b11..dca09d927 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -59,13 +59,12 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DoInitActionTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public DoInitActionTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DoInitAction", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); spriteId = sis.readUI16(); //actions = sis.readActionList(); actionBytes = sis.readBytesEx(sis.available()); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index 0aabef0fe..790bb213d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -67,13 +67,12 @@ public class EnableDebugger2Tag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public EnableDebugger2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public EnableDebugger2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "EnableDebugger2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); reserved = sis.readUI16(); passwordHash = sis.readString(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index 48b8bb459..be90be126 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -61,13 +61,12 @@ public class EnableDebuggerTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public EnableDebuggerTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public EnableDebuggerTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "EnableDebugger", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); passwordHash = sis.readString(); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java index 35c2d5bec..fe3613c00 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java @@ -70,13 +70,12 @@ public class EnableTelemetryTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public EnableTelemetryTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public EnableTelemetryTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); reserved = (int) sis.readUB(16); if (sis.available() > 0) { passwordHash = sis.readBytesEx(32); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java index 47defbbc1..427a9127d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java @@ -42,11 +42,10 @@ public class EndTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public EndTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public EndTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "End", data, pos); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index 478d7bd42..c44dd790f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -58,13 +58,12 @@ public class ExportAssetsTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public ExportAssetsTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ExportAssetsTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ExportAssets", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); int count = sis.readUI16(); tags = new ArrayList<>(); names = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java index 74eafa058..40377c648 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java @@ -49,9 +49,9 @@ public class FileAttributesTag extends Tag { super(null, ID, "FileAttributes", new byte[]{}, 0); } - public FileAttributesTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public FileAttributesTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "FileAttributes", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); reserved1 = sis.readUB(1) == 1; // reserved // UB[1] == 0 (reserved) useDirectBlit = sis.readUB(1) != 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java index 7067b2431..0f8ddf987 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java @@ -38,9 +38,9 @@ public class FrameLabelTag extends Tag { return namedAnchor; } - public FrameLabelTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public FrameLabelTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "FrameLabel", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); name = sis.readString(); if (sis.available() > 0) { if (sis.readUI8() == 1) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 00102c2ea..56a1c650a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -62,15 +62,14 @@ public class ImportAssets2Tag extends Tag implements ImportTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public ImportAssets2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ImportAssets2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ImportAssets2", data, pos); tags = new ArrayList<>(); names = new ArrayList<>(); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); url = sis.readString(); reserved1 = sis.readUI8();//reserved, must be 1 reserved2 = sis.readUI8();//reserved, must be 0 diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index e27a9c8bc..e61f89649 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -55,15 +55,14 @@ public class ImportAssetsTag extends Tag implements ImportTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public ImportAssetsTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ImportAssetsTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ImportAssets", data, pos); tags = new ArrayList<>(); names = new ArrayList<>(); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); url = sis.readString(); int count = sis.readUI16(); for (int i = 0; i < count; i++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index 7869cca57..bfb9cd9be 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -31,10 +31,10 @@ public class MetadataTag extends Tag { public String xmlMetadata; public static final int ID = 77; - public MetadataTag(SWF swf, byte[] data, int version, long pos) { + public MetadataTag(SWF swf, byte[] data, long pos) { super(swf, ID, "Metadata", data, pos); try { - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); xmlMetadata = sis.readString(); } catch (IOException ex) { } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java index c7dada19f..753e60c13 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java @@ -219,13 +219,12 @@ public class PlaceObject2Tag extends CharacterIdTag implements Container, PlaceO * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public PlaceObject2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public PlaceObject2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "PlaceObject2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); placeFlagHasClipActions = sis.readUB(1) == 1; placeFlagHasClipDepth = sis.readUB(1) == 1; placeFlagHasName = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java index 56315c9d9..57aefc2e6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java @@ -303,13 +303,12 @@ public class PlaceObject3Tag extends CharacterIdTag implements Container, PlaceO * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public PlaceObject3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public PlaceObject3Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "PlaceObject3", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); placeFlagHasClipActions = sis.readUB(1) == 1; placeFlagHasClipDepth = sis.readUB(1) == 1; placeFlagHasName = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 691c0558c..7ddfea03d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -305,13 +305,12 @@ public class PlaceObject4Tag extends CharacterIdTag implements Container, PlaceO * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public PlaceObject4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public PlaceObject4Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "PlaceObject4", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); placeFlagHasClipActions = sis.readUB(1) == 1; placeFlagHasClipDepth = sis.readUB(1) == 1; placeFlagHasName = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java index f96dadfd9..40a6087a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java @@ -103,13 +103,12 @@ public class PlaceObjectTag extends CharacterIdTag implements PlaceObjectTypeTag * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public PlaceObjectTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public PlaceObjectTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "PlaceObject", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); depth = sis.readUI16(); matrix = sis.readMatrix(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java index a99d81ad0..c2262581b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java @@ -46,9 +46,9 @@ public class ProductInfoTag extends Tag { public long compilationDateHigh; public static final int ID = 41; - public ProductInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ProductInfoTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ProductInfo", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); /* * 0: Unknown * 1: Macromedia Flex for J2EE diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index 665e58e1e..057df7c6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -61,13 +61,12 @@ public class ProtectTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public ProtectTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ProtectTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "Protect", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); if (sis.available() > 0) { passwordHash = sis.readString(); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java index 2af3c42b5..20bf34e8a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java @@ -30,9 +30,9 @@ public class RemoveObject2Tag extends Tag implements RemoveTag { public int depth; public static final int ID = 28; - public RemoveObject2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public RemoveObject2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "RemoveObject2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); depth = sis.readUI16(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java index 65ec59ac9..dd3075445 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java @@ -70,13 +70,12 @@ public class RemoveObjectTag extends CharacterIdTag implements RemoveTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public RemoveObjectTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public RemoveObjectTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "RemoveObject", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); depth = sis.readUI16(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java index 80e29019d..50191d1fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java @@ -36,9 +36,9 @@ public class ScriptLimitsTag extends Tag { public static final int ID = 65; - public ScriptLimitsTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ScriptLimitsTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ScriptLimits", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); maxRecursionDepth = sis.readUI16(); scriptTimeoutSeconds = sis.readUI16(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java index f7184fb9e..57d95b3ad 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java @@ -29,9 +29,9 @@ public class SetBackgroundColorTag extends Tag { public RGB backgroundColor; public static final int ID = 9; - public SetBackgroundColorTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SetBackgroundColorTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SetBackgroundColor", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); backgroundColor = sis.readRGB(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java index 10d1d23a7..b8c79d09e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java @@ -68,13 +68,12 @@ public class SetTabIndexTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public SetTabIndexTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SetTabIndexTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SetTabIndex", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); depth = sis.readUI16(); tabIndex = sis.readUI16(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java index 81e42e311..af3a201a2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java @@ -33,11 +33,10 @@ public class SoundStreamBlockTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public SoundStreamBlockTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SoundStreamBlockTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SoundStreamBlock", data, pos); //all data is streamSoundData } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java index 5c9300129..085b0cbf9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java @@ -127,13 +127,12 @@ public class SoundStreamHead2Tag extends CharacterIdTag implements SoundStreamHe * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public SoundStreamHead2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SoundStreamHead2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SoundStreamHead2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); reserved = (int) sis.readUB(4); playBackSoundRate = (int) sis.readUB(2); playBackSoundSize = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index e1dabcf55..f385ac8b3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -118,13 +118,12 @@ public class SoundStreamHeadTag extends CharacterIdTag implements SoundStreamHea * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public SoundStreamHeadTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SoundStreamHeadTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SoundStreamHead", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); reserved = (int) sis.readUB(4); playBackSoundRate = (int) sis.readUB(2); playBackSoundSize = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java index 80c937922..e36da5c08 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java @@ -58,13 +58,12 @@ public class StartSound2Tag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public StartSound2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { + public StartSound2Tag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "StartSound2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); soundClassName = sis.readString(); soundInfo = sis.readSOUNDINFO(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java index 8b3b40fa2..9affca4ae 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java @@ -62,13 +62,12 @@ public class StartSoundTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public StartSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public StartSoundTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "StartSound", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); soundId = sis.readUI16(); soundInfo = sis.readSOUNDINFO(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java index 2899bcafc..4fd775c3d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java @@ -36,9 +36,9 @@ public class SymbolClassTag extends Tag { public String[] names; public static final int ID = 76; - public SymbolClassTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public SymbolClassTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "SymbolClass", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); int numSymbols = sis.readUI16(); tags = new int[numSymbols]; names = new String[numSymbols]; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java b/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java index 12fd63456..37fc32773 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java @@ -55,13 +55,12 @@ public class TagStub extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public TagStub(SWF swf, byte[] data, int version, long pos) throws IOException { + public TagStub(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "" /*TODO:Insert name here*/, data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java index 806999f6d..e5fc55c3d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java @@ -64,13 +64,12 @@ public class VideoFrameTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public VideoFrameTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public VideoFrameTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "VideoFrame", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); streamID = sis.readUI16(); frameNum = sis.readUI16(); videoData = sis.readBytesEx(sis.available()); //TODO: Parse video packets diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/TextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/TextTag.java index 528659188..0687764f1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/TextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/TextTag.java @@ -43,7 +43,7 @@ import java.util.Map; * * @author JPEXS */ -public abstract class TextTag extends CharacterTag implements BoundedTag { +public abstract class TextTag extends CharacterTag implements BoundedTag, DrawableTag { public TextTag(SWF swf, int id, String name, byte[] data, long pos) { super(swf, id, name, data, pos); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java index 319c35993..49615a774 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Paragraph.java @@ -30,7 +30,7 @@ public class Paragraph { public List words = new ArrayList<>(); private Word word; - private DynamicTextModel model; + private final DynamicTextModel model; public int width; public Paragraph(DynamicTextModel model) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java index b15a9247d..5a03e15ad 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/SameStyleTextRecord.java @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.tags.dynamictext; -import com.jpexs.decompiler.flash.types.GLYPHENTRY; import java.util.ArrayList; import java.util.List; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java index b3e6ebf30..a21ddbf2e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/dynamictext/Word.java @@ -30,7 +30,7 @@ public class Word { public List records = new ArrayList<>(); private SameStyleTextRecord record; - private DynamicTextModel model; + private final DynamicTextModel model; public int width; public Word(DynamicTextModel model) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java index 4c76a96bd..9300332a1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java @@ -94,14 +94,13 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineCompactedFont(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineCompactedFont(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineCompactedFont", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); fontId = sis.readUI16(); fonts = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java index 71b6f39cd..6bd675e5c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalGradient.java @@ -68,13 +68,12 @@ public class DefineExternalGradient extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineExternalGradient(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineExternalGradient(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineExternalGradient", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); gradientId = sis.readUI16(); bitmapsFormat = sis.readUI16(); gradientSize = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java index b675e780f..8ce4bb090 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage.java @@ -70,13 +70,12 @@ public class DefineExternalImage extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineExternalImage(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineExternalImage(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineExternalImage", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); bitmapFormat = sis.readUI16(); targetWidth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java index 56bfabfa9..532e81159 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalImage2.java @@ -78,13 +78,12 @@ public class DefineExternalImage2 extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineExternalImage2(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineExternalImage2(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineExternalImage2", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI32(); bitmapFormat = sis.readUI16(); targetWidth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java index bc3ebfa8b..a6f1e06f4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalSound.java @@ -78,13 +78,12 @@ public class DefineExternalSound extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineExternalSound(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineExternalSound(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineExternalSound", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); soundFormat = sis.readUI16(); bits = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java index c597e63ea..e976b4b73 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineExternalStreamSound.java @@ -76,13 +76,12 @@ public class DefineExternalStreamSound extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineExternalStreamSound(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineExternalStreamSound(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineExternalStreamSound", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); soundFormat = sis.readUI16(); bits = sis.readUI16(); channels = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java index d97377a70..5a9fe1f15 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineGradientMap.java @@ -60,13 +60,12 @@ public class DefineGradientMap extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineGradientMap(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineGradientMap(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineGradientMap", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); int numGradients = sis.readUI16(); indices = new int[numGradients]; for (int i = 0; i < numGradients; i++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java index 1c93ec3c9..ad3214943 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineSubImage.java @@ -67,13 +67,12 @@ public class DefineSubImage extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public DefineSubImage(SWF swf, byte[] data, int version, long pos) throws IOException { + public DefineSubImage(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "DefineSubImage", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); characterId = sis.readUI16(); imageCharacterId = sis.readUI16(); x1 = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java index 4128ebb8f..ab92734bc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/ExporterInfoTag.java @@ -86,11 +86,10 @@ public class ExporterInfoTag extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public ExporterInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException { + public ExporterInfoTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "ExporterInfo", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); this.version = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java index a43c85b20..539e997d2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/FontTextureInfo.java @@ -88,13 +88,12 @@ public class FontTextureInfo extends Tag { * * @param swf * @param data Data bytes - * @param version SWF version * @param pos * @throws IOException */ - public FontTextureInfo(SWF swf, byte[] data, int version, long pos) throws IOException { + public FontTextureInfo(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "FontTextureInfo", data, pos); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), swf.version); textureID = sis.readUI32(); textureFormat = sis.readUI16(); int fileNameLen = sis.readUI8(); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index 36c16c77e..638541799 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -59,9 +59,9 @@ public class BUTTONCONDACTION implements ASMSource, Exportable, ContainerItem, S return pos; } - public BUTTONCONDACTION(SWF swf, InputStream is, int version, long containerOffset) throws IOException { + public BUTTONCONDACTION(SWF swf, InputStream is, long containerOffset) throws IOException { this.swf = swf; - SWFInputStream sis = new SWFInputStream(is, version); + SWFInputStream sis = new SWFInputStream(is, swf.version); pos = containerOffset; int condActionSize = sis.readUI16(); isLast = condActionSize <= 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index 989800390..d78846e27 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -103,9 +103,9 @@ public class CLIPACTIONRECORD implements ASMSource, Exportable, ContainerItem, S hdrPos = 0; } - public CLIPACTIONRECORD(SWF swf, InputStream is, int version, long pos) throws IOException { + public CLIPACTIONRECORD(SWF swf, InputStream is, long pos) throws IOException { this.swf = swf; - SWFInputStream sis = new SWFInputStream(is, version); + SWFInputStream sis = new SWFInputStream(is, swf.version); eventFlags = sis.readCLIPEVENTFLAGS(); if (eventFlags.isClear()) { return;