-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBioInf.asl
54 lines (43 loc) · 1.42 KB
/
BioInf.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
state("BioshockInfinite")
{
float isMapLoading : 0x14154E8, 0x4;
int overlaysPtr : 0x1415A30, 0x124;
int overlaysCount : 0x1415A30, 0x128;
int afterLogo : 0x135697C;
}
start
{
return current.afterLogo == 1 && old.afterLogo == 0;
}
isLoading
{
//This is the variable used to track when map data is being loaded.
//This includes load screens and OOB load zones.
//Note, this doesn't include the load screen transition time.
//We have to look for the overlay otherwise the timer will be delayed when starting/stoppping.
if (current.isMapLoading != -1)
return true;
var count = current.overlaysCount;
if (count < 0 || count > 8)
return false;
//Look for the load screen overlay.
for(var i = 0; i < count; i++) {
var overlayPtr = memory.ReadValue<int>(new IntPtr(current.overlaysPtr+(i*4)));
var namePtr = memory.ReadValue<int>(new IntPtr(overlayPtr));
var nameLen = memory.ReadValue<int>(new IntPtr(overlayPtr + 0x4)) - 1;
if (nameLen != 0x36)
continue;
var name = memory.ReadString(new IntPtr(namePtr), nameLen*2);
if (name == "GFXScriptReferenced.GameThreadLoadingScreen_Data_Oct22")
return true;
}
return false;
}
init
{
timer.IsGameTimePaused = false;
}
exit
{
timer.IsGameTimePaused = true;
}