mirror of
https://github.com/zeldaret/st
synced 2026-08-14 12:33:50 -04:00
ActorUnkRMSD: Unify code structure between RMSX files (#94)
* feat: Unify code structure to fit other RMSX files fix: Change type of ActorUnkRMSD.mUnk_158 that was too big to unk32 as placeholder * feat: Apply patch from Yanis Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * fix: Update code to get rid of GetResource and use new function * Update src/063_Shrine/Actor/ActorUnkRMSD.cpp Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com> * Merge branch 'main' into ActorUnkRMSD * fix: Format file * feat: Rename RMSX base class --------- Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com>
This commit is contained in:
@@ -112,14 +112,6 @@ MapObjectProfile_Derived2_20_Base *func_ov031_020f1404() {
|
||||
return data_027e0ce0->mUnk_1C->mUnk_0C;
|
||||
}
|
||||
|
||||
inline G3d_Model *GetResource(char *str) {
|
||||
return (G3d_Model *) G3d_GetUnkPtr(func_ov031_020f1404()->mUnk_50, str);
|
||||
}
|
||||
|
||||
inline G3d_Model *GetResource() {
|
||||
return (G3d_Model *) G3d_GetUnkPtr(func_ov031_020f1404()->mUnk_50, data_ov031_02110b5c);
|
||||
}
|
||||
|
||||
DECL_PROFILE(ActorProfileShotArrow);
|
||||
|
||||
Actor *ActorProfileShotArrow::Create() {
|
||||
@@ -133,8 +125,9 @@ ActorProfileShotArrow::ActorProfileShotArrow() :
|
||||
|
||||
ActorShotArrow::ActorShotArrow() :
|
||||
mUnk_9C(true),
|
||||
mUnk_A0(GetResource()),
|
||||
mUnk_100(&this->mUnk_120, GetResource(), func_ov031_020f1404()->func_ov000_02058a84(0, data_ov031_02110b08)),
|
||||
mUnk_A0(GetModelFromProfile3(func_ov031_020f1404(), data_ov031_02110b5c)),
|
||||
mUnk_100(&this->mUnk_120, GetModelFromProfile3(func_ov031_020f1404(), data_ov031_02110b5c),
|
||||
func_ov031_020f1404()->func_ov000_02058a84(0, data_ov031_02110b08)),
|
||||
mUnk_140(this),
|
||||
mUnk_168(0),
|
||||
mUnk_16C(0),
|
||||
@@ -639,15 +632,15 @@ void ActorShotArrow::func_ov031_020f2654(Mat3p *param1) {}
|
||||
void ActorShotArrow::func_ov031_020f2794(unk16 param1) {
|
||||
switch (param1) {
|
||||
case 0x0:
|
||||
this->mUnk_94.vfunc_08(GetResource(data_ov031_02110b3c));
|
||||
this->mUnk_94.vfunc_08(GetModelFromProfile3(func_ov031_020f1404(), data_ov031_02110b3c));
|
||||
this->mUnk_25A = false;
|
||||
break;
|
||||
case 0x1:
|
||||
this->mUnk_94.vfunc_08(GetResource(data_ov031_02110b4c));
|
||||
this->mUnk_94.vfunc_08(GetModelFromProfile3(func_ov031_020f1404(), data_ov031_02110b4c));
|
||||
this->mUnk_25A = false;
|
||||
break;
|
||||
case 0x2:
|
||||
this->mUnk_94.vfunc_08(GetResource(data_ov031_02110b4c));
|
||||
this->mUnk_94.vfunc_08(GetModelFromProfile3(func_ov031_020f1404(), data_ov031_02110b4c));
|
||||
this->mUnk_25A = true;
|
||||
func_ov000_02057c98(&this->mUnk_A0, &this->mUnk_100);
|
||||
break;
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
#include "Actor/ActorUnkRMSD.hpp"
|
||||
|
||||
#include "Render/ModelRender.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "nns/g3d/g3d.h"
|
||||
#include "profile.hpp"
|
||||
|
||||
extern "C" void func_ov073_0215bb34(ActorUnkRMSD *);
|
||||
|
||||
DECL_PROFILE(ActorProfileUnkRMSD);
|
||||
|
||||
char data_ov063_021625d8[0x10] = "RMSD_wall";
|
||||
char data_ov063_021625e8[0x10] = "RMSD";
|
||||
char data_ov063_021625d8[0x10]; // = "RMSD_wall";
|
||||
char data_ov063_021625e8[0x10]; // = "RMSD";
|
||||
|
||||
Actor *ActorProfileUnkRMSD::Create() {
|
||||
return new(HeapIndex_2) ActorUnkRMSD();
|
||||
@@ -19,6 +20,10 @@ Actor *ActorProfileUnkRMSD::Create() {
|
||||
ActorProfileUnkRMSD::ActorProfileUnkRMSD() :
|
||||
ActorProfile_Derived1(ActorId_RMSD) {}
|
||||
|
||||
ActorUnkRMSBase::ActorUnkRMSBase() :
|
||||
mUnk_94(NULL),
|
||||
mUnk_F4(NULL) {}
|
||||
|
||||
ActorUnkRMSD::ActorUnkRMSD() {
|
||||
ActorProfileUnkRMSD *r0 = GET_PROFILE(ActorProfileUnkRMSD);
|
||||
r0->vfunc_04();
|
||||
@@ -27,18 +32,18 @@ ActorUnkRMSD::ActorUnkRMSD() {
|
||||
void ActorUnkRMSD::func_ov063_0215c408(void) {}
|
||||
|
||||
void ActorUnkRMSD::func_ov063_0215c45c(void) {
|
||||
this->mUnk_158.vfunc_34();
|
||||
(*(Actor *) &this->mUnk_158).vfunc_34(); // Not an Actor
|
||||
}
|
||||
void ActorUnkRMSD::func_ov063_0215c474(void) {
|
||||
this->vfunc_20();
|
||||
}
|
||||
|
||||
void *ActorUnkRMSD::func_ov063_0215c488(void) {
|
||||
return G3d_GetUnkPtr(GET_PROFILE(ActorProfileUnkRMSD)->mUnk_3C.mUnk_50, data_ov063_021625e8);
|
||||
G3d_Model *ActorUnkRMSD::func_ov063_0215c488(void) {
|
||||
return GetModelFromProfile3(&GET_PROFILE(ActorProfileUnkRMSD)->mUnk_3C, data_ov063_021625e8);
|
||||
}
|
||||
|
||||
void *ActorUnkRMSD::func_ov063_0215c4c8(void) {
|
||||
return G3d_GetUnkPtr(GET_PROFILE(ActorProfileUnkRMSD)->mUnk_3C.mUnk_50, data_ov063_021625d8);
|
||||
G3d_Model *ActorUnkRMSD::func_ov063_0215c4c8(void) {
|
||||
return GetModelFromProfile3(&GET_PROFILE(ActorProfileUnkRMSD)->mUnk_3C, data_ov063_021625d8);
|
||||
}
|
||||
|
||||
ActorUnkRMSD::~ActorUnkRMSD() {}
|
||||
|
||||
Reference in New Issue
Block a user