-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShadowsOfTheEmpire.asl
60 lines (54 loc) · 2.15 KB
/
ShadowsOfTheEmpire.asl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Shadows of the Empire autosplitter
// Auto start/split/reset
state("Shadows"){
int startFlag : "Shadows.exe", 0x0CADD4; // 0 - in menu, 1 - in game
int level : "Shadows.exe", 0x4D6330; // 0-9 currently loaded level
int selected : "Shadows.exe", 0x0CAD64; // 0-9 currently selected level from menu screen
bool loading : "Shadows.exe", 0x2EEB59; // 0 - not loading, 1 - loading //might have slight delays in updating, not sure
float levelEnd : "Shadows.exe", 0x0CAF4C; // Changes from 0.0 to 9.5ish at the end-level screen, and then decreases until 2.5
int reactorHP : "Shadows.exe", 0x3B5364; // Starts at 4, destroyed at 0
byte shipActive : "Shadows.exe", 0x4D4F1A; // 24 when piloting controls are active, 0 when the game takes control
}
startup{
// Asks user to change to Real Time if LiveSplit is currently set to Game Time
if (timer.CurrentTimingMethod == TimingMethod.GameTime){
var timingMessage = MessageBox.Show (
"This game uses Real Time as the main timing method.\n"+
"LiveSplit is currently set to show in-game time (without loads)\n"+
"Would you like to set the timing method to Real Time?",
"LiveSplit | Shadows of the Empire",
MessageBoxButtons.YesNo,MessageBoxIcon.Question
);
if (timingMessage == DialogResult.Yes){
timer.CurrentTimingMethod = TimingMethod.RealTime;
}
}
}
start{
return (
current.startFlag == 1 && // a level is active
old.startFlag == 0 // immediately after being on main menu
);
}
reset{
return (
current.startFlag == 1 && // a level is active
old.startFlag == 0 && // immediately after being on main menu
current.selected == 0 // hoth selected
);
}
split{
return(
(old.levelEnd == 0.0 && // level has ended
current.levelEnd < 9.6 && // level-end screen has initialized
current.levelEnd > 9.4) // and is in the expected value range
|| // OR
(current.selected == 9 && // final level selected
current.level == 9 && // final level active
current.reactorHP == 0 && // reactor has been destroyed
current.shipActive == 0) // in-game cutscene is playing
);
}
isLoading{
return current.loading; // pause while game is loading
}