mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 01:45:35 +00:00
add depth to the filenames of the placeoject tags
This commit is contained in:
@@ -330,10 +330,6 @@ public class Configuration {
|
||||
@ConfigurationCategory("export")
|
||||
public static final ConfigurationItem<String> textExportSingleFileRecordSeparator = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(true)
|
||||
@ConfigurationCategory("export")
|
||||
public static final ConfigurationItem<Boolean> addCharacterIdToExportFileName = null;
|
||||
|
||||
@ConfigurationCategory("import")
|
||||
public static final ConfigurationItem<TextImportResizeTextBoundsMode> textImportResizeTextBoundsMode = null;
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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;
|
||||
@@ -108,14 +109,4 @@ public class CSMTextSettingsTag extends Tag {
|
||||
sharpness = sis.readFLOAT("sharpness"); //F32 = FLOAT
|
||||
reserved2 = sis.readUI8("reserved2"); //reserved
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string representation of the object
|
||||
*
|
||||
* @return String representation of the object
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CSMTextSettings";
|
||||
}
|
||||
|
||||
@@ -118,16 +118,6 @@ public class DoActionTag extends Tag implements ASMSource {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string representation of the object
|
||||
*
|
||||
* @return String representation of the object
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DoAction";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionList getActions() throws InterruptedException {
|
||||
try {
|
||||
|
||||
@@ -202,7 +202,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String getName() {
|
||||
String expName = getExportName();
|
||||
if ((expName == null) || expName.isEmpty()) {
|
||||
return super.toString();
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.abc.CopyOutputStream;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
@@ -49,7 +48,7 @@ import java.util.Set;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class PlaceObject2Tag extends CharacterIdTag implements ASMSourceContainer, PlaceObjectTypeTag {
|
||||
public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceContainer {
|
||||
|
||||
/**
|
||||
* @since SWF 5 Has clip actions (sprite characters only)
|
||||
@@ -395,11 +394,11 @@ public class PlaceObject2Tag extends CharacterIdTag implements ASMSourceContaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String getName() {
|
||||
if (placeFlagHasName) {
|
||||
return super.toString() + " (" + name + ")";
|
||||
return super.getName() + " (" + name + ")";
|
||||
} else {
|
||||
return super.toString();
|
||||
return super.getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.abc.CopyOutputStream;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
@@ -52,7 +51,7 @@ import java.util.Set;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class PlaceObject3Tag extends CharacterIdTag implements ASMSourceContainer, PlaceObjectTypeTag {
|
||||
public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceContainer {
|
||||
|
||||
/**
|
||||
* @since SWF 5 has clip actions (sprite characters only)
|
||||
@@ -540,11 +539,11 @@ public class PlaceObject3Tag extends CharacterIdTag implements ASMSourceContaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String getName() {
|
||||
if (placeFlagHasName) {
|
||||
return super.toString() + " (" + name + ")";
|
||||
return super.getName() + " (" + name + ")";
|
||||
} else {
|
||||
return super.toString();
|
||||
return super.getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.abc.CopyOutputStream;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
@@ -52,7 +51,7 @@ import java.util.Set;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class PlaceObject4Tag extends CharacterIdTag implements ASMSourceContainer, PlaceObjectTypeTag {
|
||||
public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceContainer {
|
||||
|
||||
/**
|
||||
* @since SWF 5 has clip actions (sprite characters only)
|
||||
@@ -543,11 +542,11 @@ public class PlaceObject4Tag extends CharacterIdTag implements ASMSourceContaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String getName() {
|
||||
if (placeFlagHasName) {
|
||||
return super.toString() + " (" + name + ")";
|
||||
return super.getName() + " (" + name + ")";
|
||||
} else {
|
||||
return super.toString();
|
||||
return super.getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ 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;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONS;
|
||||
@@ -42,7 +41,7 @@ import java.util.Set;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class PlaceObjectTag extends CharacterIdTag implements PlaceObjectTypeTag {
|
||||
public class PlaceObjectTag extends PlaceObjectTypeTag {
|
||||
|
||||
/**
|
||||
* ID of character to place
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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;
|
||||
@@ -39,7 +40,7 @@ public class UnknownTag extends Tag {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String toString() {
|
||||
public String getName() {
|
||||
return super.getName() + " (ID=" + id + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.tags.base;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
|
||||
@@ -59,11 +58,7 @@ public abstract class CharacterIdTag extends Tag {
|
||||
|
||||
@Override
|
||||
public String getExportFileName() {
|
||||
String result = super.getName();
|
||||
if (Configuration.addCharacterIdToExportFileName.get()) {
|
||||
result += "_" + getCharacterId();
|
||||
}
|
||||
|
||||
String result = super.getName() + "_" + getCharacterId();
|
||||
return result + (exportName != null ? "_" + exportName : "");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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.base;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONS;
|
||||
import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.filters.FILTER;
|
||||
import com.jpexs.helpers.ByteArrayRange;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,41 +31,53 @@ import java.util.List;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
*/
|
||||
public abstract class PlaceObjectTypeTag extends CharacterIdTag {
|
||||
|
||||
|
||||
public PlaceObjectTypeTag(SWF swf, int id, String name, ByteArrayRange data) {
|
||||
super(swf, id, name, data);
|
||||
}
|
||||
|
||||
|
||||
public abstract int getDepth();
|
||||
|
||||
|
||||
public abstract MATRIX getMatrix();
|
||||
|
||||
|
||||
public abstract String getInstanceName();
|
||||
|
||||
|
||||
public abstract void setInstanceName(String name);
|
||||
|
||||
|
||||
public abstract void setClassName(String className);
|
||||
|
||||
|
||||
public abstract ColorTransform getColorTransform();
|
||||
|
||||
|
||||
public abstract int getBlendMode();
|
||||
|
||||
|
||||
public abstract List<FILTER> getFilters();
|
||||
|
||||
|
||||
public abstract int getClipDepth();
|
||||
|
||||
|
||||
public abstract String getClassName();
|
||||
|
||||
|
||||
public abstract boolean cacheAsBitmap();
|
||||
|
||||
|
||||
public abstract boolean isVisible();
|
||||
|
||||
|
||||
public abstract RGBA getBackgroundColor();
|
||||
|
||||
|
||||
public abstract boolean flagMove();
|
||||
|
||||
|
||||
public abstract int getRatio();
|
||||
|
||||
|
||||
public abstract CLIPACTIONS getClipActions();
|
||||
|
||||
|
||||
public abstract void writeTagWithMatrix(SWFOutputStream sos, MATRIX m) throws IOException;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return super.getName() + " Depth: " + getDepth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExportFileName() {
|
||||
return super.getExportFileName() + "_" + getDepth();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user