CPlayerGun progress

This commit is contained in:
Luke Street 2022-10-11 11:30:39 -04:00
parent d3d6ea4c44
commit a963804889
25 changed files with 520 additions and 277 deletions

View File

@ -146,8 +146,8 @@ lbl_805AA10C:
# TODO: this appears to be a constant for CAnimRes::x4_charIdx
# could be ODR'd here, or actually live in CCharacterFactory/CAssetFactory
.global lbl_805AA110
lbl_805AA110:
.global kDefaultCharIdx__8CAnimRes
kDefaultCharIdx__8CAnimRes:
# ROM: 0x3F69B0
.4byte 0
.4byte 0

View File

@ -3085,7 +3085,7 @@ lbl_8011FD44:
__ct__11CGrappleArmFRC9CVector3f:
/* 8011FD60 0011CCC0 94 21 FE C0 */ stwu r1, -0x140(r1)
/* 8011FD64 0011CCC4 7C 08 02 A6 */ mflr r0
/* 8011FD68 0011CCC8 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 8011FD68 0011CCC8 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 8011FD6C 0011CCCC 90 01 01 44 */ stw r0, 0x144(r1)
/* 8011FD70 0011CCD0 38 00 00 29 */ li r0, 0x29
/* 8011FD74 0011CCD4 93 E1 01 3C */ stw r31, 0x13c(r1)

View File

@ -3021,7 +3021,7 @@ lbl_800EF6B4:
/* 800EF6DC 000EC63C 80 C1 00 0C */ lwz r6, 0xc(r1)
/* 800EF6E0 000EC640 38 81 00 20 */ addi r4, r1, 0x20
/* 800EF6E4 000EC644 EC 00 07 F2 */ fmuls f0, f0, f31
/* 800EF6E8 000EC648 80 A2 83 F0 */ lwz r5, lbl_805AA110@sda21(r2)
/* 800EF6E8 000EC648 80 A2 83 F0 */ lwz r5, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800EF6EC 000EC64C 90 C1 00 20 */ stw r6, 0x20(r1)
/* 800EF6F0 000EC650 90 A1 00 24 */ stw r5, 0x24(r1)
/* 800EF6F4 000EC654 D0 01 00 28 */ stfs f0, 0x28(r1)

View File

@ -1796,11 +1796,11 @@ lbl_80010D90:
/* 80010D98 0000DCF8 4B FF 9B 69 */ bl IsInCinematicCamera__14CCameraManagerCFv
/* 80010D9C 0000DCFC 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80010DA0 0000DD00 41 82 00 F0 */ beq lbl_80010E90
/* 80010DA4 0000DD04 C0 2D 87 B8 */ lfs f1, lbl_805A7378@sda21(r13)
/* 80010DA4 0000DD04 C0 2D 87 B8 */ lfs f1, kCameraBobExtentX__16CPlayerCameraBob@sda21(r13)
/* 80010DA8 0000DD08 38 61 00 08 */ addi r3, r1, 8
/* 80010DAC 0000DD0C C0 4D 87 BC */ lfs f2, lbl_805A737C@sda21(r13)
/* 80010DAC 0000DD0C C0 4D 87 BC */ lfs f2, kCameraBobExtentY__16CPlayerCameraBob@sda21(r13)
/* 80010DB0 0000DD10 48 30 34 51 */ bl __ct__9CVector2fFff
/* 80010DB4 0000DD14 C0 2D 87 C0 */ lfs f1, lbl_805A7380@sda21(r13)
/* 80010DB4 0000DD14 C0 2D 87 C0 */ lfs f1, kCameraBobPeriod__16CPlayerCameraBob@sda21(r13)
/* 80010DB8 0000DD18 7C 65 1B 78 */ mr r5, r3
/* 80010DBC 0000DD1C 38 61 00 10 */ addi r3, r1, 0x10
/* 80010DC0 0000DD20 38 80 00 01 */ li r4, 1
@ -12700,11 +12700,11 @@ lbl_8001A6A8:
/* 8001A820 00017780 48 00 06 E5 */ bl "__nw__30TOneStatic<16CPlayerCameraBob>FUlPCcPCc"
/* 8001A824 00017784 7C 77 1B 79 */ or. r23, r3, r3
/* 8001A828 00017788 41 82 00 2C */ beq lbl_8001A854
/* 8001A82C 0001778C C0 2D 87 B8 */ lfs f1, lbl_805A7378@sda21(r13)
/* 8001A82C 0001778C C0 2D 87 B8 */ lfs f1, kCameraBobExtentX__16CPlayerCameraBob@sda21(r13)
/* 8001A830 00017790 38 61 00 38 */ addi r3, r1, 0x38
/* 8001A834 00017794 C0 4D 87 BC */ lfs f2, lbl_805A737C@sda21(r13)
/* 8001A834 00017794 C0 4D 87 BC */ lfs f2, kCameraBobExtentY__16CPlayerCameraBob@sda21(r13)
/* 8001A838 00017798 48 2F 99 C9 */ bl __ct__9CVector2fFff
/* 8001A83C 0001779C C0 2D 87 C0 */ lfs f1, lbl_805A7380@sda21(r13)
/* 8001A83C 0001779C C0 2D 87 C0 */ lfs f1, kCameraBobPeriod__16CPlayerCameraBob@sda21(r13)
/* 8001A840 000177A0 7C 65 1B 78 */ mr r5, r3
/* 8001A844 000177A4 7E E3 BB 78 */ mr r3, r23
/* 8001A848 000177A8 38 80 00 01 */ li r4, 1
@ -12740,7 +12740,7 @@ lbl_8001A854:
/* 8001A8BC 0001781C 3C 60 80 5A */ lis r3, sIdentity__12CTransform4f@ha
/* 8001A8C0 00017820 90 1F 07 CC */ stw r0, 0x7cc(r31)
/* 8001A8C4 00017824 38 83 66 70 */ addi r4, r3, sIdentity__12CTransform4f@l
/* 8001A8C8 00017828 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 8001A8C8 00017828 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 8001A8CC 0001782C 38 A0 00 01 */ li r5, 1
/* 8001A8D0 00017830 93 7F 07 D0 */ stw r27, 0x7d0(r31)
/* 8001A8D4 00017834 38 00 00 00 */ li r0, 0
@ -13113,7 +13113,7 @@ None__16CActorParametersFv:
MakePlayerAnimres__FUiRC9CVector3f:
/* 8001AE58 00017DB8 90 83 00 00 */ stw r4, 0(r3)
/* 8001AE5C 00017DBC 38 80 00 01 */ li r4, 1
/* 8001AE60 00017DC0 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 8001AE60 00017DC0 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 8001AE64 00017DC4 38 00 00 00 */ li r0, 0
/* 8001AE68 00017DC8 90 C3 00 04 */ stw r6, 4(r3)
/* 8001AE6C 00017DCC C0 05 00 00 */ lfs f0, 0(r5)

View File

