mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-25 09:55:34 +00:00
replace hex tags to comment in export, AS2 highlight fixed
This commit is contained in:
@@ -305,7 +305,9 @@ public class TagNode {
|
||||
} else if (exportMode != ExportMode.SOURCE) {
|
||||
HilightedTextWriter writer = new HilightedTextWriter(false, asm.getActionSourceIndent());
|
||||
asm.getASMSource(SWF.DEFAULT_VERSION, exportMode, writer, null);
|
||||
res = asm.getActionSourcePrefix() + writer.toString() + asm.getActionSourceSuffix();
|
||||
String str = writer.toString();
|
||||
str = Helper.hexToComments(str);
|
||||
res = asm.getActionSourcePrefix() + str + asm.getActionSourceSuffix();
|
||||
} else {
|
||||
List<Action> as = asm.getActions(SWF.DEFAULT_VERSION);
|
||||
Action.setActionsAddresses(as, 0, SWF.DEFAULT_VERSION);
|
||||
|
||||
@@ -128,6 +128,7 @@ public class ScriptPack {
|
||||
abc.script_info[scriptIndex].traits.traits[t].convert(null, "", abcList, abc, false, exportMode, scriptIndex, -1, writer, new ArrayList<String>(), parallel);
|
||||
}
|
||||
String s = Graph.removeNonRefenrencedLoopLabels(writer.toString());
|
||||
s = Helper.hexToComments(s);
|
||||
fos.write(s.getBytes("utf-8"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ public class Action implements GraphSourceItem {
|
||||
* @return HilightedTextWriter with Source code
|
||||
*/
|
||||
public static String actionsToSource(List<Action> actions, int version, String path, boolean highlight, int indent) {
|
||||
HilightedTextWriter writer = new HilightedTextWriter(false, indent);
|
||||
HilightedTextWriter writer = new HilightedTextWriter(highlight, indent);
|
||||
Action.actionsToSource(actions, SWF.DEFAULT_VERSION, ""/*FIXME*/, writer);
|
||||
String s = Graph.removeNonRefenrencedLoopLabels(writer.toString());
|
||||
return s;
|
||||
|
||||
Reference in New Issue
Block a user