Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/eur/arm9/overlays/ov063/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ _ZTV19data_ov063_021633c4 kind:data(any) addr:0x021633c4
_ZTV19data_ov063_02163428 kind:data(any) addr:0x02163428
_ZTV19data_ov063_0216344c kind:data(any) addr:0x0216344c
data_ov063_021634b0 kind:data(any) addr:0x021634b0
_ZTV19data_ov063_021634c8 kind:data(any) addr:0x021634c8
_ZTV19data_ov063_021634ec kind:data(any) addr:0x021634ec
_ZTV19ActorProfileUnkRMSD kind:data(any) addr:0x021634c8
_ZTV12ActorUnkRMSD kind:data(any) addr:0x021634ec
_ZTV19data_ov063_02163510 kind:data(any) addr:0x02163510 ambiguous
_ZTV19data_ov063_02163550 kind:data(any) addr:0x02163550
_ZTV19data_ov063_02163574 kind:data(any) addr:0x02163574
Expand Down
4 changes: 2 additions & 2 deletions config/jp/arm9/overlays/ov063/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ data_ov063_02165248 kind:data(any) addr:0x02165248 ambiguous
_ZTV19data_ov063_02165248 kind:data(any) addr:0x02165248
_ZTV19data_ov063_0216526c kind:data(any) addr:0x0216526c
data_ov063_021652d0 kind:data(any) addr:0x021652d0
_ZTV19data_ov063_021652e8 kind:data(any) addr:0x021652e8
_ZTV19data_ov063_0216530c kind:data(any) addr:0x0216530c
_ZTV19ActorProfileUnkRMSD kind:data(any) addr:0x021652e8
_ZTV12ActorUnkRMSD kind:data(any) addr:0x0216530c
_ZTV19data_ov063_02165370 kind:data(any) addr:0x02165370
_ZTV19data_ov063_02165394 kind:data(any) addr:0x02165394
_ZTV19data_ov063_021653f8 kind:data(any) addr:0x021653f8
Expand Down
24 changes: 18 additions & 6 deletions include/Actor/ActorUnkRMSD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "Render/ModelRender.hpp"
#include "Unknown/Common.hpp"
#include "global.h"
#include "nns/g3d/g3d.h"
#include "types.h"

