mirror of
https://github.com/zeldaret/st
synced 2026-08-05 09:34:10 -04:00
7c266293a7
* feat: Start decompiling ActorUnkCANS ctor and vfunc_10 * feat: Improve vfunc_10 * feat: Decompile vfunc_18 and 1C * fix: Remove trailing return * feat: Progress on vfunc_20 * fix: Rename symbol * feat: Finish first run over vfunc_20 * feat: Improve vfunc_20 * feat: Improve vfunc_20 * feat: Heavily improve vfunc_20 Almost done * feat: Keep vfunc_20 going, add UnkAngleStruct to Actor.hpp * feat: Some polish on vfunc_20 That's about what I can do, there are some tweaks left but I'm unable to get anywhere. Kind of proud ngl * feat: Rename symbols and match vfunc_24 * fix: Fix jp symbol conflict * feat: Decompile vfunc_2C * feat: Fix symbols and signatures * fix: Match switch statement by adding every cases * feat: Match func_ov063_02157fa4 * feat: Match func_ov063_02158424 * feat: Match func_ov063_02158448 * feat: Match func_ov063_02158490 * feat: Match func_ov063_02158b0c * feat: Match func_ov063_02158b34 * feat: Decompile most of func_ov063_02158b98 (need regalloc fix) * feat: Create inner classes of ActorUnkCANS, match some vfuncs * feat: Update some dtor symbol and match some ctor * feat: Decompile UnkStruct 02162ee8 ctor * feat: Rename jp symbols * feat: Match func_ov063_021590c8 * feat: Match func_ov063_02159dfc * feat: Decompile some functions * fix: Fix old accesses * fix: More merge artifacts * fix: More merge artifacts * chore: Move structs around and fix some uses * feat: Start decompiling func_ov063_02158db0 * feat: Decompile some vfunc vfunc_0C is really really weird * fix: Fix use of removed struct * feat: Match func_ov063_02159258 * feat: Match func_ov063_02159494 * feat: Match func_ov063_021595a4 * feat: Match func_ov063_02159618 * feat: Match func_ov063_02159714 * feat: Match func_ov063_02159784 * fix: Move UnkAngleStruct to math.hpp * fix: .data of ActorRollingStone & ActorShotArrow * feat: Match func_ov063_021598fc * fix: Cleanup code for func_ov063_021598fc * feat: Match func_ov063_02159ca8 * feat: Match func_ov063_02159d68 * fix: Fix double declaration of func * feat: Match func_ov063_02159e20 * feat: Decompile most of func_ov063_02159ec0 * feat: Match func_ov063_0215a428 * feat: Match func_ov063_0215a474 * feat: Update lots of symbols (mainly for jp) * feat: Start decompiling two funcs with fx mul * fix: Fix broken symbol def after merge * feat: Match func_ov063_0215a514 * feat: Match func_ov063_0215a56c * feat: Match func_ov063_0215a5a0 * feat: Match func_ov063_0215a5bc * feat: Match func_ov063_0215a5d8 * feat: Decompile most of func_ov063_0215a678 * fix: Fix some regalloc order in func_ov063_0215a678 * feat: Update symbols and create unk class * feat: Update CANS member with the new class * feat: Update symbols, remove dead variables * feat: Improve ctor and some local struct layout * feat: Improve ActorUnkCANS ctor * fix: Fix ActorUnkCANS members layout * feat: Improve ActorUnkCANS ctor more * fix: Fix wrong symbol reloc * feat: Add intermediate struct and update symbols * feat: Match some jp only code, symbols * feat: Decompile part of func_ov063_0215a2c0 * fix: Fix jp only code in func_ov063_0215a2c0 * feat: Update symbols * feat: Cleanup unused functions * feat: Cleanup JP ifguards handling * feat: Remove lot of useless temps, use DEG_TO_ANG where it seems appropriate * feat: Small code cleanup * Apply suggestions from code review Co-authored-by: Alessevan <44125445+Alessevan@users.noreply.github.com> * fix: Fix style * feat: Apply suggestions from review * feat: More code cleanup * feat: Some more improvements * fix: Remove auto-generated comment headers * fix broken matches * fix broken matches 2 --------- Co-authored-by: Alessevan <44125445+Alessevan@users.noreply.github.com> Co-authored-by: Yanis002 <35189056+Yanis002@users.noreply.github.com>
215 lines
6.2 KiB
C++
215 lines
6.2 KiB
C++
#pragma once
|
|
|
|
#include "Actor/Actor.hpp"
|
|
#include "Actor/ActorProfile.hpp"
|
|
#include "Actor/ActorUnkCASE.hpp"
|
|
#include "Actor/ActorUnkZLSL_ZSRS.hpp"
|
|
#include "Actor/Actor_Derived1.hpp"
|
|
#include "Physics/Cylinder.hpp"
|
|
#include "Render/ModelRender.hpp"
|
|
#include "Unknown/UnkStruct_ov031_Items.hpp"
|
|
#include "global.h"
|
|
#include "nitro/fx.h"
|
|
#include "nitro/types.h"
|
|
#include "nns/g3d/g3d.h"
|
|
#include "types.h"
|
|
|
|
// Try to match vfunc_0C but poor results
|
|
struct UnkStruct_02162ea8_vfunc_0C {
|
|
/* 00 */ union {
|
|
unk32 mUnk_00;
|
|
Vec2bCpp vec;
|
|
};
|
|
/* 04 */ union {
|
|
unk32 mUnk_04;
|
|
struct {
|
|
u8 mUnk_04_0;
|
|
u8 mUnk_04_1;
|
|
u8 mUnk_04_2;
|
|
u8 mUnk_04_3;
|
|
};
|
|
};
|
|
};
|
|
|
|
class UnkStruct_ov063_02162ea8 : public UnkStruct_ov031_Items_00 {
|
|
public:
|
|
/* 00 (base) */
|
|
/* 04 */ STRUCT_PAD(0x4, 0x8);
|
|
/* 08 */ VecFx32 mUnk_08;
|
|
/* 14 */
|
|
|
|
UnkStruct_ov063_02162ea8();
|
|
|
|
/* 00 (base) */ virtual ~UnkStruct_ov063_02162ea8();
|
|
/* 08 */ virtual bool vfunc_08(UnkStruct_ov031_020f3310 *param1) override;
|
|
/* 0C */ virtual bool vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2, unk32 param3) override;
|
|
};
|
|
|
|
class UnkStruct_ov000_020b19f0 : public ModelRender {
|
|
public:
|
|
UnkStruct_ov000_020b19f0(G3d_Model *pModel);
|
|
};
|
|
|
|
class UnkStruct_ov000_020b3268 : public UnkStruct_ov000_020b19f0 {
|
|
public:
|
|
UnkStruct_ov000_020b3268(G3d_Model *pModel);
|
|
};
|
|
|
|
class UnkStruct_ov063_02162ee8 : public UnkStruct_ov000_020b3268 {
|
|
public:
|
|
/* 00 (base) */
|
|
/* 60 */ STRUCT_PAD(0x60, 0x6C);
|
|
/* 6C */ unk32 mUnk_6C;
|
|
/* 70 */ unk32 mUnk_70;
|
|
/* 74 */ unk32 mUnk_74;
|
|
/* 78 */
|
|
|
|
UnkStruct_ov063_02162ee8(G3d_Model *pModel);
|
|
};
|
|
|
|
class UnkStruct_ov063_02162f14 : public UnkStruct_ov000_020b31f0 {
|
|
public:
|
|
/* 2C */
|
|
/* 2C */ UnkSystem5 mUnk_2C;
|
|
/* 4C */ unk32 mUnk_4C;
|
|
/* 50 */ STRUCT_PAD(0x50, 0x7C);
|
|
/* 7C */ UnkSystem5 mUnk_7C;
|
|
/* 9C */ unk32 mUnk_9C;
|
|
|
|
UnkStruct_ov063_02162f14(void *param3, unk32 param4) :
|
|
UnkStruct_ov000_020b31f0(&mUnk_2C, &mUnk_7C, param3, param4),
|
|
mUnk_2C(&mUnk_4C, NULL),
|
|
mUnk_7C(&mUnk_9C, NULL) {
|
|
if (param4 != 0) {
|
|
*(unk32 *) &mUnk_7C = mUnk_10;
|
|
*(unk32 *) &mUnk_2C = mUnk_10;
|
|
}
|
|
}
|
|
|
|
/* 38 */ virtual void vfunc_38(unk32 param1, unk32 param2) override;
|
|
/* 3C */ virtual void vfunc_3C(void) override;
|
|
};
|
|
|
|
class UnkStruct_ov063_02162e88 : public Actor_9C {
|
|
public:
|
|
/* 20 */ void *mUnk_20; // ActorUnkCANS*
|
|
/* 24 */
|
|
|
|
UnkStruct_ov063_02162e88(void *param1);
|
|
|
|
/* 04 */ virtual unk32 vfunc_04(ActorRef param1, unk32 param2, unk32 param3, unk32 *param4) override;
|
|
};
|
|
|
|
class UnkStruct_func_ov063_0215a678 {
|
|
public:
|
|
/* 00 */ STRUCT_PAD(0x00, 0x04);
|
|
/* 04 */ ModelRender *mUnk_04; //! INFO: Placeholder that matches
|
|
/* 08 */ unk32 mUnk_08;
|
|
/* 0C */ STRUCT_PAD(0x0C, 0x92);
|
|
/* 92 */ s8 mUnk_92;
|
|
/* 93 */ STRUCT_PAD(0x93, 0xAE);
|
|
/* AE */ u8 mUnk_AE;
|
|
};
|
|
|
|
class UnkStruct_ActorUnkCANS_224 {
|
|
public:
|
|
/* 00 (base) */
|
|
/* 04 */
|
|
|
|
UnkStruct_ActorUnkCANS_224(); // func_ov000_02099820
|
|
};
|
|
|
|
class ActorUnkCANS : public Actor_Derived2 {
|
|
public:
|
|
/* 000 (base) */
|
|
/* 0AE */ STRUCT_PAD(0xAE, 0xB0);
|
|
/* 0B0 */ UnkStruct_ov063_02162ee8 mUnk_B0;
|
|
/* 128 */ UnkStruct_ov063_02162f14 mUnk_128;
|
|
/* 1C8 */ STRUCT_PAD(0x1C8, 0x1F4);
|
|
/* 1F4 */ Actor_Derived1_94 mUnk_1F4;
|
|
/* 200 */ UnkStruct_ov063_02162e88 mUnk_200;
|
|
/* 224 */ UnkStruct_ActorUnkCANS_224 mUnk_224;
|
|
/* 226 */ STRUCT_PAD(0x226, 0x22C);
|
|
/* 22C */ unk16 mUnk_22C;
|
|
/* 22E */ unk16 mUnk_22E;
|
|
/* 230 */ STRUCT_PAD(0x230, 0x234);
|
|
/* 234 */ volatile u16 mUnk_234;
|
|
/* 236 */ u16 mUnk_236;
|
|
/* 238 */ volatile u16 mUnk_238;
|
|
/* 23A */ u16 mUnk_23A;
|
|
/* 23C */ UnkStruct_ov063_02162ea8 mUnk_23C;
|
|
/* 250 */ VecFx32 mUnk_250;
|
|
/* 25C */ unk32 mUnk_25C;
|
|
/* 260 */ unk32 mUnk_260;
|
|
/* 264 */ unk32 mUnk_264;
|
|
/* 268 */ ActorUnkCASE *mUnk_268;
|
|
/* 26C */ fx16 mUnk_26C; // Some kind of angle, probably
|
|
/* 26E */ STRUCT_PAD(0x26E, 0x270);
|
|
/* 270 */ unk32 mUnk_270;
|
|
/* 274 */ u16 mUnk_274;
|
|
/* 276 */ s8 mUnk_276;
|
|
/* 277 */ s8 mUnk_277;
|
|
/* 278 */
|
|
|
|
ActorUnkCANS();
|
|
|
|
/* 10 */ virtual void vfunc_10(Cylinder *param1);
|
|
/* 18 */ virtual unk32 vfunc_18(void);
|
|
/* 1C */ virtual void vfunc_1C(void);
|
|
/* 20 */ virtual void vfunc_20(void);
|
|
/* 24 */ virtual void vfunc_24(void);
|
|
/* 2C */ virtual void vfunc_2C(unk32 param1);
|
|
/* 4C */ virtual ~ActorUnkCANS() override;
|
|
|
|
unk32 func_ov063_02157fa4(ActorRef param1, unk32 param2, unk32 param3, unk32 *param4);
|
|
void func_ov063_02158424(void);
|
|
void func_ov063_02158448(unk32 param1);
|
|
void func_ov063_02158490(void);
|
|
void func_ov063_02158b0c(void);
|
|
void func_ov063_02158b34(void);
|
|
void func_ov063_02158b98(void);
|
|
void func_ov063_02158d40(void);
|
|
void func_ov063_02158db0(void);
|
|
void func_ov063_021590c8(void);
|
|
void func_ov063_02159100(void);
|
|
void func_ov063_021591f4(void);
|
|
void func_ov063_02159258(void);
|
|
void func_ov063_02159408(void);
|
|
void func_ov063_02159494(void);
|
|
void func_ov063_021595a4(void);
|
|
void func_ov063_02159618(void);
|
|
void func_ov063_02159714(void);
|
|
void func_ov063_02159784(void);
|
|
void func_ov063_021598fc(void);
|
|
void func_ov063_021599e4(void);
|
|
void func_ov063_02159ca8(void);
|
|
void func_ov063_02159d68(void);
|
|
void func_ov063_02159dfc(void);
|
|
void func_ov063_02159e1c(void);
|
|
void func_ov063_02159e20(void);
|
|
void func_ov063_02159ec0(void);
|
|
unk32 func_ov063_02159f3c(unk32 param1);
|
|
unk32 func_ov063_0215a0f0(void);
|
|
unk32 func_ov063_0215a2c0(void);
|
|
void func_ov063_0215a428(void);
|
|
unk32 func_ov063_0215a474(void);
|
|
unk32 func_ov063_0215a514(void);
|
|
unk32 func_ov063_0215a56c(unk32 param1);
|
|
void func_ov063_0215a5a0(VecFx32 *param1);
|
|
unk32 func_ov063_0215a5bc(void);
|
|
unk32 func_ov063_0215a5d8(void);
|
|
static void func_ov063_0215a678(ActorUnkCANS *param1, UnkStruct_func_ov063_0215a678 *param2);
|
|
};
|
|
|
|
class ActorProfileUnkCANS : public ActorProfile_Derived1 {
|
|
public:
|
|
/* 00 (base) */
|
|
|
|
ActorProfileUnkCANS();
|
|
~ActorProfileUnkCANS();
|
|
|
|
/* 0C */ virtual Actor *Create();
|
|
|
|
static ActorProfileUnkCANS *GetProfile();
|
|
};
|