@ -7,73 +7,73 @@ lbl_ctor:
.section .sdata
.balign 8
.global lbl_805A7378
lbl_805A7378:
.global kCameraBobExtentX__16CPlayerCameraBob
kCameraBobExtentX__16CPlayerCameraBob:
# ROM: 0x3F4D18
.4byte 0x3D916873
.global lbl_805A737C
lbl_805A737C:
.global kCameraBobExtentY__16CPlayerCameraBob
kCameraBobExtentY__16CPlayerCameraBob:
# ROM: 0x3F4D1C
.4byte 0x3E116873
.global lbl_805A7380
lbl_805A7380:
.global kCameraBobPeriod__16CPlayerCameraBob
kCameraBobPeriod__16CPlayerCameraBob:
# ROM: 0x3F4D20
.4byte 0x3EF0A3D7
.global lbl_805A7384
lbl_805A7384:
.global kOrbitBobScale__16CPlayerCameraBob
kOrbitBobScale__16CPlayerCameraBob:
# ROM: 0x3F4D24
.4byte 0x3F451EB8
.global lbl_805A7388
lbl_805A7388:
.global kMaxOrbitBobScale__16CPlayerCameraBob
kMaxOrbitBobScale__16CPlayerCameraBob:
# ROM: 0x3F4D28
.4byte 0x3F4CCCCD
.global lbl_805A738C
lbl_805A738C:
.global kSlowSpeedPeriodScale__16CPlayerCameraBob
kSlowSpeedPeriodScale__16CPlayerCameraBob:
# ROM: 0x3F4D2C
.float 0.3
.global lbl_805A7390
lbl_805A7390:
.global kTargetMagnitudeTrackingRate__16CPlayerCameraBob
kTargetMagnitudeTrackingRate__16CPlayerCameraBob:
# ROM: 0x3F4D30
.float 0.1
.global lbl_805A7394
lbl_805A7394:
.global kLandingBobSpringConstant__16CPlayerCameraBob
kLandingBobSpringConstant__16CPlayerCameraBob:
# ROM: 0x3F4D34
.float 150.0
.global lbl_805A7398
lbl_805A7398:
.global kViewWanderRadius__16CPlayerCameraBob
kViewWanderRadius__16CPlayerCameraBob:
# ROM: 0x3F4D38
.4byte 0xC1F00000
.global lbl_805A739C
lbl_805A739C:
.global kViewWanderSpeedMin__16CPlayerCameraBob
kViewWanderSpeedMin__16CPlayerCameraBob:
# ROM: 0x3F4D3C
.4byte 0xC20C0000
.global lbl_805A73A0
lbl_805A73A0:
.global kViewWanderSpeedMax__16CPlayerCameraBob
kViewWanderSpeedMax__16CPlayerCameraBob:
# ROM: 0x3F4D40
.4byte 0x42200000
.global lbl_805A73A4
lbl_805A73A4:
.global kViewWanderRollVariation__16CPlayerCameraBob
kViewWanderRollVariation__16CPlayerCameraBob:
# ROM: 0x3F4D44
.4byte 0x42A00000
.global lbl_805A73A8
lbl_805A73A8:
.global kGunBobMagnitude__16CPlayerCameraBob
kGunBobMagnitude__16CPlayerCameraBob:
# ROM: 0x3F4D48
.float 0.03
.global lbl_805A73AC
lbl_805A73AC:
.global kHelmetBobMagnitude__16CPlayerCameraBob
kHelmetBobMagnitude__16CPlayerCameraBob:
# ROM: 0x3F4D4C
.float 0.1
@ -371,7 +371,7 @@ UpdateViewWander__16CPlayerCameraBobFfR13CStateManager:
/* 800E9794 000E66F4 54 1F 10 3A */ slwi r31, r0, 2
/* 800E9798 000E66F8 48 00 00 85 */ bl CalculateRandomViewWanderPitch__16CPlayerCameraBobFR13CStateManager
/* 800E979C 000E66FC 7C 3E FD 2E */ stfsx f1, r30, r31
/* 800E97A0 000E6700 C3 ED 87 EC */ lfs f31, lbl_805A73AC@sda21(r13)
/* 800E97A0 000E6700 C3 ED 87 EC */ lfs f31, kHelmetBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800E97A4 000E6704 80 7D 09 00 */ lwz r3, 0x900(r29)
/* 800E97A8 000E6708 48 22 8D 35 */ bl Float__9CRandom16Fv
/* 800E97AC 000E670C C0 4D 87 F0 */ lfs f2, lbl_805A73B0@sda21(r13)
@ -447,7 +447,7 @@ CalculateRandomViewWanderPosition__16CPlayerCameraBobFR13CStateManager:
/* 800E98A8 000E6808 80 7F 09 00 */ lwz r3, 0x900(r31)
/* 800E98AC 000E680C EF C0 00 72 */ fmuls f30, f0, f1
/* 800E98B0 000E6810 48 22 8C 2D */ bl Float__9CRandom16Fv
/* 800E98B4 000E6814 C0 0D 87 E8 */ lfs f0, lbl_805A73A8@sda21(r13)
/* 800E98B4 000E6814 C0 0D 87 E8 */ lfs f0, kGunBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800E98B8 000E6818 EF A0 00 72 */ fmuls f29, f0, f1
/* 800E98BC 000E681C FC 20 F0 90 */ fmr f1, f30
/* 800E98C0 000E6820 48 22 BA 25 */ bl SlowCosineR__5CMathFf
@ -520,7 +520,7 @@ InitViewWander__16CPlayerCameraBobFR13CStateManager:
/* 800E99C0 000E6920 D0 1E 00 BC */ stfs f0, 0xbc(r30)
/* 800E99C4 000E6924 4B FF FE 59 */ bl CalculateRandomViewWanderPitch__16CPlayerCameraBobFR13CStateManager
/* 800E99C8 000E6928 D0 3E 00 C0 */ stfs f1, 0xc0(r30)
/* 800E99CC 000E692C C3 ED 87 EC */ lfs f31, lbl_805A73AC@sda21(r13)
/* 800E99CC 000E692C C3 ED 87 EC */ lfs f31, kHelmetBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800E99D0 000E6930 80 7F 09 00 */ lwz r3, 0x900(r31)
/* 800E99D4 000E6934 48 22 8B 09 */ bl Float__9CRandom16Fv
/* 800E99D8 000E6938 C0 4D 87 F0 */ lfs f2, lbl_805A73B0@sda21(r13)
@ -575,10 +575,10 @@ SetState__16CPlayerCameraBobFQ216CPlayerCameraBob15ECameraBobStateR13CStateManag
/* 800E9A80 000E69E0 38 00 00 01 */ li r0, 1
/* 800E9A84 000E69E4 98 03 00 28 */ stb r0, 0x28(r3)
/* 800E9A88 000E69E8 C0 23 00 68 */ lfs f1, 0x68(r3)
/* 800E9A8C 000E69EC C0 0D 87 DC */ lfs f0, lbl_805A739C@sda21(r13)
/* 800E9A8C 000E69EC C0 0D 87 DC */ lfs f0, kViewWanderSpeedMin__16CPlayerCameraBob@sda21(r13)
/* 800E9A90 000E69F0 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 800E9A94 000E69F4 40 80 00 0C */ bge lbl_800E9AA0
/* 800E9A98 000E69F8 38 8D 87 DC */ addi r4, r13, lbl_805A739C@sda21
/* 800E9A98 000E69F8 38 8D 87 DC */ addi r4, r13, kViewWanderSpeedMin__16CPlayerCameraBob@sda21
/* 800E9A9C 000E69FC 48 00 00 08 */ b lbl_800E9AA4
lbl_800E9AA0:
/* 800E9AA0 000E6A00 38 83 00 68 */ addi r4, r3, 0x68
@ -586,7 +586,7 @@ lbl_800E9AA4:
/* 800E9AA4 000E6A04 C0 04 00 00 */ lfs f0, 0(r4)
/* 800E9AA8 000E6A08 D0 03 00 68 */ stfs f0, 0x68(r3)
/* 800E9AAC 000E6A0C C0 23 00 68 */ lfs f1, 0x68(r3)
/* 800E9AB0 000E6A10 C0 0D 87 D8 */ lfs f0, lbl_805A7398@sda21(r13)
/* 800E9AB0 000E6A10 C0 0D 87 D8 */ lfs f0, kViewWanderRadius__16CPlayerCameraBob@sda21(r13)
/* 800E9AB4 000E6A14 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 800E9AB8 000E6A18 7C 00 00 26 */ mfcr r0
/* 800E9ABC 000E6A1C 54 00 0F FE */ srwi r0, r0, 0x1f
@ -924,10 +924,10 @@ Update__16CPlayerCameraBobFfR13CStateManager:
/* 800E9F30 000E6E90 88 1E 00 29 */ lbz r0, 0x29(r30)
/* 800E9F34 000E6E94 C0 0D A3 10 */ lfs f0, lbl_805A8ED0@sda21(r13)
/* 800E9F38 000E6E98 28 00 00 00 */ cmplwi r0, 0
/* 800E9F3C 000E6E9C C0 8D 87 D4 */ lfs f4, lbl_805A7394@sda21(r13)
/* 800E9F3C 000E6E9C C0 8D 87 D4 */ lfs f4, kLandingBobSpringConstant__16CPlayerCameraBob@sda21(r13)
/* 800E9F40 000E6EA0 41 82 00 0C */ beq lbl_800E9F4C
/* 800E9F44 000E6EA4 C0 0D A3 14 */ lfs f0, lbl_805A8ED4@sda21(r13)
/* 800E9F48 000E6EA8 C0 8D 87 E0 */ lfs f4, lbl_805A73A0@sda21(r13)
/* 800E9F48 000E6EA8 C0 8D 87 E0 */ lfs f4, kViewWanderSpeedMax__16CPlayerCameraBob@sda21(r13)
lbl_800E9F4C:
/* 800E9F4C 000E6EAC C0 5E 00 6C */ lfs f2, 0x6c(r30)
/* 800E9F50 000E6EB0 C0 7E 00 70 */ lfs f3, 0x70(r30)
@ -943,7 +943,7 @@ lbl_800E9F4C:
/* 800E9F78 000E6ED8 D0 1E 00 70 */ stfs f0, 0x70(r30)
/* 800E9F7C 000E6EDC C0 0D A3 18 */ lfs f0, lbl_805A8ED8@sda21(r13)
/* 800E9F80 000E6EE0 C0 5E 00 74 */ lfs f2, 0x74(r30)
/* 800E9F84 000E6EE4 C0 8D 87 E4 */ lfs f4, lbl_805A73A4@sda21(r13)
/* 800E9F84 000E6EE4 C0 8D 87 E4 */ lfs f4, kViewWanderRollVariation__16CPlayerCameraBob@sda21(r13)
/* 800E9F88 000E6EE8 EC 00 00 B2 */ fmuls f0, f0, f2
/* 800E9F8C 000E6EEC C0 7E 00 78 */ lfs f3, 0x78(r30)
/* 800E9F90 000E6EF0 FC 00 00 50 */ fneg f0, f0
@ -1018,7 +1018,7 @@ lbl_800EA034:
lbl_800EA098:
/* 800EA098 000E6FF8 C0 1E 01 04 */ lfs f0, 0x104(r30)
/* 800EA09C 000E6FFC C0 5E 01 00 */ lfs f2, 0x100(r30)
/* 800EA0A0 000E7000 C0 6D 87 D0 */ lfs f3, lbl_805A7390@sda21(r13)
/* 800EA0A0 000E7000 C0 6D 87 D0 */ lfs f3, kTargetMagnitudeTrackingRate__16CPlayerCameraBob@sda21(r13)
/* 800EA0A4 000E7004 EC 20 10 28 */ fsubs f1, f0, f2
/* 800EA0A8 000E7008 C0 02 90 78 */ lfs f0, lbl_805AAD98@sda21(r2)
/* 800EA0AC 000E700C EC 23 10 7A */ fmadds f1, f3, f1, f2
@ -1032,7 +1032,7 @@ lbl_800EA0C4:
/* 800EA0C8 000E7028 FC 20 F8 90 */ fmr f1, f31
/* 800EA0CC 000E702C C0 5E 00 14 */ lfs f2, 0x14(r30)
/* 800EA0D0 000E7030 7F C3 F3 78 */ mr r3, r30
/* 800EA0D4 000E7034 C0 6D 87 D0 */ lfs f3, lbl_805A7390@sda21(r13)
/* 800EA0D4 000E7034 C0 6D 87 D0 */ lfs f3, kTargetMagnitudeTrackingRate__16CPlayerCameraBob@sda21(r13)
/* 800EA0D8 000E7038 7F E4 FB 78 */ mr r4, r31
/* 800EA0DC 000E703C EC 00 10 28 */ fsubs f0, f0, f2
/* 800EA0E0 000E7040 EC 03 10 3A */ fmadds f0, f3, f0, f2
@ -1085,34 +1085,34 @@ ReadTweaks__16CPlayerCameraBobFR12CInputStream:
/* 800EA190 000E70F0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 800EA194 000E70F4 7C 7F 1B 78 */ mr r31, r3
/* 800EA198 000E70F8 48 25 4A 91 */ bl ReadFloat__12CInputStreamFv
/* 800EA19C 000E70FC D0 2D 87 B8 */ stfs f1, lbl_805A7378@sda21(r13)
/* 800EA19C 000E70FC D0 2D 87 B8 */ stfs f1, kCameraBobExtentX__16CPlayerCameraBob@sda21(r13)
/* 800EA1A0 000E7100 7F E3 FB 78 */ mr r3, r31
/* 800EA1A4 000E7104 48 25 4A 85 */ bl ReadFloat__12CInputStreamFv
/* 800EA1A8 000E7108 D0 2D 87 BC */ stfs f1, lbl_805A737C@sda21(r13)
/* 800EA1A8 000E7108 D0 2D 87 BC */ stfs f1, kCameraBobExtentY__16CPlayerCameraBob@sda21(r13)
/* 800EA1AC 000E710C 7F E3 FB 78 */ mr r3, r31
/* 800EA1B0 000E7110 48 25 4A 79 */ bl ReadFloat__12CInputStreamFv
/* 800EA1B4 000E7114 D0 2D 87 C0 */ stfs f1, lbl_805A7380@sda21(r13)
/* 800EA1B4 000E7114 D0 2D 87 C0 */ stfs f1, kCameraBobPeriod__16CPlayerCameraBob@sda21(r13)
/* 800EA1B8 000E7118 7F E3 FB 78 */ mr r3, r31
/* 800EA1BC 000E711C 48 25 4A 6D */ bl ReadFloat__12CInputStreamFv
/* 800EA1C0 000E7120 D0 2D 87 C4 */ stfs f1, lbl_805A7384@sda21(r13)
/* 800EA1C0 000E7120 D0 2D 87 C4 */ stfs f1, kOrbitBobScale__16CPlayerCameraBob@sda21(r13)
/* 800EA1C4 000E7124 7F E3 FB 78 */ mr r3, r31
/* 800EA1C8 000E7128 48 25 4A 61 */ bl ReadFloat__12CInputStreamFv
/* 800EA1CC 000E712C D0 2D 87 C8 */ stfs f1, lbl_805A7388@sda21(r13)
/* 800EA1CC 000E712C D0 2D 87 C8 */ stfs f1, kMaxOrbitBobScale__16CPlayerCameraBob@sda21(r13)
/* 800EA1D0 000E7130 7F E3 FB 78 */ mr r3, r31
/* 800EA1D4 000E7134 48 25 4A 55 */ bl ReadFloat__12CInputStreamFv
/* 800EA1D8 000E7138 D0 2D 87 CC */ stfs f1, lbl_805A738C@sda21(r13)
/* 800EA1D8 000E7138 D0 2D 87 CC */ stfs f1, kSlowSpeedPeriodScale__16CPlayerCameraBob@sda21(r13)
/* 800EA1DC 000E713C 7F E3 FB 78 */ mr r3, r31
/* 800EA1E0 000E7140 48 25 4A 49 */ bl ReadFloat__12CInputStreamFv
/* 800EA1E4 000E7144 D0 2D 87 D0 */ stfs f1, lbl_805A7390@sda21(r13)
/* 800EA1E4 000E7144 D0 2D 87 D0 */ stfs f1, kTargetMagnitudeTrackingRate__16CPlayerCameraBob@sda21(r13)
/* 800EA1E8 000E7148 7F E3 FB 78 */ mr r3, r31
/* 800EA1EC 000E714C 48 25 4A 3D */ bl ReadFloat__12CInputStreamFv
/* 800EA1F0 000E7150 D0 2D 87 D4 */ stfs f1, lbl_805A7394@sda21(r13)
/* 800EA1F0 000E7150 D0 2D 87 D4 */ stfs f1, kLandingBobSpringConstant__16CPlayerCameraBob@sda21(r13)
/* 800EA1F4 000E7154 7F E3 FB 78 */ mr r3, r31
/* 800EA1F8 000E7158 48 25 4A 31 */ bl ReadFloat__12CInputStreamFv
/* 800EA1FC 000E715C D0 2D 87 E8 */ stfs f1, lbl_805A73A8@sda21(r13)
/* 800EA1FC 000E715C D0 2D 87 E8 */ stfs f1, kGunBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800EA200 000E7160 7F E3 FB 78 */ mr r3, r31
/* 800EA204 000E7164 48 25 4A 25 */ bl ReadFloat__12CInputStreamFv
/* 800EA208 000E7168 D0 2D 87 EC */ stfs f1, lbl_805A73AC@sda21(r13)
/* 800EA208 000E7168 D0 2D 87 EC */ stfs f1, kHelmetBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800EA20C 000E716C 7F E3 FB 78 */ mr r3, r31
/* 800EA210 000E7170 48 25 4A 19 */ bl ReadFloat__12CInputStreamFv
/* 800EA214 000E7174 D0 2D 87 F0 */ stfs f1, lbl_805A73B0@sda21(r13)
@ -1175,7 +1175,7 @@ __ct__16CPlayerCameraBobFQ216CPlayerCameraBob14ECameraBobTypeRC9CVector2ff:
/* 800EA2EC 000E724C 90 1F 00 7C */ stw r0, 0x7c(r31)
/* 800EA2F0 000E7250 90 1F 00 B0 */ stw r0, 0xb0(r31)
/* 800EA2F4 000E7254 D0 1F 00 C4 */ stfs f0, 0xc4(r31)
/* 800EA2F8 000E7258 C0 0D 87 EC */ lfs f0, lbl_805A73AC@sda21(r13)
/* 800EA2F8 000E7258 C0 0D 87 EC */ lfs f0, kHelmetBobMagnitude__16CPlayerCameraBob@sda21(r13)
/* 800EA2FC 000E725C D0 1F 00 C8 */ stfs f0, 0xc8(r31)
/* 800EA300 000E7260 90 1F 00 CC */ stw r0, 0xcc(r31)
/* 800EA304 000E7264 48 22 88 71 */ bl __ct__12CTransform4fFRC12CTransform4f
@ -1290,16 +1290,16 @@ __sinit_CPlayerCameraBob_cpp:
/* 800EA48C 000E73EC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800EA490 000E73F0 7C 08 02 A6 */ mflr r0
/* 800EA494 000E73F4 90 01 00 14 */ stw r0, 0x14(r1)
/* 800EA498 000E73F8 C0 2D 87 D4 */ lfs f1, lbl_805A7394@sda21(r13)
/* 800EA498 000E73F8 C0 2D 87 D4 */ lfs f1, kLandingBobSpringConstant__16CPlayerCameraBob@sda21(r13)
/* 800EA49C 000E73FC 48 22 B0 65 */ bl SqrtF__5CMathFf
/* 800EA4A0 000E7400 C0 02 90 84 */ lfs f0, lbl_805AADA4@sda21(r2)
/* 800EA4A4 000E7404 EC 00 00 72 */ fmuls f0, f0, f1
/* 800EA4A8 000E7408 C0 2D 87 E0 */ lfs f1, lbl_805A73A0@sda21(r13)
/* 800EA4A8 000E7408 C0 2D 87 E0 */ lfs f1, kViewWanderSpeedMax__16CPlayerCameraBob@sda21(r13)
/* 800EA4AC 000E740C D0 0D A3 10 */ stfs f0, lbl_805A8ED0@sda21(r13)
/* 800EA4B0 000E7410 48 22 B0 51 */ bl SqrtF__5CMathFf
/* 800EA4B4 000E7414 C0 02 90 BC */ lfs f0, lbl_805AADDC@sda21(r2)
/* 800EA4B8 000E7418 EC 00 00 72 */ fmuls f0, f0, f1
/* 800EA4BC 000E741C C0 2D 87 E4 */ lfs f1, lbl_805A73A4@sda21(r13)
/* 800EA4BC 000E741C C0 2D 87 E4 */ lfs f1, kViewWanderRollVariation__16CPlayerCameraBob@sda21(r13)
/* 800EA4C0 000E7420 D0 0D A3 14 */ stfs f0, lbl_805A8ED4@sda21(r13)
/* 800EA4C4 000E7424 48 22 B0 3D */ bl SqrtF__5CMathFf
/* 800EA4C8 000E7428 C0 02 90 C0 */ lfs f0, lbl_805AADE0@sda21(r2)

View File

@ -2578,8 +2578,8 @@ lbl_80284138:
/* 8028415C 002810BC EC 3D 07 7A */ fmadds f1, f29, f29, f0
/* 80284160 002810C0 48 09 13 A1 */ bl SqrtF__5CMathFf
/* 80284164 002810C4 EC 21 F0 24 */ fdivs f1, f1, f30
/* 80284168 002810C8 C0 0D 87 C4 */ lfs f0, lbl_805A7384@sda21(r13)
/* 8028416C 002810CC C0 4D 87 C8 */ lfs f2, lbl_805A7388@sda21(r13)
/* 80284168 002810C8 C0 0D 87 C4 */ lfs f0, kOrbitBobScale__16CPlayerCameraBob@sda21(r13)
/* 8028416C 002810CC C0 4D 87 C8 */ lfs f2, kMaxOrbitBobScale__16CPlayerCameraBob@sda21(r13)
/* 80284170 002810D0 D0 41 00 08 */ stfs f2, 8(r1)
/* 80284174 002810D4 EC 01 00 32 */ fmuls f0, f1, f0
/* 80284178 002810D8 D0 21 00 0C */ stfs f1, 0xc(r1)
@ -2694,7 +2694,7 @@ lbl_802842CC:
/* 802842FC 0028125C 80 7D 07 6C */ lwz r3, 0x76c(r29)
/* 80284300 00281260 C0 21 00 0C */ lfs f1, 0xc(r1)
/* 80284304 00281264 4B E6 5B 49 */ bl SetBobMagnitude__16CPlayerCameraBobFf
/* 80284308 00281268 C0 4D 87 CC */ lfs f2, lbl_805A738C@sda21(r13)
/* 80284308 00281268 C0 4D 87 CC */ lfs f2, kSlowSpeedPeriodScale__16CPlayerCameraBob@sda21(r13)
/* 8028430C 0028126C C0 22 BD 80 */ lfs f1, lbl_805ADAA0@sda21(r2)
/* 80284310 00281270 C0 01 00 0C */ lfs f0, 0xc(r1)
/* 80284314 00281274 EC 21 10 28 */ fsubs f1, f1, f2

