mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 15:00:46 +00:00
ScaleForm GFx opening from open/save dialog
GFx classes refactoring
This commit is contained in:
@@ -185,7 +185,11 @@ public class SWF {
|
||||
*/
|
||||
public byte[] lzmaProperties;
|
||||
public FileAttributesTag fileAttributes;
|
||||
|
||||
/**
|
||||
* ScaleForm GFx
|
||||
*/
|
||||
public boolean gfx = false;
|
||||
|
||||
/**
|
||||
* Gets all tags with specified id
|
||||
*
|
||||
@@ -225,10 +229,19 @@ public class SWF {
|
||||
} else if (compressed) {
|
||||
os.write('C');
|
||||
} else {
|
||||
os.write('F');
|
||||
if (gfx) {
|
||||
os.write('G');
|
||||
} else {
|
||||
os.write('F');
|
||||
}
|
||||
}
|
||||
if (gfx) {
|
||||
os.write('F');
|
||||
os.write('X');
|
||||
} else {
|
||||
os.write('W');
|
||||
os.write('S');
|
||||
}
|
||||
os.write('W');
|
||||
os.write('S');
|
||||
os.write(version);
|
||||
byte[] data = baos.toByteArray();
|
||||
sos = new SWFOutputStream(os, version);
|
||||
@@ -300,13 +313,22 @@ public class SWF {
|
||||
byte[] hdr = new byte[3];
|
||||
is.read(hdr);
|
||||
String shdr = new String(hdr, "utf-8");
|
||||
if ((!shdr.equals("FWS")) && (!shdr.equals("CWS")) && (!shdr.equals("ZWS"))) {
|
||||
if (!Arrays.asList(
|
||||
"FWS", //Uncompressed Flash
|
||||
"CWS", //ZLib compressed Flash
|
||||
"ZWS", //LZMA compressed Flash
|
||||
"GFX", //Uncompressed ScaleForm GFx
|
||||
"CFX" //Compressed ScaleForm GFx
|
||||
).contains(shdr)) {
|
||||
throw new IOException("Invalid SWF file");
|
||||
}
|
||||
version = is.read();
|
||||
SWFInputStream sis = new SWFInputStream(is, version, 4);
|
||||
fileSize = sis.readUI32();
|
||||
|
||||
if(hdr[1] == 'F' && hdr[2] == 'X'){
|
||||
gfx = true;
|
||||
}
|
||||
if (hdr[0] == 'C') {
|
||||
sis = new SWFInputStream(new InflaterInputStream(is), version, 8);
|
||||
compressed = true;
|
||||
|
||||
@@ -16,6 +16,16 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineGradientMap;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineExternalImage2;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.FontTextureInfo;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineExternalSound;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineExternalImage;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.ExporterInfoTag;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineExternalGradient;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineSubImage;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineExternalStreamSound;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionListReader;
|
||||
import com.jpexs.decompiler.flash.action.model.ConstantPool;
|
||||
@@ -954,34 +964,34 @@ public class SWFInputStream extends InputStream {
|
||||
ret = new PlaceObject4Tag(swf, data, version, pos);
|
||||
break;
|
||||
case 1000:
|
||||
ret = new GFxExporterInfoTag(swf, data, version, pos);
|
||||
ret = new ExporterInfoTag(swf, data, version, pos);
|
||||
break;
|
||||
case 1001:
|
||||
ret = new GFxDefineExternalImage(swf, data, version, pos);
|
||||
ret = new DefineExternalImage(swf, data, version, pos);
|
||||
break;
|
||||
case 1002:
|
||||
ret = new GFxFontTextureInfo(swf, data, version, pos);
|
||||
ret = new FontTextureInfo(swf, data, version, pos);
|
||||
break;
|
||||
case 1003:
|
||||
ret = new GFxDefineExternalGradient(swf, data, version, pos);
|
||||
ret = new DefineExternalGradient(swf, data, version, pos);
|
||||
break;
|
||||
case 1004:
|
||||
ret = new GFxDefineGradientMap(swf, data, version, pos);
|
||||
ret = new DefineGradientMap(swf, data, version, pos);
|
||||
break;
|
||||
case 1005:
|
||||
ret = new GFxDefineCompactedFont(swf, data, version, pos);
|
||||
ret = new DefineCompactedFont(swf, data, version, pos);
|
||||
break;
|
||||
case 1006:
|
||||
ret = new GFxDefineExternalSound(swf, data, version, pos);
|
||||
ret = new DefineExternalSound(swf, data, version, pos);
|
||||
break;
|
||||
case 1007:
|
||||
ret = new GFxDefineExternalStreamSound(swf, data, version, pos);
|
||||
ret = new DefineExternalStreamSound(swf, data, version, pos);
|
||||
break;
|
||||
case 1008:
|
||||
ret = new GFxDefineSubImage(swf, data, version, pos);
|
||||
ret = new DefineSubImage(swf, data, version, pos);
|
||||
break;
|
||||
case 1009:
|
||||
ret = new GFxDefineExternalImage2(swf, data, version, pos);
|
||||
ret = new DefineExternalImage2(swf, data, version, pos);
|
||||
break;
|
||||
default:
|
||||
ret = new Tag(swf, tag.getId(), "Unknown", data, pos);
|
||||
|
||||
@@ -413,28 +413,59 @@ public class Main {
|
||||
|
||||
public static boolean saveFileDialog() {
|
||||
JFileChooser fc = new JFileChooser();
|
||||
fc.setCurrentDirectory(new File(Configuration.getConfig("lastSaveDir", ".")));
|
||||
fc.setFileFilter(new FileFilter() {
|
||||
fc.setCurrentDirectory(new File(Configuration.getConfig("lastSaveDir", ".")));
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().endsWith(".swf")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase().endsWith(".swf")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return translate("filter.swf");
|
||||
}
|
||||
});
|
||||
};
|
||||
if(!swf.gfx){
|
||||
fc.setFileFilter(swfFilter);
|
||||
}else{
|
||||
fc.addChoosableFileFilter(swfFilter);
|
||||
}
|
||||
FileFilter gfxFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".gfx")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return translate("filter.gfx");
|
||||
}
|
||||
};
|
||||
if(swf.gfx){
|
||||
fc.setFileFilter(gfxFilter);
|
||||
}else{
|
||||
fc.addChoosableFileFilter(gfxFilter);
|
||||
}
|
||||
fc.setAcceptAllFileFilterUsed(false);
|
||||
JFrame f = new JFrame();
|
||||
View.setWindowIcon(f);
|
||||
int returnVal = fc.showSaveDialog(f);
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
File file = Helper.fixDialogFile(fc.getSelectedFile());
|
||||
FileFilter selFilter = fc.getFileFilter();
|
||||
try {
|
||||
String fileName = file.getAbsolutePath();
|
||||
if (!fileName.toLowerCase().endsWith(".swf")) {
|
||||
fileName += ".swf";
|
||||
if(selFilter == swfFilter){
|
||||
if (!fileName.toLowerCase().endsWith(".swf")) {
|
||||
fileName += ".swf";
|
||||
}
|
||||
swf.gfx = false;
|
||||
}
|
||||
if(selFilter == gfxFilter){
|
||||
if (!fileName.toLowerCase().endsWith(".gfx")) {
|
||||
fileName += ".gfx";
|
||||
}
|
||||
swf.gfx = true;
|
||||
}
|
||||
Main.saveFile(fileName);
|
||||
Configuration.setConfig("lastSaveDir", file.getParentFile().getAbsolutePath());
|
||||
@@ -452,17 +483,45 @@ public class Main {
|
||||
fileTitle = null;
|
||||
JFileChooser fc = new JFileChooser();
|
||||
fc.setCurrentDirectory(new File(Configuration.getConfig("lastOpenDir", ".")));
|
||||
fc.setFileFilter(new FileFilter() {
|
||||
FileFilter allSupportedFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().endsWith(".swf")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase().toLowerCase().endsWith(".swf"))
|
||||
|| (f.getName().toLowerCase().toLowerCase().endsWith(".gfx"))
|
||||
|| (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return translate("filter.supported");
|
||||
}
|
||||
};
|
||||
fc.setFileFilter(allSupportedFilter);
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".swf")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return translate("filter.swf");
|
||||
}
|
||||
});
|
||||
};
|
||||
fc.addChoosableFileFilter(swfFilter);
|
||||
FileFilter gfxFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".gfx")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return translate("filter.gfx");
|
||||
}
|
||||
};
|
||||
fc.addChoosableFileFilter(gfxFilter);
|
||||
fc.setAcceptAllFileFilterUsed(true);
|
||||
JFrame f = new JFrame();
|
||||
View.setWindowIcon(f);
|
||||
int returnVal = fc.showOpenDialog(f);
|
||||
|
||||
@@ -67,7 +67,7 @@ import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag;
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.EndTag;
|
||||
import com.jpexs.decompiler.flash.tags.ExportAssetsTag;
|
||||
import com.jpexs.decompiler.flash.tags.GFxDefineCompactedFont;
|
||||
import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont;
|
||||
import com.jpexs.decompiler.flash.tags.JPEGTablesTag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObject2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag;
|
||||
@@ -1764,7 +1764,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
|
||||
|| (t instanceof DefineFont2Tag)
|
||||
|| (t instanceof DefineFont3Tag)
|
||||
|| (t instanceof DefineFont4Tag)
|
||||
|| (t instanceof GFxDefineCompactedFont)) {
|
||||
|| (t instanceof DefineCompactedFont)) {
|
||||
return "font";
|
||||
}
|
||||
if ((t instanceof DefineTextTag)
|
||||
@@ -2949,8 +2949,8 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
|
||||
}
|
||||
|
||||
private static Tag classicTag(Tag t) {
|
||||
if (t instanceof GFxDefineCompactedFont) {
|
||||
return ((GFxDefineCompactedFont) t).toClassicFont();
|
||||
if (t instanceof DefineCompactedFont) {
|
||||
return ((DefineCompactedFont) t).toClassicFont();
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -362,4 +362,7 @@ button.addtrait = Add trait
|
||||
button.font.embed = Embed...
|
||||
button.yes.all = Yes to all
|
||||
button.no.all = No to all
|
||||
message.font.add.exists = Character %char% already exists in the font tag.\nDo you want to replace it?
|
||||
message.font.add.exists = Character %char% already exists in the font tag.\nDo you want to replace it?
|
||||
|
||||
filter.gfx = ScaleForm GFx files (*.gfx)
|
||||
filter.supported = All supported filetypes (*.swf, *.gfx)
|
||||
|
||||
@@ -367,4 +367,7 @@ button.addtrait = P\u0159idat vlastnost
|
||||
button.font.embed = Vlo\u017eit...
|
||||
button.yes.all = Ano v\u0161em
|
||||
button.no.all = Ne v\u0161em
|
||||
message.font.add.exists = Znak %char% ji\u017e v tagu p\u00edsma existuje.\nChcete ho nahradit?
|
||||
message.font.add.exists = Znak %char% ji\u017e v tagu p\u00edsma existuje.\nChcete ho nahradit?
|
||||
|
||||
filter.gfx = ScaleForm GFx soubory (*.gfx)
|
||||
filter.supported = V\u0161echny podporovan\u00e9 typy (*.swf, *.gfx)
|
||||
|
||||
+6
-4
@@ -14,11 +14,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.DefineFont2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.DrawableTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
@@ -63,7 +65,7 @@ import javax.swing.JPanel;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineCompactedFont extends FontTag implements DrawableTag {
|
||||
public class DefineCompactedFont extends FontTag implements DrawableTag {
|
||||
|
||||
public static final int ID = 1005;
|
||||
public int fontId;
|
||||
@@ -128,7 +130,7 @@ public class GFxDefineCompactedFont extends FontTag implements DrawableTag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineCompactedFont(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineCompactedFont(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineCompactedFont", data, pos);
|
||||
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
@@ -409,7 +411,7 @@ public class GFxDefineCompactedFont extends FontTag implements DrawableTag {
|
||||
}*/
|
||||
return ret;
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(GFxDefineCompactedFont.class.getName()).log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger(DefineCompactedFont.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineExternalGradient extends Tag {
|
||||
public class DefineExternalGradient extends Tag {
|
||||
|
||||
public static final int ID = 1003;
|
||||
public static final int BITMAP_FORMAT_DEFAULT = 0;
|
||||
@@ -72,7 +73,7 @@ public class GFxDefineExternalGradient extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineExternalGradient(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineExternalGradient(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineExternalGradient", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
gradientId = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineExternalImage extends Tag {
|
||||
public class DefineExternalImage extends Tag {
|
||||
|
||||
public static final int ID = 1001;
|
||||
public int characterId;
|
||||
@@ -74,7 +75,7 @@ public class GFxDefineExternalImage extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineExternalImage(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineExternalImage(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineExternalImage", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
characterId = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineExternalImage2 extends Tag {
|
||||
public class DefineExternalImage2 extends Tag {
|
||||
|
||||
public static final int ID = 1009;
|
||||
public long characterId;
|
||||
@@ -78,7 +79,7 @@ public class GFxDefineExternalImage2 extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineExternalImage2(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineExternalImage2(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineExternalImage2", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
characterId = sis.readUI32();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineExternalSound extends Tag {
|
||||
public class DefineExternalSound extends Tag {
|
||||
|
||||
public static final int ID = 1006;
|
||||
public int characterId;
|
||||
@@ -82,7 +83,7 @@ public class GFxDefineExternalSound extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineExternalSound(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineExternalSound(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineExternalSound", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
characterId = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineExternalStreamSound extends Tag {
|
||||
public class DefineExternalStreamSound extends Tag {
|
||||
|
||||
public static final int ID = 1007;
|
||||
public int soundFormat;
|
||||
@@ -80,7 +81,7 @@ public class GFxDefineExternalStreamSound extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineExternalStreamSound(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineExternalStreamSound(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineExternalStreamSound", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
soundFormat = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineGradientMap extends Tag {
|
||||
public class DefineGradientMap extends Tag {
|
||||
|
||||
public static final int ID = 1004;
|
||||
public int indices[];
|
||||
@@ -64,7 +65,7 @@ public class GFxDefineGradientMap extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineGradientMap(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineGradientMap(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineGradientMap", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
int numGradients = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -29,7 +30,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxDefineSubImage extends Tag {
|
||||
public class DefineSubImage extends Tag {
|
||||
|
||||
public static final int ID = 1008;
|
||||
public int characterId;
|
||||
@@ -71,7 +72,7 @@ public class GFxDefineSubImage extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxDefineSubImage(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public DefineSubImage(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "DefineSubImage", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
characterId = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -31,7 +32,7 @@ import java.util.List;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxExporterInfoTag extends Tag {
|
||||
public class ExporterInfoTag extends Tag {
|
||||
|
||||
public static final int ID = 1000;
|
||||
//Version (1.10 will be encoded as 0x10A)
|
||||
@@ -90,7 +91,7 @@ public class GFxExporterInfoTag extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxExporterInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public ExporterInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "ExporterInfo", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
this.version = sis.readUI16();
|
||||
+4
-3
@@ -14,11 +14,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
package com.jpexs.decompiler.flash.tags.gfx;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.types.gfx.FONTINFO;
|
||||
import com.jpexs.decompiler.flash.types.gfx.GFxInputStream;
|
||||
import com.jpexs.decompiler.flash.types.gfx.GFxOutputStream;
|
||||
@@ -33,7 +34,7 @@ import java.io.OutputStream;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class GFxFontTextureInfo extends Tag {
|
||||
public class FontTextureInfo extends Tag {
|
||||
|
||||
public static final int ID = 1002;
|
||||
public long textureID;
|
||||
@@ -92,7 +93,7 @@ public class GFxFontTextureInfo extends Tag {
|
||||
* @param pos
|
||||
* @throws IOException
|
||||
*/
|
||||
public GFxFontTextureInfo(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
public FontTextureInfo(SWF swf, byte[] data, int version, long pos) throws IOException {
|
||||
super(swf, ID, "FontTextureInfo", data, pos);
|
||||
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
|
||||
textureID = sis.readUI32();
|
||||
Reference in New Issue
Block a user