summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorenzofc708 <47937189+enzofc708@users.noreply.github.com>2026-01-30 12:30:17 -0300
committerGitHub <noreply@github.com>2026-01-30 16:30:17 +0100
commit63b823ef2ccfcf2c0bf4223832c34f4528ee4907 (patch)
tree4469fa649defa418cb87451af4545ca86b7e70a7 /include
parent90b0175de6ef7e8aa6573e6dc4b41ef7925efc6b (diff)
Decomp ModelRender (#139)
* decomp ModelRender * fix ModelRender function name * fix other ModelRender references * reloc vtables * fix ModelRender obect size * fix matches * match 100%
Diffstat (limited to 'include')
-rw-r--r--include/Actor/Navi/ActorNavi.hpp4
-rw-r--r--include/Render/ModelRender.hpp70
2 files changed, 51 insertions, 23 deletions
diff --git a/include/Actor/Navi/ActorNavi.hpp b/include/Actor/Navi/ActorNavi.hpp
index 4dbad5fe..841c91f1 100644
--- a/include/Actor/Navi/ActorNavi.hpp
+++ b/include/Actor/Navi/ActorNavi.hpp
@@ -45,9 +45,7 @@ public:
/* 344 */ q20 mUnk_344;
/* 348 */ unk32 mUnk_348;
/* 34c */ ActorNaviBase_Unk1 mUnk_34c[4];
- /* 35c */ unk8 mUnk_35c[0x28];
- /* 384 */ Mat3p mUnk_384;
- /* 3a8 */ unk8 mUnk_3a8[0xC];
+ /* 35c */ ModelRender_UnkBoneMatrixStruct unkBoneMatrixStruct;
/* 3b4 */ EquipHammer *mHammer;
/* 3b8 */ UnkStruct_02057200 mUnk_3b8;
/* 3c0 */ u8 mUnk_3c0;
diff --git a/include/Render/ModelRender.hpp b/include/Render/ModelRender.hpp
index 8698d5b9..d0fca92a 100644
--- a/include/Render/ModelRender.hpp
+++ b/include/Render/ModelRender.hpp
@@ -8,46 +8,76 @@
#include "System/SysNew.hpp"
#include "Unknown/UnkStruct_ov000_020c0c08.hpp"
+class ModelRender;
+
+struct ModelRender_UnkBoneMatrixStruct {
+ /* 00 */ unk8 mUnk_00[0x28];
+ /* 28 */ Mat3p mUnk_28;
+ /* 4c */ unk8 mUnk_4c[0xC];
+ /* 58 */
+};
+
+struct ModelRender_UnkStruct_4 {
+ /* 00 */ unk32 flags;
+ /* 04 */ void *mLcdcAddr;
+ /* 08 */ void *mUnk_08; // this attribute is related to UnkStruct_ov000_020c0c08
+ /* 0c */ void *mUnkTransformFunc;
+ /* 10 */ void *mUnk_10; // also related to UnkStruct_ov000_020c0c08
+ /* 14 */ void *mUnkMaterialFunc;
+ /* 18 */ void *mUnk_18; // also related to UnkStruct_ov000_020c0c08
+ /* 1c */ void *mUnkVisibilityFunc;
+ /* 20 */ void *mUnkFunc_20;
+ /* 24 */ unk8 mUnk_24;
+ /* 25 */ unk8 mUnk_25;
+ /* 26 */ unk8 mUnk_26[2];
+ /* 28 */ void *mUnk_28;
+ /* 2c */ ModelRender *mUnk_2c; // pointer to self?
+ /* 30 */ unk32 mUnk_30;
+ /* 34 */ ModelRender_UnkBoneMatrixStruct *unkBoneMatrixArray1;
+ /* 38 */ unk32 mUnk_38[3];
+ /* 44 */ unk32 mUnk_44[2];
+ /* 4c */ unk32 mUnk_4c[2];
+ /* 54 */
+};
+
+struct ModelRenderCommandsData {
+ /* 00 */ u8 command;
+ /* 04 */ ModelRender_UnkStruct_4 *unkStruct4;
+ /* 08 */
+};
+
class ItemModel;
class ModelRender : public SysObject {
public:
/* 00 (vtable) */
- /* 04 */ u32 mUnk_04;
- /* 08 */ void *mLcdcAddr;
- /* 0c */ s32 mUnk_0c;
- /* 10 */ unk32 mUnk_10;
- /* 14 */ s32 mUnk_14;
- /* 18 */ unk32 mUnk_18;
- /* 1c */ s32 mUnk_1c;
- /* 20 */ unk8 mUnk_20[0x38];
- /* 58 */ void *mUnk_58;
+ /* 04 */ ModelRender_UnkStruct_4 mUnk_04;
+ /* 58 */ ModelRender_UnkBoneMatrixStruct *unkBoneMatrixArray2;
/* 5c */
/* 00 */ virtual ~ModelRender();
/* 08 */ virtual void *GetLcdcAddress();
- /* 0c */ virtual void vfunc_0c(ItemModel *model);
+ /* 0c */ virtual void Init_ModelRender_UnkStruct_4(ItemModel *model);
/* 10 */ virtual void SetTransform(Vec3p *scale, Mat3p *rotation, Vec3p *translation);
/* 14 */ virtual void SetRotationTranslation(Mat3p *rotation, Vec3p *translation);
/* 18 */ virtual void SetTranslation(Vec3p *translation);
/* 1c */ virtual void PushGeometryCommands();
- /* 20 */ virtual void vfunc_20();
+ /* 20 */ virtual void ExecRenderCommands(); // Reads the NSBMD Render Commands and push instructions to the FIFO
/* 24 */ virtual void vfunc_24(UnkStruct_ov000_020c0c08 *param1);
/* 28 */ virtual void vfunc_28();
/* 2c */ virtual void vfunc_2c();
/* 30 */ virtual void vfunc_30();
/* 34 */ virtual void vfunc_34();
/* 38 */ virtual void vfunc_38();
- /* 3c */ virtual void vfunc_3c();
+ /* 3c */ virtual void vfunc_3c(ModelRenderCommandsData *renderData);
/* 40 */
- ModelRender(ItemModel *param1);
- void *func_ov000_020a9624(s32 param1);
- void func_ov000_020a98e8(unk32 param1);
- void func_ov000_020a990c(unk32 param1);
- void func_ov000_020a9938(unk32 param1);
- void func_ov000_020a9960(void *param1);
- void func_ov000_020a9998(unk32 param1, unk32 param2);
- void func_ov000_020a99c0();
+ ModelRender(ItemModel *itemModel);
+ ModelRender_UnkBoneMatrixStruct *UnkGetBoneMatrix(s32 index);
+ s32 GetObjectIndex(char *objectName);
+ s32 GetMaterialIndex(char *materialName);
+ void InitBoneMatrixArrays(u32 idLength);
+ void SetUnkBoneMatrixArray1(ModelRender_UnkBoneMatrixStruct *boneMatrix);
+ void UnkInit_Struct4_Params(u8 param1, u8 param2);
void func_ov000_020b413c(unk16 param1, Vec3p *param2);
};