View File

@ -6,15 +6,19 @@ lbl_ctor:
.section .data
.balign 8
.global lbl_803D9D50
lbl_803D9D50:
.global kVerticalAngleTable
kVerticalAngleTable:
# ROM: 0x3D6D50
.4byte 0xC1F00000
.4byte 0
.4byte 0x41F00000
.global kHorizontalAngleTable
kHorizontalAngleTable:
.4byte 0x41F00000
.4byte 0x41F00000
.4byte 0x41F00000
.global kVerticalVarianceTable
kVerticalVarianceTable:
.4byte 0x41F00000
.4byte 0x41F00000
.4byte 0x41F00000
@ -81,8 +85,8 @@ lbl_803D9E04:
.section .sdata
.balign 8
.global lbl_805A6DE0
lbl_805A6DE0:
.global gGunExtendDistance__Q210CPlayerGun12CMotionState
gGunExtendDistance__Q210CPlayerGun12CMotionState:
# ROM: 0x3F4780
.float 0.125
@ -96,28 +100,35 @@ lbl_805A6DE8:
# ROM: 0x3F4788
.4byte 0x00000012
.global lbl_805A6DEC
lbl_805A6DEC:
.global mItemEmptySound
mItemEmptySound:
# ROM: 0x3F478C
.4byte 0x000006E3
.2byte 0x0000
.2byte 0x06E3
.global lbl_805A6DF0
lbl_805A6DF0:
.global mIntoBeamSound
mIntoBeamSound:
# ROM: 0x3F4790
.4byte 0x0000071D
.4byte 0x07230721
.2byte 0x0000
.2byte 0x071D
.2byte 0x0723
.2byte 0x0721
.global lbl_805A6DF8
lbl_805A6DF8:
.global mFromBeamSound
mFromBeamSound:
# ROM: 0x3F4798
.4byte 0x0000071E
.4byte 0x07240722
.2byte 0x0000
.2byte 0x071E
.2byte 0x0724
.2byte 0x0722
.global lbl_805A6E00
lbl_805A6E00:
.global sBeamChargeUpSound
sBeamChargeUpSound:
# ROM: 0x3F47A0
.4byte 0x06E606DF
.4byte 0x0734072F
.2byte 0x06E6
.2byte 0x06DF
.2byte 0x0734
.2byte 0x072F
.global lbl_805A6E08
lbl_805A6E08:
@ -149,18 +160,18 @@ lbl_805A6E18:
.balign 8
.lcomm lbl_8045C518, 0x18, 4
.lcomm lbl_8045C530, 0x20, 4
.comm lbl_8056D404, 0xC, 4
.lcomm kThermalFlags, 0x20, 4
.comm kScaleVector__10CPlayerGun, 0xC, 4
.section .sbss
.balign 8
# CPlayerGun
.global skTractorBeamFactor__10CPlayerGun
skTractorBeamFactor__10CPlayerGun:
.global kTractorBeamFactor__10CPlayerGun
kTractorBeamFactor__10CPlayerGun:
.skip 0x4
.global lbl_805A8D74
lbl_805A8D74:
.global kArmColor
kArmColor:
.skip 0x4
.global lbl_805A8D78
lbl_805A8D78:
@ -171,11 +182,11 @@ lbl_805A8D7C:
.global lbl_805A8D80
lbl_805A8D80:
.skip 0x4
.global lbl_805A8D84
lbl_805A8D84:
.global kHandThermalFlag
kHandThermalFlag:
.skip 0x8
.global lbl_805A8D8C
lbl_805A8D8C:
.global kHandHoloFlag
kHandHoloFlag:
.skip 0xC
.section .sdata2, "a"
@ -1059,8 +1070,8 @@ lbl_8003AF6C:
/* 8003AFC8 00037F28 48 00 00 64 */ b lbl_8003B02C
lbl_8003AFCC:
/* 8003AFCC 00037F2C 80 7C 07 78 */ lwz r3, 0x778(r28)
/* 8003AFD0 00037F30 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 8003AFD4 00037F34 38 84 D4 04 */ addi r4, r4, lbl_8056D404@l
/* 8003AFD0 00037F30 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 8003AFD4 00037F34 38 84 D4 04 */ addi r4, r4, kScaleVector__10CPlayerGun@l
/* 8003AFD8 00037F38 81 83 00 00 */ lwz r12, 0(r3)
/* 8003AFDC 00037F3C 81 8C 00 24 */ lwz r12, 0x24(r12)
/* 8003AFE0 00037F40 7D 89 03 A6 */ mtctr r12
@ -1123,7 +1134,7 @@ lbl_8003B0B4:
/* 8003B0B4 00038014 57 C0 06 3F */ clrlwi. r0, r30, 0x18
/* 8003B0B8 00038018 41 82 00 2C */ beq lbl_8003B0E4
/* 8003B0BC 0003801C 80 7C 03 10 */ lwz r3, 0x310(r28)
/* 8003B0C0 00038020 38 8D 82 30 */ addi r4, r13, lbl_805A6DF0@sda21
/* 8003B0C0 00038020 38 8D 82 30 */ addi r4, r13, mIntoBeamSound@sda21
/* 8003B0C4 00038024 88 1C 08 34 */ lbz r0, 0x834(r28)
/* 8003B0C8 00038028 38 E0 00 4A */ li r7, 0x4a
/* 8003B0CC 0003802C 54 66 08 3C */ slwi r6, r3, 1
@ -1760,9 +1771,9 @@ UpdateAuxWeapons__10CPlayerGunFfRC12CTransform4fR13CStateManager:
/* 8003B9E0 00038940 80 9F 08 70 */ lwz r4, 0x870(r31)
/* 8003B9E4 00038944 4B FC EF 31 */ bl GetGlobalCameraTranslation__14CCameraManagerCFRC13CStateManager
/* 8003B9E8 00038948 C0 41 00 3C */ lfs f2, 0x3c(r1)
/* 8003B9EC 0003894C 3C 60 80 57 */ lis r3, lbl_8056D404@ha
/* 8003B9EC 0003894C 3C 60 80 57 */ lis r3, kScaleVector__10CPlayerGun@ha
/* 8003B9F0 00038950 C0 01 00 44 */ lfs f0, 0x44(r1)
/* 8003B9F4 00038954 38 83 D4 04 */ addi r4, r3, lbl_8056D404@l
/* 8003B9F4 00038954 38 83 D4 04 */ addi r4, r3, kScaleVector__10CPlayerGun@l
/* 8003B9F8 00038958 EC 7F 10 2A */ fadds f3, f31, f2
/* 8003B9FC 0003895C C0 21 00 40 */ lfs f1, 0x40(r1)
/* 8003BA00 00038960 EC 1D 00 2A */ fadds f0, f29, f0
@ -2610,9 +2621,9 @@ lbl_8003C550:
/* 8003C5C0 00039520 80 7D 07 44 */ lwz r3, 0x744(r29)
/* 8003C5C4 00039524 80 9D 03 10 */ lwz r4, 0x310(r29)
/* 8003C5C8 00039528 48 17 C3 75 */ bl Load__10CAuxWeaponFiR13CStateManager
/* 8003C5CC 0003952C 3C 60 80 3D */ lis r3, lbl_803CCE44@ha
/* 8003C5CC 0003952C 3C 60 80 3D */ lis r3, mHandAnimId__10CPlayerGun@ha
/* 8003C5D0 00039530 38 00 00 00 */ li r0, 0
/* 8003C5D4 00039534 38 63 CE 44 */ addi r3, r3, lbl_803CCE44@l
/* 8003C5D4 00039534 38 63 CE 44 */ addi r3, r3, mHandAnimId__10CPlayerGun@l
/* 8003C5D8 00039538 C0 02 84 7C */ lfs f0, lbl_805AA19C@sda21(r2)
/* 8003C5DC 0003953C 7C C3 C8 2E */ lwzx r6, r3, r25
/* 8003C5E0 00039540 38 80 FF FF */ li r4, -1
@ -3203,7 +3214,7 @@ lbl_8003CE40:
/* 8003CE54 00039DB4 40 82 00 88 */ bne lbl_8003CEDC
/* 8003CE58 00039DB8 C0 82 84 7C */ lfs f4, lbl_805AA19C@sda21(r2)
/* 8003CE5C 00039DBC 38 61 01 CC */ addi r3, r1, 0x1cc
/* 8003CE60 00039DC0 C0 0D 82 20 */ lfs f0, lbl_805A6DE0@sda21(r13)
/* 8003CE60 00039DC0 C0 0D 82 20 */ lfs f0, gGunExtendDistance__Q210CPlayerGun12CMotionState@sda21(r13)
/* 8003CE64 00039DC4 38 81 00 0C */ addi r4, r1, 0xc
/* 8003CE68 00039DC8 C0 BD 00 0C */ lfs f5, 0xc(r29)
/* 8003CE6C 00039DCC EC 24 00 24 */ fdivs f1, f4, f0
@ -3400,7 +3411,7 @@ lbl_8003D138:
/* 8003D140 0003A0A0 EC 01 07 FA */ fmadds f0, f1, f31, f0
/* 8003D144 0003A0A4 D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 8003D148 0003A0A8 C0 1D 00 0C */ lfs f0, 0xc(r29)
/* 8003D14C 0003A0AC C0 2D 82 20 */ lfs f1, lbl_805A6DE0@sda21(r13)
/* 8003D14C 0003A0AC C0 2D 82 20 */ lfs f1, gGunExtendDistance__Q210CPlayerGun12CMotionState@sda21(r13)
/* 8003D150 0003A0B0 FC 00 08 40 */ fcmpo cr0, f0, f1
/* 8003D154 0003A0B4 40 81 00 50 */ ble lbl_8003D1A4
/* 8003D158 0003A0B8 D0 3D 00 0C */ stfs f1, 0xc(r29)
@ -5246,12 +5257,12 @@ HandleBeamChange__10CPlayerGunFRC11CFinalInputR13CStateManager:
/* 8003EB78 0003BAD8 BF 01 00 10 */ stmw r24, 0x10(r1)
/* 8003EB7C 0003BADC 80 E5 08 B8 */ lwz r7, 0x8b8(r5)
/* 8003EB80 0003BAE0 7C BF 2B 78 */ mr r31, r5
/* 8003EB84 0003BAE4 3C C0 80 3D */ lis r6, lbl_803CCE54@ha
/* 8003EB88 0003BAE8 3C A0 80 3D */ lis r5, lbl_803CCE74@ha
/* 8003EB84 0003BAE4 3C C0 80 3D */ lis r6, mBeamArr@ha
/* 8003EB88 0003BAE8 3C A0 80 3D */ lis r5, mBeamCtrlCmd@ha
/* 8003EB8C 0003BAEC C3 C2 84 6C */ lfs f30, lbl_805AA18C@sda21(r2)
/* 8003EB90 0003BAF0 3B 86 CE 54 */ addi r28, r6, lbl_803CCE54@l
/* 8003EB90 0003BAF0 3B 86 CE 54 */ addi r28, r6, mBeamArr@l
/* 8003EB94 0003BAF4 83 A7 00 00 */ lwz r29, 0(r7)
/* 8003EB98 0003BAF8 3B 65 CE 74 */ addi r27, r5, lbl_803CCE74@l
/* 8003EB98 0003BAF8 3B 65 CE 74 */ addi r27, r5, mBeamCtrlCmd@l
/* 8003EB9C 0003BAFC C3 E2 84 E8 */ lfs f31, lbl_805AA208@sda21(r2)
/* 8003EBA0 0003BB00 7C 7E 1B 78 */ mr r30, r3
/* 8003EBA4 0003BB04 7C 98 23 78 */ mr r24, r4
@ -5287,9 +5298,9 @@ lbl_8003EBE8:
/* 8003EC14 0003BB74 80 1E 03 10 */ lwz r0, 0x310(r30)
/* 8003EC18 0003BB78 7C 00 D0 00 */ cmpw r0, r26
/* 8003EC1C 0003BB7C 41 82 00 DC */ beq lbl_8003ECF8
/* 8003EC20 0003BB80 3C 60 80 3D */ lis r3, lbl_803CCE54@ha
/* 8003EC20 0003BB80 3C 60 80 3D */ lis r3, mBeamArr@ha
/* 8003EC24 0003BB84 57 40 10 3A */ slwi r0, r26, 2
/* 8003EC28 0003BB88 38 83 CE 54 */ addi r4, r3, lbl_803CCE54@l
/* 8003EC28 0003BB88 38 83 CE 54 */ addi r4, r3, mBeamArr@l
/* 8003EC2C 0003BB8C 7F A3 EB 78 */ mr r3, r29
/* 8003EC30 0003BB90 7C 84 00 2E */ lwzx r4, r4, r0
/* 8003EC34 0003BB94 48 05 2E 8D */ bl HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
@ -5345,9 +5356,9 @@ lbl_8003ECCC:
/* 8003ECF0 0003BC50 90 1E 02 E4 */ stw r0, 0x2e4(r30)
/* 8003ECF4 0003BC54 48 00 00 7C */ b lbl_8003ED70
lbl_8003ECF8:
/* 8003ECF8 0003BC58 3C 60 80 3D */ lis r3, lbl_803CCE54@ha
/* 8003ECF8 0003BC58 3C 60 80 3D */ lis r3, mBeamArr@ha
/* 8003ECFC 0003BC5C 57 40 10 3A */ slwi r0, r26, 2
/* 8003ED00 0003BC60 38 83 CE 54 */ addi r4, r3, lbl_803CCE54@l
/* 8003ED00 0003BC60 38 83 CE 54 */ addi r4, r3, mBeamArr@l
/* 8003ED04 0003BC64 7F A3 EB 78 */ mr r3, r29
/* 8003ED08 0003BC68 7C 84 00 2E */ lwzx r4, r4, r0
/* 8003ED0C 0003BC6C 48 05 2D B5 */ bl HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
@ -5630,11 +5641,11 @@ ResetBeamParams__10CPlayerGunFR13CStateManagerRC12CPlayerStateb:
lbl_8003F100:
/* 8003F100 0003C060 80 9F 03 14 */ lwz r4, 0x314(r31)
/* 8003F104 0003C064 38 00 00 00 */ li r0, 0
/* 8003F108 0003C068 3C 60 80 3D */ lis r3, lbl_803CCE44@ha
/* 8003F108 0003C068 3C 60 80 3D */ lis r3, mHandAnimId__10CPlayerGun@ha
/* 8003F10C 0003C06C C0 02 84 7C */ lfs f0, lbl_805AA19C@sda21(r2)
/* 8003F110 0003C070 54 86 10 3A */ slwi r6, r4, 2
/* 8003F114 0003C074 38 A0 FF FF */ li r5, -1
/* 8003F118 0003C078 38 83 CE 44 */ addi r4, r3, lbl_803CCE44@l
/* 8003F118 0003C078 38 83 CE 44 */ addi r4, r3, mHandAnimId__10CPlayerGun@l
/* 8003F11C 0003C07C 38 60 00 01 */ li r3, 1
/* 8003F120 0003C080 7C C4 30 2E */ lwzx r6, r4, r6
/* 8003F124 0003C084 38 81 00 0C */ addi r4, r1, 0xc
@ -5906,7 +5917,7 @@ lbl_8003F4C0:
/* 8003F4F0 0003C450 98 9E 08 32 */ stb r4, 0x832(r30)
lbl_8003F4F4:
/* 8003F4F4 0003C454 C0 3E 03 40 */ lfs f1, 0x340(r30)
/* 8003F4F8 0003C458 C0 0D A1 B0 */ lfs f0, skTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 8003F4F8 0003C458 C0 0D A1 B0 */ lfs f0, kTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 8003F4FC 0003C45C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 8003F500 0003C460 40 81 02 2C */ ble lbl_8003F72C
/* 8003F504 0003C464 7F C3 F3 78 */ mr r3, r30
@ -5917,7 +5928,7 @@ lbl_8003F4F4:
/* 8003F518 0003C478 28 00 00 00 */ cmplwi r0, 0
/* 8003F51C 0003C47C 40 82 00 34 */ bne lbl_8003F550
/* 8003F520 0003C480 80 7E 03 10 */ lwz r3, 0x310(r30)
/* 8003F524 0003C484 38 8D 82 40 */ addi r4, r13, lbl_805A6E00@sda21
/* 8003F524 0003C484 38 8D 82 40 */ addi r4, r13, sBeamChargeUpSound@sda21
/* 8003F528 0003C488 88 1E 08 34 */ lbz r0, 0x834(r30)
/* 8003F52C 0003C48C 38 C0 00 01 */ li r6, 1
/* 8003F530 0003C490 54 65 08 3C */ slwi r5, r3, 1
@ -6372,8 +6383,8 @@ lbl_8003FB9C:
/* 8003FBAC 0003CB0C 48 30 12 95 */ bl __dt__6CTokenFv
lbl_8003FBB0:
/* 8003FBB0 0003CB10 80 7E 07 80 */ lwz r3, 0x780(r30)
/* 8003FBB4 0003CB14 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 8003FBB8 0003CB18 38 84 D4 04 */ addi r4, r4, lbl_8056D404@l
/* 8003FBB4 0003CB14 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 8003FBB8 0003CB18 38 84 D4 04 */ addi r4, r4, kScaleVector__10CPlayerGun@l
/* 8003FBBC 0003CB1C 81 83 00 00 */ lwz r12, 0(r3)
/* 8003FBC0 0003CB20 81 8C 00 24 */ lwz r12, 0x24(r12)
/* 8003FBC4 0003CB24 7D 89 03 A6 */ mtctr r12
@ -6792,7 +6803,7 @@ lbl_800401B0:
/* 800401C0 0003D120 48 00 00 2C */ b lbl_800401EC
lbl_800401C4:
/* 800401C4 0003D124 80 7E 03 18 */ lwz r3, 0x318(r30)
/* 800401C8 0003D128 38 8D 82 2C */ addi r4, r13, lbl_805A6DEC@sda21
/* 800401C8 0003D128 38 8D 82 2C */ addi r4, r13, mItemEmptySound@sda21
/* 800401CC 0003D12C 88 1E 08 34 */ lbz r0, 0x834(r30)
/* 800401D0 0003D130 38 E0 00 4A */ li r7, 0x4a
/* 800401D4 0003D134 54 66 08 3C */ slwi r6, r3, 1
@ -7179,8 +7190,8 @@ lbl_80040704:
/* 8004072C 0003D68C 2C 00 00 04 */ cmpwi r0, 4
/* 80040730 0003D690 41 80 00 38 */ blt lbl_80040768
/* 80040734 0003D694 80 1C 03 10 */ lwz r0, 0x310(r28)
/* 80040738 0003D698 3C 60 80 3D */ lis r3, lbl_803CCE64@ha
/* 8004073C 0003D69C 38 83 CE 64 */ addi r4, r3, lbl_803CCE64@l
/* 80040738 0003D698 3C 60 80 3D */ lis r3, mBeamComboArr@ha
/* 8004073C 0003D69C 38 83 CE 64 */ addi r4, r3, mBeamComboArr@l
/* 80040740 0003D6A0 7F E3 FB 78 */ mr r3, r31
/* 80040744 0003D6A4 54 00 10 3A */ slwi r0, r0, 2
/* 80040748 0003D6A8 7C 84 00 2E */ lwzx r4, r4, r0
@ -7693,11 +7704,11 @@ lbl_80040E58:
/* 80040E74 0003DDD4 80 7D 09 00 */ lwz r3, 0x900(r29)
/* 80040E78 0003DDD8 48 2D 16 A9 */ bl Next__9CRandom16Fv
/* 80040E7C 0003DDDC 3C A0 55 55 */ lis r5, 0x55555556@ha
/* 80040E80 0003DDE0 3C 80 80 3D */ lis r4, lbl_803CCE38@ha
/* 80040E80 0003DDE0 3C 80 80 3D */ lis r4, chargeShakeTbl@ha
/* 80040E84 0003DDE4 38 05 55 56 */ addi r0, r5, 0x55555556@l
/* 80040E88 0003DDE8 C0 1C 03 40 */ lfs f0, 0x340(r28)
/* 80040E8C 0003DDEC 7C A0 18 96 */ mulhw r5, r0, r3
/* 80040E90 0003DDF0 38 84 CE 38 */ addi r4, r4, lbl_803CCE38@l
/* 80040E90 0003DDF0 38 84 CE 38 */ addi r4, r4, chargeShakeTbl@l
/* 80040E94 0003DDF4 54 A0 0F FE */ srwi r0, r5, 0x1f
/* 80040E98 0003DDF8 7C 05 02 14 */ add r0, r5, r0
/* 80040E9C 0003DDFC 1C 00 00 03 */ mulli r0, r0, 3
@ -7709,11 +7720,11 @@ lbl_80040E58:
/* 80040EB4 0003DE14 80 7D 09 00 */ lwz r3, 0x900(r29)
/* 80040EB8 0003DE18 48 2D 16 69 */ bl Next__9CRandom16Fv
/* 80040EBC 0003DE1C 3C A0 55 55 */ lis r5, 0x55555556@ha
/* 80040EC0 0003DE20 3C 80 80 3D */ lis r4, lbl_803CCE38@ha
/* 80040EC0 0003DE20 3C 80 80 3D */ lis r4, chargeShakeTbl@ha
/* 80040EC4 0003DE24 38 05 55 56 */ addi r0, r5, 0x55555556@l
/* 80040EC8 0003DE28 C0 1C 03 40 */ lfs f0, 0x340(r28)
/* 80040ECC 0003DE2C 7C A0 18 96 */ mulhw r5, r0, r3
/* 80040ED0 0003DE30 38 84 CE 38 */ addi r4, r4, lbl_803CCE38@l
/* 80040ED0 0003DE30 38 84 CE 38 */ addi r4, r4, chargeShakeTbl@l
/* 80040ED4 0003DE34 54 A0 0F FE */ srwi r0, r5, 0x1f
/* 80040ED8 0003DE38 7C 05 02 14 */ add r0, r5, r0
/* 80040EDC 0003DE3C 1C 00 00 03 */ mulli r0, r0, 3
@ -8430,7 +8441,7 @@ lbl_80041950:
/* 80041954 0003E8B4 48 00 00 34 */ b lbl_80041988
lbl_80041958:
/* 80041958 0003E8B8 80 1F 03 10 */ lwz r0, 0x310(r31)
/* 8004195C 0003E8BC 38 6D 82 38 */ addi r3, r13, lbl_805A6DF8@sda21
/* 8004195C 0003E8BC 38 6D 82 38 */ addi r3, r13, mFromBeamSound@sda21
/* 80041960 0003E8C0 54 00 08 3C */ slwi r0, r0, 1
/* 80041964 0003E8C4 7C 63 02 2E */ lhzx r3, r3, r0
/* 80041968 0003E8C8 48 00 00 20 */ b lbl_80041988
@ -8550,8 +8561,8 @@ Render__10CPlayerGunCFRC13CStateManagerRC9CVector3fRC11CModelFlags:
/* 80041B00 0003EA60 54 78 D9 7E */ srwi r24, r3, 5
/* 80041B04 0003EA64 41 82 00 1C */ beq lbl_80041B20
/* 80041B08 0003EA68 80 9C 03 10 */ lwz r4, 0x310(r28)
/* 80041B0C 0003EA6C 3C 60 80 46 */ lis r3, lbl_8045C530@ha
/* 80041B10 0003EA70 38 03 C5 30 */ addi r0, r3, lbl_8045C530@l
/* 80041B0C 0003EA6C 3C 60 80 46 */ lis r3, kThermalFlags@ha
/* 80041B10 0003EA70 38 03 C5 30 */ addi r0, r3, kThermalFlags@l
/* 80041B14 0003EA74 54 83 18 38 */ slwi r3, r4, 3
/* 80041B18 0003EA78 7F 60 1A 14 */ add r27, r0, r3
/* 80041B1C 0003EA7C 48 00 00 48 */ b lbl_80041B64
@ -8756,9 +8767,9 @@ lbl_80041DC0:
/* 80041E00 0003ED60 7F 86 E3 78 */ mr r6, r28
/* 80041E04 0003ED64 38 7C 06 E0 */ addi r3, r28, 0x6e0
/* 80041E08 0003ED68 38 A1 03 84 */ addi r5, r1, 0x384
/* 80041E0C 0003ED6C 38 ED A1 CC */ addi r7, r13, lbl_805A8D8C@sda21
/* 80041E0C 0003ED6C 38 ED A1 CC */ addi r7, r13, kHandHoloFlag@sda21
/* 80041E10 0003ED70 41 82 00 08 */ beq lbl_80041E18
/* 80041E14 0003ED74 38 ED A1 C4 */ addi r7, r13, lbl_805A8D84@sda21
/* 80041E14 0003ED74 38 ED A1 C4 */ addi r7, r13, kHandThermalFlag@sda21
lbl_80041E18:
/* 80041E18 0003ED78 48 0D 2F A5 */ bl Render__10CModelDataCFRC13CStateManagerRC12CTransform4fPC12CActorLightsRC11CModelFlags
lbl_80041E1C:
@ -8813,9 +8824,9 @@ lbl_80041E64:
/* 80041ED8 0003EE38 7F 86 E3 78 */ mr r6, r28
/* 80041EDC 0003EE3C 38 7C 06 E0 */ addi r3, r28, 0x6e0
/* 80041EE0 0003EE40 38 A1 03 54 */ addi r5, r1, 0x354
/* 80041EE4 0003EE44 38 ED A1 CC */ addi r7, r13, lbl_805A8D8C@sda21
/* 80041EE4 0003EE44 38 ED A1 CC */ addi r7, r13, kHandHoloFlag@sda21
/* 80041EE8 0003EE48 41 82 00 08 */ beq lbl_80041EF0
/* 80041EEC 0003EE4C 38 ED A1 C4 */ addi r7, r13, lbl_805A8D84@sda21
/* 80041EEC 0003EE4C 38 ED A1 C4 */ addi r7, r13, kHandThermalFlag@sda21
lbl_80041EF0:
/* 80041EF0 0003EE50 48 0D 2E CD */ bl Render__10CModelDataCFRC13CStateManagerRC12CTransform4fPC12CActorLightsRC11CModelFlags
/* 80041EF4 0003EE54 C0 22 84 7C */ lfs f1, lbl_805AA19C@sda21(r2)
@ -8888,9 +8899,9 @@ lbl_80041FF0:
/* 80041FF8 0003EF58 7F 86 E3 78 */ mr r6, r28
/* 80041FFC 0003EF5C 38 7C 06 E0 */ addi r3, r28, 0x6e0
/* 80042000 0003EF60 38 A1 03 54 */ addi r5, r1, 0x354
/* 80042004 0003EF64 38 ED A1 CC */ addi r7, r13, lbl_805A8D8C@sda21
/* 80042004 0003EF64 38 ED A1 CC */ addi r7, r13, kHandHoloFlag@sda21
/* 80042008 0003EF68 41 82 00 08 */ beq lbl_80042010
/* 8004200C 0003EF6C 38 ED A1 C4 */ addi r7, r13, lbl_805A8D84@sda21
/* 8004200C 0003EF6C 38 ED A1 C4 */ addi r7, r13, kHandThermalFlag@sda21
lbl_80042010:
/* 80042010 0003EF70 48 0D 2D AD */ bl Render__10CModelDataCFRC13CStateManagerRC12CTransform4fPC12CActorLightsRC11CModelFlags
/* 80042014 0003EF74 C0 22 84 7C */ lfs f1, lbl_805AA19C@sda21(r2)
@ -10170,14 +10181,14 @@ __ct__10CPlayerGunF9TUniqueId:
/* 800431C8 00040128 94 21 FF 60 */ stwu r1, -0xa0(r1)
/* 800431CC 0004012C 7C 08 02 A6 */ mflr r0
/* 800431D0 00040130 3C A0 80 5A */ lis r5, sZeroVector__9CVector3f@ha
/* 800431D4 00040134 3C C0 80 3E */ lis r6, lbl_803D9D50@ha
/* 800431D4 00040134 3C C0 80 3E */ lis r6, kVerticalAngleTable@ha
/* 800431D8 00040138 90 01 00 A4 */ stw r0, 0xa4(r1)
/* 800431DC 0004013C 39 00 00 00 */ li r8, 0
/* 800431E0 00040140 C0 22 94 04 */ lfs f1, lbl_805AB124@sda21(r2)
/* 800431E4 00040144 39 20 00 00 */ li r9, 0
/* 800431E8 00040148 BF 61 00 8C */ stmw r27, 0x8c(r1)
/* 800431EC 0004014C 7C 9E 23 78 */ mr r30, r4
/* 800431F0 00040150 3B A6 9D 50 */ addi r29, r6, lbl_803D9D50@l
/* 800431F0 00040150 3B A6 9D 50 */ addi r29, r6, kVerticalAngleTable@l
/* 800431F4 00040154 7C 7F 1B 78 */ mr r31, r3
/* 800431F8 00040158 38 C0 00 04 */ li r6, 4
/* 800431FC 0004015C 39 40 00 00 */ li r10, 0
@ -10302,10 +10313,10 @@ __ct__10CPlayerGunF9TUniqueId:
/* 800433D8 00040338 90 1F 05 44 */ stw r0, 0x544(r31)
/* 800433DC 0004033C 90 1F 05 48 */ stw r0, 0x548(r31)
/* 800433E0 00040340 90 1F 05 4C */ stw r0, 0x54c(r31)
/* 800433E4 00040344 C0 2D 87 B8 */ lfs f1, lbl_805A7378@sda21(r13)
/* 800433E8 00040348 C0 4D 87 BC */ lfs f2, lbl_805A737C@sda21(r13)
/* 800433E4 00040344 C0 2D 87 B8 */ lfs f1, kCameraBobExtentX__16CPlayerCameraBob@sda21(r13)
/* 800433E8 00040348 C0 4D 87 BC */ lfs f2, kCameraBobExtentY__16CPlayerCameraBob@sda21(r13)
/* 800433EC 0004034C 48 2D 0E 15 */ bl __ct__9CVector2fFff
/* 800433F0 00040350 C0 2D 87 C0 */ lfs f1, lbl_805A7380@sda21(r13)
/* 800433F0 00040350 C0 2D 87 C0 */ lfs f1, kCameraBobPeriod__16CPlayerCameraBob@sda21(r13)
/* 800433F4 00040354 7C 65 1B 78 */ mr r5, r3
/* 800433F8 00040358 38 7F 05 50 */ addi r3, r31, 0x550
/* 800433FC 0004035C 38 80 00 01 */ li r4, 1
@ -10363,7 +10374,7 @@ __ct__10CPlayerGunF9TUniqueId:
/* 800434CC 0004042C 48 2F 50 3D */ bl __ct__6CAABoxFRC9CVector3fRC9CVector3f
/* 800434D0 00040430 80 6D A1 48 */ lwz r3, gpTweakGunRes@sda21(r13)
/* 800434D4 00040434 38 A0 00 01 */ li r5, 1
/* 800434D8 00040438 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 800434D8 00040438 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800434DC 0004043C 38 00 00 00 */ li r0, 0
/* 800434E0 00040440 80 E3 00 0C */ lwz r7, 0xc(r3)
/* 800434E4 00040444 38 7F 06 E0 */ addi r3, r31, 0x6e0
@ -10391,8 +10402,8 @@ __ct__10CPlayerGunF9TUniqueId:
/* 8004353C 0004049C 7C 60 1B 79 */ or. r0, r3, r3
/* 80043540 000404A0 41 82 00 1C */ beq lbl_8004355C
/* 80043544 000404A4 80 CD A1 48 */ lwz r6, gpTweakGunRes@sda21(r13)
/* 80043548 000404A8 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 8004354C 000404AC 38 A4 D4 04 */ addi r5, r4, lbl_8056D404@l
/* 80043548 000404A8 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 8004354C 000404AC 38 A4 D4 04 */ addi r5, r4, kScaleVector__10CPlayerGun@l
/* 80043550 000404B0 80 86 00 04 */ lwz r4, 4(r6)
/* 80043554 000404B4 48 19 61 4D */ bl __ct__10CGunMotionFUiRC9CVector3f
/* 80043558 000404B8 7C 60 1B 78 */ mr r0, r3
@ -10406,8 +10417,8 @@ lbl_8004355C:
/* 80043574 000404D4 48 2D 22 F9 */ bl __nw__FUlPCcPCc
/* 80043578 000404D8 7C 60 1B 79 */ or. r0, r3, r3
/* 8004357C 000404DC 41 82 00 14 */ beq lbl_80043590
/* 80043580 000404E0 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 80043584 000404E4 38 84 D4 04 */ addi r4, r4, lbl_8056D404@l
/* 80043580 000404E0 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 80043584 000404E4 38 84 D4 04 */ addi r4, r4, kScaleVector__10CPlayerGun@l
/* 80043588 000404E8 48 0D C7 D9 */ bl __ct__11CGrappleArmFRC9CVector3f
/* 8004358C 000404EC 7C 60 1B 78 */ mr r0, r3
lbl_80043590:
@ -10435,10 +10446,10 @@ lbl_800435C8:
/* 800435E0 00040540 48 2D 22 8D */ bl __nw__FUlPCcPCc
/* 800435E4 00040544 7C 60 1B 79 */ or. r0, r3, r3
/* 800435E8 00040548 41 82 00 24 */ beq lbl_8004360C
/* 800435EC 0004054C 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 800435EC 0004054C 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 800435F0 00040550 C0 22 84 6C */ lfs f1, lbl_805AA18C@sda21(r2)
/* 800435F4 00040554 C0 42 85 0C */ lfs f2, lbl_805AA22C@sda21(r2)
/* 800435F8 00040558 38 84 D4 04 */ addi r4, r4, lbl_8056D404@l
/* 800435F8 00040558 38 84 D4 04 */ addi r4, r4, kScaleVector__10CPlayerGun@l
/* 800435FC 0004055C 38 A0 00 14 */ li r5, 0x14
/* 80043600 00040560 38 C0 00 02 */ li r6, 2
/* 80043604 00040564 48 22 71 35 */ bl __ct__20CRainSplashGeneratorFRC9CVector3fiiff
@ -10454,8 +10465,8 @@ lbl_8004360C:
/* 80043628 00040588 7C 60 1B 79 */ or. r0, r3, r3
/* 8004362C 0004058C 41 82 00 30 */ beq lbl_8004365C
/* 80043630 00040590 A0 1E 00 00 */ lhz r0, 0(r30)
/* 80043634 00040594 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 80043638 00040598 39 04 D4 04 */ addi r8, r4, lbl_8056D404@l
/* 80043634 00040594 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 80043638 00040598 39 04 D4 04 */ addi r8, r4, kScaleVector__10CPlayerGun@l
/* 8004363C 0004059C 80 8D A1 48 */ lwz r4, gpTweakGunRes@sda21(r13)
/* 80043640 000405A0 B0 01 00 18 */ sth r0, 0x18(r1)
/* 80043644 000405A4 38 C1 00 18 */ addi r6, r1, 0x18
@ -10475,8 +10486,8 @@ lbl_8004365C:
/* 80043678 000405D8 7C 60 1B 79 */ or. r0, r3, r3
/* 8004367C 000405DC 41 82 00 30 */ beq lbl_800436AC
/* 80043680 000405E0 A0 1E 00 00 */ lhz r0, 0(r30)
/* 80043684 000405E4 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 80043688 000405E8 39 04 D4 04 */ addi r8, r4, lbl_8056D404@l
/* 80043684 000405E4 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 80043688 000405E8 39 04 D4 04 */ addi r8, r4, kScaleVector__10CPlayerGun@l
/* 8004368C 000405EC 80 8D A1 48 */ lwz r4, gpTweakGunRes@sda21(r13)
/* 80043690 000405F0 B0 01 00 14 */ sth r0, 0x14(r1)
/* 80043694 000405F4 38 C1 00 14 */ addi r6, r1, 0x14
@ -10496,8 +10507,8 @@ lbl_800436AC:
/* 800436C8 00040628 7C 60 1B 79 */ or. r0, r3, r3
/* 800436CC 0004062C 41 82 00 30 */ beq lbl_800436FC
/* 800436D0 00040630 A0 1E 00 00 */ lhz r0, 0(r30)
/* 800436D4 00040634 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 800436D8 00040638 39 04 D4 04 */ addi r8, r4, lbl_8056D404@l
/* 800436D4 00040634 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 800436D8 00040638 39 04 D4 04 */ addi r8, r4, kScaleVector__10CPlayerGun@l
/* 800436DC 0004063C 80 8D A1 48 */ lwz r4, gpTweakGunRes@sda21(r13)
/* 800436E0 00040640 B0 01 00 10 */ sth r0, 0x10(r1)
/* 800436E4 00040644 38 C1 00 10 */ addi r6, r1, 0x10
@ -10517,8 +10528,8 @@ lbl_800436FC:
/* 80043718 00040678 7C 60 1B 79 */ or. r0, r3, r3
/* 8004371C 0004067C 41 82 00 30 */ beq lbl_8004374C
/* 80043720 00040680 A0 1E 00 00 */ lhz r0, 0(r30)
/* 80043724 00040684 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 80043728 00040688 39 04 D4 04 */ addi r8, r4, lbl_8056D404@l
/* 80043724 00040684 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 80043728 00040688 39 04 D4 04 */ addi r8, r4, kScaleVector__10CPlayerGun@l
/* 8004372C 0004068C 80 8D A1 48 */ lwz r4, gpTweakGunRes@sda21(r13)
/* 80043730 00040690 B0 01 00 0C */ sth r0, 0xc(r1)
/* 80043734 00040694 38 C1 00 0C */ addi r6, r1, 0xc
@ -10538,8 +10549,8 @@ lbl_8004374C:
/* 80043768 000406C8 7C 60 1B 79 */ or. r0, r3, r3
/* 8004376C 000406CC 41 82 00 30 */ beq lbl_8004379C
/* 80043770 000406D0 A0 1E 00 00 */ lhz r0, 0(r30)
/* 80043774 000406D4 3C 80 80 57 */ lis r4, lbl_8056D404@ha
/* 80043778 000406D8 39 04 D4 04 */ addi r8, r4, lbl_8056D404@l
/* 80043774 000406D4 3C 80 80 57 */ lis r4, kScaleVector__10CPlayerGun@ha
/* 80043778 000406D8 39 04 D4 04 */ addi r8, r4, kScaleVector__10CPlayerGun@l
/* 8004377C 000406DC 80 8D A1 48 */ lwz r4, gpTweakGunRes@sda21(r13)
/* 80043780 000406E0 B0 01 00 08 */ sth r0, 8(r1)
/* 80043784 000406E4 38 C1 00 08 */ addi r6, r1, 8
@ -10767,7 +10778,7 @@ lbl_800438EC:
/* 80043AD8 00040A38 C0 04 00 1C */ lfs f0, 0x1c(r4)
/* 80043ADC 00040A3C D0 1D 00 18 */ stfs f0, 0x18(r29)
/* 80043AE0 00040A40 C0 04 00 48 */ lfs f0, 0x48(r4)
/* 80043AE4 00040A44 D0 0D 82 20 */ stfs f0, lbl_805A6DE0@sda21(r13)
/* 80043AE4 00040A44 D0 0D 82 20 */ stfs f0, gGunExtendDistance__Q210CPlayerGun12CMotionState@sda21(r13)
/* 80043AE8 00040A48 4B FF AE A1 */ bl InitBeamData__10CPlayerGunFv
/* 80043AEC 00040A4C 7F E3 FB 78 */ mr r3, r31
/* 80043AF0 00040A50 4B FF AA FD */ bl InitBombData__10CPlayerGunFv
@ -10817,16 +10828,16 @@ __sinit_CPlayerGun_cpp:
/* 80043B88 00040AE8 93 C1 00 48 */ stw r30, 0x48(r1)
/* 80043B8C 00040AEC 48 04 D6 71 */ bl GetMissileComboChargeFactor__12CPlayerStateFv
/* 80043B90 00040AF0 C0 42 84 D8 */ lfs f2, lbl_805AA1F8@sda21(r2)
/* 80043B94 00040AF4 3C 60 80 57 */ lis r3, lbl_8056D404@ha
/* 80043B94 00040AF4 3C 60 80 57 */ lis r3, kScaleVector__10CPlayerGun@ha
/* 80043B98 00040AF8 C0 02 84 80 */ lfs f0, lbl_805AA1A0@sda21(r2)
/* 80043B9C 00040AFC 38 83 D4 04 */ addi r4, r3, lbl_8056D404@l
/* 80043B9C 00040AFC 38 83 D4 04 */ addi r4, r3, kScaleVector__10CPlayerGun@l
/* 80043BA0 00040B00 EC 62 08 24 */ fdivs f3, f2, f1
/* 80043BA4 00040B04 C0 22 84 98 */ lfs f1, lbl_805AA1B8@sda21(r2)
/* 80043BA8 00040B08 D0 04 00 00 */ stfs f0, 0(r4)
/* 80043BAC 00040B0C 38 61 00 0C */ addi r3, r1, 0xc
/* 80043BB0 00040B10 C0 42 84 FC */ lfs f2, lbl_805AA21C@sda21(r2)
/* 80043BB4 00040B14 D0 04 00 04 */ stfs f0, 4(r4)
/* 80043BB8 00040B18 D0 6D A1 B0 */ stfs f3, skTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 80043BB8 00040B18 D0 6D A1 B0 */ stfs f3, kTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 80043BBC 00040B1C C0 62 84 6C */ lfs f3, lbl_805AA18C@sda21(r2)
/* 80043BC0 00040B20 D0 04 00 08 */ stfs f0, 8(r4)
/* 80043BC4 00040B24 C0 82 84 7C */ lfs f4, lbl_805AA19C@sda21(r2)
@ -10835,7 +10846,7 @@ __sinit_CPlayerGun_cpp:
/* 80043BD0 00040B30 38 60 00 00 */ li r3, 0
/* 80043BD4 00040B34 80 AD 82 28 */ lwz r5, lbl_805A6DE8@sda21(r13)
/* 80043BD8 00040B38 38 80 00 01 */ li r4, 1
/* 80043BDC 00040B3C 90 0D A1 B4 */ stw r0, lbl_805A8D74@sda21(r13)
/* 80043BDC 00040B3C 90 0D A1 B4 */ stw r0, kArmColor@sda21(r13)
/* 80043BE0 00040B40 48 34 63 15 */ bl __shl2i
/* 80043BE4 00040B44 80 AD 82 24 */ lwz r5, lbl_805A6DE4@sda21(r13)
/* 80043BE8 00040B48 7C 9E 23 78 */ mr r30, r4
@ -10877,9 +10888,9 @@ __sinit_CPlayerGun_cpp:
/* 80043C78 00040BD8 38 C0 00 00 */ li r6, 0
/* 80043C7C 00040BDC 38 00 00 80 */ li r0, 0x80
/* 80043C80 00040BE0 98 C1 00 08 */ stb r6, 8(r1)
/* 80043C84 00040BE4 3C 60 80 46 */ lis r3, lbl_8045C530@ha
/* 80043C84 00040BE4 3C 60 80 46 */ lis r3, kThermalFlags@ha
/* 80043C88 00040BE8 C0 22 84 7C */ lfs f1, lbl_805AA19C@sda21(r2)
/* 80043C8C 00040BEC 39 43 C5 30 */ addi r10, r3, lbl_8045C530@l
/* 80043C8C 00040BEC 39 43 C5 30 */ addi r10, r3, kThermalFlags@l
/* 80043C90 00040BF0 89 61 00 20 */ lbz r11, 0x20(r1)
/* 80043C94 00040BF4 38 80 00 03 */ li r4, 3
/* 80043C98 00040BF8 89 21 00 21 */ lbz r9, 0x21(r1)
@ -10908,9 +10919,9 @@ __sinit_CPlayerGun_cpp:
/* 80043CF4 00040C54 48 31 F6 F9 */ bl __ct__6CColorFffff
/* 80043CF8 00040C58 C0 22 84 7C */ lfs f1, lbl_805AA19C@sda21(r2)
/* 80043CFC 00040C5C 38 80 00 00 */ li r4, 0
/* 80043D00 00040C60 3C 60 80 46 */ lis r3, lbl_8045C530@ha
/* 80043D00 00040C60 3C 60 80 46 */ lis r3, kThermalFlags@ha
/* 80043D04 00040C64 89 21 00 18 */ lbz r9, 0x18(r1)
/* 80043D08 00040C68 39 03 C5 30 */ addi r8, r3, lbl_8045C530@l
/* 80043D08 00040C68 39 03 C5 30 */ addi r8, r3, kThermalFlags@l
/* 80043D0C 00040C6C 88 E1 00 19 */ lbz r7, 0x19(r1)
/* 80043D10 00040C70 A0 C1 00 1A */ lhz r6, 0x1a(r1)
/* 80043D14 00040C74 38 00 00 03 */ li r0, 3
@ -10927,9 +10938,9 @@ __sinit_CPlayerGun_cpp:
/* 80043D40 00040CA0 98 81 00 11 */ stb r4, 0x11(r1)
/* 80043D44 00040CA4 B0 01 00 12 */ sth r0, 0x12(r1)
/* 80043D48 00040CA8 48 31 F6 A5 */ bl __ct__6CColorFffff
/* 80043D4C 00040CAC 3C 60 80 46 */ lis r3, lbl_8045C530@ha
/* 80043D4C 00040CAC 3C 60 80 46 */ lis r3, kThermalFlags@ha
/* 80043D50 00040CB0 88 C1 00 10 */ lbz r6, 0x10(r1)
/* 80043D54 00040CB4 38 A3 C5 30 */ addi r5, r3, lbl_8045C530@l
/* 80043D54 00040CB4 38 A3 C5 30 */ addi r5, r3, kThermalFlags@l
/* 80043D58 00040CB8 88 81 00 11 */ lbz r4, 0x11(r1)
/* 80043D5C 00040CBC A0 61 00 12 */ lhz r3, 0x12(r1)
/* 80043D60 00040CC0 80 01 00 14 */ lwz r0, 0x14(r1)
@ -10941,23 +10952,23 @@ __sinit_CPlayerGun_cpp:
/* 80043D78 00040CD8 A1 42 C5 FC */ lhz r10, kInternalInvalidSfxId__11CSfxManager@sda21(r2)
/* 80043D7C 00040CDC 39 00 00 07 */ li r8, 7
/* 80043D80 00040CE0 81 23 00 00 */ lwz r9, 0(r3)
/* 80043D84 00040CE4 38 CD A1 C4 */ addi r6, r13, lbl_805A8D84@sda21
/* 80043D84 00040CE4 38 CD A1 C4 */ addi r6, r13, kHandThermalFlag@sda21
/* 80043D88 00040CE8 38 E0 00 00 */ li r7, 0
/* 80043D8C 00040CEC 38 A0 00 03 */ li r5, 3
/* 80043D90 00040CF0 38 6D A1 CC */ addi r3, r13, lbl_805A8D8C@sda21
/* 80043D94 00040CF4 80 0D A1 B4 */ lwz r0, lbl_805A8D74@sda21(r13)
/* 80043D90 00040CF0 38 6D A1 CC */ addi r3, r13, kHandHoloFlag@sda21
/* 80043D94 00040CF4 80 0D A1 B4 */ lwz r0, kArmColor@sda21(r13)
/* 80043D98 00040CF8 38 80 00 01 */ li r4, 1
/* 80043D9C 00040CFC 99 0D A1 C4 */ stb r8, lbl_805A8D84@sda21(r13)
/* 80043D9C 00040CFC 99 0D A1 C4 */ stb r8, kHandThermalFlag@sda21(r13)
/* 80043DA0 00040D00 98 E6 00 01 */ stb r7, 1(r6)
/* 80043DA4 00040D04 B0 A6 00 02 */ sth r5, 2(r6)
/* 80043DA8 00040D08 91 26 00 04 */ stw r9, 4(r6)
/* 80043DAC 00040D0C 98 8D A1 CC */ stb r4, lbl_805A8D8C@sda21(r13)
/* 80043DAC 00040D0C 98 8D A1 CC */ stb r4, kHandHoloFlag@sda21(r13)
/* 80043DB0 00040D10 98 E3 00 01 */ stb r7, 1(r3)
/* 80043DB4 00040D14 B0 A3 00 02 */ sth r5, 2(r3)
/* 80043DB8 00040D18 90 03 00 04 */ stw r0, 4(r3)
/* 80043DBC 00040D1C B1 4D 82 2C */ sth r10, lbl_805A6DEC@sda21(r13)
/* 80043DC0 00040D20 B1 4D 82 30 */ sth r10, lbl_805A6DF0@sda21(r13)
/* 80043DC4 00040D24 B1 4D 82 38 */ sth r10, lbl_805A6DF8@sda21(r13)
/* 80043DBC 00040D1C B1 4D 82 2C */ sth r10, mItemEmptySound@sda21(r13)
/* 80043DC0 00040D20 B1 4D 82 30 */ sth r10, mIntoBeamSound@sda21(r13)
/* 80043DC4 00040D24 B1 4D 82 38 */ sth r10, mFromBeamSound@sda21(r13)
/* 80043DC8 00040D28 83 E1 00 4C */ lwz r31, 0x4c(r1)
/* 80043DCC 00040D2C 83 C1 00 48 */ lwz r30, 0x48(r1)
/* 80043DD0 00040D30 80 01 00 54 */ lwz r0, 0x54(r1)
@ -10967,39 +10978,39 @@ __sinit_CPlayerGun_cpp:
.section .rodata
.balign 8
.global lbl_803CCE38
lbl_803CCE38:
.global chargeShakeTbl
chargeShakeTbl:
# ROM: 0x3C9E38
.4byte 0xBA83126F
.4byte 0
.float 0.001
.global lbl_803CCE44
lbl_803CCE44:
.global mHandAnimId__10CPlayerGun
mHandAnimId__10CPlayerGun:
# ROM: 0x3C9E44
.4byte 0
.4byte 0x00000001
.4byte 0x00000002
.4byte 0x00000001
.global lbl_803CCE54
lbl_803CCE54:
.global mBeamArr
mBeamArr:
# ROM: 0x3C9E54
.4byte 0
.4byte 0x00000001
.4byte 0x00000002
.4byte 0x00000003
.global lbl_803CCE64
lbl_803CCE64:
.global mBeamComboArr
mBeamComboArr:
# ROM: 0x3C9E64
.4byte 0x0000000B
.4byte 0x0000000E
.4byte 0x0000001C
.4byte 0x00000008
.global lbl_803CCE74
lbl_803CCE74:
.global mBeamCtrlCmd
mBeamCtrlCmd:
# ROM: 0x3C9E74
.4byte 0x00000013
.4byte 0x00000014

