Preparing other headers for CScriptSpecialFunction

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-02 13:13:35 +03:00
parent 1a2fe4974f
commit 6ffb16e4a9
No known key found for this signature in database
GPG Key ID: E224F951761145F8
22 changed files with 152 additions and 49 deletions

View File

@ -167,8 +167,8 @@ lbl_8020FF34:
/* 8020FF54 0020CEB4 38 21 00 30 */ addi r1, r1, 0x30
/* 8020FF58 0020CEB8 4E 80 00 20 */ blr
.global sub_8020ff5c
sub_8020ff5c:
.global SetFxDensity__13CEnvFxManagerFv
SetFxDensity__13CEnvFxManagerFv:
/* 8020FF5C 0020CEBC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8020FF60 0020CEC0 6C 84 80 00 */ xoris r4, r4, 0x8000
/* 8020FF64 0020CEC4 3C 00 43 30 */ lis r0, 0x4330
@ -4583,4 +4583,3 @@ lbl_803D2818:
.asciz "TXTR_UnderwaterFlake"
.balign 4
.4byte 0

View File

@ -2754,8 +2754,8 @@ Update__14CCameraManagerFfR13CStateManager:
/* 8000B5C4 00008524 38 21 00 20 */ addi r1, r1, 0x20
/* 8000B5C8 00008528 4E 80 00 20 */ blr
.global sub_8000b5cc
sub_8000b5cc:
.global SetFogDensity__14CCameraManagerFfFf
SetFogDensity__14CCameraManagerFfFf:
/* 8000B5CC 0000852C D0 23 00 9C */ stfs f1, 0x9c(r3)
/* 8000B5D0 00008530 C0 23 00 9C */ lfs f1, 0x9c(r3)
/* 8000B5D4 00008534 C0 03 00 94 */ lfs f0, 0x94(r3)

View File

@ -3964,7 +3964,7 @@ lbl_800C8844:
/* 800C89D8 000C5938 C8 01 00 C0 */ lfd f0, 0xc0(r1)
/* 800C89DC 000C593C 93 61 00 28 */ stw r27, 0x28(r1)
/* 800C89E0 000C5940 EC 60 18 28 */ fsubs f3, f0, f3
/* 800C89E4 000C5944 48 08 A1 DD */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
/* 800C89E4 000C5944 48 08 A1 DD */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
/* 800C89E8 000C5948 7C 7C 1B 78 */ mr r28, r3
lbl_800C89EC:
/* 800C89EC 000C594C 7F 20 07 75 */ extsb. r0, r25
@ -5569,7 +5569,7 @@ lbl_800CA054:
/* 800CA1A8 000C7108 C8 01 00 80 */ lfd f0, 0x80(r1)
/* 800CA1AC 000C710C 93 61 00 28 */ stw r27, 0x28(r1)
/* 800CA1B0 000C7110 EC 40 10 28 */ fsubs f2, f0, f2
/* 800CA1B4 000C7114 48 08 8A 0D */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
/* 800CA1B4 000C7114 48 08 8A 0D */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
/* 800CA1B8 000C7118 7C 7D 1B 78 */ mr r29, r3
lbl_800CA1BC:
/* 800CA1BC 000C711C 7F 40 07 75 */ extsb. r0, r26
@ -5919,7 +5919,7 @@ lbl_800CA580:
/* 800CA6C0 000C7620 93 41 00 20 */ stw r26, 0x20(r1)
/* 800CA6C4 000C7624 93 41 00 24 */ stw r26, 0x24(r1)
/* 800CA6C8 000C7628 93 41 00 28 */ stw r26, 0x28(r1)
/* 800CA6CC 000C762C 48 08 84 F5 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
/* 800CA6CC 000C762C 48 08 84 F5 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
/* 800CA6D0 000C7630 7C 7B 1B 78 */ mr r27, r3
lbl_800CA6D4:
/* 800CA6D4 000C7634 7F C0 07 75 */ extsb. r0, r30
@ -15309,7 +15309,7 @@ lbl_800D2E70:
/* 800D3020 000CFF80 93 81 00 20 */ stw r28, 0x20(r1)
/* 800D3024 000CFF84 93 81 00 24 */ stw r28, 0x24(r1)
/* 800D3028 000CFF88 93 81 00 28 */ stw r28, 0x28(r1)
/* 800D302C 000CFF8C 48 07 FB 95 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
/* 800D302C 000CFF8C 48 07 FB 95 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
/* 800D3030 000CFF90 7C 7F 1B 78 */ mr r31, r3
lbl_800D3034:
/* 800D3034 000CFF94 7F 40 07 75 */ extsb. r0, r26
@ -15473,7 +15473,7 @@ lbl_800D31AC:
/* 800D328C 000D01EC 93 21 00 20 */ stw r25, 0x20(r1)
/* 800D3290 000D01F0 93 01 00 24 */ stw r24, 0x24(r1)
/* 800D3294 000D01F4 92 E1 00 28 */ stw r23, 0x28(r1)
/* 800D3298 000D01F8 48 07 F9 29 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
/* 800D3298 000D01F8 48 07 F9 29 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
/* 800D329C 000D01FC 7C 7A 1B 78 */ mr r26, r3
lbl_800D32A0:
/* 800D32A0 000D0200 38 61 00 44 */ addi r3, r1, 0x44

