forked from bladecoding/ASL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BioInfDLC.asl
84 lines (69 loc) · 2.7 KB
/
BioInfDLC.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
state("BioshockInfinite")
{
float isMapLoading : 0x14154E8, 0x4;
int overlaysPtr : 0x1415A30, 0x124;
int overlaysCount : 0x1415A30, 0x128;
byte afterLogo : 0x135697C;
long area : 0x1423D18, 0x124, 0x1A4;
int segment : 0x13D327C;
int loadingScreen : 0x137CF94, 0x3BC, 0x19C;
}
state("BioshockInfinite", "Steam Current Patch")
{
float isMapLoading : 0x0FEC7C8, 0x4;
int overlaysPtr : 0x0FED290, 0x124;
int overlaysCount : 0x0FED290, 0x128;
byte afterLogo : 0x0F30854;
long area : 0x1007160, 0x124, 0x1A4;
int segment : 0x0FA493C;
int loadingScreen : 0x137CF94, 0x3BC, 0x19C;
}
start
{
if(current.loadingScreen == 0 && old.loadingScreen > 0)
return (current.area == 128849018910 && current.segment == 1500) || (current.area == 8589934594 && current.segment == 1546);
}
isLoading
{
if(timer.CurrentSplit.Name.ToLower().Contains("setup")) return true;
//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 && nameLen != 0x2A && nameLen != 0x26)
continue;
var name = memory.ReadString(new IntPtr(namePtr), nameLen*2);
if(name.Contains("Loading"))
print(i + ". 0x" + nameLen.ToString("X2") + " " + name);
if (name == "GFXScriptReferenced.GameThreadLoadingScreen_Data_Oct22" || name == "DLCB_GFxMovieInfos.DLCB_LoadingScreen_Data" || name == "DLCC_GFxMovieInfos.XDLCC_LoadingScreen")
return true;
}
return false;
}
split
{
if(timer.CurrentSplit.Name.ToLower().Contains("setup") && current.loadingScreen == 0 && old.loadingScreen > 0)
return (current.area == 128849018910 && current.segment == 1500) || (current.area == 8589934594 && current.segment == 1546);
}
init
{
if(modules.First().ModuleMemorySize == 19197952)
version = "Steam Current Patch";
timer.IsGameTimePaused=false;
}
reset
{
if(current.loadingScreen > 0 && old.segment < current.segment)
return (current.area == 128849018910 && current.segment == 1500) || (!timer.Run.CategoryName.ToLower().Contains("both") && current.area == 8589934594 && current.segment == 1546);
}
exit{timer.IsGameTimePaused=true;}