class ActorUnkRMSD_C4 : public Actor_C4 {
Expand All @@ -20,12 +21,23 @@ class ActorUnkRMSD_C4 : public Actor_C4 {
/* 0C */ virtual void vfunc_0C(unk32 param1) override;
};

class ActorUnkRMSD : public Actor {
class ActorUnkRMSBase : public Actor {
public:
/* 00 (base) */
/* 94 */ unk8 mUnk_94;
/* 95 */ STRUCT_PAD(0x95, 0x158);
/* 158 */ Actor mUnk_158;
/* 94 */ ModelRender mUnk_94;
/* F4 */ ModelRender mUnk_F4;
/* 154 */ unk32 mUnk_154;
/* 158 */

ActorUnkRMSBase();
};

class ActorUnkRMSD : public ActorUnkRMSBase {
public:
/* 00 (base) */
/* 158 */ unk32 mUnk_158; //! INFO: Some class with a vfunc_34
/* 15C */ STRUCT_PAD(0x15C, 0x1D4); //! INFO: Force alignment to match ::Create
/* 1D4 */

ActorUnkRMSD();

Expand All @@ -34,8 +46,8 @@ class ActorUnkRMSD : public Actor {
void func_ov063_0215c408(void);
void func_ov063_0215c45c(void);
void func_ov063_0215c474(void);
void *func_ov063_0215c488(void); //! TODO: G3d_Model?
void *func_ov063_0215c4c8(void); //! TODO: G3d_Model?
G3d_Model *func_ov063_0215c488(void); //! INFO: G3d_Model deduced from RMSF
G3d_Model *func_ov063_0215c4c8(void); //! INFO: same as above
};

class ActorProfileUnkRMSD : public ActorProfile_Derived1 {
Expand Down
81 changes: 0 additions & 81 deletions include/Unknown/Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,22 +839,6 @@ class UnkSystem2_UnkSubSystem8 : public UnkSystem2_UnkSubSystem8_Base {
/* 04 */ virtual void vfunc_04() override;
};

class UnkSystem3 {
public:
/* 00 */ void *mUnk_00;
/* 04 */ void *mUnk_04;
/* 08 */ unk32 mUnk_08;
/* 0C */

UnkSystem3(const char *path, unk32 param2);
UnkSystem3(const char *path, unk32 param2, unk32 param3, unk32 param4);
~UnkSystem3();

void func_02015410(const char *path, unk32 param2);
void func_0201541c(const char *param1, unk32 param2);
void func_02015460(const char *param1, void *param2, unk32 param3);
};

class UnkStruct2 {
public:
/* 00 */ unk32 mUnk_00;
Expand Down Expand Up @@ -1151,71 +1135,6 @@ struct InputInformations {
void *unk_0C;
};

class MapObjectProfile_Derived2_20_Base_18 {
public:
/* 00 */ const char *mUnk_00;
/* 04 */ unk32 mUnk_04;
/* 08 */

MapObjectProfile_Derived2_20_Base_18(); // func_02016620
~MapObjectProfile_Derived2_20_Base_18();
};

class MapObjectProfile_Derived2_20_Base_54 {
public:
/* 00 (vtable) */
/* 04 */ const char *mUnk_04;
/* 08 */ unk32 mUnk_08;
/* 0C */ unk32 mUnk_0C;
/* 10 */

MapObjectProfile_Derived2_20_Base_54();
~MapObjectProfile_Derived2_20_Base_54();

/* 00 */ virtual void vfunc_00();
/* 04 */ virtual void vfunc_04();
/* 08 */ virtual void vfunc_08(unk32 param1);
/* 0C */ virtual void vfunc_0C();
};

class MapObjectProfile_Derived2_20_Base {
public:
/* 00 (vtable) */
/* 04 */ const char *mDirName;
/* 08 */ const char *mArchiveName;
/* 0C */ void *mUnk_0C;
/* 10 */ void *mUnk_10;
/* 14 */ u8 mUnk_14;
/* 15 */ u8 mUnk_15;
/* 16 */ u8 mUnk_16;
/* 17 */ u8 mUnk_17;
/* 18 */ MapObjectProfile_Derived2_20_Base_18 mUnk_18;
/* 20 */ UnkSystem3 mUnk_20;
/* 2C */ UnkFileSystem3 mUnk_2C;
/* 3C */ UnkFileSystem5 mUnk_3C;
/* 50 */ BMDSectionModel *mUnk_50;
/* 54 */ MapObjectProfile_Derived2_20_Base_54 mUnk_54[4];
/* 94 */

MapObjectProfile_Derived2_20_Base(const char *directory, const char *archiveName, const char *param3, const char *param4,
unk32 param5,
unk32 param6); // func_ov000_02058540

// data_ov000_020b1b14
/* 00 */ virtual ~MapObjectProfile_Derived2_20_Base();
/* 08 */

void func_ov000_020586b4(unk32 param1, unk32 param2, unk32 param3, unk32 param4);
void func_ov000_020588f0(void *param1, unk32 param2, unk32 param3, void *param4);
void func_ov000_02058900(void);
void func_ov000_02058914(void *param1);
void func_ov000_020589e4(void);
unk32 func_ov000_02058a24();
void unc_ov000_02058a58(void);
unk32 func_ov000_02058a84(unk32 param1, const char *param2);
void func_ov000_02058ab0(void);
};

class MapObjectProfile_Derived5 : public MapObjectProfile_Derived2_20_Base {
public:
/* 00 (base) */
Expand Down
88 changes: 88 additions & 0 deletions include/profile.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,91 @@
#pragma once

#include "Unknown/UnkFileSystem.hpp"
#include "types.h"
#include <nns/g3d/g3d.h>

//! TODO: doesn't belong here but since we don't know what it is...
class UnkSystem3 {
public:
/* 00 */ void *mUnk_00;
/* 04 */ void *mUnk_04;
/* 08 */ unk32 mUnk_08;
/* 0C */

UnkSystem3(const char *path, unk32 param2);
UnkSystem3(const char *path, unk32 param2, unk32 param3, unk32 param4);
~UnkSystem3();

void func_02015410(const char *path, unk32 param2);
void func_0201541c(const char *param1, unk32 param2);
void func_02015460(const char *param1, void *param2, unk32 param3);
};

class MapObjectProfile_Derived2_20_Base_18 {
public:
/* 00 */ const char *mUnk_00;
/* 04 */ unk32 mUnk_04;
/* 08 */

MapObjectProfile_Derived2_20_Base_18(); // func_02016620
~MapObjectProfile_Derived2_20_Base_18();
};

class MapObjectProfile_Derived2_20_Base_54 {
public:
/* 00 (vtable) */
/* 04 */ const char *mUnk_04;
/* 08 */ unk32 mUnk_08;
/* 0C */ unk32 mUnk_0C;
/* 10 */

MapObjectProfile_Derived2_20_Base_54();
~MapObjectProfile_Derived2_20_Base_54();

/* 00 */ virtual void vfunc_00();
/* 04 */ virtual void vfunc_04();
/* 08 */ virtual void vfunc_08(unk32 param1);
/* 0C */ virtual void vfunc_0C();
};

class MapObjectProfile_Derived2_20_Base {
public:
/* 00 (vtable) */
/* 04 */ const char *mDirName;
/* 08 */ const char *mArchiveName;
/* 0C */ void *mUnk_0C;
/* 10 */ void *mUnk_10;
/* 14 */ u8 mUnk_14;
/* 15 */ u8 mUnk_15;
/* 16 */ u8 mUnk_16;
/* 17 */ u8 mUnk_17;
/* 18 */ MapObjectProfile_Derived2_20_Base_18 mUnk_18;
/* 20 */ UnkSystem3 mUnk_20;
/* 2C */ UnkFileSystem3 mUnk_2C;
/* 3C */ UnkFileSystem5 mUnk_3C;
/* 50 */ BMDSectionModel *mUnk_50;
/* 54 */ MapObjectProfile_Derived2_20_Base_54 mUnk_54[4];
/* 94 */

MapObjectProfile_Derived2_20_Base(const char *directory, const char *archiveName, const char *param3, const char *param4,
unk32 param5,
unk32 param6); // func_ov000_02058540

// data_ov000_020b1b14
/* 00 */ virtual ~MapObjectProfile_Derived2_20_Base();
/* 08 */

void func_ov000_020586b4(unk32 param1, unk32 param2, unk32 param3, unk32 param4);
void func_ov000_020588f0(void *param1, unk32 param2, unk32 param3, void *param4);
void func_ov000_02058900(void);
void func_ov000_02058914(void *param1);
void func_ov000_020589e4(void);
unk32 func_ov000_02058a24();
void unc_ov000_02058a58(void);
unk32 func_ov000_02058a84(unk32 param1, const char *param2);
void func_ov000_02058ab0(void);
};

#define GET_PROFILE(T) (&ProfileInstance<T>::sProfile)
#define GET_PROFILE_20(T) (&ProfileInstance<T>::sProfile.mUnk_20)
#define GET_PROFILE_20_50(T) (ProfileInstance<T>::sProfile.mUnk_20.mUnk_50)
Expand All @@ -26,3 +110,7 @@ template <typename T> static inline G3d_Model *GetModelFromProfile2(s32 param1,
pProfile->func_ov000_0209ccd8(param1, resId);
return G3d_GetModelPtr((BMDSectionModel *) pProfile->mUnk_20[param1]->mUnk_50);
}

static inline G3d_Model *GetModelFromProfile3(MapObjectProfile_Derived2_20_Base *param1, const char *name) {
return G3d_GetUnkPtr(param1->mUnk_50, name);
}
5 changes: 2 additions & 3 deletions libs/nns/include/nns/g3d/g3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,12 @@ static inline G3d_Model *G3d_GetModelPtr(const BMDSectionModel *pSection) {
return G3d_GetModelVariantPtr(pSection, 0);
}

//! TODO: returns `G3d_Model*`?
static inline void *G3d_GetUnkPtr(const BMDSectionModel *pSection, const char *name) {
static inline G3d_Model *G3d_GetUnkPtr(const BMDSectionModel *pSection, const char *name) {
if (pSection != NULL) {
u32 *pOffset = G3d_0200f05c(&pSection->modelList, name);

if (pOffset != NULL) {
return (void *) ((u8 *) pSection + *pOffset);
return (G3d_Model *) ((u8 *) pSection + *pOffset);
}
}

Expand Down
19 changes: 6 additions & 13 deletions src/031_Land/Actor/ActorShotArrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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),
Expand Down Expand Up @@ -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;
Expand Down
21 changes: 13 additions & 8 deletions src/063_Shrine/Actor/ActorUnkRMSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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() {}
Expand Down
Loading