From 35548292c7a05bc4bd91e473986bfd647e3dc84a Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Wed, 11 Mar 2015 23:06:24 +0100 Subject: [PATCH] Shape export to xml fixed, ffdec.sh fixed --- installer.nsi | 4 ++-- .../jpexs/decompiler/flash/SWFInputStream.java | 4 ++-- .../decompiler/flash/tags/DefineShape2Tag.java | 2 +- .../decompiler/flash/tags/DefineSpriteTag.java | 15 ++++++++++----- .../src/com/jpexs/decompiler/flash/tags/Tag.java | 8 -------- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/installer.nsi b/installer.nsi index 0bfb41cf1..050bcc4f8 100644 --- a/installer.nsi +++ b/installer.nsi @@ -760,8 +760,8 @@ DetailPrint "Checking Adobe site for newest PlayerGlobal.swc file" inetc::get /SILENT /USERAGENT "${APP_NAME} Setup" "https://www.adobe.com/support/flashplayer/downloads.html" "${PGHTML}" Pop $0 StrCmp $0 "OK" dlok -;MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP "PlayerGlobal.SWC was not found on Adobe webpages. You can download it later manually." /SD IDIGNORE IDRETRY checkadobe IDIGNORE exit -MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP "PlayerGlobal.SWC was not found on Adobe webpages. You can download it later manually. (Error returned was: $0)" /SD IDIGNORE IDRETRY checkadobe IDIGNORE exit +MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP "PlayerGlobal.SWC was not found on Adobe webpages. You can download it later manually." /SD IDIGNORE IDRETRY checkadobe IDIGNORE exit +;MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP "PlayerGlobal.SWC was not found on Adobe webpages. You can download it later manually. (Error returned was: $0)" /SD IDIGNORE IDRETRY checkadobe IDIGNORE exit Abort dlok: diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index 13d276322..fbd1c8164 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -994,8 +994,8 @@ public class SWFInputStream implements AutoCloseable { sb.append(Helper.bytesToHexString(64, tag.getOriginalData(), 0)); out.println(sb.toString()); // out.println(Utils.formatHex((int)tag.getPos(), 8) + ": " + Utils.indent(level, "") + Utils.format(tag.toString(), 25 - 2*level) + " tagId="+tag.getId()+" len="+tag.getOrigDataLength()+": "+Utils.bytesToHexString(64, tag.getData(version), 0)); - if (tag.hasSubTags()) { - for (Tag subTag : tag.getSubTags()) { + if (tag instanceof DefineSpriteTag) { + for (Tag subTag : ((DefineSpriteTag) tag).getSubTags()) { dumpTag(out, version, subTag, level + 1); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index 80dcbbbab..ded652c64 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -38,7 +38,7 @@ public class DefineShape2Tag extends ShapeTag { @SWFType(BasicType.UI16) public int shapeId; - private RECT shapeBounds; + public RECT shapeBounds; public SHAPEWITHSTYLE shapes; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index dc5405b54..1e1495c97 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -260,14 +260,19 @@ public class DefineSpriteTag extends CharacterTag implements DrawableTag, Timeli return baos.toByteArray(); } - @Override - public boolean hasSubTags() { - return true; + public List getSubTags() { + return subTags; } @Override - public List getSubTags() { - return subTags; + public void setModified(boolean value) { + if (!value) { + for (Tag subTag : subTags) { + subTag.setModified(false); + } + } + + super.setModified(value); } public static void clearCache() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java index 3afa77483..bbf172920 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -519,14 +519,6 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable { return shortLength == 0x3f; } - public boolean hasSubTags() { - return false; - } - - public List getSubTags() { - return null; - } - public long getPos() { if (originalRange == null) { return -1;