Add CEffect

Former-commit-id: 4b593647d6
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-14 02:06:56 +03:00
parent 7391174814
commit a7ca62c0dc
6 changed files with 35 additions and 19 deletions

View File

@ -3,8 +3,8 @@
.section .data .section .data
.balign 8 .balign 8
.global lbl_803DA118 .global __vt__7CEffect
lbl_803DA118: __vt__7CEffect:
# ROM: 0x3D7118 # ROM: 0x3D7118
.4byte 0 .4byte 0
.4byte 0 .4byte 0
@ -15,8 +15,8 @@ lbl_803DA118:
.4byte AcceptScriptMsg__6CActorF20EScriptObjectMessage9TUniqueIdR13CStateManager .4byte AcceptScriptMsg__6CActorF20EScriptObjectMessage9TUniqueIdR13CStateManager
.4byte SetActive__6CActorFb .4byte SetActive__6CActorFb
.4byte PreRender__6CActorFR13CStateManagerRC14CFrustumPlanes .4byte PreRender__6CActorFR13CStateManagerRC14CFrustumPlanes
.4byte nullsub_83 .4byte AddToRenderer__7CEffectCFRC14CFrustumPlanesRC13CStateManager
.4byte nullsub_84 .4byte Render__7CEffectCFRC13CStateManager
.4byte CanRenderUnsorted__6CActorCFRC13CStateManager .4byte CanRenderUnsorted__6CActorCFRC13CStateManager
.4byte CalculateRenderBounds__6CActorFv .4byte CalculateRenderBounds__6CActorFv
.4byte HealthInfo__6CActorFR13CStateManager .4byte HealthInfo__6CActorFR13CStateManager
@ -83,12 +83,12 @@ lbl_8005AD28:
/* 8005AD40 00057CA0 38 21 00 20 */ addi r1, r1, 0x20 /* 8005AD40 00057CA0 38 21 00 20 */ addi r1, r1, 0x20
/* 8005AD44 00057CA4 4E 80 00 20 */ blr /* 8005AD44 00057CA4 4E 80 00 20 */ blr
.global nullsub_83 .global AddToRenderer__7CEffectCFRC14CFrustumPlanesRC13CStateManager
nullsub_83: AddToRenderer__7CEffectCFRC14CFrustumPlanesRC13CStateManager:
/* 8005AD48 00057CA8 4E 80 00 20 */ blr /* 8005AD48 00057CA8 4E 80 00 20 */ blr
.global nullsub_84 .global Render__7CEffectCFRC13CStateManager
nullsub_84: Render__7CEffectCFRC13CStateManager:
/* 8005AD4C 00057CAC 4E 80 00 20 */ blr /* 8005AD4C 00057CAC 4E 80 00 20 */ blr
.global "__ct__7CEffectF9TUniqueIdRC11CEntityInfobRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC12CTransform4f" .global "__ct__7CEffectF9TUniqueIdRC11CEntityInfobRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC12CTransform4f"
@ -143,9 +143,9 @@ nullsub_84:
/* 8005AE0C 00057D6C 38 61 00 88 */ addi r3, r1, 0x88 /* 8005AE0C 00057D6C 38 61 00 88 */ addi r3, r1, 0x88
/* 8005AE10 00057D70 38 80 FF FF */ li r4, -1 /* 8005AE10 00057D70 38 80 FF FF */ li r4, -1
/* 8005AE14 00057D74 48 0B BC 39 */ bl __dt__10CModelDataFv /* 8005AE14 00057D74 48 0B BC 39 */ bl __dt__10CModelDataFv
/* 8005AE18 00057D78 3C 80 80 3E */ lis r4, lbl_803DA118@ha /* 8005AE18 00057D78 3C 80 80 3E */ lis r4, __vt__7CEffect@ha
/* 8005AE1C 00057D7C 7F E3 FB 78 */ mr r3, r31 /* 8005AE1C 00057D7C 7F E3 FB 78 */ mr r3, r31
/* 8005AE20 00057D80 38 04 A1 18 */ addi r0, r4, lbl_803DA118@l /* 8005AE20 00057D80 38 04 A1 18 */ addi r0, r4, __vt__7CEffect@l
/* 8005AE24 00057D84 90 1F 00 00 */ stw r0, 0(r31) /* 8005AE24 00057D84 90 1F 00 00 */ stw r0, 0(r31)
/* 8005AE28 00057D88 BB 41 00 D8 */ lmw r26, 0xd8(r1) /* 8005AE28 00057D88 BB 41 00 D8 */ lmw r26, 0xd8(r1)
/* 8005AE2C 00057D8C 80 01 00 F4 */ lwz r0, 0xf4(r1) /* 8005AE2C 00057D8C 80 01 00 F4 */ lwz r0, 0xf4(r1)