View File

@ -610,7 +610,7 @@ __ct__20CSamusFaceReflectionFRC13CStateManager:
/* 8015B680 001585E0 38 A0 00 01 */ li r5, 1
/* 8015B684 001585E4 C0 02 9E AC */ lfs f0, lbl_805ABBCC@sda21(r2)
/* 8015B688 001585E8 38 00 00 00 */ li r0, 0
/* 8015B68C 001585EC 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 8015B68C 001585EC 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 8015B690 001585F0 38 61 00 58 */ addi r3, r1, 0x58
/* 8015B694 001585F4 90 81 00 14 */ stw r4, 0x14(r1)
/* 8015B698 001585F8 38 81 00 14 */ addi r4, r1, 0x14

View File

@ -6829,7 +6829,7 @@ lbl_800CB394:
/* 800CB408 000C8368 41 82 00 98 */ beq lbl_800CB4A0
/* 800CB40C 000C836C 80 E1 03 0C */ lwz r7, 0x30c(r1)
/* 800CB410 000C8370 38 A0 00 01 */ li r5, 1
/* 800CB414 000C8374 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 800CB414 000C8374 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800CB418 000C8378 38 61 00 6C */ addi r3, r1, 0x6c
/* 800CB41C 000C837C C0 41 02 14 */ lfs f2, 0x214(r1)
/* 800CB420 000C8380 38 81 00 50 */ addi r4, r1, 0x50
@ -7785,7 +7785,7 @@ lbl_800CBED0:
/* 800CC25C 000C91BC 41 82 01 20 */ beq lbl_800CC37C
/* 800CC260 000C91C0 80 E1 08 1C */ lwz r7, 0x81c(r1)
/* 800CC264 000C91C4 38 A0 00 01 */ li r5, 1
/* 800CC268 000C91C8 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 800CC268 000C91C8 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800CC26C 000C91CC 38 61 01 A0 */ addi r3, r1, 0x1a0
/* 800CC270 000C91D0 C0 41 07 24 */ lfs f2, 0x724(r1)
/* 800CC274 000C91D4 38 81 01 84 */ addi r4, r1, 0x184
@ -14157,7 +14157,7 @@ lbl_800D1F20:
/* 800D1F40 000CEEA0 41 82 01 00 */ beq lbl_800D2040
/* 800D1F44 000CEEA4 80 E1 03 68 */ lwz r7, 0x368(r1)
/* 800D1F48 000CEEA8 38 A0 00 01 */ li r5, 1
/* 800D1F4C 000CEEAC 80 C2 83 F0 */ lwz r6, lbl_805AA110@sda21(r2)
/* 800D1F4C 000CEEAC 80 C2 83 F0 */ lwz r6, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800D1F50 000CEEB0 38 61 01 14 */ addi r3, r1, 0x114
/* 800D1F54 000CEEB4 C0 41 02 70 */ lfs f2, 0x270(r1)
/* 800D1F58 000CEEB8 38 81 00 60 */ addi r4, r1, 0x60
@ -18202,7 +18202,7 @@ lbl_800D5ABC:
/* 800D5ADC 000D2A3C 3C 1F BE B2 */ addis r0, r31, 0xbeb2
/* 800D5AE0 000D2A40 28 00 43 53 */ cmplwi r0, 0x4353
/* 800D5AE4 000D2A44 40 82 00 5C */ bne lbl_800D5B40
/* 800D5AE8 000D2A48 80 A2 83 F0 */ lwz r5, lbl_805AA110@sda21(r2)
/* 800D5AE8 000D2A48 80 A2 83 F0 */ lwz r5, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800D5AEC 000D2A4C 38 00 00 01 */ li r0, 1
/* 800D5AF0 000D2A50 C0 41 03 DC */ lfs f2, 0x3dc(r1)
/* 800D5AF4 000D2A54 38 61 01 80 */ addi r3, r1, 0x180
@ -19205,7 +19205,7 @@ lbl_800D6868:
/* 800D6984 000D38E4 38 60 00 00 */ li r3, 0
/* 800D6988 000D38E8 48 00 01 B4 */ b lbl_800D6B3C
lbl_800D698C:
/* 800D698C 000D38EC 80 A2 83 F0 */ lwz r5, lbl_805AA110@sda21(r2)
/* 800D698C 000D38EC 80 A2 83 F0 */ lwz r5, kDefaultCharIdx__8CAnimRes@sda21(r2)
/* 800D6990 000D38F0 38 00 00 00 */ li r0, 0
/* 800D6994 000D38F4 C0 41 02 50 */ lfs f2, 0x250(r1)
/* 800D6998 000D38F8 38 61 01 5C */ addi r3, r1, 0x15c