View File

@ -100,7 +100,7 @@ lbl_801BD53C:
/* 801BD560 001BA4C0 80 7F 08 80 */ lwz r3, 0x880(r31)
/* 801BD564 001BA4C4 38 80 01 F4 */ li r4, 0x1f4
/* 801BD568 001BA4C8 C0 3D 00 3C */ lfs f1, 0x3c(r29)
/* 801BD56C 001BA4CC 48 05 29 F1 */ bl sub_8020ff5c
/* 801BD56C 001BA4CC 48 05 29 F1 */ bl SetFxDensity__13CEnvFxManagerFv
/* 801BD570 001BA4D0 48 00 00 3C */ b lbl_801BD5AC
lbl_801BD574:
/* 801BD574 001BA4D4 80 9F 08 50 */ lwz r4, 0x850(r31)
@ -189,4 +189,3 @@ lbl_803D19F0:
# ROM: 0x3CE9F0
.4byte 0
.4byte 0

View File

@ -15,7 +15,7 @@ lbl_803E2B68:
.4byte AcceptScriptMsg__22CScriptSpecialFunctionF20EScriptObjectMessage9TUniqueIdR13CStateManager
.4byte SetActive__6CActorFb
.4byte PreRender__22CScriptSpecialFunctionFR13CStateManagerRC14CFrustumPlanes
.4byte AddToRenderer__22CScriptSpecialFunctionCFRC14CFrustumPlanesRC13CStateManager
.4byte AddToRenderer__22CScriptSpecialFunctionFRC14CFrustumPlanesR13CStateManager
.4byte Render__22CScriptSpecialFunctionCFRC13CStateManager
.4byte CanRenderUnsorted__6CActorCFRC13CStateManager
.4byte CalculateRenderBounds__6CActorFv
@ -442,8 +442,8 @@ lbl_8014F530:
/* 8014F538 0014C498 38 21 00 10 */ addi r1, r1, 0x10
/* 8014F53C 0014C49C 4E 80 00 20 */ blr
.global sub_8014f540
sub_8014f540:
.global ThinkActorScale__22CScriptSpecialFunctionFfR13CStateManager
ThinkActorScale__22CScriptSpecialFunctionFfR13CStateManager:
/* 8014F540 0014C4A0 94 21 FF 80 */ stwu r1, -0x80(r1)
/* 8014F544 0014C4A4 7C 08 02 A6 */ mflr r0
/* 8014F548 0014C4A8 90 01 00 84 */ stw r0, 0x84(r1)
@ -3693,7 +3693,7 @@ lbl_80152324:
/* 80152338 0014F298 C0 3F 00 FC */ lfs f1, 0xfc(r31)
/* 8015233C 0014F29C D8 01 01 50 */ stfd f0, 0x150(r1)
/* 80152340 0014F2A0 80 81 01 54 */ lwz r4, 0x154(r1)
/* 80152344 0014F2A4 48 0B DC 19 */ bl sub_8020ff5c
/* 80152344 0014F2A4 48 0B DC 19 */ bl SetFxDensity__13CEnvFxManagerFv
/* 80152348 0014F2A8 48 00 05 58 */ b lbl_801528A0
.global lbl_8015234C
lbl_8015234C:
@ -4046,14 +4046,14 @@ lbl_80152814:
/* 8015281C 0014F77C 40 82 00 14 */ bne lbl_80152830
/* 80152820 0014F780 80 7E 08 70 */ lwz r3, 0x870(r30)
/* 80152824 0014F784 C0 3F 00 FC */ lfs f1, 0xfc(r31)
/* 80152828 0014F788 4B EB 8D A5 */ bl sub_8000b5cc
/* 80152828 0014F788 4B EB 8D A5 */ bl SetFogDensity__14CCameraManagerFfFf
/* 8015282C 0014F78C 48 00 00 74 */ b lbl_801528A0
lbl_80152830:
/* 80152830 0014F790 2C 1C 00 05 */ cmpwi r28, 5
/* 80152834 0014F794 40 82 00 6C */ bne lbl_801528A0
/* 80152838 0014F798 80 7E 08 70 */ lwz r3, 0x870(r30)
/* 8015283C 0014F79C C0 22 9D B4 */ lfs f1, lbl_805ABAD4@sda21(r2)
/* 80152840 0014F7A0 4B EB 8D 8D */ bl sub_8000b5cc
/* 80152840 0014F7A0 4B EB 8D 8D */ bl SetFogDensity__14CCameraManagerFfFf
/* 80152844 0014F7A4 48 00 00 5C */ b lbl_801528A0
.global lbl_80152848
lbl_80152848:
@ -4184,8 +4184,8 @@ lbl_801529F4:
/* 80152A04 0014F964 38 21 00 50 */ addi r1, r1, 0x50
/* 80152A08 0014F968 4E 80 00 20 */ blr
.global AddToRenderer__22CScriptSpecialFunctionCFRC14CFrustumPlanesRC13CStateManager
AddToRenderer__22CScriptSpecialFunctionCFRC14CFrustumPlanesRC13CStateManager:
.global AddToRenderer__22CScriptSpecialFunctionFRC14CFrustumPlanesR13CStateManager
AddToRenderer__22CScriptSpecialFunctionFRC14CFrustumPlanesR13CStateManager:
/* 80152A0C 0014F96C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80152A10 0014F970 7C 08 02 A6 */ mflr r0
/* 80152A14 0014F974 90 01 00 14 */ stw r0, 0x14(r1)
@ -4227,33 +4227,26 @@ Think__22CScriptSpecialFunctionFfR13CStateManager:
/* 80152A94 0014F9F4 7C 05 00 2E */ lwzx r0, r5, r0
/* 80152A98 0014F9F8 7C 09 03 A6 */ mtctr r0
/* 80152A9C 0014F9FC 4E 80 04 20 */ bctr
.global lbl_80152AA0
lbl_80152AA0:
/* 80152AA0 0014FA00 4B FF E4 D1 */ bl ThinkPlayerFollowLocator__22CScriptSpecialFunctionFfR13CStateManager
/* 80152AA4 0014FA04 48 00 01 04 */ b lbl_80152BA8
.global lbl_80152AA8
lbl_80152AA8:
/* 80152AA8 0014FA08 38 A0 00 00 */ li r5, 0
/* 80152AAC 0014FA0C 4B FF D7 E1 */ bl ThinkSpinnerController__22CScriptSpecialFunctionFfR13CStateManagerQ222CScriptSpecialFunction22ESpinnerControllerMode
/* 80152AB0 0014FA10 48 00 00 F8 */ b lbl_80152BA8
.global lbl_80152AB4
lbl_80152AB4:
/* 80152AB4 0014FA14 38 A0 00 01 */ li r5, 1
/* 80152AB8 0014FA18 4B FF D7 D5 */ bl ThinkSpinnerController__22CScriptSpecialFunctionFfR13CStateManagerQ222CScriptSpecialFunction22ESpinnerControllerMode
/* 80152ABC 0014FA1C 48 00 00 EC */ b lbl_80152BA8
.global lbl_80152AC0
lbl_80152AC0:
/* 80152AC0 0014FA20 4B FF D5 99 */ bl ThinkObjectFollowLocator__22CScriptSpecialFunctionFfR13CStateManager
/* 80152AC4 0014FA24 48 00 00 E4 */ b lbl_80152BA8
.global lbl_80152AC8
lbl_80152AC8:
/* 80152AC8 0014FA28 4B FF D3 CD */ bl ThinkObjectFollowObject__22CScriptSpecialFunctionFfR13CStateManager
/* 80152ACC 0014FA2C 48 00 00 DC */ b lbl_80152BA8
.global lbl_80152AD0
lbl_80152AD0:
/* 80152AD0 0014FA30 4B FF CE F1 */ bl ThinkChaffTarget__22CScriptSpecialFunctionFfR13CStateManager
/* 80152AD4 0014FA34 48 00 00 D4 */ b lbl_80152BA8
.global lbl_80152AD8
lbl_80152AD8:
/* 80152AD8 0014FA38 88 9E 01 E4 */ lbz r4, 0x1e4(r30)
/* 80152ADC 0014FA3C 54 80 EF FF */ rlwinm. r0, r4, 0x1d, 0x1f, 0x1f
@ -4278,31 +4271,24 @@ lbl_80152B00:
/* 80152B24 0014FA84 38 C0 FF FF */ li r6, -1
/* 80152B28 0014FA88 4B EF E5 99 */ bl SendScriptMsgs__7CEntityF18EScriptObjectStateR13CStateManager20EScriptObjectMessage
/* 80152B2C 0014FA8C 48 00 00 7C */ b lbl_80152BA8
.global lbl_80152B30
lbl_80152B30:
/* 80152B30 0014FA90 4B FF EB 7D */ bl ThinkSaveStation__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B34 0014FA94 48 00 00 74 */ b lbl_80152BA8
.global lbl_80152B38
lbl_80152B38:
/* 80152B38 0014FA98 4B FF E5 E5 */ bl ThinkIntroBossRingController__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B3C 0014FA9C 48 00 00 6C */ b lbl_80152BA8
.global lbl_80152B40
lbl_80152B40:
/* 80152B40 0014FAA0 4B FF CD F9 */ bl ThinkRainSimulator__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B44 0014FAA4 48 00 00 64 */ b lbl_80152BA8
.global lbl_80152B48
lbl_80152B48:
/* 80152B48 0014FAA8 4B FF CB F1 */ bl ThinkAreaDamage__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B4C 0014FAAC 48 00 00 5C */ b lbl_80152BA8
.global lbl_80152B50
lbl_80152B50:
/* 80152B50 0014FAB0 4B FF C9 F1 */ bl sub_8014f540
/* 80152B50 0014FAB0 4B FF C9 F1 */ bl ThinkActorScale__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B54 0014FAB4 48 00 00 54 */ b lbl_80152BA8
.global lbl_80152B58
lbl_80152B58:
/* 80152B58 0014FAB8 4B FF C9 65 */ bl ThinkPlayerInArea__22CScriptSpecialFunctionFfR13CStateManager
/* 80152B5C 0014FABC 48 00 00 4C */ b lbl_80152BA8
.global lbl_80152B60
lbl_80152B60:
/* 80152B60 0014FAC0 88 1E 01 F0 */ lbz r0, 0x1f0(r30)
/* 80152B64 0014FAC4 28 00 00 00 */ cmplwi r0, 0
@ -4322,7 +4308,6 @@ lbl_80152B60:
/* 80152B9C 0014FAFC 38 60 00 00 */ li r3, 0
/* 80152BA0 0014FB00 50 60 2E B4 */ rlwimi r0, r3, 5, 0x1a, 0x1a
/* 80152BA4 0014FB04 98 1E 01 E5 */ stb r0, 0x1e5(r30)
.global lbl_80152BA8
lbl_80152BA8:
/* 80152BA8 0014FB08 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80152BAC 0014FB0C 83 E1 00 0C */ lwz r31, 0xc(r1)
@ -4331,8 +4316,8 @@ lbl_80152BA8:
/* 80152BB8 0014FB18 38 21 00 10 */ addi r1, r1, 0x10
/* 80152BBC 0014FB1C 4E 80 00 20 */ blr
.global "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs"
"__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfoUiUiUiUsUsUs":
.global "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
"__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss":
/* 80152BC0 0014FB20 94 21 FE 70 */ stwu r1, -0x190(r1)
/* 80152BC4 0014FB24 7C 08 02 A6 */ mflr r0
/* 80152BC8 0014FB28 90 01 01 94 */ stw r0, 0x194(r1)

