@@ -247,6 +247,8 @@ class cGcPlayerState(Structure):
247247 muUnits : Annotated [int , Field (c_uint32 , 0x1BC )]
248248 muNanites : Annotated [int , Field (c_uint32 , 0x1C0 )]
249249 muSpecials : Annotated [int , Field (c_uint32 , 0x1C4 )]
250+ # Found in cGcPlayerShipOwnership::SpawnNewShip
251+ miPrimaryShip : Annotated [int , Field (c_uint32 , 0xC4F0 )]
250252
251253 @function_hook (
252254 "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 44 8B 81 ? ? ? ? 48 8D 2D"
@@ -276,9 +278,12 @@ def StoreCurrentSystemSpaceStationEndpoint(
276278
277279@partial_struct
278280class 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 )]
281+
282+ @partial_struct
283+ class sGcShipData (Structure ):
284+ _total_size_ = 0x48
285+
286+ mPlayerShipSeed : Annotated [basic .cTkSeed , 0x0 ]
282287
283288 @function_hook (
284289 "48 89 5C 24 ? 55 56 57 41 54 41 56 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 45"
@@ -294,6 +299,31 @@ def Update(
294299 lfTimestep : Annotated [float , c_float ],
295300 ): ...
296301
302+ @function_hook ("44 89 44 24 ? 48 89 54 24 ? 55 56 41 54 41 56 41 57 48 8D 6C 24" )
303+ def SpawnNewShip (
304+ self ,
305+ this : "_Pointer[cGcPlayerShipOwnership]" ,
306+ lMatrix : _Pointer [basic .cTkMatrix34 ],
307+ leLandingGearState : c_uint32 , # cGcPlayerShipOwnership::ShipSpawnLandingGearState
308+ liShipIndex : c_int32 ,
309+ lbSpawnShipOverride : c_bool ,
310+ ) -> c_bool :
311+ ...
312+
313+ @function_hook ("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 83 EC ? 48 8B 35 ? ? ? ? 8B DA" )
314+ def DestroyShip (
315+ self ,
316+ this : "_Pointer[cGcPlayerShipOwnership]" ,
317+ liShipIndex : c_int32 ,
318+ ) -> c_bool :
319+ ...
320+
321+ # Not sure about this...
322+ mShips : Annotated [list [sGcShipData ], Field (sGcShipData * 12 , 0x58 )]
323+ # Both these found at the top of cGcPlayerShipOwnership::UpdateMeshRefresh
324+ mbShouldRefreshMesh : Annotated [bool , Field (c_bool , 0xA690 )]
325+ mMeshRefreshState : Annotated [int , Field (c_uint32 , 0xA694 )]
326+
297327
298328@partial_struct
299329class cGcGameState (Structure ):
0 commit comments