Skip to content

Commit 8546781

Browse files
committed
Version fix and add another function relating to spaceship heat factor
1 parent 863720b commit 8546781

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

nmspy/data/types.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def DestroyShip(
328328
@partial_struct
329329
class cGcGameState(Structure):
330330
mPlayerState: Annotated[cGcPlayerState, 0xA950]
331-
# Found in cGcGameState:: Update
331+
# Found in cGcGameState::Update
332332
mPlayerShipOwnership: Annotated[cGcPlayerShipOwnership, 0xA2BD0]
333333

334334
@function_hook("48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 88 54 24")
@@ -1310,7 +1310,15 @@ def GetPulseDriveFuelFactor(
13101310
) -> c_float: ...
13111311

13121312

1313+
@partial_struct
13131314
class cGcSpaceshipWeapons(Structure):
1315+
# These can be found in cGcSpaceshipWeapons::GetHeatFactor and cGcSpaceshipWeapons::GetOverheatProgress
1316+
# This enum corresponds to the element in the following 3 arrays by index.
1317+
meWeaponMode: Annotated[c_enum32[enums.cGcShipWeapons], 0xA4]
1318+
mafWeaponHeat: Annotated[list[float], Field(c_float * 7, 0x5FA4)]
1319+
mafWeaponOverheatTimer: Annotated[list[float], Field(c_float * 7, 0x5FC0)]
1320+
mabWeaponOverheated: Annotated[list[bool], Field(c_bool * 7, 0x5FDC)]
1321+
13141322
@function_hook("48 63 81 ?? ?? 00 00 80 BC 08 ?? ?? 00 00 00 74 12")
13151323
def GetOverheatProgress(self, this: "_Pointer[cGcSpaceshipWeapons]") -> c_float: ...
13161324

@@ -1331,6 +1339,10 @@ def GetCurrentShootPoints(
13311339
) -> c_uint64: # cGcShootPoint *
13321340
...
13331341

1342+
@function_hook("48 63 81 ? ? ? ? F3 0F 10 84 81")
1343+
def GetHeatFactor(self, this: "_Pointer[cGcSpaceshipWeapons]") -> c_float:
1344+
...
1345+
13341346

13351347
class cGcPlayerCharacterComponent(Structure):
13361348
@function_hook("48 8B C4 55 53 56 57 41 56 48 8D 68 A1 48 81 EC 90 00 00")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers = [
2626
dependencies = [
2727
"pymhf[gui]>=0.2.1"
2828
]
29-
version = "155759.0"
29+
version = "155983.0"
3030

3131
[dependency-groups]
3232
dev = [

tools/data.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,5 +768,10 @@
768768
"name": "cGcPlayerShipOwnership::DestroyShip",
769769
"signature": "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",
770770
"mangled_name": "?DestroyShip@cGcPlayerShipOwnership@@QEAA_NH@Z"
771+
},
772+
{
773+
"name": "cGcSpaceshipWeapons::GetHeatFactor",
774+
"signature": "48 63 81 ? ? ? ? F3 0F 10 84 81",
775+
"mangled_name": "?GetHeatFactor@cGcSpaceshipWeapons@@UEBAMXZ"
771776
}
772777
]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)