@@ -21,7 +21,7 @@ PatternScanner = require("includes.services.PatternScanner")
2121--
2222-- **NOTE:** Please make sure no modules/files try to use a pointer before the scan is complete.
2323--
24- -- You can call `PatternScanner:IsDone()` to double check.
24+ -- You can call `PatternScanner:IsDone()` to double check.-
2525--- @class GPointers
2626--- @field ScriptGlobals pointer
2727--- @field GameState pointer<byte>
@@ -66,12 +66,10 @@ local mem_batches <const> = {
6666 GPointers .ScriptGlobals = ptr :add (0x3 ):rip ()
6767 end ),
6868 MemoryBatch .new (" GameVersion" , " 8B C3 33 D2 C6 44 24 20" , function (ptr )
69- local pGameBuild = ptr :add (0x24 ):rip ()
70- local pOnlineVersion = pGameBuild :add (0x20 )
71- GPointers .GameVersion = {
72- build = pGameBuild :get_string (),
73- online = pOnlineVersion :get_string ()
74- }
69+ local pGameBuild = ptr :add (0x24 ):rip ()
70+ local pOnlineVersion = pGameBuild :add (0x20 )
71+ GPointers .GameVersion .build = pGameBuild :get_string ()
72+ GPointers .GameVersion .online = pOnlineVersion :get_string ()
7573 end ),
7674 MemoryBatch .new (" GameState" , " 81 39 5D 6D FF AF 75 20" , function (ptr )
7775 GPointers .GameState = ptr :add (0xA ):rip ():add (0x1 )
@@ -80,10 +78,8 @@ local mem_batches <const> = {
8078 GPointers .GameTime = ptr :add (0x2 ):rip ()
8179 end ),
8280 MemoryBatch .new (" ScreenResolution" , " 66 0F 6E 0D ? ? ? ? 0F B7 3D" , function (ptr )
83- GPointers .ScreenResolution = vec2 :new (
84- ptr :sub (0x4 ):rip ():get_word (),
85- ptr :add (0x4 ):rip ():get_word ()
86- )
81+ GPointers .ScreenResolution .x = ptr :sub (0x4 ):rip ():get_word ()
82+ GPointers .ScreenResolution .y = ptr :add (0x4 ):rip ():get_word ()
8783 end ),
8884
8985 -- TODO: enable once dynamic calls become stable. For now either the JIT compiler is broken or I'm just outright stupid.
@@ -103,19 +99,15 @@ local mem_batches <const> = {
10399 GPointers .ScriptGlobals = ptr :add (0x7 ):add (0x3 ):rip ()
104100 end ),
105101 MemoryBatch .new (" GameVersion" , " 4C 8D 0D ? ? ? ? 48 8D 5C 24 ? 48 89 D9 48 89 FA" , function (ptr )
106- GPointers .GameVersion = {
107- build = ptr :add (0x3 ):rip ():get_string (),
108- online = ptr :add (0x47 ):add (0x3 ):rip ():get_string ()
109- }
102+ GPointers .GameVersion .build = ptr :add (0x3 ):rip ():get_string ()
103+ GPointers .GameVersion .online = ptr :add (0x47 ):add (0x3 ):rip ():get_string ()
110104 end ),
111105 MemoryBatch .new (" GameState" , " 83 3D ? ? ? ? ? 0F 85 ? ? ? ? BA ? 00" , function (ptr )
112106 GPointers .GameState = ptr :add (0x2 ):rip ():add (0x1 )
113107 end ),
114108 MemoryBatch .new (" ScreenResolution" , " 75 39 0F 57 C0 F3 0F 2A 05" , function (ptr )
115- GPointers .ScreenResolution = vec2 :new (
116- ptr :add (0x5 ):add (0x4 ):rip ():get_word (),
117- ptr :add (0x1E ):add (0x4 ):rip ():get_word ()
118- )
109+ GPointers .ScreenResolution .x = ptr :add (0x5 ):add (0x4 ):rip ():get_word ()
110+ GPointers .ScreenResolution .y = ptr :add (0x1E ):add (0x4 ):rip ():get_word ()
119111 end ),
120112 },
121113 [Enums .eAPIVersion .L54 ] = { --[[ dummy]] },
0 commit comments