View File

@ -710,7 +710,7 @@ lbl_800C2DD8:
lbl_800C2E44:
/* 800C2E44 000BFDA4 C0 22 8D C8 */ lfs f1, lbl_805AAAE8@sda21(r2)
lbl_800C2E48:
/* 800C2E48 000BFDA8 C0 0D A1 B0 */ lfs f0, skTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 800C2E48 000BFDA8 C0 0D A1 B0 */ lfs f0, kTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 800C2E4C 000BFDAC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 800C2E50 000BFDB0 40 80 00 3C */ bge lbl_800C2E8C
/* 800C2E54 000BFDB4 88 1E 02 8C */ lbz r0, 0x28c(r30)
@ -745,7 +745,7 @@ lbl_800C2E9C:
lbl_800C2EC0:
/* 800C2EC0 000BFE20 C0 22 8D C8 */ lfs f1, lbl_805AAAE8@sda21(r2)
lbl_800C2EC4:
/* 800C2EC4 000BFE24 C0 0D A1 B0 */ lfs f0, skTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 800C2EC4 000BFE24 C0 0D A1 B0 */ lfs f0, kTractorBeamFactor__10CPlayerGun@sda21(r13)
/* 800C2EC8 000BFE28 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 800C2ECC 000BFE2C 40 81 01 28 */ ble lbl_800C2FF4
/* 800C2ED0 000BFE30 80 BF 08 70 */ lwz r5, 0x870(r31)

