diff options
| author | 2024-04-06 13:05:49 +0200 | |
|---|---|---|
| committer | 2024-04-06 12:05:49 +0100 | |
| commit | 31b6e9e188fb2abbab040ee07f8a8c14cec2571d (patch) | |
| tree | 6c51dc775b9f95cd70fde11a30eb655c8899ae68 /enigma-swing | |
| parent | Bump version (diff) | |
| download | enigma-fork-31b6e9e188fb2abbab040ee07f8a8c14cec2571d.tar.gz enigma-fork-31b6e9e188fb2abbab040ee07f8a8c14cec2571d.tar.xz enigma-fork-31b6e9e188fb2abbab040ee07f8a8c14cec2571d.zip | |
Add Vineflower decompiler (#541)
* Add Vineflower integration
* Fix some confusing names
* Rename method to reflect visitor pattern naming schemes
* Remove dead null check
Diffstat (limited to 'enigma-swing')
3 files changed, 3 insertions, 2 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java index f9b5cbe..41ee254 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java | |||
| @@ -4,6 +4,7 @@ import cuchaz.enigma.source.DecompilerService; | |||
| 4 | import cuchaz.enigma.source.Decompilers; | 4 | import cuchaz.enigma.source.Decompilers; |
| 5 | 5 | ||
| 6 | public enum Decompiler { | 6 | public enum Decompiler { |
| 7 | VINEFLOWER("Vineflower", Decompilers.VINEFLOWER), | ||
| 7 | CFR("CFR", Decompilers.CFR), | 8 | CFR("CFR", Decompilers.CFR), |
| 8 | PROCYON("Procyon", Decompilers.PROCYON), | 9 | PROCYON("Procyon", Decompilers.PROCYON), |
| 9 | BYTECODE("Bytecode", Decompilers.BYTECODE); | 10 | BYTECODE("Bytecode", Decompilers.BYTECODE); |
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java index 32d6d76..ecd17f2 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java | |||
| @@ -105,7 +105,7 @@ public final class UiConfig { | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | public static Decompiler getDecompiler() { | 107 | public static Decompiler getDecompiler() { |
| 108 | return ui.data().section("Decompiler").setIfAbsentEnum(Decompiler::valueOf, "Current", Decompiler.CFR); | 108 | return ui.data().section("Decompiler").setIfAbsentEnum(Decompiler::valueOf, "Current", Decompiler.VINEFLOWER); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | public static void setDecompiler(Decompiler d) { | 111 | public static void setDecompiler(Decompiler d) { |
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/legacy/Config.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/legacy/Config.java index 0e8f7da..2f7cf19 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/legacy/Config.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/config/legacy/Config.java | |||
| @@ -78,7 +78,7 @@ public class Config { | |||
| 78 | 78 | ||
| 79 | public float scaleFactor = 1.0f; | 79 | public float scaleFactor = 1.0f; |
| 80 | 80 | ||
| 81 | public Decompiler decompiler = Decompiler.CFR; | 81 | public Decompiler decompiler = Decompiler.VINEFLOWER; |
| 82 | 82 | ||
| 83 | public Config() { | 83 | public Config() { |
| 84 | gson = new GsonBuilder().registerTypeAdapter(Integer.class, new IntSerializer()).registerTypeAdapter(Integer.class, new IntDeserializer()).registerTypeAdapter(Config.class, (InstanceCreator<Config>) type -> this).setPrettyPrinting().create(); | 84 | gson = new GsonBuilder().registerTypeAdapter(Integer.class, new IntSerializer()).registerTypeAdapter(Integer.class, new IntDeserializer()).registerTypeAdapter(Config.class, (InstanceCreator<Config>) type -> this).setPrettyPrinting().create(); |