From 954273ef7df9b4365362c1b1cc275bb908977154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 6 Apr 2025 12:18:43 +0200 Subject: [PATCH] AS1 Direct editation - DO NOT group pushes, until we figure out how to do it correctly. --- CHANGELOG.md | 1 - .../parser/script/ActionSourceGenerator.java | 20 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c13e0dd4..a9254fc68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,6 @@ All notable changes to this project will be documented in this file. - [#2391] Double not operator in ternar operator expression - [#2436] PDF export clipping - missing colors / text - [#2437] AS1 P-code - do not group pushes automatically -- [#2437] AS1 Direct editation - group pushes on FP5+ - [#2437] AS1 - use Constant pool only on FP5+ ## [22.0.2] - 2025-01-17 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 631ed6d71..d5bb3425c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -146,7 +146,23 @@ public class ActionSourceGenerator implements SourceGenerator { } private List groupPushes(List items) { - if (swfVersion <= 4) { + + //TODO: This should take in account important offsets (jumps) + //And not group Pushes over different parts of code + /*Like: + If locA + Push "A" + Push "B" + locA: + Push "C" + + Should not be grouped to Push "A","B","C" + */ + + + return items; + //Commented out for now... + /*if (swfVersion <= 4) { return items; } List ret = new ArrayList<>(); @@ -165,7 +181,7 @@ public class ActionSourceGenerator implements SourceGenerator { prevPush = null; } } - return ret; + return ret;*/ } private List nonempty(List list) {