diff --git a/Platform/Apple/tools/jace/src/main/java/jace/LawlessLegends.java b/Platform/Apple/tools/jace/src/main/java/jace/LawlessLegends.java index cd2726ce..825d7ee9 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/LawlessLegends.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/LawlessLegends.java @@ -67,12 +67,12 @@ public class LawlessLegends extends Application { primaryStage.show(); new Thread(() -> { new Emulator(getParameters().getRaw()); + configureEmulatorForGame(); reconnectUIHooks(); EmulatorUILogic.scaleIntegerRatio(); while (Emulator.computer.getVideo() == null || Emulator.computer.getVideo().getFrameBuffer() == null) { Thread.yield(); } - configureEmulatorForGame(); bootWatchdog(); }).start(); primaryStage.setOnCloseRequest(event -> { @@ -81,9 +81,9 @@ public class LawlessLegends extends Application { System.exit(0); }); } - + public void reconnectUIHooks() { - controller.connectComputer(Emulator.computer, primaryStage); + controller.connectComputer(Emulator.computer, primaryStage); } public static LawlessLegends getApplication() { diff --git a/Platform/Apple/tools/jace/src/main/java/jace/core/SoundGeneratorDevice.java b/Platform/Apple/tools/jace/src/main/java/jace/core/SoundGeneratorDevice.java index a6206666..992c5141 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/core/SoundGeneratorDevice.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/core/SoundGeneratorDevice.java @@ -25,7 +25,6 @@ public abstract class SoundGeneratorDevice extends Device { @Override public void reconfigure() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } @Override diff --git a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java index 1fdfe2da..75ab1752 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessHacks.java @@ -12,12 +12,17 @@ public class LawlessHacks extends Cheats { // Modes specified by the game engine int MODE_SOFTSWITCH = 0x0C020; - - + + public LawlessHacks(Computer computer) { super(computer); } + @Override + public void toggleCheats() { + // Do nothing -- you cannot toggle this once it's active. + } + @Override public void registerListeners() { // Observe graphics changes diff --git a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java index 8c4f0b8c..9b8c4c35 100644 --- a/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java +++ b/Platform/Apple/tools/jace/src/main/java/jace/lawless/LawlessVideo.java @@ -16,12 +16,12 @@ public class LawlessVideo extends VideoNTSC { private static RenderEngine activeEngine = RenderEngine.UNKNOWN; private boolean titleScreen = true; private boolean[][] activeMask = new boolean[192][80]; - - + + public static enum RenderEngine { FULL_COLOR, FULL_TEXT(new int[]{ - 2, 6, 78, 186 + 2, 6, 78, 186 }), _2D(new int[]{ 9, 8, 34, 17, @@ -31,15 +31,19 @@ public class LawlessVideo extends VideoNTSC { _3D(new int[]{ 9, 8, 34, 17, 44, 24, 76, 136, - 44, 143, 76, 184, + 44, 143, 76, 183, 8, 172, 14, 182,}), MAP(new int[]{ 2, 6, 78, 11, 2, 11, 4, 186, - 76, 11, 78, 186, + 76, 11, 78, 186, 2, 182, 78, 186, 28, 3, 52, 6 - }), + }), + STORYBOOK(new int[]{ + 0, 0, 39, 191, + 39, 130, 78, 191 + }), UNKNOWN; boolean[][] colorMask; @@ -81,7 +85,7 @@ public class LawlessVideo extends VideoNTSC { Emulator.computer.onNextVBL(() -> Emulator.computer.getVideo().forceRefresh()); System.out.println("Detected engine: " + e.name()); } else { - System.out.println("Detected engine same as before: " + e.name()); + System.out.println("Detected engine same as before: " + e.name()); } }