mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-08-02 16:01:15 +00:00
allow adding "other type" tags
This commit is contained in:
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -81,6 +83,14 @@ public class CSMTextSettingsTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public CSMTextSettingsTag(SWF swf) {
|
||||
super(swf, ID, "CSMTextSettings", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -54,6 +56,15 @@ public class DebugIDTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DebugIDTag(SWF swf) {
|
||||
super(swf, ID, "DebugID", null);
|
||||
debugId = new byte[16];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -56,6 +58,15 @@ public class DefineButtonCxformTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineButtonCxformTag(SWF swf) {
|
||||
super(swf, ID, "DefineButtonCxform", null);
|
||||
buttonColorTransform = new CXFORM();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
|
||||
@@ -96,6 +98,14 @@ public class DefineButtonSoundTag extends CharacterIdTag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineButtonSoundTag(SWF swf) {
|
||||
super(swf, ID, "DefineButtonSound", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -42,6 +44,15 @@ public class DefineFontAlignZonesTag extends Tag {
|
||||
public List<ZONERECORD> zoneTable;
|
||||
public static final int ID = 73;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineFontAlignZonesTag(SWF swf) {
|
||||
super(swf, ID, "DefineFontAlignZones", null);
|
||||
zoneTable = new ArrayList<>();
|
||||
}
|
||||
|
||||
public DefineFontAlignZonesTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "DefineFontAlignZones", data);
|
||||
fontID = sis.readUI16("fontID");
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -26,6 +28,7 @@ import com.jpexs.helpers.utf8.Utf8Helper;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -85,6 +88,17 @@ public class DefineFontInfo2Tag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineFontInfo2Tag(SWF swf) {
|
||||
super(swf, ID, "DefineFontInfo2", null);
|
||||
fontName = "New Font Info Name";
|
||||
languageCode = new LANGCODE();
|
||||
codeTable = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -86,6 +88,16 @@ public class DefineFontInfoTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineFontInfoTag(SWF swf) {
|
||||
super(swf, ID, "DefineFontInfo", null);
|
||||
fontName = "New Font Info Name";
|
||||
codeTable = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -110,12 +122,12 @@ public class DefineFontInfoTag extends Tag {
|
||||
fontFlagsBold = sis.readUB(1, "fontFlagsBold") == 1;
|
||||
fontFlagsWideCodes = sis.readUB(1, "fontFlagsWideCodes") == 1;
|
||||
codeTable = new ArrayList<>();
|
||||
codeTable = new ArrayList<>();
|
||||
while (sis.available() > 0) {
|
||||
if (fontFlagsWideCodes) {
|
||||
codeTable.add(sis.readUI16("code"));
|
||||
} else {
|
||||
codeTable.add(sis.readUI8("code"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -32,6 +34,16 @@ public class DefineFontNameTag extends Tag {
|
||||
public String fontCopyright;
|
||||
public static final int ID = 88;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineFontNameTag(SWF swf) {
|
||||
super(swf, ID, "DefineFontName", null);
|
||||
fontName = "New Font Name";
|
||||
fontCopyright = "Copyright text";
|
||||
}
|
||||
|
||||
public DefineFontNameTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "DefineFontName", data);
|
||||
fontId = sis.readUI16("fontId");
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -35,6 +37,15 @@ public class DefineScalingGridTag extends Tag {
|
||||
public RECT splitter;
|
||||
public static final int ID = 78;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineScalingGridTag(SWF swf) {
|
||||
super(swf, ID, "DefineScalingGrid", null);
|
||||
splitter = new RECT();
|
||||
}
|
||||
|
||||
public DefineScalingGridTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "DefineScalingGrid", data);
|
||||
characterId = sis.readUI16("characterId");
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -75,6 +77,18 @@ public class DefineSceneAndFrameLabelDataTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DefineSceneAndFrameLabelDataTag(SWF swf) {
|
||||
super(swf, ID, "DefineSceneAndFrameLabelData", null);
|
||||
sceneOffsets = new long[0];
|
||||
sceneNames = new String[0];
|
||||
frameNums= new long[0];
|
||||
frameNames = new String[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -65,6 +65,16 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag {
|
||||
return "DoABCDefine (" + name + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DoABCDefineTag(SWF swf) {
|
||||
super(swf, ID, "DoABCDefine", null);
|
||||
name = "New DoABC";
|
||||
abc = new ABC(swf);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -52,6 +52,15 @@ public class DoABCTag extends Tag implements ABCContainerTag {
|
||||
return "DoABC";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DoABCTag(SWF swf) {
|
||||
super(swf, ID, "DoABC", null);
|
||||
abc = new ABC(swf);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -48,6 +48,14 @@ public class DoActionTag extends Tag implements ASMSource {
|
||||
public ByteArrayRange actionBytes;
|
||||
public static final int ID = 12;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DoActionTag(SWF swf) {
|
||||
super(swf, ID, "DoAction", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.DisassemblyListener;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
@@ -53,6 +54,14 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource {
|
||||
public ByteArrayRange actionBytes;
|
||||
public static final int ID = 59;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public DoInitActionTag(SWF swf) {
|
||||
super(swf, ID, "DoInitAction", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -61,6 +63,15 @@ public class EnableDebugger2Tag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public EnableDebugger2Tag(SWF swf) {
|
||||
super(swf, ID, "EnableDebugger2", null);
|
||||
passwordHash = "PasswordHash";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
@@ -55,6 +57,15 @@ public class EnableDebuggerTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public EnableDebuggerTag(SWF swf) {
|
||||
super(swf, ID, "EnableDebugger", null);
|
||||
passwordHash = "PasswordHash";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -64,6 +66,15 @@ public class EnableTelemetryTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public EnableTelemetryTag(SWF swf) {
|
||||
super(swf, ID, "EnableTelemetry", null);
|
||||
passwordHash = new byte[32];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -38,6 +39,14 @@ public class EndTag extends Tag {
|
||||
|
||||
public static final int ID = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public EndTag(SWF swf) {
|
||||
super(swf, ID, "End", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -49,8 +58,4 @@ public class EndTag extends Tag {
|
||||
super(swf, ID, "End", data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public EndTag(SWF swf) {
|
||||
super(swf, ID, "End", null);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -46,6 +47,10 @@ public class ExportAssetsTag extends Tag {
|
||||
public List<String> names;
|
||||
public static final int ID = 56;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ExportAssetsTag(SWF swf) {
|
||||
super(swf, ID, "ExportAssets", null);
|
||||
tags = new ArrayList<>();
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -44,6 +45,10 @@ public class FileAttributesTag extends Tag {
|
||||
public int reserved3;
|
||||
public static final int ID = 69;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public FileAttributesTag(SWF swf) {
|
||||
super(swf, ID, "FileAttributes", null);
|
||||
}
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.ImportTag;
|
||||
@@ -55,6 +57,16 @@ public class ImportAssets2Tag extends Tag implements ImportTag {
|
||||
public List<String> names;
|
||||
public static final int ID = 71;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ImportAssets2Tag(SWF swf) {
|
||||
super(swf, ID, "ImportAssets2", null);
|
||||
url = "";
|
||||
tags = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.ImportTag;
|
||||
@@ -48,6 +50,16 @@ public class ImportAssetsTag extends Tag implements ImportTag {
|
||||
public List<String> names;
|
||||
public static final int ID = 57;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ImportAssetsTag(SWF swf) {
|
||||
super(swf, ID, "ImportAssets", null);
|
||||
url = "";
|
||||
tags = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
@@ -29,6 +31,15 @@ public class JPEGTablesTag extends Tag {
|
||||
@Internal
|
||||
public byte[] jpegData;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public JPEGTablesTag(SWF swf) {
|
||||
super(swf, ID, "JPEGTables", null);
|
||||
jpegData = new byte[0];
|
||||
}
|
||||
|
||||
public JPEGTablesTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "JPEGTables", data);
|
||||
jpegData = sis.readBytesEx(sis.available(), "jpegData");
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Multiline;
|
||||
@@ -29,6 +31,15 @@ public class MetadataTag extends Tag {
|
||||
public String xmlMetadata;
|
||||
public static final int ID = 77;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public MetadataTag(SWF swf) {
|
||||
super(swf, ID, "Metadata", null);
|
||||
xmlMetadata = "";
|
||||
}
|
||||
|
||||
public MetadataTag(SWFInputStream sis, ByteArrayRange data) {
|
||||
super(sis.getSwf(), ID, "Metadata", data);
|
||||
try {
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -44,6 +46,14 @@ public class ProductInfoTag extends Tag {
|
||||
public long compilationDateHigh;
|
||||
public static final int ID = 41;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ProductInfoTag(SWF swf) {
|
||||
super(swf, ID, "ProductInfo", null);
|
||||
}
|
||||
|
||||
public ProductInfoTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "ProductInfo", data);
|
||||
/*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
@@ -55,6 +57,15 @@ public class ProtectTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ProtectTag(SWF swf) {
|
||||
super(swf, ID, "Protect", null);
|
||||
passwordHash = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -34,6 +36,14 @@ public class ScriptLimitsTag extends Tag {
|
||||
|
||||
public static final int ID = 65;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ScriptLimitsTag(SWF swf) {
|
||||
super(swf, ID, "ScriptLimits", null);
|
||||
}
|
||||
|
||||
public ScriptLimitsTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "ScriptLimits", data);
|
||||
maxRecursionDepth = sis.readUI16("maxRecursionDepth");
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -28,6 +29,15 @@ public class SetBackgroundColorTag extends Tag {
|
||||
public RGB backgroundColor;
|
||||
public static final int ID = 9;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public SetBackgroundColorTag(SWF swf) {
|
||||
super(swf, ID, "SetBackgroundColor", null);
|
||||
backgroundColor = new RGB();
|
||||
}
|
||||
|
||||
public SetBackgroundColorTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "SetBackgroundColor", data);
|
||||
backgroundColor = sis.readRGB("backgroundColor");
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -62,6 +64,14 @@ public class SetTabIndexTag extends Tag {
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public SetTabIndexTag(SWF swf) {
|
||||
super(swf, ID, "SetTabIndex", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -48,6 +48,14 @@ public class ShowFrameTag extends Tag {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ShowFrameTag(SWF swf) {
|
||||
super(swf, ID, "ShowFrame", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -58,14 +66,6 @@ public class ShowFrameTag extends Tag {
|
||||
super(swf, ID, "ShowFrame", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public ShowFrameTag(SWF swf) {
|
||||
super(swf, ID, "ShowFrame", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data bytes
|
||||
*
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
@@ -34,6 +36,16 @@ public class SymbolClassTag extends Tag {
|
||||
public String[] names;
|
||||
public static final int ID = 76;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param swf
|
||||
*/
|
||||
public SymbolClassTag(SWF swf) {
|
||||
super(swf, ID, "SymbolClass", null);
|
||||
tags = new int[0];
|
||||
names = new String[0];
|
||||
}
|
||||
|
||||
public SymbolClassTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
|
||||
super(sis.getSwf(), ID, "SymbolClass", data);
|
||||
int numSymbols = sis.readUI16("numSymbols");
|
||||
|
||||
@@ -548,7 +548,7 @@ public class Timeline {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isSingleFrame(int frame) {
|
||||
public boolean isSingleFrame(int frame) {
|
||||
Frame frameObj = frames.get(frame);
|
||||
int maxDepth = getMaxDepthInternal();
|
||||
for (int i = 1; i <= maxDepth; i++) {
|
||||
|
||||
@@ -159,12 +159,11 @@ public class ExportDialog extends AppDialog {
|
||||
cnt.setLayout(new BorderLayout());
|
||||
JPanel comboPanel = new JPanel(null);
|
||||
combos = new JComboBox[optionNames.length];
|
||||
JLabel[] labels = new JLabel[optionNames.length];
|
||||
int labWidth = 0;
|
||||
for (int i = 0; i < optionNames.length; i++) {
|
||||
labels[i] = new JLabel(optionNames[i]);
|
||||
if (labels[i].getPreferredSize().width > labWidth) {
|
||||
labWidth = labels[i].getPreferredSize().width;
|
||||
JLabel label = new JLabel(optionNames[i]);
|
||||
if (label.getPreferredSize().width > labWidth) {
|
||||
labWidth = label.getPreferredSize().width;
|
||||
}
|
||||
}
|
||||
String exportFormatsStr = Configuration.lastSelectedExportFormats.get();
|
||||
|
||||
@@ -594,7 +594,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
|
||||
|
||||
img = image;
|
||||
}
|
||||
if (drawable.getTimeline().isSingleFrame()) {
|
||||
if (drawable.getTimeline().isSingleFrame(frame)) {
|
||||
SWF.putToCache(key, img);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.jpexs.decompiler.flash.gui.MainFrameRibbonMenu;
|
||||
import com.jpexs.decompiler.flash.gui.MainPanel;
|
||||
import com.jpexs.decompiler.flash.gui.TreeNodeType;
|
||||
import com.jpexs.decompiler.flash.gui.View;
|
||||
import com.jpexs.decompiler.flash.tags.CSMTextSettingsTag;
|
||||
import com.jpexs.decompiler.flash.tags.DebugIDTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsJPEG2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsJPEG3Tag;
|
||||
@@ -33,14 +35,22 @@ import com.jpexs.decompiler.flash.tags.DefineBitsLossless2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsLosslessTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBitsTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButton2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButtonCxformTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButtonSoundTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButtonTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineEditTextTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFont2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFont3Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFont4Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFontAlignZonesTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFontInfo2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFontInfoTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFontNameTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFontTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineMorphShape2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineMorphShapeTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineScalingGridTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineSceneAndFrameLabelDataTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineShape2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineShape3Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineShape4Tag;
|
||||
@@ -50,19 +60,38 @@ import com.jpexs.decompiler.flash.tags.DefineSpriteTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineText2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineTextTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoABCDefineTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoABCTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoInitActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.EnableDebugger2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.EnableDebuggerTag;
|
||||
import com.jpexs.decompiler.flash.tags.EnableTelemetryTag;
|
||||
import com.jpexs.decompiler.flash.tags.ExportAssetsTag;
|
||||
import com.jpexs.decompiler.flash.tags.FileAttributesTag;
|
||||
import com.jpexs.decompiler.flash.tags.FrameLabelTag;
|
||||
import com.jpexs.decompiler.flash.tags.ImportAssets2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.ImportAssetsTag;
|
||||
import com.jpexs.decompiler.flash.tags.JPEGTablesTag;
|
||||
import com.jpexs.decompiler.flash.tags.MetadataTag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObject2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObject3Tag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObject4Tag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObjectTag;
|
||||
import com.jpexs.decompiler.flash.tags.ProductInfoTag;
|
||||
import com.jpexs.decompiler.flash.tags.ProtectTag;
|
||||
import com.jpexs.decompiler.flash.tags.RemoveObject2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.RemoveObjectTag;
|
||||
import com.jpexs.decompiler.flash.tags.ScriptLimitsTag;
|
||||
import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag;
|
||||
import com.jpexs.decompiler.flash.tags.SetTabIndexTag;
|
||||
import com.jpexs.decompiler.flash.tags.ShowFrameTag;
|
||||
import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag;
|
||||
import com.jpexs.decompiler.flash.tags.SoundStreamHead2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.SoundStreamHeadTag;
|
||||
import com.jpexs.decompiler.flash.tags.StartSound2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.StartSoundTag;
|
||||
import com.jpexs.decompiler.flash.tags.SymbolClassTag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.VideoFrameTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSource;
|
||||
@@ -360,7 +389,14 @@ public class TagTree extends JTree implements ActionListener {
|
||||
ret = new ArrayList<>();
|
||||
break;
|
||||
case TagTreeModel.FOLDER_OTHERS:
|
||||
ret = new ArrayList<>();
|
||||
ret = Arrays.asList(CSMTextSettingsTag.ID, DebugIDTag.ID, DefineButtonCxformTag.ID, DefineButtonSoundTag.ID,
|
||||
DefineFontAlignZonesTag.ID, DefineFontInfoTag.ID, DefineFontInfo2Tag.ID, DefineFontNameTag.ID,
|
||||
DefineScalingGridTag.ID, DefineSceneAndFrameLabelDataTag.ID,
|
||||
DoABCDefineTag.ID, DoABCTag.ID, DoActionTag.ID, DoInitActionTag.ID,
|
||||
EnableDebuggerTag.ID, EnableDebugger2Tag.ID, EnableTelemetryTag.ID,
|
||||
ExportAssetsTag.ID, FileAttributesTag.ID, ImportAssetsTag.ID, ImportAssets2Tag.ID,
|
||||
JPEGTablesTag.ID, MetadataTag.ID, ProductInfoTag.ID, ProtectTag.ID, ScriptLimitsTag.ID,
|
||||
SetBackgroundColorTag.ID, SetTabIndexTag.ID, SymbolClassTag.ID);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user