@@ -613,8 +613,59 @@ def Update(
613613 ): ...
614614
615615
616+ @partial_struct
617+ class cGcPlayerEnvironment (Structure ):
618+ mPlayerTM : Annotated [basic .cTkMatrix34 , Field (basic .cTkMatrix34 , 0x0 )]
619+ mUp : Annotated [basic .Vector3f , Field (basic .Vector3f , 0x40 )]
620+
621+ # Found below the call to cTkDynamicGravityControl::GetGravity in cGcPlayerEnvironment::Update
622+ miNearestPlanetIndex : Annotated [int , Field (c_uint32 , 0x2BC )]
623+ mfDistanceFromPlanet : Annotated [float , Field (c_float , 0x2C0 )]
624+ mfNearestPlanetSealevel : Annotated [float , Field (c_float , 0x2C4 )]
625+ mNearestPlanetPos : Annotated [basic .Vector3f , Field (basic .Vector3f , 0x2D0 )]
626+ mbInsidePlanetAtmosphere : Annotated [bool , Field (c_bool , 0x2EC )]
627+ meLocation : Annotated [
628+ enums .EnvironmentLocation .Enum ,
629+ Field (c_enum32 [enums .EnvironmentLocation .Enum ], 0x458 )
630+ ]
631+ meLocationStable : Annotated [
632+ enums .EnvironmentLocation .Enum ,
633+ Field (c_enum32 [enums .EnvironmentLocation .Enum ], 0x464 )
634+ ]
635+
636+ @function_hook ("48 83 EC ? 80 B9 ? ? ? ? ? C6 04 24" )
637+ def IsOnboardOwnFreighter (
638+ self , this : "_Pointer[cGcPlayerEnvironment]"
639+ ) -> c_bool : ...
640+
641+ @function_hook ("8B 81 ? ? ? ? 83 E8 ? 83 F8 ? 0F 96 C0 C3 48 83 EC" )
642+ def IsOnPlanet (self , this : "_Pointer[cGcPlayerEnvironment]" ) -> c_bool : ...
643+
644+ @function_hook ("48 8B C4 F3 0F 11 48 ? 55 53 41 54" )
645+ def Update (
646+ self ,
647+ this : "_Pointer[cGcPlayerEnvironment]" ,
648+ lfTimeStep : Annotated [float , c_float ],
649+ ): ...
650+
651+
652+ @partial_struct
653+ class cGcEnvironment (Structure ):
654+ # Passed into multiple cGcPlayerEnvironment methods.
655+ mPlayerEnvironment : Annotated [cGcPlayerEnvironment , 0x8A0 ]
656+
657+ @function_hook (
658+ "48 8B C4 48 89 48 ? 55 53 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 ? 4C 8B E9"
659+ )
660+ def UpdateRender (self , this : "_Pointer[cGcEnvironment]" ):
661+ # TODO: There could be a few good functions to get which are called in here...
662+ ...
663+
664+
616665@partial_struct
617666class cGcSimulation (Structure ):
667+ # Found in cGcSimulation::Update. Passed into cGcEnvironment::Update.
668+ mEnvironment : Annotated [cGcEnvironment , 0xAF790 ]
618669 mPlayer : Annotated [cGcPlayer , 0x24DE40 ]
619670 # Found in cGcSimulation::Update. Passed into cGcSolarSystem::Update.
620671 mpSolarSystem : Annotated [_Pointer [cGcSolarSystem ], 0x24C670 ]
@@ -885,34 +936,6 @@ def UpdateGravityPoint(
885936]
886937
887938
888- @partial_struct
889- class cGcPlayerEnvironment (Structure ):
890- mPlayerTM : Annotated [basic .cTkMatrix34 , Field (basic .cTkMatrix34 , 0x0 )]
891- mUp : Annotated [basic .Vector3f , Field (basic .Vector3f , 0x40 )]
892-
893- # Found below the call to cTkDynamicGravityControl::GetGravity in cGcPlayerEnvironment::Update
894- miNearestPlanetIndex : Annotated [int , Field (c_uint32 , 0x2BC )]
895- mfDistanceFromPlanet : Annotated [float , Field (c_float , 0x2C0 )]
896- mfNearestPlanetSealevel : Annotated [float , Field (c_float , 0x2C4 )]
897- mNearestPlanetPos : Annotated [basic .Vector3f , Field (basic .Vector3f , 0x2D0 )]
898- mbInsidePlanetAtmosphere : Annotated [bool , Field (c_bool , 0x2EC )]
899-
900- @function_hook ("48 83 EC ? 80 B9 ? ? ? ? ? C6 04 24" )
901- def IsOnboardOwnFreighter (
902- self , this : "_Pointer[cGcPlayerEnvironment]"
903- ) -> c_bool : ...
904-
905- @function_hook ("8B 81 ? ? ? ? 83 E8 ? 83 F8 ? 0F 96 C0 C3 48 83 EC" )
906- def IsOnPlanet (self , this : "_Pointer[cGcPlayerEnvironment]" ) -> c_bool : ...
907-
908- @function_hook ("48 8B C4 F3 0F 11 48 ? 55 53 41 54" )
909- def Update (
910- self ,
911- this : "_Pointer[cGcPlayerEnvironment]" ,
912- lfTimeStep : Annotated [float , c_float ],
913- ): ...
914-
915-
916939class Engine :
917940 @static_function_hook ("40 53 48 83 EC ? 44 8B D1 44 8B C1" )
918941 @staticmethod
@@ -1156,15 +1179,6 @@ def StateChange(
11561179 ): ...
11571180
11581181
1159- class cGcEnvironment (Structure ):
1160- @function_hook (
1161- "48 8B C4 48 89 48 ? 55 53 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 ? 4C 8B E9"
1162- )
1163- def UpdateRender (self , this : "_Pointer[cGcEnvironment]" ):
1164- # TODO: There could be a few good functions to get which are called in here...
1165- ...
1166-
1167-
11681182class cGcPlayerNotifications (Structure ):
11691183 @function_hook ("48 89 5C 24 ? 48 89 74 24 ? 57 48 81 EC ? ? ? ? 44 8B 81" )
11701184 def AddTimedMessage (
0 commit comments