View File

@ -12,7 +12,7 @@ enum ELightType {
kLT_Custom = 4,
};
enum EFallofType { kFT_Constant, kFT_Linear, kFT_Quadratic };
enum EFalloffType { kFT_Constant, kFT_Linear, kFT_Quadratic };
class CLight {
static const CVector3f kDefaultPosition;

View File

@ -9,6 +9,7 @@ class CModelFlags {
public:
enum ETrans {
kT_Opaque = 0,
kT_One = 1, // ?
kT_Two = 2, // ?
kT_Blend = 5,
kT_Additive = 7,
@ -90,7 +91,7 @@ public:
static CModelFlags Normal() { return CModelFlags(kT_Opaque, 1.f); }
static CModelFlags AlphaBlended(float alpha) { return CModelFlags(kT_Blend, alpha); }
static CModelFlags AlphaBlended(const CColor& color);
static CModelFlags AlphaBlended(const CColor& color) { return CModelFlags(kT_Blend, color); }
static CModelFlags Additive(float f);
static CModelFlags Additive(const CColor& color);
static CModelFlags AdditiveRGB(const CColor& color);

View File

@ -33,17 +33,6 @@ public:
static CRelAngle FromDegrees(float deg) { return CRelAngle(deg * (M_PIF / 180.f)); }
static CRelAngle FromRadians(float rad) { return CRelAngle(rad); }
// Relative
static float MakeRelativeAngle(float angle) {
float ret = angle - ((float)(int)(angle * (1.f / (2.f * M_PIF)))) * (2.f * M_PIF);
if (ret < 0.f)
ret += 2.f * M_PIF;
return ret;
}
CRelAngle AsRelative() const { return CRelAngle(MakeRelativeAngle(x0_angle)); }
private:
CRelAngle(float rad) : x0_angle(rad) {}

View File

@ -3,20 +3,37 @@
#include "types.h"
#include "Kyoto/Math/CMatrix3f.hpp"
#include "Kyoto/Math/CTransform4f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
#include "Kyoto/Particles/CParticleGen.hpp"
#include "Kyoto/TToken.hpp"
class CGenDescription;
class CModVectorElement;
class CParticle;
class CElementGen : public CParticleGen {
public:
enum EModelOrientationType { kMOT_Normal, kMOT_One };
enum EOptionalSystemFlags { kOSF_None, kOSF_One, kOSF_Two };
enum LightType { kLT_None = 0, kLT_Custom = 1, kLT_Directional = 2, kLT_Spot = 3 };
enum EModelOrientationType {
kMOT_Normal,
kMOT_One,
};
enum EOptionalSystemFlags {
kOSF_None,
kOSF_One,
kOSF_Two,
};
enum LightType {
kLT_None = 0,
kLT_Custom = 1,
kLT_Directional = 2,
kLT_Spot = 3,
};
CElementGen(TToken< CGenDescription >, EModelOrientationType = kMOT_Normal,
EOptionalSystemFlags = kOSF_One);
~CElementGen();
~CElementGen() override;
virtual void Update(double);
virtual void Render() const;
@ -47,14 +64,87 @@ public:
int GetEmitterTime() const;
// TODO
int GetCumulativeParticleCount() const { return *reinterpret_cast< const int* >(&x4_pad[0x25c]); }
int GetCumulativeParticleCount() const { return x260_cumulativeParticles; }
static void Initialize();
static void ShutDown();
private:
uchar x4_pad[0x33C];
public:
TLockedToken< CGenDescription > x1c_genDesc;
CGenDescription* x28_loadedGenDesc;
EModelOrientationType x2c_orientType;
rstl::vector< CParticle > x30_particles;
rstl::vector< uint > x40;
rstl::vector< CMatrix3f > x50_parentMatrices;
rstl::vector< float[8] > x60_advValues;
int x70_internalStartFrame;
int x74_curFrame;
double x78_curSeconds;
float x80_timeDeltaScale;
int x84_prevFrame;
bool x88_particleEmission;
float x8c_generatorRemainder;
int x90_MAXP;
ushort x94_randomSeed;
float x98_generatorRate;
float x9c_externalVars[16];
CVector3f xdc_translation;
CVector3f xe8_globalTranslation;
CVector3f xf4_POFS;
CVector3f x100_globalScale;
CTransform4f x10c_globalScaleTransform;
CTransform4f x13c_globalScaleTransformInverse;
CVector3f x16c_localScale;
CTransform4f x178_localScaleTransform;
CTransform4f x1a8_localScaleTransformInverse;
CTransform4f x1d8_orientation;
CMatrix3f x208_orientationInverse;
CTransform4f x22c_globalOrientation;
uint x25c_activeParticleCount;
uint x260_cumulativeParticles;
uint x264_recursiveParticleCount;
int x268_PSLT;
bool x26c_24_translationDirty : 1;
bool x26c_25_LIT_ : 1;
bool x26c_26_AAPH : 1;
bool x26c_27_ZBUF : 1;
bool x26c_28_zTest : 1;
bool x26c_29_ORNT : 1;
bool x26c_30_MBLR : 1;
bool x26c_31_LINE : 1;
bool x26d_24_FXLL : 1;
bool x26d_25_warmedUp : 1;
bool x26d_26_modelsUseLights : 1;
bool x26d_27_enableOPTS : 1;
bool x26d_28_enableADV : 1;
int x270_MBSP;
GXLightID x274_backupLightActive;
bool x278_hasVMD[4];
CRandom16 x27c_randState;
CModVectorElement* x280_VELSources[4];
rstl::vector< rstl::auto_ptr< CParticleGen > > x290_activePartChildren;
int x2a0_CSSD;
int x2a4_SISY;
int x2a8_PISY;
int x2ac_SSSD;
CVector3f x2b0_SSPO;
int x2bc_SESD;
CVector3f x2c0_SEPO;
float x2cc;
float x2d0;
CVector3f x2d4_aabbMin;
CVector3f x2e0_aabbMax;
float x2ec_maxSize;
CAABox x2f0_systemBounds;
LightType x308_lightType;
CColor x30c_LCLR;
float x310_LINT;
CVector3f x314_LOFF;
CVector3f x320_LDIR;
EFalloffType x32c_falloffType;
float x330_LFOR;
float x334_LSLA;
CColor x338_moduColor;
};
CHECK_SIZEOF(CElementGen, 0x340)

View File

@ -1,13 +1,105 @@
#ifndef _CGENDESCRIPTION
#define _CGENDESCRIPTION
#include "types.h"
#include "Kyoto/Particles/IElement.hpp"
#include "Kyoto/TToken.hpp"
#include "rstl/optional_object.hpp"
#include "rstl/single_ptr.hpp"
class CElectricDescription;
class CSwooshDescription;
class CSpawnSystemKeyframeData;
class CGenDescription {
public:
typedef rstl::optional_object< TCachedToken< CModel > > TParticleModel;
typedef rstl::optional_object< TCachedToken< CGenDescription > > TChildGeneratorDesc;
typedef rstl::optional_object< TCachedToken< CSwooshDescription > > TSwooshGeneratorDesc;
typedef TCachedToken< CElectricDescription > TElectricGeneratorDesc;
CGenDescription();
~CGenDescription();
private:
char data[0x12c];
rstl::single_ptr< CIntElement > x0_PSLT;
rstl::single_ptr< CIntElement > x4_PSWT;
rstl::single_ptr< CRealElement > x8_PSTS;
rstl::single_ptr< CVectorElement > xc_POFS;
rstl::single_ptr< CIntElement > x10_SEED;
rstl::single_ptr< CRealElement > x14_LENG;
rstl::single_ptr< CRealElement > x18_WIDT;
rstl::single_ptr< CIntElement > x1c_MAXP;
rstl::single_ptr< CRealElement > x20_GRTE;
rstl::single_ptr< CColorElement > x24_COLR;
rstl::single_ptr< CIntElement > x28_LTME;
rstl::single_ptr< CEmitterElement > x2c_EMTR;
bool x30_28_SORT : 1;
bool x31_24_MBLR : 1;
bool x30_24_LINE : 1;
bool x30_29_LIT_ : 1;
bool x30_26_AAPH : 1;
bool x30_27_ZBUF : 1;
bool x30_25_FXLL : 1;
bool x31_25_PMAB : 1;
bool x31_31_VMD4 : 1;
bool x31_30_VMD3 : 1;
bool x31_29_VMD2 : 1;
bool x31_28_VMD1 : 1;
bool x32_25_OPTS : 1;
bool x31_26_PMUS : 1;
bool x31_27_PMOO : 1;
bool x32_24_CIND : 1;
bool x30_30_ORNT : 1;
bool x30_31_RSOP : 1;
rstl::single_ptr< CIntElement > x34_MBSP;
rstl::single_ptr< CRealElement > x38_SIZE;
rstl::single_ptr< CRealElement > x3c_ROTA;
rstl::single_ptr< CUVElement > x40_TEXR;
rstl::single_ptr< CUVElement > x44_TIND;
TParticleModel x48_PMDL;
rstl::single_ptr< CVectorElement > x58_PMOP;
rstl::single_ptr< CVectorElement > x5c_PMRT;
rstl::single_ptr< CVectorElement > x60_PMSC;
rstl::single_ptr< CColorElement > x64_PMCL;
rstl::single_ptr< CModVectorElement > x68_VEL1;
rstl::single_ptr< CModVectorElement > x6c_VEL2;
rstl::single_ptr< CModVectorElement > x70_VEL3;
rstl::single_ptr< CModVectorElement > x74_VEL4;
TChildGeneratorDesc x78_ICTS;
rstl::single_ptr< CIntElement > x88_NCSY;
rstl::single_ptr< CIntElement > x8c_CSSD;
TChildGeneratorDesc x90_IDTS;
rstl::single_ptr< CIntElement > xa0_NDSY;
TChildGeneratorDesc xa4_IITS;
rstl::single_ptr< CIntElement > xb4_PISY;
rstl::single_ptr< CIntElement > xb8_SISY;
rstl::single_ptr< CSpawnSystemKeyframeData > xbc_KSSM;
TSwooshGeneratorDesc xc0_SSWH;
rstl::single_ptr< CIntElement > xd0_SSSD;
rstl::single_ptr< CVectorElement > xd4_SSPO;
TElectricGeneratorDesc xd8_SELC;
rstl::single_ptr< CIntElement > xe4_SESD;
rstl::single_ptr< CVectorElement > xe8_SEPO;
rstl::single_ptr< CIntElement > xec_LTYP;
rstl::single_ptr< CColorElement > xf0_LCLR;
rstl::single_ptr< CRealElement > xf4_LINT;
rstl::single_ptr< CVectorElement > xf8_LOFF;
rstl::single_ptr< CVectorElement > xfc_LDIR;
rstl::single_ptr< CIntElement > x100_LFOT;
rstl::single_ptr< CRealElement > x104_LFOR;
rstl::single_ptr< CRealElement > x108_LSLA;
rstl::single_ptr< CRealElement > x10c_ADV1;
rstl::single_ptr< CRealElement > x110_ADV2;
rstl::single_ptr< CRealElement > x114_ADV3;
rstl::single_ptr< CRealElement > x118_ADV4;
rstl::single_ptr< CRealElement > x11c_ADV5;
rstl::single_ptr< CRealElement > x120_ADV6;
rstl::single_ptr< CRealElement > x124_ADV7;
rstl::single_ptr< CRealElement > x128_ADV8;
};
CHECK_SIZEOF(CGenDescription, 0x12c)
#endif // _CGENDESCRIPTION

View File

@ -7,7 +7,10 @@
#include "Kyoto/Math/CTransform4f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
#include "rstl/list.hpp"
class CWarp;
class CParticleGen {
public:
virtual ~CParticleGen() = 0;
@ -38,6 +41,9 @@ public:
virtual void DestroyParticles() = 0;
virtual void AddModifier(CWarp*) = 0;
virtual uint Get4CharId() const = 0;
private:
rstl::list< CWarp > x4_modifiersList;
};
#endif // _CPARTICLEGEN

View File

@ -3,7 +3,10 @@
#include "types.h"
#include "Kyoto/TToken.hpp"
class CColor;
class CTexture;
class CVector3f;
class IElement {
@ -48,4 +51,16 @@ public:
virtual bool GetValue(int frame, CVector3f& pPos, CVector3f& pVel) const = 0;
};
struct SUVElementSet {
float xMin, yMin, xMax, yMax;
};
class CUVElement : public IElement {
public:
virtual TLockedToken< CTexture > GetValueTexture(int frame) const = 0;
virtual void GetValueUV(int frame, SUVElementSet& valOut) const = 0;
virtual bool HasConstantTexture() const = 0;
virtual bool HasConstantUV() const = 0;
};
#endif // _IELEMENT

View File

@ -26,6 +26,9 @@ public:
, x8_scale(scale)
, x14_canLoop(loop)
, x18_defaultAnim(defaultAnim) {}
// name?
static int kDefaultCharIdx;
};
CHECK_SIZEOF(CAnimRes, 0x1c)

View File

@ -10,12 +10,12 @@
class CArchitectureQueue {
public:
bool Push(const CArchitectureMessage& msg) {
x0_queue.push_back(msg);
return false; // TODO
// x0_queue.push_back(msg);
return false; // TODO
}
void Pop(); // TODO
void Clear(); // TODO
bool IsEmpty() const; // TODO
void Pop(); // TODO
void Clear(); // TODO
bool IsEmpty() const; // TODO
private:
rstl::list< CArchitectureMessage > x0_queue;

View File

@ -29,7 +29,7 @@ public:
kCBS_Unspecified,
};
CPlayerCameraBob(ECameraBobType type, const CVector2f& vec, float bobPeriod);
CPlayerCameraBob(ECameraBobType type, float bobPeriod, const CVector2f& vec);
CTransform4f GetViewWanderTransform() const;
CVector3f GetHelmetBobTranslation() const;
@ -51,7 +51,7 @@ public:
CTransform4f CalculateCameraBobTransformation() const;
static void ReadTweaks(CInputStream& in);
static CVector2f GetCameraBobExtent() { return CVector2f(kCameraBobExtentX, kCameraBobExtentY); }
static const CVector2f& GetCameraBobExtent() { return CVector2f(kCameraBobExtentX, kCameraBobExtentY); }
static float GetCameraBobPeriod() { return kCameraBobPeriod; }
static float GetOrbitBobScale() { return kOrbitBobScale; }
static float GetMaxOrbitBobScale() { return kMaxOrbitBobScale; }

View File

@ -48,7 +48,9 @@ class CGameCamera;
class CPlayerGun;
class CPlayerGun : public TOneStatic< CPlayerGun > {
static float skTractorBeamFactor;
static float kTractorBeamFactor;
static CVector3f kScaleVector;
static const uint mHandAnimId[4];
public:
enum EMissileMode {
@ -174,7 +176,7 @@ public:
float GetChargeBeamFactor() const { return x834_24_charging ? x340_chargeBeamFactor : 0.f; }
static float GetTractorBeamFactor() { return skTractorBeamFactor; }
static float GetTractorBeamFactor() { return kTractorBeamFactor; }
int GetStateFlags() const { return x2f8_stateFlags; }
void SetStateFlags(int flags) { x2f8_stateFlags = flags; }
@ -255,6 +257,7 @@ private:
private:
static float gGunExtendDistance;
bool x0_24_extendParabola : 1;
float x4_extendParabolaDelayTimer;
float x8_fireTime;

View File

@ -5,14 +5,30 @@
#include "MetroidPrime/TGameTypes.hpp"
class CWeaponDescription;
class CGenDescription;
class CElementGen;
class CAuxWeapon {
public:
explicit CAuxWeapon(TUniqueId playerId);
CAuxWeapon(TUniqueId playerId);
bool IsComboFxActive(const CStateManager& mgr) const;
private:
uchar x0_pad[0x84];
TCachedToken< CWeaponDescription > x0_missile;
TCachedToken< CGenDescription > xc_flameMuzzle;
TCachedToken< CGenDescription > x18_busterMuzzle;
rstl::single_ptr< CElementGen > x24_muzzleFxGen;
rstl::reserved_vector< TCachedToken< CWeaponDescription >, 5 > x28_combos;
float x68_ammoConsumeTimer;
TUniqueId x6c_playerId;
TUniqueId x6e_flameThrowerId;
TUniqueId x70_waveBusterId;
CPlayerState::EBeamId x74_firingBeamId;
CPlayerState::EBeamId x78_loadBeamId;
CSfxHandle x7c_comboSfx;
bool x80_24_isLoaded : 1;
};
CHECK_SIZEOF(CAuxWeapon, 0x84)

View File

@ -34,7 +34,7 @@ public:
float x30_;
bool x34_castShadows;
float x38_;
EFallofType x3c_falloff;
EFalloffType x3c_falloff;
float x40_;
};

View File

@ -24,9 +24,11 @@
#include "Kyoto/Audio/CSfxManager.hpp"
#include "Kyoto/Graphics/CModelFlags.hpp"
#include "Kyoto/Math/CAbsAngle.hpp"
#include "Kyoto/Math/CMath.hpp"
#include "Kyoto/Math/CRelAngle.hpp"
#include "Kyoto/Particles/CElementGen.hpp"
#include "Kyoto/Particles/CGenDescription.hpp"
#include "Kyoto/SObjectTag.hpp"
#include "Collision/CMaterialFilter.hpp"
@ -40,23 +42,27 @@ static float kVerticalAngleTable[3] = {-30.f, 0.f, 30.f};
static float kHorizontalAngleTable[3] = {30.f, 30.f, 30.f};
static float kVerticalVarianceTable[3] = {30.f, 30.f, 30.f};
static const CVector3f sGunScale(2.f, 2.f, 2.f);
static const float chargeShakeTbl[3] = {
-0.001f,
0.f,
0.001f,
};
static const uint skBeamAnimIds[4] = {
const uint CPlayerGun::mHandAnimId[4] = {
0,
1,
2,
1,
};
static const CPlayerState::EItemType skBeamArr[4] = {
static const CPlayerState::EItemType mBeamArr[4] = {
CPlayerState::kIT_PowerBeam,
CPlayerState::kIT_IceBeam,
CPlayerState::kIT_WaveBeam,
CPlayerState::kIT_PlasmaBeam,
};
static const CPlayerState::EItemType skBeamComboArr[4] = {
static const CPlayerState::EItemType mBeamComboArr[4] = {
CPlayerState::kIT_SuperMissile,
CPlayerState::kIT_IceSpreader,
CPlayerState::kIT_Wavebuster,
@ -77,7 +83,7 @@ static const CPlayerState::EItemType skBeamComboArr[4] = {
// SFXwpn_from_missile_plasma,
// };
// constexpr std::array<ushort, 4> skFromBeamSound{
// constexpr std::array<ushort, 4> mFromBeamSound{
// SFXsfx0000,
// SFXwpn_from_beam_ice,
// SFXwpn_from_beam_wave,
@ -91,17 +97,23 @@ static const CPlayerState::EItemType skBeamComboArr[4] = {
// SFXwpn_to_missile_plasma,
// };
// constexpr std::array<ushort, 4> skIntoBeamSound{
// constexpr std::array<ushort, 4> mIntoBeamSound{
// SFXsfx0000,
// SFXwpn_into_beam_ice,
// SFXwpn_into_beam_wave,
// SFXwpn_into_beam_plasma,
// };
float CPlayerGun::kTractorBeamFactor = 0.25f / CPlayerState::GetMissileComboChargeFactor();
CVector3f CPlayerGun::kScaleVector(2.f, 2.f, 2.f);
float CPlayerGun::CMotionState::gGunExtendDistance = 0.125f;
static CColor kArmColor = CColor(0.75f, 0.5f, 0.f, 1.f);
static CMaterialFilter sAimFilter = CMaterialFilter::MakeIncludeExclude(
CMaterialList(kMT_Solid), CMaterialList(kMT_ProjectilePassthrough));
static const float kChargeSpeed = 1.f / CPlayerState::GetMissileComboChargeFactor();
static const float kChargeFxStart = 1.f / CPlayerState::GetMissileComboChargeFactor();
static const float kChargeAnimStart = 0.25f / CPlayerState::GetMissileComboChargeFactor();
static const float kChargeStart = 0.025f / CPlayerState::GetMissileComboChargeFactor();
static const float kChargeFxStart = 1.f / CPlayerState::GetMissileComboChargeFactor();
// constexpr std::array<ushort, 4> skBeamChargeUpSound{
// SFXwpn_chargeup_power,
@ -115,33 +127,34 @@ static const CPlayerState::EItemType skItemArr[2] = {
CPlayerState::kIT_Missiles,
};
// static const ushort skItemEmptySound[2] = {
// SFXsfx0000,
// SFXwpn_empty_action,
// };
static const float chargeShakeTbl[3] = {
-0.001f,
0.f,
0.001f,
};
static const CMaterialFilter sAimFilter = CMaterialFilter::MakeIncludeExclude(
CMaterialList(kMT_Solid), CMaterialList(kMT_ProjectilePassthrough));
static const CModelFlags kThermalFlags[4] = {
CModelFlags(CModelFlags::kT_Opaque, CColor(1.f, 1.f, 1.f, 1.0f)),
CModelFlags(CModelFlags::kT_Blend, CColor(0.f, 0.f, 0.f, 0.5f)),
CModelFlags(CModelFlags::kT_Opaque, CColor(1.f, 1.f, 1.f, 1.0f)),
CModelFlags(CModelFlags::kT_Opaque, CColor(1.f, 1.f, 1.f, 1.0f)),
CModelFlags::Normal(),
CModelFlags::AlphaBlended(CColor(u8(255), u8(255), u8(255), u8(128))),
CModelFlags::Normal(),
CModelFlags::Normal(),
};
static const CModelFlags kHandThermalFlag(CModelFlags::kT_Additive, CColor::White());
static const CModelFlags kHandHoloFlag(CModelFlags::kT_One, kArmColor);
static const CModelFlags kHandHoloFlag((CModelFlags::ETrans)1, // TODO: ETrans 1?
CColor(0.75f, 0.5f, 0.f, 1.f));
static ushort mItemEmptySound[2] = {
CSfxManager::kInternalInvalidSfxId,
SFXwpn_empty_action,
};
float CPlayerGun::CMotionState::gGunExtendDistance = 0.125f;
static ushort mIntoBeamSound[4] = {
CSfxManager::kInternalInvalidSfxId,
SFXwpn_into_beam_ice,
SFXwpn_into_beam_wave,
SFXwpn_into_beam_plasma,
};
static ushort mFromBeamSound[4] = {
CSfxManager::kInternalInvalidSfxId,
SFXwpn_from_beam_ice,
SFXwpn_from_beam_wave,
SFXwpn_from_beam_plasma,
};
CPlayerGun::CPlayerGun(TUniqueId playerId)
: x0_lights(8, CVector3f::Zero(), 4, 4, false, false, false, 0.1)
@ -202,36 +215,39 @@ CPlayerGun::CPlayerGun(TUniqueId playerId)
, x538_playerId(playerId)
, x53a_powerBomb(kInvalidUniqueId)
, x53c_lightId(kInvalidUniqueId)
, x550_camBob(CPlayerCameraBob::kCBT_One, CPlayerCameraBob::GetCameraBobExtent(),
CPlayerCameraBob::GetCameraBobPeriod())
, x550_camBob(CPlayerCameraBob::kCBT_One, CPlayerCameraBob::GetCameraBobPeriod(),
CPlayerCameraBob::GetCameraBobExtent())
, x658_(1)
, x65c_(0.f)
, x660_(0.f)
, x664_(0.f)
, x668_aimVerticalSpeed(gpTweakPlayerGun->GetAimVerticalSpeed())
, x66c_aimHorizontalSpeed(gpTweakPlayerGun->GetAimHorizontalSpeed())
, x670_animSfx(InvalidSfxId, CSfxHandle())
, x678_morph(gpTweakPlayerGun->GetGunTransformTime(), gpTweakPlayerGun->GetHoloHoldTime())
, x6a0_motionState()
, x6c8_hologramClipCube(CVector3f(-0.29329199f, 0.f, -0.2481945f),
CVector3f(0.29329199f, 1.292392f, 0.2481945f))
, x6e0_rightHandModel(CAnimRes(gpTweakGunRes->xc_rightHand, 0, CVector3f(3.f, 3.f, 3.f), 0, true))
, x6e0_rightHandModel(CAnimRes(gpTweakGunRes->xc_rightHand, CAnimRes::kDefaultCharIdx,
CVector3f(3.f, 3.f, 3.f), 0, true))
, x72c_currentBeam(nullptr)
, x730_outgoingBeam(nullptr)
, x734_loadingBeam(nullptr)
, x738_nextBeam(nullptr)
, x73c_gunMotion(new CGunMotion(gpTweakGunRes->x4_gunMotion, sGunScale))
, x740_grappleArm(new CGrappleArm(sGunScale))
, x73c_gunMotion(new CGunMotion(gpTweakGunRes->x4_gunMotion, kScaleVector))
, x740_grappleArm(new CGrappleArm(kScaleVector))
, x744_auxWeapon(new CAuxWeapon(playerId))
, x748_rainSplashGenerator(new CRainSplashGenerator(sGunScale, 20, 2, 0.f, 0.125f))
, x748_rainSplashGenerator(new CRainSplashGenerator(kScaleVector, 20, 2, 0.f, 0.125f))
, x74c_powerBeam(
new CPowerBeam(gpTweakGunRes->x10_powerBeam, kWT_Power, playerId, kMT_Player, sGunScale))
, x750_iceBeam(new CIceBeam(gpTweakGunRes->x14_iceBeam, kWT_Ice, playerId, kMT_Player, sGunScale))
new CPowerBeam(gpTweakGunRes->x10_powerBeam, kWT_Power, playerId, kMT_Player, kScaleVector))
, x750_iceBeam(
new CIceBeam(gpTweakGunRes->x14_iceBeam, kWT_Ice, playerId, kMT_Player, kScaleVector))
, x754_waveBeam(
new CWaveBeam(gpTweakGunRes->x18_waveBeam, kWT_Wave, playerId, kMT_Player, sGunScale))
, x758_plasmaBeam(
new CPlasmaBeam(gpTweakGunRes->x1c_plasmaBeam, kWT_Plasma, playerId, kMT_Player, sGunScale))
, x75c_phazonBeam(
new CPhazonBeam(gpTweakGunRes->x20_phazonBeam, kWT_Phazon, playerId, kMT_Player, sGunScale))
new CWaveBeam(gpTweakGunRes->x18_waveBeam, kWT_Wave, playerId, kMT_Player, kScaleVector))
, x758_plasmaBeam(new CPlasmaBeam(gpTweakGunRes->x1c_plasmaBeam, kWT_Plasma, playerId, kMT_Player,
kScaleVector))
, x75c_phazonBeam(new CPhazonBeam(gpTweakGunRes->x20_phazonBeam, kWT_Phazon, playerId, kMT_Player,
kScaleVector))
, x760_selectableBeams(nullptr)
, x774_holoTransitionGen(
new CElementGen(gpSimplePool->GetObj(SObjectTag('PART', gpTweakGunRes->x24_holoTransition))))
@ -381,7 +397,7 @@ void CPlayerGun::ProcessChargeState(int releasedStates, int pressedStates, CStat
const CPlayerState* state = mgr.GetPlayerState();
if (state->HasPowerUp(CPlayerState::kIT_Missiles) && (pressedStates & 0x2) != 0) {
if (x32c_chargePhase >= kCP_FxGrown) {
if (state->HasPowerUp(skBeamComboArr[size_t(x310_currentBeam)]))
if (state->HasPowerUp(mBeamComboArr[size_t(x310_currentBeam)]))
ActivateCombo(mgr);
} else if (x32c_chargePhase == kCP_NotCharging) {
FireSecondary(dt, mgr);
@ -512,7 +528,7 @@ void CPlayerGun::ResetBeamParams(CStateManager& mgr, const CPlayerState& playerS
if (playerState.ItemEnabled(CPlayerState::kIT_ChargeBeam)) {
ResetCharge(mgr, false);
}
const CAnimPlaybackParms parms(skBeamAnimIds[size_t(x314_nextBeam)], -1, 1.f, true);
const CAnimPlaybackParms parms(mHandAnimId[size_t(x314_nextBeam)], -1, 1.f, true);
x6e0_rightHandModel.AnimationData()->SetAnimation(parms, false);
Reset(mgr, false);
if (playSelectionSfx) {
@ -997,13 +1013,14 @@ void CPlayerGun::TakeDamage(bool bigStrike, bool notFromMetroid, CStateManager&
const CPlayer& player = *mgr.GetPlayer();
bool hasStrikeAngle = false;
float angle = 0.f;
if (x398_damageAmt >= 10.f && !bigStrike && (x2f8_stateFlags & 0x10) != 0x10 && !x832_26_comboFiring &&
x384_gunStrikeDelayTimer <= 0.f) {
if (x398_damageAmt >= 10.f && !bigStrike && (x2f8_stateFlags & 0x10) != 0x10 &&
!x832_26_comboFiring && x384_gunStrikeDelayTimer <= 0.f) {
x384_gunStrikeDelayTimer = 20.f;
x364_gunStrikeCoolTimer = 0.75f;
if (x678_morph.GetGunState() == CGunMorph::kGS_OutWipeDone) {
CVector3f localDamageLoc = player.GetTransform().TransposeRotate(x3dc_damageLocation);
angle = CRelAngle::FromRadians(atan2(localDamageLoc.GetY(), localDamageLoc.GetX())).AsRelative().AsDegrees();
angle =
CAbsAngle::FromRadians(atan2(localDamageLoc.GetY(), localDamageLoc.GetX())).AsDegrees();
hasStrikeAngle = true;
}
}

View File

@ -18,7 +18,7 @@ CWorldLight::CWorldLight(CInputStream& in)
, x30_(in.Get< float >())
, x34_castShadows(in.Get< bool >())
, x38_(in.Get< float >())
, x3c_falloff((EFallofType)in.Get< uint >())
, x3c_falloff((EFalloffType)in.Get< uint >())
, x40_(in.Get< float >()) {}
CLight CWorldLight::GetAsCGraphicsLight() const {