mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 21:38:26 +00:00
Move items from Debug tab in advanced settings to other tabs to avoid acidentally setting it,
reseting most of them by renaming.
This commit is contained in:
@@ -1628,7 +1628,7 @@ public class SWFInputStream implements AutoCloseable {
|
||||
logger.log(Level.SEVERE, "Problem in " + timelined.toString(), ex);
|
||||
}
|
||||
|
||||
if (Configuration.debugMode.get()) {
|
||||
if (Configuration._debugMode.get()) {
|
||||
byte[] data = ret.getOriginalData();
|
||||
byte[] dataNew = ret.getData();
|
||||
int ignoreFirst = 0;
|
||||
|
||||
@@ -465,7 +465,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
public void writeRECT(RECT value) throws IOException {
|
||||
int nBits = 0;
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
nBits = Math.max(nBits, value.nbits);
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
nBits = enlargeBitCountS(nBits, yMin);
|
||||
nBits = enlargeBitCountS(nBits, yMax);
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
nBits = Math.max(nBits, value.nbits);
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
nBits = enlargeBitCountS(nBits, value.scaleX);
|
||||
nBits = enlargeBitCountS(nBits, value.scaleY);
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
nBits = Math.max(nBits, value.nScaleBits);
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
nBits = enlargeBitCountS(nBits, value.rotateSkew0);
|
||||
nBits = enlargeBitCountS(nBits, value.rotateSkew1);
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
nBits = Math.max(nBits, value.nRotateBits);
|
||||
}
|
||||
|
||||
@@ -666,7 +666,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
NTranslateBits = enlargeBitCountS(NTranslateBits, value.translateX);
|
||||
NTranslateBits = enlargeBitCountS(NTranslateBits, value.translateY);
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
NTranslateBits = Math.max(NTranslateBits, value.nTranslateBits);
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
Nbits = enlargeBitCountS(Nbits, value.blueAddTerm);
|
||||
}
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
Nbits = Math.max(Nbits, value.nbits);
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
Nbits = enlargeBitCountS(Nbits, value.alphaAddTerm);
|
||||
}
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
Nbits = Math.max(Nbits, value.nbits);
|
||||
}
|
||||
|
||||
@@ -1406,7 +1406,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
writeUB(1, 1); // typeFlag
|
||||
writeUB(1, 0); // curvedEdge
|
||||
int numBits = Math.max(getNeededBitsS(cer.controlDeltaX, cer.controlDeltaY, cer.anchorDeltaX, cer.anchorDeltaY) - 2, 0);
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
numBits = Math.max(numBits, cer.numBits);
|
||||
}
|
||||
|
||||
@@ -1421,7 +1421,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
writeUB(1, 1); // typeFlag
|
||||
writeUB(1, 1); // straightEdge
|
||||
int numBits = Math.max(getNeededBitsS(ser.deltaX, ser.deltaY) - 2, 0);
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
numBits = Math.max(numBits, ser.numBits);
|
||||
}
|
||||
|
||||
@@ -1447,7 +1447,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
writeUB(1, scr.stateMoveTo ? 1 : 0);
|
||||
if (scr.stateMoveTo) {
|
||||
int moveBits = getNeededBitsS(scr.moveDeltaX, scr.moveDeltaY);
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
moveBits = Math.max(moveBits, scr.moveBits);
|
||||
}
|
||||
|
||||
@@ -1471,7 +1471,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
fillBits = getNeededBitsU(scr.fillStyles.fillStyles.length);
|
||||
lineBits = getNeededBitsU(scr.lineStyles.lineStyles.length);
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
fillBits = Math.max(fillBits, scr.numFillBits);
|
||||
lineBits = Math.max(lineBits, scr.numLineBits);
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ public class ASM3Parser {
|
||||
value_index = parseNamespace(constants, lexer);
|
||||
break;
|
||||
default:
|
||||
if (Configuration.debugMode.get()) {
|
||||
if (Configuration._debugMode.get()) {
|
||||
throw new AVM2ParseException("Not supported valueType.", lexer.yyline());
|
||||
}
|
||||
}
|
||||
@@ -773,88 +773,80 @@ public class ASM3Parser {
|
||||
case AVM2Code.DAT_STRING_INDEX:
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) {
|
||||
operandsList.add(0);
|
||||
} else {
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_STRING) {
|
||||
int sid = constants.getStringId((String) parsedOperand.value, false);
|
||||
if (sid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingString((String) parsedOperand.value))) {
|
||||
sid = constants.addString((String) parsedOperand.value);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown String", lexer.yyline());
|
||||
}
|
||||
} else if (parsedOperand.type == ParsedSymbol.TYPE_STRING) {
|
||||
int sid = constants.getStringId((String) parsedOperand.value, false);
|
||||
if (sid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingString((String) parsedOperand.value))) {
|
||||
sid = constants.addString((String) parsedOperand.value);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown String", lexer.yyline());
|
||||
}
|
||||
operandsList.add(sid);
|
||||
} else {
|
||||
throw new AVM2ParseException("String or null expected", lexer.yyline());
|
||||
}
|
||||
operandsList.add(sid);
|
||||
} else {
|
||||
throw new AVM2ParseException("String or null expected", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case AVM2Code.DAT_INT_INDEX:
|
||||
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) {
|
||||
operandsList.add(0);
|
||||
} else {
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
long intVal = (Long) parsedOperand.value;
|
||||
int iid = constants.getIntId(intVal, false);
|
||||
if (iid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingInt(intVal))) {
|
||||
iid = constants.addInt(intVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown int", lexer.yyline());
|
||||
}
|
||||
} else if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
long intVal = (Long) parsedOperand.value;
|
||||
int iid = constants.getIntId(intVal, false);
|
||||
if (iid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingInt(intVal))) {
|
||||
iid = constants.addInt(intVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown int", lexer.yyline());
|
||||
}
|
||||
operandsList.add(iid);
|
||||
} else {
|
||||
throw new AVM2ParseException("Integer or null expected", lexer.yyline());
|
||||
}
|
||||
operandsList.add(iid);
|
||||
} else {
|
||||
throw new AVM2ParseException("Integer or null expected", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case AVM2Code.DAT_UINT_INDEX:
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) {
|
||||
operandsList.add(0);
|
||||
} else {
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
long intVal = (Long) parsedOperand.value;
|
||||
int iid = constants.getUIntId(intVal, false);
|
||||
if (iid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingUInt(intVal))) {
|
||||
iid = constants.addUInt(intVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown uint", lexer.yyline());
|
||||
}
|
||||
} else if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
long intVal = (Long) parsedOperand.value;
|
||||
int iid = constants.getUIntId(intVal, false);
|
||||
if (iid == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingUInt(intVal))) {
|
||||
iid = constants.addUInt(intVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown uint", lexer.yyline());
|
||||
}
|
||||
operandsList.add(iid);
|
||||
} else {
|
||||
throw new AVM2ParseException("Integer or null expected", lexer.yyline());
|
||||
}
|
||||
operandsList.add(iid);
|
||||
} else {
|
||||
throw new AVM2ParseException("Integer or null expected", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case AVM2Code.DAT_DOUBLE_INDEX:
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_KEYWORD_NULL) {
|
||||
operandsList.add(0);
|
||||
} else {
|
||||
if ((parsedOperand.type == ParsedSymbol.TYPE_INTEGER) || (parsedOperand.type == ParsedSymbol.TYPE_FLOAT)) {
|
||||
} else if ((parsedOperand.type == ParsedSymbol.TYPE_INTEGER) || (parsedOperand.type == ParsedSymbol.TYPE_FLOAT)) {
|
||||
|
||||
double doubleVal = 0;
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
doubleVal = (Long) parsedOperand.value;
|
||||
}
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_FLOAT) {
|
||||
doubleVal = (Double) parsedOperand.value;
|
||||
}
|
||||
int did = constants.getDoubleId(doubleVal, false);
|
||||
if (did == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingDouble(doubleVal))) {
|
||||
did = constants.addDouble(doubleVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown double", lexer.yyline());
|
||||
}
|
||||
}
|
||||
operandsList.add(did);
|
||||
} else {
|
||||
throw new AVM2ParseException("Float or null expected", lexer.yyline());
|
||||
double doubleVal = 0;
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_INTEGER) {
|
||||
doubleVal = (Long) parsedOperand.value;
|
||||
}
|
||||
if (parsedOperand.type == ParsedSymbol.TYPE_FLOAT) {
|
||||
doubleVal = (Double) parsedOperand.value;
|
||||
}
|
||||
int did = constants.getDoubleId(doubleVal, false);
|
||||
if (did == -1) {
|
||||
if ((missingHandler != null) && (missingHandler.missingDouble(doubleVal))) {
|
||||
did = constants.addDouble(doubleVal);
|
||||
} else {
|
||||
throw new AVM2ParseException("Unknown double", lexer.yyline());
|
||||
}
|
||||
}
|
||||
operandsList.add(did);
|
||||
} else {
|
||||
throw new AVM2ParseException("Float or null expected", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case AVM2Code.DAT_OFFSET:
|
||||
|
||||
@@ -159,7 +159,6 @@ public class Configuration {
|
||||
public static final ConfigurationItem<String> overrideTextExportFileName = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
public static final ConfigurationItem<Boolean> useDetailedLogging = null;
|
||||
|
||||
/**
|
||||
@@ -167,12 +166,12 @@ public class Configuration {
|
||||
* recompiled
|
||||
*/
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
public static final ConfigurationItem<Boolean> debugMode = null;
|
||||
@ConfigurationInternal
|
||||
public static final ConfigurationItem<Boolean> _debugMode = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
public static final ConfigurationItem<Boolean> showDebugMenu = null;
|
||||
@ConfigurationInternal
|
||||
public static final ConfigurationItem<Boolean> _showDebugMenu = null;
|
||||
|
||||
/**
|
||||
* Turn off resolving constants in ActionScript 2
|
||||
@@ -215,15 +214,14 @@ public class Configuration {
|
||||
public static final ConfigurationItem<Boolean> displayFileName = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
public static final ConfigurationItem<Boolean> debugCopy = null;
|
||||
@ConfigurationInternal
|
||||
public static final ConfigurationItem<Boolean> _debugCopy = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
public static final ConfigurationItem<Boolean> dumpTags = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(true)
|
||||
@ConfigurationCategory("debug")
|
||||
@ConfigurationCategory("export")
|
||||
public static final ConfigurationItem<Boolean> setFFDecVersionInExportedFont = null;
|
||||
|
||||
@ConfigurationDefaultInt(60)
|
||||
@@ -436,7 +434,7 @@ public class Configuration {
|
||||
public static final ConfigurationItem<Integer> lzmaFastBytes = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("debug")
|
||||
@ConfigurationCategory("script")
|
||||
public static final ConfigurationItem<Boolean> showMethodBodyId = null;
|
||||
|
||||
@ConfigurationDefaultDouble(1.0)
|
||||
@@ -794,7 +792,7 @@ public class Configuration {
|
||||
setConfigurationFields();
|
||||
if (useDetailedLogging.get()) {
|
||||
logLevel = Level.FINEST;
|
||||
} else if (debugMode.get()) {
|
||||
} else if (_debugMode.get()) {
|
||||
logLevel = Level.INFO;
|
||||
} else {
|
||||
logLevel = Level.WARNING;
|
||||
|
||||
@@ -281,7 +281,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
if (toStringCalled) {
|
||||
throw new Error("HighlightedTextWriter.toString() was already called.");
|
||||
}
|
||||
if (Configuration.debugMode.get()) {
|
||||
if (Configuration._debugMode.get()) {
|
||||
long stopTime = System.currentTimeMillis();
|
||||
long time = stopTime - startTime;
|
||||
if (time > 500) {
|
||||
|
||||
@@ -221,7 +221,7 @@ public class Highlighting implements Serializable {
|
||||
public Highlighting(int startPos, HighlightData data, HighlightType type, String text) {
|
||||
this.startPos = startPos;
|
||||
this.type = type;
|
||||
if (Configuration.debugMode.get()) {
|
||||
if (Configuration._debugMode.get()) {
|
||||
this.HighlightedText = text;
|
||||
}
|
||||
this.properties = data;
|
||||
|
||||
@@ -411,7 +411,7 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable {
|
||||
* @throws IOException
|
||||
*/
|
||||
public void writeTag(SWFOutputStream sos) throws IOException {
|
||||
if (Configuration.debugCopy.get() || isModified()) {
|
||||
if (Configuration._debugCopy.get() || isModified()) {
|
||||
byte[] newData = getData();
|
||||
byte[] newHeaderData = getHeader(newData.length);
|
||||
sos.write(newHeaderData);
|
||||
@@ -477,7 +477,7 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable {
|
||||
public byte[] getData() {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
OutputStream os = baos;
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
byte[] originalData = getOriginalData();
|
||||
if (originalData != null) {
|
||||
os = new CopyOutputStream(os, new ByteArrayInputStream(getOriginalData()));
|
||||
|
||||
@@ -134,7 +134,7 @@ public abstract class ShapeTag extends CharacterTag implements DrawableTag, Lazy
|
||||
@Override
|
||||
public void toImage(int frame, int time, int ratio, RenderContext renderContext, SerializableImage image, boolean isClip, Matrix transformation, Matrix absoluteTransformation, ColorTransform colorTransform) {
|
||||
BitmapExporter.export(swf, getShapes(), null, image, transformation, colorTransform);
|
||||
if (Configuration.debugMode.get()) { // show control points
|
||||
if (Configuration._debugMode.get()) { // show control points
|
||||
List<GeneralPath> paths = PathExporter.export(swf, getShapes());
|
||||
double[] coords = new double[6];
|
||||
AffineTransform at = transformation.toTransform();
|
||||
|
||||
@@ -111,7 +111,7 @@ public abstract class StaticTextTag extends TextTag {
|
||||
}
|
||||
}
|
||||
|
||||
if (Configuration.debugCopy.get()) {
|
||||
if (Configuration._debugCopy.get()) {
|
||||
glyphBits = Math.max(glyphBits, this.glyphBits);
|
||||
advanceBits = Math.max(advanceBits, this.advanceBits);
|
||||
}
|
||||
@@ -513,12 +513,10 @@ public abstract class StaticTextTag extends TextTag {
|
||||
tr.styleFlagsHasColor = true;
|
||||
color = null;
|
||||
}
|
||||
} else {
|
||||
if (colorA != null) {
|
||||
tr.textColorA = colorA;
|
||||
tr.styleFlagsHasColor = true;
|
||||
colorA = null;
|
||||
}
|
||||
} else if (colorA != null) {
|
||||
tr.textColorA = colorA;
|
||||
tr.styleFlagsHasColor = true;
|
||||
colorA = null;
|
||||
}
|
||||
if (x != null) {
|
||||
tr.xOffset = x;
|
||||
|
||||
Reference in New Issue
Block a user