View File

@ -9,7 +9,16 @@ class CSfxManager {
public:
static void Update(f32 dt);
static void RemoveEmitter(CSfxHandle handle);
static void UpdateEmitter(const CSfxHandle& handle, const CVector3f& pos, const CVector3f& dir,
uchar maxVol);
static CSfxHandle AddEmitter(u16 id, const CVector3f& pos, const CVector3f& dir,
bool useAcoustics, bool looped, s16 prio, s32 areaId);
static CSfxHandle AddEmitter(u16 id, const CVector3f& pos, const CVector3f& dir, uchar vol,
bool useAcoustics, bool looped, s16 prio, s32 areaId);
static void Shutdown();
static u16 TranslateSFXID(u16);
static void PitchBend(const CSfxHandle& handle, float pitch);
};
#endif

View File

@ -4,6 +4,9 @@
#include "types.h"
class CVector2i {
public:
CVector2i(int, int);
private:
int x;
int y;

View File

@ -267,6 +267,7 @@ public:
}
CVector3f GetTranslation() const { return x34_transform.GetTranslation(); }
void SetTranslation(const CVector3f& vec);
CTransform4f GetScaledLocatorTransform(const rstl::string& segName) const;
/// ????
bool NullModel() const { return !GetAnimationData() && !GetModelData()->HasNormalModel(); }
@ -318,6 +319,17 @@ public:
void SetMuted(bool b) { xe5_26_muted = b; }
void SetRenderParticleDatabaseInside(bool b) { xe6_29_renderParticleDBInside = b; }
void RemoveMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
void RemoveMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
void RemoveMaterial(EMaterialTypes, EMaterialTypes, CStateManager&);
void RemoveMaterial(EMaterialTypes, CStateManager&);
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
void AddMaterial(EMaterialTypes, EMaterialTypes, EMaterialTypes, CStateManager&);
void AddMaterial(EMaterialTypes, EMaterialTypes, CStateManager&);
void AddMaterial(EMaterialTypes, CStateManager&);
void AddMaterial(const CMaterialList& l);
const CAABox& GetRenderBoundsCached() const { return x9c_renderBounds; }
void SetRenderBounds(const CAABox& bounds) { x9c_renderBounds = bounds; }

