forked from drtchops/asl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblackplague.asl
More file actions
45 lines (37 loc) · 873 Bytes
/
blackplague.asl
File metadata and controls
45 lines (37 loc) · 873 Bytes
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
state("Penumbra")
{
float gameTime: 0x2DCAF0, 0x188, 0x4C, 0x1C;
}
startup
{
vars.prevPhase = null;
vars.loadedTime = 0;
}
update
{
if (current.gameTime == 0 && old.gameTime > 0) {
// reload previous save
vars.loadedTime += old.gameTime;
}
if (timer.CurrentPhase == TimerPhase.Running && vars.prevPhase == TimerPhase.NotRunning) {
// on reset, reset this var
vars.loadedTime = 0;
}
vars.prevPhase = timer.CurrentPhase;
}
start
{
// autostart if only a current time is higher than 0
// can't be done using old.GamerTimer == 0, since it's already 0 in menu
return old.gameTime == 0 && current.gameTime > 0;
}
isLoading
{
return true;
}
gameTime
{
return TimeSpan.FromSeconds(current.gameTime + vars.loadedTime);
}
// based on SuicideMachine's SH2 timer
// made not terrible by chops