From e514aa95352119730f6a3d7b47d18e9a213dafd9 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 6 Feb 2023 21:55:32 -0800 Subject: [PATCH] Match and link CExplosion --- asm/Kyoto/Particles/CElementGen.s | 2 +- asm/Kyoto/Particles/CParticleElectric.s | 2 +- asm/Kyoto/Particles/CParticleSwoosh.s | 2 +- asm/MetroidPrime/CExplosion.s | 4 ++-- configure.py | 2 +- include/MetroidPrime/CExplosion.hpp | 3 +++ src/MetroidPrime/CExplosion.cpp | 4 +--- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/asm/Kyoto/Particles/CElementGen.s b/asm/Kyoto/Particles/CElementGen.s index 2679a4f0..73e472e3 100644 --- a/asm/Kyoto/Particles/CElementGen.s +++ b/asm/Kyoto/Particles/CElementGen.s @@ -8751,7 +8751,7 @@ lbl_8031F390: /* 8031F3A0 0031C300 38 04 DD 08 */ addi r0, r4, __vt__12CParticleGen@l /* 8031F3A4 0031C304 38 80 FF FF */ li r4, -1 /* 8031F3A8 0031C308 90 1E 00 00 */ stw r0, 0(r30) -/* 8031F3AC 0031C30C 4B D3 B9 25 */ bl "__dt__Q24rstl52list,Q24rstl17rmemory_allocator>Fv" +/* 8031F3AC 0031C30C 4B D3 B9 25 */ bl "__dt__Q24rstl40listFv" lbl_8031F3B0: /* 8031F3B0 0031C310 7F E0 07 35 */ extsh. r0, r31 /* 8031F3B4 0031C314 40 81 00 0C */ ble lbl_8031F3C0 diff --git a/asm/Kyoto/Particles/CParticleElectric.s b/asm/Kyoto/Particles/CParticleElectric.s index 98775101..597ff96d 100644 --- a/asm/Kyoto/Particles/CParticleElectric.s +++ b/asm/Kyoto/Particles/CParticleElectric.s @@ -3909,7 +3909,7 @@ lbl_80361EC0: /* 80361ED0 0035EE30 38 04 DD 08 */ addi r0, r4, __vt__12CParticleGen@l /* 80361ED4 0035EE34 38 80 FF FF */ li r4, -1 /* 80361ED8 0035EE38 90 1E 00 00 */ stw r0, 0(r30) -/* 80361EDC 0035EE3C 4B CF 8D F5 */ bl "__dt__Q24rstl52list,Q24rstl17rmemory_allocator>Fv" +/* 80361EDC 0035EE3C 4B CF 8D F5 */ bl "__dt__Q24rstl40listFv" lbl_80361EE0: /* 80361EE0 0035EE40 7F E0 07 35 */ extsh. r0, r31 /* 80361EE4 0035EE44 40 81 00 0C */ ble lbl_80361EF0 diff --git a/asm/Kyoto/Particles/CParticleSwoosh.s b/asm/Kyoto/Particles/CParticleSwoosh.s index 27e8c497..813ca6e9 100644 --- a/asm/Kyoto/Particles/CParticleSwoosh.s +++ b/asm/Kyoto/Particles/CParticleSwoosh.s @@ -4884,7 +4884,7 @@ lbl_8032ED98: /* 8032EDA8 0032BD08 38 04 DD 08 */ addi r0, r4, __vt__12CParticleGen@l /* 8032EDAC 0032BD0C 38 80 FF FF */ li r4, -1 /* 8032EDB0 0032BD10 90 1E 00 00 */ stw r0, 0(r30) -/* 8032EDB4 0032BD14 4B D2 BF 1D */ bl "__dt__Q24rstl52list,Q24rstl17rmemory_allocator>Fv" +/* 8032EDB4 0032BD14 4B D2 BF 1D */ bl "__dt__Q24rstl40listFv" lbl_8032EDB8: /* 8032EDB8 0032BD18 7F E0 07 35 */ extsh. r0, r31 /* 8032EDBC 0032BD1C 40 81 00 0C */ ble lbl_8032EDC8 diff --git a/asm/MetroidPrime/CExplosion.s b/asm/MetroidPrime/CExplosion.s index 097678d5..820a600a 100644 --- a/asm/MetroidPrime/CExplosion.s +++ b/asm/MetroidPrime/CExplosion.s @@ -873,8 +873,8 @@ lbl_8005AC20: /* 8005ACC8 00057C28 38 21 00 80 */ addi r1, r1, 0x80 /* 8005ACCC 00057C2C 4E 80 00 20 */ blr -.global "__dt__Q24rstl52list,Q24rstl17rmemory_allocator>Fv" -"__dt__Q24rstl52list,Q24rstl17rmemory_allocator>Fv": +.global "__dt__Q24rstl40listFv" +"__dt__Q24rstl40listFv": /* 8005ACD0 00057C30 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8005ACD4 00057C34 7C 08 02 A6 */ mflr r0 /* 8005ACD8 00057C38 90 01 00 24 */ stw r0, 0x24(r1) diff --git a/configure.py b/configure.py index 02f577e5..8d605a75 100755 --- a/configure.py +++ b/configure.py @@ -53,7 +53,7 @@ LIBS = [ ["MetroidPrime/Tweaks/CTweakParticle", True], "MetroidPrime/Clamp_int", ["MetroidPrime/CArchMsgParmControllerStatus", True], - ["MetroidPrime/CExplosion", False], + ["MetroidPrime/CExplosion", True], ["MetroidPrime/CEffect", True], "MetroidPrime/Cameras/CGameCamera", "MetroidPrime/CGameArea", diff --git a/include/MetroidPrime/CExplosion.hpp b/include/MetroidPrime/CExplosion.hpp index d3eb7bf7..c835bb6f 100644 --- a/include/MetroidPrime/CExplosion.hpp +++ b/include/MetroidPrime/CExplosion.hpp @@ -33,6 +33,9 @@ public: void Render(const CStateManager&) const override; void CalculateRenderBounds() override; + TUniqueId GetExplosionLightId() const { return xec_explosionLight; } + uint GetSourceId() const { return xf0_sourceId; } + public: rstl::single_ptr< CParticleGen > xe8_particleGen; TUniqueId xec_explosionLight; diff --git a/src/MetroidPrime/CExplosion.cpp b/src/MetroidPrime/CExplosion.cpp index 170c4ce3..0e474281 100644 --- a/src/MetroidPrime/CExplosion.cpp +++ b/src/MetroidPrime/CExplosion.cpp @@ -121,7 +121,7 @@ void CExplosion::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CSt CActor::AcceptScriptMsg(msg, sender, mgr); if (xec_explosionLight != kInvalidUniqueId) - mgr.SendScriptMsgAlways(sender, xec_explosionLight, msg); + mgr.SendScriptMsgAlways(xec_explosionLight, sender, msg); } void CExplosion::CalculateRenderBounds() { @@ -152,5 +152,3 @@ void CExplosion::Render(const CStateManager& mgr) const { mgr.SetupFogForArea(GetCurrentAreaId()); CElementGen::SetSubtractBlend(false); } - -// bool CExplosion::CanRenderUnsorted(const CStateManager&) const { return false; }