mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-03-01 03:30:04 +00:00
Various bug fixes and added story book mode
This commit is contained in:
parent
3e025e405f
commit
6dd9c7e789
@ -67,12 +67,12 @@ public class LawlessLegends extends Application {
|
|||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
new Emulator(getParameters().getRaw());
|
new Emulator(getParameters().getRaw());
|
||||||
|
configureEmulatorForGame();
|
||||||
reconnectUIHooks();
|
reconnectUIHooks();
|
||||||
EmulatorUILogic.scaleIntegerRatio();
|
EmulatorUILogic.scaleIntegerRatio();
|
||||||
while (Emulator.computer.getVideo() == null || Emulator.computer.getVideo().getFrameBuffer() == null) {
|
while (Emulator.computer.getVideo() == null || Emulator.computer.getVideo().getFrameBuffer() == null) {
|
||||||
Thread.yield();
|
Thread.yield();
|
||||||
}
|
}
|
||||||
configureEmulatorForGame();
|
|
||||||
bootWatchdog();
|
bootWatchdog();
|
||||||
}).start();
|
}).start();
|
||||||
primaryStage.setOnCloseRequest(event -> {
|
primaryStage.setOnCloseRequest(event -> {
|
||||||
@ -81,9 +81,9 @@ public class LawlessLegends extends Application {
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reconnectUIHooks() {
|
public void reconnectUIHooks() {
|
||||||
controller.connectComputer(Emulator.computer, primaryStage);
|
controller.connectComputer(Emulator.computer, primaryStage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LawlessLegends getApplication() {
|
public static LawlessLegends getApplication() {
|
||||||
|
@ -25,7 +25,6 @@ public abstract class SoundGeneratorDevice extends Device {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reconfigure() {
|
public void reconfigure() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,12 +12,17 @@ public class LawlessHacks extends Cheats {
|
|||||||
|
|
||||||
// Modes specified by the game engine
|
// Modes specified by the game engine
|
||||||
int MODE_SOFTSWITCH = 0x0C020;
|
int MODE_SOFTSWITCH = 0x0C020;
|
||||||
|
|
||||||
|
|
||||||
public LawlessHacks(Computer computer) {
|
public LawlessHacks(Computer computer) {
|
||||||
super(computer);
|
super(computer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void toggleCheats() {
|
||||||
|
// Do nothing -- you cannot toggle this once it's active.
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerListeners() {
|
public void registerListeners() {
|
||||||
// Observe graphics changes
|
// Observe graphics changes
|
||||||
|
@ -16,12 +16,12 @@ public class LawlessVideo extends VideoNTSC {
|
|||||||
private static RenderEngine activeEngine = RenderEngine.UNKNOWN;
|
private static RenderEngine activeEngine = RenderEngine.UNKNOWN;
|
||||||
private boolean titleScreen = true;
|
private boolean titleScreen = true;
|
||||||
private boolean[][] activeMask = new boolean[192][80];
|
private boolean[][] activeMask = new boolean[192][80];
|
||||||
|
|
||||||
|
|
||||||
public static enum RenderEngine {
|
public static enum RenderEngine {
|
||||||
FULL_COLOR,
|
FULL_COLOR,
|
||||||
FULL_TEXT(new int[]{
|
FULL_TEXT(new int[]{
|
||||||
2, 6, 78, 186
|
2, 6, 78, 186
|
||||||
}),
|
}),
|
||||||
_2D(new int[]{
|
_2D(new int[]{
|
||||||
9, 8, 34, 17,
|
9, 8, 34, 17,
|
||||||
@ -31,15 +31,19 @@ public class LawlessVideo extends VideoNTSC {
|
|||||||
_3D(new int[]{
|
_3D(new int[]{
|
||||||
9, 8, 34, 17,
|
9, 8, 34, 17,
|
||||||
44, 24, 76, 136,
|
44, 24, 76, 136,
|
||||||
44, 143, 76, 184,
|
44, 143, 76, 183,
|
||||||
8, 172, 14, 182,}),
|
8, 172, 14, 182,}),
|
||||||
MAP(new int[]{
|
MAP(new int[]{
|
||||||
2, 6, 78, 11,
|
2, 6, 78, 11,
|
||||||
2, 11, 4, 186,
|
2, 11, 4, 186,
|
||||||
76, 11, 78, 186,
|
76, 11, 78, 186,
|
||||||
2, 182, 78, 186,
|
2, 182, 78, 186,
|
||||||
28, 3, 52, 6
|
28, 3, 52, 6
|
||||||
}),
|
}),
|
||||||
|
STORYBOOK(new int[]{
|
||||||
|
0, 0, 39, 191,
|
||||||
|
39, 130, 78, 191
|
||||||
|
}),
|
||||||
UNKNOWN;
|
UNKNOWN;
|
||||||
boolean[][] colorMask;
|
boolean[][] colorMask;
|
||||||
|
|
||||||
@ -81,7 +85,7 @@ public class LawlessVideo extends VideoNTSC {
|
|||||||
Emulator.computer.onNextVBL(() -> Emulator.computer.getVideo().forceRefresh());
|
Emulator.computer.onNextVBL(() -> Emulator.computer.getVideo().forceRefresh());
|
||||||
System.out.println("Detected engine: " + e.name());
|
System.out.println("Detected engine: " + e.name());
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Detected engine same as before: " + e.name());
|
System.out.println("Detected engine same as before: " + e.name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user