View File

@ -28,7 +28,9 @@ public:
mgr.SendScriptMsg(to, sender, msg);
}
TUniqueId GetUniqueId() const { return x8_uid; }
TEditorId GetEditorId() const { return xc_editorId; }
TAreaId GetAreaId() const;
TAreaId GetAreaIdAlways() const { return x4_areaId; }
bool GetActive() const { return x30_24_active; }
// might be fake?

View File

@ -37,6 +37,7 @@ private:
class CEnvFxManager {
public:
static void Initialize();
void SetFxDensity(s32, float);
private:
CAABox x0_particleBounds;

View File

@ -78,6 +78,7 @@ public:
bool CheckTerminate();
bool CheckReset();
void OpenWindow();
void SetFlowState(EFlowState s) { x12c_flowState = s; }
void SetMaxSpeed(bool v) {
// ?

View File

@ -3,10 +3,15 @@
#include "types.h"
#include "MetroidPrime/TGameTypes.hpp"
#include "Kyoto/CObjectReference.hpp"
class CMemoryCard {
public:
~CMemoryCard();
// TODO
rstl::pair<CAssetId, TAreaId> GetAreaAndWorldIdForSaveId(s32 saveId) const;
};
extern CMemoryCard* gpMemoryCard;

View File

@ -39,6 +39,7 @@ public:
};
// TODO these probably aren't real
bool HasAnimData() const { return xc_animData.get() != nullptr; }
bool HasNormalModel() const { return x1c_normalModel; }
CModelData();
@ -74,6 +75,9 @@ public:
bool GetSortThermal() const { return x14_25_sortThermal; }
void SetSortThermal(bool b) { x14_25_sortThermal = b; }
const CVector3f& GetScale() const { return x0_scale; }
void SetScale(const CVector3f& scale) { x0_scale = scale; }
static CModelData CModelDataNull();
static EWhichModel GetRenderingModel(const CStateManager& mgr);

View File

@ -67,6 +67,7 @@ public:
CAABox GetBoundingBox() const;
void MoveCollisionPrimitive(const CVector3f&);
void SetAngularVelocityWR(const CAxisAngle& angVel);
void Stop();
CMotionState GetMotionState() const;

View File

@ -3,7 +3,10 @@
#include "types.h"
#include "Kyoto/CObjectReference.hpp"
#include "Kyoto/CRandom16.hpp"
#include "Kyoto/Math/CVector2i.hpp"
#include "Kyoto/TToken.hpp"
#include "MetroidPrime/CEntityInfo.hpp"
#include "MetroidPrime/CObjectList.hpp"
#include "MetroidPrime/TGameTypes.hpp"
@ -36,6 +39,10 @@ class CEntity;
class CMazeState;
class CRayCastResult;
class CMaterialFilter;
class CScriptLayerManager;
class CLight;
class CDamageInfo;
class CTexture;
namespace SL {
class CSortedListManager;
@ -44,8 +51,24 @@ class CSortedListManager;
#define kMaxEntities 1024
typedef rstl::reserved_vector< TUniqueId, kMaxEntities > TEntityList;
enum EStateManagerTransition {
kSMT_InGame,
kSMT_MapScreen,
kSMT_PauseGame,
kSMT_LogBook,
kSMT_SaveGame,
kSMT_MessageScreen
};
struct SOnScreenTex {
CAssetId x0_id;
CVector2i x4_origin;
CVector2i xc_extent;
};
class CStateManager {
public:
void ResetEscapeSequenceTimer(float);
void SendScriptMsg(TUniqueId uid, TEditorId target, EScriptObjectMessage msg,
EScriptObjectState state);
void SendScriptMsg(CEntity* ent, TUniqueId target, EScriptObjectMessage msg);
@ -65,6 +88,7 @@ public:
CEntity* ObjectById(TUniqueId uid);
const CEntity* GetObjectById(TUniqueId uid) const;
TUniqueId GetIdForScript(TEditorId eid) const;
// <unk> GetIdListForScript(TEditorId) const;
CMazeState* CurrentMaze();
const CMazeState* GetCurrentMaze() const;
@ -82,6 +106,9 @@ public:
const CActorModelParticles* GetActorModelParticles() const {
return x884_actorModelParticles.get();
}
CEnvFxManager* EnvFxManager() { return x880_envFxManager; }
const CEnvFxManager* GetEnvFxManager() const { return x880_envFxManager; }
CRandom16* GetActiveRandom() const { return x900_random; }
CObjectList& GetObjectListById(EGameObjectList id) { return *x808_objectLists[id]; }
@ -100,6 +127,30 @@ public:
return objUid;
}
void ApplyDamageToWorld(TUniqueId, const CActor&, const CVector3f&, const CDamageInfo& info,
CMaterialFilter&);
bool ApplyDamage(TUniqueId damagerId, TUniqueId damageeId, TUniqueId radiusSender,
const CDamageInfo& info, const CMaterialFilter& filter,
const CVector3f& knockbackVec);
void DeferStateTransition(EStateManagerTransition t);
EStateManagerTransition GetDeferredStateTransition() const { return xf90_deferredTransition; }
void SetBossParams(TUniqueId bossId, float maxEnergy, u32 stringIdx);
void SetPendingOnScreenTex(CAssetId texId, const CVector2i& origin, const CVector2i& extent) {
xef4_pendingScreenTex.x0_id = texId;
xef4_pendingScreenTex.x4_origin = origin;
xef4_pendingScreenTex.xc_extent = extent;
}
const SOnScreenTex& GetPendingScreenTex() const { return xef4_pendingScreenTex; }
void SetShouldQuitGame(bool should) { xf94_25_quitGame = should; }
void SetSkipCinematicSpecialFunction(TUniqueId id) { /*xf38_skipCineSpecialFunc = id;*/
}
void SetInSaveUI(bool b) { xf94_28_inSaveUI = b; }
bool GetInSaveUI() const { return xf94_28_inSaveUI; }
void SetIsFullThreat(bool v) { xf94_30_fullThreat = v; }
u32 GetInputFrameIdx() const { return x8d4_inputFrameIdx; }
private:
u16 x0_nextFreeIndex;
rstl::reserved_vector< u16, 1024 > x8_objectIndexArray;
@ -123,12 +174,29 @@ private:
rstl::rc_ptr< CScriptMailbox > x8bc_mailbox;
rstl::rc_ptr< CMapWorldInfo > x8c0_mapWorldInfo;
rstl::rc_ptr< CWorldTransManager > x8c4_worldTransManager;
u8 pad2[0x38];
rstl::rc_ptr< CScriptLayerManager > x8c8_worldLayerState;
TAreaId x8cc_nextAreaId;
TAreaId x8d0_prevAreaId;
u32 x8d4_inputFrameIdx;
u32 x8d8_updateFrameIdx;
u32 x8dc_objectDrawToken;
rstl::vector< CLight > x8e0_dynamicLights;
TLockedToken< CTexture > x8f0_shadowTex;
CRandom16* x900_random;
u8 pad4[0x61c];
u8 x904_pad[0x5f0];
SOnScreenTex xef4_pendingScreenTex;
u8 xf08_pad[0x1C];
f32 xf24_thermColdScale1;
f32 xf28_thermColdScale2;
u8 pad3[0x6c];
u8 pad3[0x68];
EStateManagerTransition xf90_deferredTransition;
bool xf94_24_readyToRender : 1;
bool xf94_25_quitGame : 1;
bool xf94_26_generatingObject : 1;

View File

@ -3,6 +3,7 @@
#include "types.h"
#include "MetroidPrime/CGameArea.hpp"
#include "MetroidPrime/TGameTypes.hpp"
#include "Kyoto/IObjectStore.hpp"
@ -60,6 +61,8 @@ public:
const CGameArea& GetAreaAlways(TAreaId id) const { return *x18_areas[id.Value()]; }
const CGameArea* GetArea(TAreaId id) const { return x18_areas[id.Value()].get(); }
bool IsAreaValid(TAreaId id) const { return x18_areas[id.Value()]->IsLoaded(); }
CAssetId GetWorldAssetId() const { return x8_mlvlId; }
TAreaId GetAreaIdForSaveId(s32 saveId) const;
private:
enum Phase {

View File

@ -25,6 +25,8 @@ public:
CGameCamera* GetCurrentCamera(CStateManager& mgr) const;
void SetPlayerCamera(CStateManager& mgr, TUniqueId newCamId);
void SetFogDensity(float fogDensityTarget, float fogDensitySpeed);
static f32 DefaultThirdPersonFov();
private:

View File

@ -17,6 +17,10 @@ class CHintOptions {
public:
void SetHintNextTime();
void DelayHint(const rstl::string& name);
void ActivateImmediateHintTimer(const rstl::string& name);
void ActivateContinueDelayHintTimer(const rstl::string& name);
private:
rstl::vector< SHintState > x0_hintStates;
int x10_nextHintIdx;

View File

@ -152,6 +152,9 @@ public:
CTransform4f CreateTransformFromMovementDirection() const;
EPlayerOrbitState GetOrbitState() const { return x304_orbitState; }
const CVector3f& GetMovementDirection() const { return x50c_moveDir; }
void SetHudDisable(float staticTimer, float outSpeed, float inSpeed);
void IncrementPhazon();
void DecrementPhazon();
// GetMovementDirection2D__7CPlayerCFv ??
private:

View File

@ -95,11 +95,11 @@ public:
u32 GetMissileCostForAltAttack() const;
float GetComboFireAmmoPeriod() const;
static float GetMissileComboChargeFactor();
u32 CalculateItemCollectionRate();
u32 GetTotalPickupCount();
u32 CalculateItemCollectionRate() const;
u32 GetTotalPickupCount() const;
void SetIsFusionEnabled(bool v);
bool GetIsFusionEnabled();
bool GetIsFusionEnabled() const;
EPlayerSuit GetCurrentSuit();
EPlayerSuit GetCurrentSuitRaw() const { return x20_currentSuit; }

View File

@ -16,6 +16,9 @@ public:
void SetHasFusion(bool v);
bool GetHasFusion() const { return xd0_28_fusionSuitActive; }
bool GetCinematicState(CAssetId mlvlId, TEditorId cineId) const;
void SetCinematicState(CAssetId mlvlId, TEditorId cineId, bool state);
private:
rstl::reserved_vector< u8, 98 > x0_nesState;
rstl::reserved_vector< bool, 64 > x68_;

View File

@ -362,13 +362,13 @@ CPlayerState::EPlayerSuit CPlayerState::GetCurrentSuit() {
return x20_currentSuit;
}
bool CPlayerState::GetIsFusionEnabled() { return x0_26_fusion; }
bool CPlayerState::GetIsFusionEnabled() const { return x0_26_fusion; }
void CPlayerState::SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
u32 CPlayerState::GetTotalPickupCount() { return 99; }
u32 CPlayerState::GetTotalPickupCount() const { return 99; }
u32 CPlayerState::CalculateItemCollectionRate() {
u32 CPlayerState::CalculateItemCollectionRate() const {
u32 total = GetItemCapacity(kIT_PowerBombs);
if (total >= 4)
@ -416,4 +416,3 @@ float CPlayerState::GetComboFireAmmoPeriod() const {
}
float CPlayerState::GetMissileComboChargeFactor() { return 1.8f; }