View File

@ -583,9 +583,9 @@ __dt__10CExplosionFv:
lbl_8005A890: lbl_8005A890:
/* 8005A890 000577F0 28 1E 00 00 */ cmplwi r30, 0 /* 8005A890 000577F0 28 1E 00 00 */ cmplwi r30, 0
/* 8005A894 000577F4 41 82 00 1C */ beq lbl_8005A8B0 /* 8005A894 000577F4 41 82 00 1C */ beq lbl_8005A8B0
/* 8005A898 000577F8 3C 80 80 3E */ lis r4, lbl_803DA118@ha /* 8005A898 000577F8 3C 80 80 3E */ lis r4, __vt__7CEffect@ha
/* 8005A89C 000577FC 7F C3 F3 78 */ mr r3, r30 /* 8005A89C 000577FC 7F C3 F3 78 */ mr r3, r30
/* 8005A8A0 00057800 38 04 A1 18 */ addi r0, r4, lbl_803DA118@l /* 8005A8A0 00057800 38 04 A1 18 */ addi r0, r4, __vt__7CEffect@l
/* 8005A8A4 00057804 38 80 00 00 */ li r4, 0 /* 8005A8A4 00057804 38 80 00 00 */ li r4, 0
/* 8005A8A8 00057808 90 1E 00 00 */ stw r0, 0(r30) /* 8005A8A8 00057808 90 1E 00 00 */ stw r0, 0(r30)
/* 8005A8AC 0005780C 4B FF AE 45 */ bl __dt__6CActorFv /* 8005A8AC 0005780C 4B FF AE 45 */ bl __dt__6CActorFv
@ -730,9 +730,9 @@ __dt__7CEffectFv:
/* 8005AAAC 00057A0C 93 C1 00 08 */ stw r30, 8(r1) /* 8005AAAC 00057A0C 93 C1 00 08 */ stw r30, 8(r1)
/* 8005AAB0 00057A10 7C 7E 1B 79 */ or. r30, r3, r3 /* 8005AAB0 00057A10 7C 7E 1B 79 */ or. r30, r3, r3
/* 8005AAB4 00057A14 41 82 00 28 */ beq lbl_8005AADC /* 8005AAB4 00057A14 41 82 00 28 */ beq lbl_8005AADC
/* 8005AAB8 00057A18 3C A0 80 3E */ lis r5, lbl_803DA118@ha /* 8005AAB8 00057A18 3C A0 80 3E */ lis r5, __vt__7CEffect@ha
/* 8005AABC 00057A1C 38 80 00 00 */ li r4, 0 /* 8005AABC 00057A1C 38 80 00 00 */ li r4, 0
/* 8005AAC0 00057A20 38 05 A1 18 */ addi r0, r5, lbl_803DA118@l /* 8005AAC0 00057A20 38 05 A1 18 */ addi r0, r5, __vt__7CEffect@l
/* 8005AAC4 00057A24 90 1E 00 00 */ stw r0, 0(r30) /* 8005AAC4 00057A24 90 1E 00 00 */ stw r0, 0(r30)
/* 8005AAC8 00057A28 4B FF AC 29 */ bl __dt__6CActorFv /* 8005AAC8 00057A28 4B FF AC 29 */ bl __dt__6CActorFv
/* 8005AACC 00057A2C 7F E0 07 35 */ extsh. r0, r31 /* 8005AACC 00057A2C 7F E0 07 35 */ extsh. r0, r31

View File

