Skip to content

Commit 516c41b

Browse files
committed
Initial work on functions relating to ship mesh regen
1 parent 19bd024 commit 516c41b

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

nmspy/data/types.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,32 @@ def StoreCurrentSystemSpaceStationEndpoint(
274274
): ...
275275

276276

277+
@partial_struct
278+
class cGcPlayerShipOwnership(Structure):
279+
# Both these found at the top of cGcPlayerShipOwnership::UpdateMeshRefresh
280+
mbShouldRefreshMesh: Annotated[bool, Field(c_bool, 0xA690)]
281+
mMeshRefreshState: Annotated[int, Field(c_uint32, 0xA694)]
282+
283+
@function_hook(
284+
"48 89 5C 24 ? 55 56 57 41 54 41 56 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 45"
285+
)
286+
def UpdateMeshRefresh(self, this: "_Pointer[cGcPlayerShipOwnership]"): ...
287+
288+
@function_hook(
289+
"48 8B C4 55 53 56 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 80 B9 ? ? ? ? ? 48 8B F1"
290+
)
291+
def Update(
292+
self,
293+
this: "_Pointer[cGcPlayerShipOwnership]",
294+
lfTimestep: Annotated[float, c_float],
295+
): ...
296+
297+
277298
@partial_struct
278299
class cGcGameState(Structure):
279300
mPlayerState: Annotated[cGcPlayerState, 0xA950]
301+
# Found in cGcGameState:: Update
302+
mPlayerShipOwnership: Annotated[cGcPlayerShipOwnership, 0xA2BD0]
280303

281304
@function_hook("48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 88 54 24")
282305
def OnSaveProgressCompleted(
@@ -292,11 +315,18 @@ def OnSaveProgressCompleted(
292315
def LoadFromPersistentStorage(
293316
self,
294317
this: "_Pointer[cGcGameState]",
295-
leSlot: c_uint32,
318+
leSlot: Annotated[int, c_uint32],
296319
a3: c_int32,
297320
lbNetworkClientLoad: Annotated[bool, c_bool],
298321
) -> c_uint64: ...
299322

323+
@function_hook(
324+
"48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 55 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? F3 0F 10 91"
325+
)
326+
def Update(
327+
self, this: "_Pointer[cGcGameState]", lfTimeStep: Annotated[float, c_float]
328+
): ...
329+
300330

301331
class cTkFSM(Structure):
302332
@function_hook(

tools/data.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,5 +743,20 @@
743743
"name": "Engine::AddGroupNode",
744744
"signature": "48 89 5C 24 ? 57 48 81 EC ? ? ? ? 44 8B D2 44 8B CA 41 C1 EA ? 41 81 E1 ? ? ? ? 48 8B D9 45 85 D2 0F 84 ? ? ? ? 41 81 F9 ? ? ? ? 0F 84 ? ? ? ? 8B CA 48 8B 15 ? ? ? ? 81 E1 ? ? ? ? 48 8B 82 ? ? ? ? 48 63 0C 88 48 8B 82 ? ? ? ? 48 8B 3C C8 48 85 FF 74 ? 8B 4F ? 8B C1 25 ? ? ? ? 41 3B C1 75 ? C1 E9 ? 41 3B CA 75 ? 4C 8B CF 48 8D 4C 24 ? BA ? ? ? ? E8 ? ? ? ? 48 8B 0D ? ? ? ? 48 8D 05 ? ? ? ? 4C 8D 4C 24 ? 48 89 44 24 ? 41 B8 ? ? ? ? 48 89 7C 24 ? 48 8B D3 E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? EB ? C7 03 ? ? ? ? 48 8B C3 48 8B 9C 24 ? ? ? ? 48 81 C4 ? ? ? ? 5F C3 CC CC CC CC CC 48 89 5C 24",
745745
"mangled_name": "?AddGroupNode@Engine@@YA?AVTkHandle@@V2@PEBD@Z"
746+
},
747+
{
748+
"name": "cGcPlayerShipOwnership::UpdateMeshRefresh",
749+
"signature": "48 89 5C 24 ? 55 56 57 41 54 41 56 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 45",
750+
"mangled_name": "?UpdateMeshRefresh@cGcPlayerShipOwnership@@AEAAXXZ"
751+
},
752+
{
753+
"name": "cGcPlayerShipOwnership::Update",
754+
"signature": "48 8B C4 55 53 56 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 80 B9 ? ? ? ? ? 48 8B F1",
755+
"mangled_name": "?Update@cGcPlayerShipOwnership@@QEAAXM@Z"
756+
},
757+
{
758+
"name": "cGcGameState::Update",
759+
"signature": "48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 55 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? F3 0F 10 91",
760+
"mangled_name": "?Update@cGcGameState@@QEAAXM@Z"
746761
}
747762
]

0 commit comments

Comments
 (0)