Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions Livesplit.KatanaZERO/Livesplit.KatanaZERO.asl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ state ("Katana Zero", "GOG 1.0.4") {
int statePtr : 0x1AE4578, 0x0, 0x38, 0x8;
}

state ("Katana Zero", "GOG 1.0.5") {
int map : 0x1CF7890;
int speedrunData : 0x1CFE518, 0x48, 0x48;
double timer : 0x1ADD168, 0x2C, 0x10, 0x3B4, 0x40;
int statePtr : 0x1AE6638, 0x0, 0x38, 0x8;
}

startup {
settings.Add("tape1", true, "1 - Factory");
settings.Add("tape2", true, "2 - Hotel");
Expand Down Expand Up @@ -186,14 +193,25 @@ startup {

init {
switch (modules.First().ModuleMemorySize) {
case 0x1E0E000: version = "Steam 1.0.5"; break;
case 0x1E0B000: version = "GOG 1.0.4"; break;
case 0x1E0E000:
version = "Steam 1.0.5";
vars.timerNotReady = -1;
break;
case 0x1E0D000:
version = "GOG 1.0.5";
vars.timerNotReady = -1;
break;
case 0x1E0B000:
version = "GOG 1.0.4";
vars.timerNotReady = 0;
break;

}

vars.timerResetVars = (EventHandler)((s, e) => {
vars.tape = 12;
while(vars.tape > 1) {
if(game.ReadValue<double>((IntPtr)(current.speedrunData+0x200+0x10*vars.tape)) != -1)
if(game.ReadValue<double>((IntPtr)(current.speedrunData+0x200+0x10*vars.tape)) == vars.timerNotReady)
break;
--vars.tape;
}
Expand Down