@ -387,9 +387,9 @@ lbl_8012FE84:
lbl_8012FEAC: lbl_8012FEAC:
/* 8012FEAC 0012CE0C 28 1E 00 00 */ cmplwi r30, 0 /* 8012FEAC 0012CE0C 28 1E 00 00 */ cmplwi r30, 0
/* 8012FEB0 0012CE10 41 82 00 1C */ beq lbl_8012FECC /* 8012FEB0 0012CE10 41 82 00 1C */ beq lbl_8012FECC
/* 8012FEB4 0012CE14 3C 80 80 3E */ lis r4, lbl_803DA118@ha /* 8012FEB4 0012CE14 3C 80 80 3E */ lis r4, __vt__7CEffect@ha
/* 8012FEB8 0012CE18 7F C3 F3 78 */ mr r3, r30 /* 8012FEB8 0012CE18 7F C3 F3 78 */ mr r3, r30
/* 8012FEBC 0012CE1C 38 04 A1 18 */ addi r0, r4, lbl_803DA118@l /* 8012FEBC 0012CE1C 38 04 A1 18 */ addi r0, r4, __vt__7CEffect@l
/* 8012FEC0 0012CE20 38 80 00 00 */ li r4, 0 /* 8012FEC0 0012CE20 38 80 00 00 */ li r4, 0
/* 8012FEC4 0012CE24 90 1E 00 00 */ stw r0, 0(r30) /* 8012FEC4 0012CE24 90 1E 00 00 */ stw r0, 0(r30)
/* 8012FEC8 0012CE28 4B F2 58 29 */ bl __dt__6CActorFv /* 8012FEC8 0012CE28 4B F2 58 29 */ bl __dt__6CActorFv

View File

@ -2188,9 +2188,9 @@ lbl_801B79E0:
lbl_801B7A08: lbl_801B7A08:
/* 801B7A08 001B4968 28 1E 00 00 */ cmplwi r30, 0 /* 801B7A08 001B4968 28 1E 00 00 */ cmplwi r30, 0
/* 801B7A0C 001B496C 41 82 00 1C */ beq lbl_801B7A28 /* 801B7A0C 001B496C 41 82 00 1C */ beq lbl_801B7A28
/* 801B7A10 001B4970 3C 80 80 3E */ lis r4, lbl_803DA118@ha /* 801B7A10 001B4970 3C 80 80 3E */ lis r4, __vt__7CEffect@ha
/* 801B7A14 001B4974 7F C3 F3 78 */ mr r3, r30 /* 801B7A14 001B4974 7F C3 F3 78 */ mr r3, r30
/* 801B7A18 001B4978 38 04 A1 18 */ addi r0, r4, lbl_803DA118@l /* 801B7A18 001B4978 38 04 A1 18 */ addi r0, r4, __vt__7CEffect@l
/* 801B7A1C 001B497C 38 80 00 00 */ li r4, 0 /* 801B7A1C 001B497C 38 80 00 00 */ li r4, 0
/* 801B7A20 001B4980 90 1E 00 00 */ stw r0, 0(r30) /* 801B7A20 001B4980 90 1E 00 00 */ stw r0, 0(r30)
/* 801B7A24 001B4984 4B E9 DC CD */ bl __dt__6CActorFv /* 801B7A24 001B4984 4B E9 DC CD */ bl __dt__6CActorFv

View File

@ -11,7 +11,11 @@ public:
const CTransform4f& xf); const CTransform4f& xf);
// CEntity // CEntity
~CEffect(); ~CEffect() {}
// CActor
virtual void AddToRenderer(const CFrustumPlanes&, const CStateManager&) const;
virtual void Render(const CStateManager&) const;
}; };
CHECK_SIZEOF(CEffect, 0xe8) CHECK_SIZEOF(CEffect, 0xe8)

View File

@ -0,0 +1,12 @@
#include "MetroidPrime/CEffect.hpp"
#include "MetroidPrime/CActorParameters.hpp"
CEffect::CEffect(TUniqueId uid, const CEntityInfo& info, bool active, const rstl::string& name,
const CTransform4f& xf)
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(kMT_NoStepLogic),
CActorParameters::None(), kInvalidUniqueId) {}
void CEffect::AddToRenderer(const CFrustumPlanes&, const CStateManager&) const {}
void CEffect::Render(const CStateManager&) const {}