diff options
| author | Aetias <aetias@outlook.com> | 2025-07-01 21:27:52 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-07-01 21:27:52 +0200 |
| commit | a7f149c3af206d90f046c6e7237ea701f0ce7b41 (patch) | |
| tree | 3321e504a1be2ea314121730767e16f00c43d6a5 /include | |
| parent | 2b45d3fab70aa81c0c2564aa976a70692c3d455d (diff) | |
| parent | cfb0123c4a582a7cd28e1a49e7642cba0260cc6f (diff) | |
Merge remote-tracking branch 'zeldaret/main' into decomp/MapManager
Diffstat (limited to 'include')
52 files changed, 1555 insertions, 263 deletions
diff --git a/include/Actor/Actor.hpp b/include/Actor/Actor.hpp index c22f086e..b58c39c8 100644 --- a/include/Actor/Actor.hpp +++ b/include/Actor/Actor.hpp @@ -35,8 +35,8 @@ struct Actor_UnkStruct_020 { /* 08 */ u8 mUnk_08[2]; /* 0a */ u8 mUnk_0a[2]; /* 0c */ unk8 mUnk_0c; - /* 0d */ unk8 mUnk_0d; - /* 0e */ unk8 mUnk_0e; + /* 0d */ u8 mUnk_0d; + /* 0e */ u8 mUnk_0e; /* 0f */ unk8 mUnk_0f; /* 10 */ unk32 mUnk_10; /* 14 */ @@ -64,6 +64,7 @@ struct Actor_UnkStruct_0a4 { /* 14 */ Actor_UnkStruct_0a4(q20 x, q20 y, q20 z, s32 unk_10); + void func_ov000_0207a1c8(unk32 param1, Vec3p *param2); }; class KillPickupsFilter : FilterActorReturn, public FilterActorBase { @@ -83,7 +84,8 @@ enum PlayerCollide_ { PlayerCollide_Gongoron = 0x8, PlayerCollide_Hammer = 0x10, - PlayerCollide_PickupFlags = PlayerCollide_Hammer | PlayerCollide_Gongoron | PlayerCollide_Sword | PlayerCollide_Player, + /* 0x1b */ PlayerCollide_PickupFlags = + PlayerCollide_Hammer | PlayerCollide_Gongoron | PlayerCollide_Sword | PlayerCollide_Player, }; struct Knockback { @@ -108,8 +110,7 @@ public: /* 012 */ unk16 mUnk_012; /* 014 */ Vec3p mUnk_014; /* 020 */ Actor_UnkStruct_020 mUnk_020; - /* 034 */ unk32 mUnk_034; - /* 038 */ unk32 mUnk_038; + /* 034 */ ActorRef mUnk_034; /* 03c */ unk32 mUnk_03c; /* 040 */ ActorRef mUnk_040; /* 048 */ Vec3p mPos; @@ -136,10 +137,10 @@ public: /* 108 */ unk8 mUnk_108; /* 109 */ unk8 mUnk_109; /* 10a */ unk8 mUnk_10a[0x6]; - /* 110 */ unk8 mUnk_110; + /* 110 */ bool mUnk_110; /* 111 */ bool mUnk_111; - /* 112 */ unk8 mUnk_112; - /* 113 */ unk8 mUnk_113; + /* 112 */ bool mUnk_112; + /* 113 */ bool mUnk_113; /* 114 */ unk8 mUnk_114; /* 115 */ unk8 mUnk_115; /* 116 */ unk8 mUnk_116; @@ -172,8 +173,8 @@ public: /* 158 */ /* 00 */ virtual ~Actor(); - /* 08 */ virtual bool vfunc_08(); - /* 0c */ virtual void vfunc_0c(); + /* 08 */ virtual bool Init(); + /* 0c */ virtual bool vfunc_0c(); /* 10 */ virtual void vfunc_10(u32 param1); /* 14 */ virtual void vfunc_14(u32 param1); /* 18 */ virtual void vfunc_18(u32 param1); diff --git a/include/Actor/ActorRef.hpp b/include/Actor/ActorRef.hpp index 5ef03f2c..eeace571 100644 --- a/include/Actor/ActorRef.hpp +++ b/include/Actor/ActorRef.hpp @@ -8,9 +8,7 @@ struct ActorRef { /* 4 */ s32 index; /* 8 */ - inline ActorRef() { - Reset(); - } + inline ActorRef() {} inline ActorRef(s32 id, s32 index) : id(id), index(index) {} diff --git a/include/Actor/ActorRupee.hpp b/include/Actor/ActorRupee.hpp index a5fcbea3..983abaae 100644 --- a/include/Actor/ActorRupee.hpp +++ b/include/Actor/ActorRupee.hpp @@ -33,7 +33,7 @@ public: /* 160 */ /* 00 */ virtual ~ActorRupee() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* 20 */ virtual void vfunc_20(bool param1) override; diff --git a/include/Actor/ActorSpawner.hpp b/include/Actor/ActorSpawner.hpp index 94047e10..e99bafb3 100644 --- a/include/Actor/ActorSpawner.hpp +++ b/include/Actor/ActorSpawner.hpp @@ -5,10 +5,23 @@ #include "global.h" #include "types.h" +#include "Actor/Actor.hpp" #include "Actor/ActorRef.hpp" #include "Actor/ActorType.hpp" +#include "System/SysNew.hpp" -class ActorSpawner { +struct ActorSpawnOptions { + /* 00 */ Actor_UnkStruct_020 mUnk_00; + /* 14 */ s16 mAngle; + /* 16 */ unk8 mUnk_16[0x2]; + /* 18 */ unk32 mUnk_18; + /* 1c */ ActorRef mUnk_1c; + /* 24 */ unk32 mUnk_24; + /* 28 */ unk32 mUnk_28; + /* 2c */ +}; + +class ActorSpawner : public SysObject { public: /* 0 (empty) */ @@ -18,8 +31,8 @@ public: ~ActorSpawner(); void func_ov000_020c4014(); void func_ov000_020c4018(); - Actor *CreateActor(ActorTypeId type); - s32 Spawn(ActorTypeId type, Vec3p *pos, void *param3, ActorRef *ref); + Actor *CreateActor(ActorTypeId typeId); + s32 Spawn(ActorTypeId type, Vec3p *pos, ActorSpawnOptions *param3, ActorRef *ref); }; extern ActorSpawner *gActorSpawner; diff --git a/include/Actor/ActorType.hpp b/include/Actor/ActorType.hpp index fe7b2cc6..6101cd2c 100644 --- a/include/Actor/ActorType.hpp +++ b/include/Actor/ActorType.hpp @@ -25,8 +25,13 @@ enum ActorTypeId_ { ActorTypeId_ShopItemShield = 'ITSL', ActorTypeId_ShopItemSoldOut = 'ITSO', - ActorTypeId_Heart = 'HART', - ActorTypeId_Rupee = 'RUPY', + ActorTypeId_RefillArrows = 'FLAL', + ActorTypeId_RefillBombs = 'FLBM', + ActorTypeId_RefillBombchus = 'FLBT', + ActorTypeId_RefillTime = 'FLTM', + ActorTypeId_Heart = 'HART', + ActorTypeId_LSTM = 'LSTM', + ActorTypeId_Rupee = 'RUPY', ActorTypeId_Arrow = 'ARRW', ActorTypeId_Blast = 'BLST', diff --git a/include/Actor/Dungeon/ActorActionObject.hpp b/include/Actor/Dungeon/ActorActionObject.hpp index 0bf35dfb..c4e2add3 100644 --- a/include/Actor/Dungeon/ActorActionObject.hpp +++ b/include/Actor/Dungeon/ActorActionObject.hpp @@ -10,7 +10,7 @@ public: /* 158 */ /* 00 */ virtual ~ActorActionObject() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* b4 */ diff --git a/include/Actor/Dungeon/ActorEventIcon.hpp b/include/Actor/Dungeon/ActorEventIcon.hpp index ccef162d..a7a86751 100644 --- a/include/Actor/Dungeon/ActorEventIcon.hpp +++ b/include/Actor/Dungeon/ActorEventIcon.hpp @@ -17,7 +17,7 @@ public: /* 160 */ UnkStruct_02035064 mUnk_160; /* 00 */ virtual ~ActorEventIcon() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* 1c */ virtual void vfunc_1c(u16 *param1) override; diff --git a/include/Actor/Dungeon/ActorSwitchObject.hpp b/include/Actor/Dungeon/ActorSwitchObject.hpp index b2fa08d3..0658fcb2 100644 --- a/include/Actor/Dungeon/ActorSwitchObject.hpp +++ b/include/Actor/Dungeon/ActorSwitchObject.hpp @@ -21,8 +21,8 @@ public: /* 198 */ /* 00 */ virtual ~ActorSwitchObject() override; - /* 08 */ virtual bool vfunc_08() override; - /* 0c */ virtual void vfunc_0c() override; + /* 08 */ virtual bool Init() override; + /* 0c */ virtual bool vfunc_0c() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* b4 */ diff --git a/include/Actor/Navi/ActorNavi.hpp b/include/Actor/Navi/ActorNavi.hpp index 86774de4..f8a86acc 100644 --- a/include/Actor/Navi/ActorNavi.hpp +++ b/include/Actor/Navi/ActorNavi.hpp @@ -40,7 +40,7 @@ public: /* 3c8 */ /* 00 */ virtual ~ActorNavi() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 20 */ virtual void vfunc_20(bool param1) override; /* 8c */ virtual bool vfunc_8c() override; /* b4 */ virtual FairyId GetFairyId() override; diff --git a/include/Actor/Navi/ActorNaviBase.hpp b/include/Actor/Navi/ActorNaviBase.hpp index 4c2a20cf..c7dd7cea 100644 --- a/include/Actor/Navi/ActorNaviBase.hpp +++ b/include/Actor/Navi/ActorNaviBase.hpp @@ -21,7 +21,7 @@ class ActorNaviBase_Unk1 {}; class ActorNaviBase : public Actor { public: /* 000 (base) */ - /* 158 */ Vec3p mUnk_158; + /* 158 */ Vec3p mOffsetPos; /* 164 */ unk32 mUnk_164; /* 168 */ ModelRender mUnk_168; /* 1c4 */ unk8 mUnk_1c4[0xc]; @@ -46,7 +46,7 @@ public: /* 294 */ /* 00 */ virtual ~ActorNaviBase() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 10 */ virtual void vfunc_10(u32 param1) override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; diff --git a/include/Actor/Player/ActorArrow.hpp b/include/Actor/Player/ActorArrow.hpp index a0ced1e3..021007f6 100644 --- a/include/Actor/Player/ActorArrow.hpp +++ b/include/Actor/Player/ActorArrow.hpp @@ -36,7 +36,7 @@ public: /* 1b8 */ /* 00 */ virtual ~ActorArrow() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 10 */ virtual void vfunc_10(u32 param1) override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; diff --git a/include/Actor/Player/ActorBlast.hpp b/include/Actor/Player/ActorBlast.hpp index a1e8b5fe..431cc1d7 100644 --- a/include/Actor/Player/ActorBlast.hpp +++ b/include/Actor/Player/ActorBlast.hpp @@ -19,7 +19,7 @@ public: /* 164 */ /* 00 */ virtual ~ActorBlast() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* b4 */ diff --git a/include/Actor/Player/ActorBomb.hpp b/include/Actor/Player/ActorBomb.hpp index 17538bf8..3817a73e 100644 --- a/include/Actor/Player/ActorBomb.hpp +++ b/include/Actor/Player/ActorBomb.hpp @@ -54,7 +54,7 @@ public: /* 26c */ /* 00 */ virtual ~ActorBomb() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; /* 20 */ virtual void vfunc_20(bool param1) override; diff --git a/include/Actor/Player/ActorRefill.hpp b/include/Actor/Player/ActorRefill.hpp new file mode 100644 index 00000000..eeab2793 --- /dev/null +++ b/include/Actor/Player/ActorRefill.hpp @@ -0,0 +1,113 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "Actor/Actor.hpp" +#include "Actor/ActorType.hpp" + +class ActorRefill : public Actor { +public: + /* 000 (base) */ + /* 158 */ unk32 mUnk_158; + /* 15c */ unk32 mUnk_15c; + /* 160 */ unk32 mUnk_160; + /* 164 */ u8 mUnk_164; + /* 165 */ unk8 mUnk_165[0x3]; + /* 168 */ + +public: + ActorRefill(unk32 param1); + + /* 00 */ virtual ~ActorRefill() override; + /* 08 */ virtual bool Init() override; + /* 14 */ virtual void vfunc_14(u32 param1) override; + /* 20 */ virtual void vfunc_20(bool param1) override; + /* b4 */ virtual ItemFlag GetAmmoItem() = 0; + /* b8 */ + + bool func_ov014_02135364(unk32 param1); + void func_ov014_02135474(); +}; + +class ActorRefillBombs : public ActorRefill { +public: + static ActorType gType; + + /* 000 (base) */ + /* 168 */ + +public: + ActorRefillBombs(); + static ActorRefillBombs *Create(); + + /* 00 */ virtual ~ActorRefillBombs() override; + /* b4 */ virtual ItemFlag GetAmmoItem() override; + /* b8 */ +}; + +class ActorRefillBombchus : public ActorRefill { +public: + static ActorType gType; + + /* 000 (base) */ + /* 168 */ + +public: + ActorRefillBombchus(); + static ActorRefillBombchus *Create(); + + /* 00 */ virtual ~ActorRefillBombchus() override; + /* b4 */ virtual ItemFlag GetAmmoItem() override; + /* b8 */ +}; + +class ActorRefillArrows : public ActorRefill { +public: + static ActorType gType; + + /* 000 (base) */ + /* 168 */ + +public: + ActorRefillArrows(); + static ActorRefillArrows *Create(); + + /* 00 */ virtual ~ActorRefillArrows() override; + /* b4 */ virtual ItemFlag GetAmmoItem() override; + /* b8 */ +}; + +class ActorRefillTime : public ActorRefill { +public: + static ActorType gType; + + /* 000 (base) */ + /* 168 */ + +public: + ActorRefillTime(); + static ActorRefillTime *Create(); + + /* 00 */ virtual ~ActorRefillTime() override; + /* 08 */ virtual bool Init() override; + /* b4 */ virtual ItemFlag GetAmmoItem() override; + /* b8 */ +}; + +class ActorLSTM : public ActorRefill { +public: + static ActorType gType; + + /* 000 (base) */ + /* 168 */ + +public: + ActorLSTM(); + static ActorLSTM *Create(); + + /* 00 */ virtual ~ActorLSTM() override; + /* 08 */ virtual bool Init() override; + /* b4 */ virtual ItemFlag GetAmmoItem() override; + /* b8 */ +}; diff --git a/include/Actor/Player/ActorRope.hpp b/include/Actor/Player/ActorRope.hpp index 1d70a5fd..245a7851 100644 --- a/include/Actor/Player/ActorRope.hpp +++ b/include/Actor/Player/ActorRope.hpp @@ -46,7 +46,7 @@ public: /* 1a0 */ /* 00 */ virtual ~ActorRope() override; - /* 08 */ virtual bool vfunc_08() override; + /* 08 */ virtual bool Init() override; /* 10 */ virtual void vfunc_10(u32 param1) override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; diff --git a/include/DTCM/UnkStruct_027e05f8.hpp b/include/DTCM/UnkStruct_027e05f8.hpp index 43e83540..a5bc24d6 100644 --- a/include/DTCM/UnkStruct_027e05f8.hpp +++ b/include/DTCM/UnkStruct_027e05f8.hpp @@ -4,7 +4,10 @@ #include "types.h" struct UnkStruct_027e05f8 { - // TODO: Add fields + /* 0 */ u16 mUnk_0; + /* 2 */ u16 mUnk_2; + /* 4 */ unk16 mUnk_4; + /* 6 */ void func_0202adf4(unk32 param1, s32 param2); ~UnkStruct_027e05f8(); @@ -15,3 +18,5 @@ struct UnkStruct_027e05f8 { void func_02037480(); static unk32 func_02037490(unk32 param1); }; + +extern UnkStruct_027e05f8 data_027e05f8; diff --git a/include/DTCM/UnkStruct_027e077c.hpp b/include/DTCM/UnkStruct_027e077c.hpp index 3adda2bc..57ef477d 100644 --- a/include/DTCM/UnkStruct_027e077c.hpp +++ b/include/DTCM/UnkStruct_027e077c.hpp @@ -4,8 +4,26 @@ #include "types.h" struct UnkStruct_027e077c { - // TODO: Add fields +private: + /* 0 */ unk32 mUnk_0; + /* 4 */ unk32 mUnk_4; + +public: + /* 8 */ unk16 mUnk_8; + /* a */ unk8 mUnk_a; + /* b */ UnkStruct_027e077c(unk32 param1); bool func_0202e740(unk32 param1); + + inline volatile unk32 GetUnk0() const { + return mUnk_0; + } + + inline unk32 GetUnk4() const { + return mUnk_4; + } }; + +extern UnkStruct_027e077c data_027e077c; +extern volatile u8 data_02056be4[]; diff --git a/include/DTCM/UnkStruct_027e0c68.hpp b/include/DTCM/UnkStruct_027e0c68.hpp new file mode 100644 index 00000000..e172e51e --- /dev/null +++ b/include/DTCM/UnkStruct_027e0c68.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "Debug/DebugHierarchyBase.hpp" + +struct UnkStruct_027e0c68 { + /* 00 */ unk8 mUnk_00[4]; + /* 04 */ u8 mUnk_04; + /* 05 */ unk8 mUnk_05[3]; + /* 08 */ unk32 mUnk_08; + /* 0c */ unk8 mUnk_0c[4]; + /* 10 */ unk16 mUnk_10; + /* 12 */ unk8 mUnk_12[2]; + /* 14 */ unk32 mUnk_14; + /* 18 */ s32 mUnk_18; + /* 1c */ s32 mUnk_1c; + /* 20 */ s32 *mUnk_20; + /* 24 */ unk32 mUnk_24; + /* 28 */ s32 *mUnk_28; + /* 2c */ unk8 mUnk_2c[0x1c]; + /* 48 */ DebugHierarchyBase *mDebug; + /* 4c */ +}; + +extern UnkStruct_027e0c68 data_027e0c68; diff --git a/include/DTCM/UnkStruct_027e0d38.hpp b/include/DTCM/UnkStruct_027e0d38.hpp index a36af0fe..b2e50a89 100644 --- a/include/DTCM/UnkStruct_027e0d38.hpp +++ b/include/DTCM/UnkStruct_027e0d38.hpp @@ -3,6 +3,12 @@ #include "global.h" #include "types.h" +struct UnkStruct_027e0d38_Unk28 { + /* 00 */ unk8 mUnk_00[0x34]; + /* 34 */ bool mUnk_34; + /* 35 */ +}; + struct UnkStruct_027e0d38 { /* 00 */ unk8 mUnk_00; /* 01 */ unk8 mUnk_01[3]; // padding? @@ -19,10 +25,10 @@ struct UnkStruct_027e0d38 { /* 21 */ unk8 mUnk_21; /* 22 */ unk8 mUnk_22[2]; // padding? /* 24 */ void *mUnk_24; - /* 28 */ void *mUnk_28; + /* 28 */ UnkStruct_027e0d38_Unk28 *mUnk_28; /* 2c */ - unk32 func_ov000_02078b40(); + s32 func_ov000_02078b40(); unk8 func_ov000_02078b64(); bool func_ov000_02078b88(); }; diff --git a/include/DTCM/UnkStruct_027e0e2c.hpp b/include/DTCM/UnkStruct_027e0e2c.hpp new file mode 100644 index 00000000..b8923bde --- /dev/null +++ b/include/DTCM/UnkStruct_027e0e2c.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e0e2c { + /* 00 */ unk32 mUnk_00; + /* 04 */ unk32 mUnk_04; + /* 08 */ unk32 mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk32 mUnk_10; + /* 14 */ unk16 mUnk_14; + /* 16 */ unk16 mUnk_16; + /* 18 */ unk32 mUnk_18; + /* 1c */ unk32 mUnk_1c; + /* 20 */ unk32 mUnk_20; + /* 24 */ unk32 mUnk_24; + /* 28 */ unk32 mUnk_28; + /* 2c */ +}; + +extern UnkStruct_027e0e2c data_027e0e2c; diff --git a/include/DTCM/UnkStruct_027e0f64.hpp b/include/DTCM/UnkStruct_027e0f64.hpp new file mode 100644 index 00000000..33728a7e --- /dev/null +++ b/include/DTCM/UnkStruct_027e0f64.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e0f64 { + /* 0 */ DebugHierarchyBase *mUnk_0; + /* 4 */ void *mUnk_4; + /* 8 */ void *mUnk_8; + /* c */ + + unk32 func_ov000_0208b180(); +}; + +extern UnkStruct_027e0f64 *data_027e0f64; diff --git a/include/DTCM/UnkStruct_027e0ffc.hpp b/include/DTCM/UnkStruct_027e0ffc.hpp new file mode 100644 index 00000000..463d9ec8 --- /dev/null +++ b/include/DTCM/UnkStruct_027e0ffc.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e0ffc { + /* 00 */ unk32 mUnk_00; + /* 04 */ unk32 mUnk_04[0x4]; + /* 14 */ unk32 mUnk_14; + /* 18 */ unk32 mUnk_18; + /* 1c */ unk32 mUnk_1c; + /* 20 */ unk32 mUnk_20; + /* 24 */ unk8 mUnk_24; + /* 25 */ unk8 mUnk_25[0x3]; + /* 28 */ unk32 mUnk_28; + /* 2c */ unk32 mUnk_2c; + /* 30 */ unk32 mUnk_30; + /* 34 */ unk32 mUnk_34; + /* 38 */ unk8 mUnk_38; + /* 39 */ + + void func_ov000_020cebcc(u32 param1, unk16 param2, unk32 param3); + void func_ov000_020ced64(Cylinder *param1, u32 param2, u32 param3); + void func_ov000_020ced7c(Vec3p *param1, s32 param2, s32 param3, unk32 param4); +}; + +extern UnkStruct_027e0ffc data_027e0ffc; diff --git a/include/DTCM/UnkStruct_027e103c.hpp b/include/DTCM/UnkStruct_027e103c.hpp index 0538e54e..02f58f4c 100644 --- a/include/DTCM/UnkStruct_027e103c.hpp +++ b/include/DTCM/UnkStruct_027e103c.hpp @@ -57,7 +57,7 @@ struct UnkStruct_027e103c { void func_ov000_020cf3f0(); void func_ov000_020cf404(); void func_ov000_020cf414(); - void func_ov000_020cf42c(); + bool func_ov000_020cf42c(); bool func_ov000_020cf444(); bool func_ov000_020cf488(); bool func_ov000_020cf4bc(); @@ -80,7 +80,10 @@ struct UnkStruct_027e103c { unk8 func_ov000_020cfab0(); void func_ov000_020cfabc(s32 param1, s32 param2); void func_ov000_020cfae8(s32 param1, s32 param2); - void func_ov000_020cfb20(unk32 param1); + + //! TODO: find out if the type is always `UnkStruct_020397f8*` + void func_ov000_020cfb20(void *); + void func_ov000_020cfb38(); void func_ov000_020cfb48(); void func_ov000_020cfb58(); diff --git a/include/DTCM/UnkStruct_027e1098.hpp b/include/DTCM/UnkStruct_027e1098.hpp new file mode 100644 index 00000000..043e108a --- /dev/null +++ b/include/DTCM/UnkStruct_027e1098.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "types.h" + +struct UnkStruct_027e1098 { + /* 00 */ unk8 mUnk_00[0x38]; + /* 38 */ unk32 mUnk_38; + /* 3c */ unk32 mUnk_3c; + /* 40 */ unk32 mUnk_40; + /* 44 */ unk32 mUnk_44; + /* 48 */ unk8 mUnk_48; + /* 49 */ unk8 mUnk_49; + /* 4a */ unk8 mUnk_4a; + /* 4b */ unk8 mUnk_4b; + /* 4c */ unk32 mUnk_4c; + /* 50 */ + + void func_ov014_0211fd04(); +}; + +extern UnkStruct_027e1098 *data_027e1098; diff --git a/include/Debug/DebugHierarchyBase.hpp b/include/Debug/DebugHierarchyBase.hpp index 5b4a175a..ca1e0eb7 100644 --- a/include/Debug/DebugHierarchyBase.hpp +++ b/include/Debug/DebugHierarchyBase.hpp @@ -19,14 +19,15 @@ public: /* 14 */ virtual void vfunc_14(); /* 18 */ virtual void vfunc_18(); /* 1c */ virtual void vfunc_1c(); - /* 20 */ virtual void vfunc_20(); + /* 20 */ virtual void vfunc_20(unk32 param1, const char *param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6); /* 24 */ virtual void vfunc_24(); /* 28 */ virtual void vfunc_28(); /* 2c */ virtual void vfunc_2c(); /* 30 */ virtual void vfunc_30(); - /* 34 */ virtual bool GetChildNode(unk32 param1, const char *description, u32 parent, s32 *param4); + /* 34 */ virtual bool GetChildNode(unk32 param1, const char *description, u32 parent, s32 *param4, unk32 param5, + unk32 param6, unk32 param7, unk32 param8); /* 38 */ virtual void vfunc_38(); - /* 3c */ virtual void vfunc_3c(); + /* 3c */ virtual void vfunc_3c(unk32 param1, void *param2); /* 40 */ DebugHierarchyBase(); diff --git a/include/Item/Item.hpp b/include/Item/Item.hpp index 4d70c9f1..cea5c551 100644 --- a/include/Item/Item.hpp +++ b/include/Item/Item.hpp @@ -50,7 +50,7 @@ enum ItemFlag_ { /* 0x2d */ ItemFlag_SwordsmansScroll = 45, /* 0x2e */ ItemFlag_CycloneSlate = 46, - /* 0x2f */ ItemFlag_Unk_47 = 47, + /* 0x2f */ ItemFlag_BigCatchLure = 47, /* 0x60 */ ItemFlag_TreasureChart1 = 96, /* 0x61 */ ItemFlag_TreasureChart2 = 97, @@ -224,7 +224,7 @@ enum ItemId_ { /* 0x7d */ ItemId_Unk_125 = 125, /* 0x7e */ ItemId_Unk_126 = 126, /* 0x7f */ ItemId_CycloneSlate = 127, - /* 0x80 */ ItemId_Unk_128 = 128, + /* 0x80 */ ItemId_BigCatchLure = 128, /* 0x81 */ ItemId_Rupoor10 = 129, /* 0x82 */ ItemId_Rupoor50 = 130, /* 0x83 */ ItemId_Unk_131 = 131, diff --git a/include/Item/ItemManager.hpp b/include/Item/ItemManager.hpp index 9e473fc2..3de57def 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -8,7 +8,8 @@ extern "C" { #include "nds/math.h"
#include "types.h"
-#include "Actor/Navi/ActorNaviBase.hpp"
+#include "Actor/Navi/ActorNavi.hpp"
+#include "DTCM/UnkStruct_027e0d38.hpp"
#include "Item/Item.hpp"
#include "Player/EquipItem.hpp"
#include "Render/ModelRender.hpp"
@@ -51,7 +52,7 @@ enum DungeonItemModelId_ { };
class ItemManager : public SysObject {
-private:
+public:
/* 000 */ ItemFlag mEquippedItem;
/* 004 */ ItemFlag mPrevEquippedItem;
/* 008 */ ItemFlag mForcedItem; // game crashes when any item besides this one is equipped
@@ -92,7 +93,6 @@ private: /* 14e */ unk8 mUnk_14e[0x2]; // padding?
/* 150 */
-public:
static ItemManager *Create();
static void Destroy();
ItemManager();
@@ -135,7 +135,7 @@ public: // Ammo
u16 GetAmmo(ItemFlag equipId) const;
- void GiveAmmo(ItemFlag equipId, u16 amount);
+ void GiveAmmo(ItemFlag equipId, u32 amount);
u16 GetMaxAmmo(ItemFlag equipId) const;
void UpgradeQuiver();
void UpgradeBombBag();
@@ -187,6 +187,9 @@ public: // Rupees
s32 GetMaxRupees() const;
void GiveRupees(s32 amount, bool param2);
+ inline u16 GetNumRupees(void) {
+ return this->mNumRupees;
+ }
// Potion
void SetPotion(u32 index, Potion potion);
diff --git a/include/Item/ItemModelLoader.hpp b/include/Item/ItemModelLoader.hpp index 6b06893a..3eb3e157 100644 --- a/include/Item/ItemModelLoader.hpp +++ b/include/Item/ItemModelLoader.hpp @@ -27,3 +27,5 @@ public: static void Create(); static void Destroy(); }; + +extern ItemModelLoader *gItemModelLoader; diff --git a/include/Message/BMG.hpp b/include/Message/BMG.hpp new file mode 100644 index 00000000..c3d4479d --- /dev/null +++ b/include/Message/BMG.hpp @@ -0,0 +1,208 @@ +#pragma once + +#include "System/SysNew.hpp" +#include "global.h" +#include "types.h" + +#define BMG_MAGIC "MESGbmg1" +#define BMG_GET_INF1(pGroups, flags) ((pGroups)->entries[(flags) >> 0x10].func_02037258((flags) & 0xFFFF)) +#define BMG_GET_MSG_OFFSET(pGroups, flags) (BMG_GET_INF1((pGroups), (flags))->offset) +#define BMG_GET_MSG_ADDR(pGroups, flags) \ + ((u32) (pGroups)->entries[(flags) >> 0x10].pDAT1 + (BMG_GET_MSG_OFFSET((pGroups), (flags)) & ~1)) + +enum BMGTag { + /* "INF1" */ BMG_TAG_INF1 = '1FNI', + /* "FLW1" */ BMG_TAG_FLW1 = '1WLF', + /* "FLI1" */ BMG_TAG_FLI1 = '1ILF', + /* "DAT1" */ BMG_TAG_DAT1 = '1TAD', + /* "MID1" */ BMG_TAG_MID1 = '1DIM', + /* "STR1" */ BMG_TAG_STR1 = '1RTS', +}; + +enum BMGEncoding { + /* 1 */ BMG_ENCODING_CP1252 = 1, + /* 2 */ BMG_ENCODING_UTF16_BE, + /* 3 */ BMG_ENCODING_SHIFT_JIS, + /* 4 */ BMG_ENCODING_UTF8, + /* 5 */ BMG_ENCODING_MAX +}; + +typedef enum BMGFileIndex { + /* 0 */ BMG_FILE_INDEX_SYSTEM, + /* 1 */ BMG_FILE_INDEX_REGULAR, + /* 2 */ BMG_FILE_INDEX_BATTLE, + /* 3 */ BMG_FILE_INDEX_TEST, + /* 4 */ BMG_FILE_INDEX_DEFAULT, + /* 5 */ BMG_FILE_INDEX_SEA, + /* 6 */ BMG_FILE_INDEX_KAITEI, + /* 7 */ BMG_FILE_INDEX_MAIN_ISL, + /* 8 */ BMG_FILE_INDEX_BRAVE, + /* 9 */ BMG_FILE_INDEX_FLAME, + /* 10 */ BMG_FILE_INDEX_WIND, + /* 11 */ BMG_FILE_INDEX_FROST, + /* 12 */ BMG_FILE_INDEX_POWER, + /* 13 */ BMG_FILE_INDEX_WISDOM, + /* 14 */ BMG_FILE_INDEX_GHOST, + /* 15 */ BMG_FILE_INDEX_HIDARI, + /* 16 */ BMG_FILE_INDEX_SENNIN, + /* 17 */ BMG_FILE_INDEX_SHIP, + /* 18 */ BMG_FILE_INDEX_COLLECT, + /* 19 */ BMG_FILE_INDEX_MAINSELECT, + /* 20 */ BMG_FILE_INDEX_FIELD, + /* 21 */ BMG_FILE_INDEX_WISDOM_DNGN, + /* 22 */ BMG_FILE_INDEX_DEMO, + /* 23 */ BMG_FILE_INDEX_BATTLECOMMON, + /* 24 */ BMG_FILE_INDEX_BOSSLAST1, + /* 25 */ BMG_FILE_INDEX_BOSSLAST3, + /* 26 */ BMG_FILE_INDEX_TORII, + /* 27 */ BMG_FILE_INDEX_MYOU, + /* 28 */ BMG_FILE_INDEX_KOJIMA1, + /* 29 */ BMG_FILE_INDEX_KOJIMA2, + /* 30 */ BMG_FILE_INDEX_KOJIMA5, + /* 31 */ BMG_FILE_INDEX_KOJIMA3, + /* 32 */ BMG_FILE_INDEX_STAFF, + /* 33 */ BMG_FILE_INDEX_KAITEI_F, + /* 34 */ BMG_FILE_INDEX_MAX +} BMGFileIndex; + +struct SectionBase { + /* 00 */ u32 tag; // "INF1", "DAT1", ... + /* 04 */ u32 size; // the size of the section + /* 08 */ +}; + +struct BMGHeader { + /* 00 */ char magic[8]; // always "MESGbmg1" + /* 08 */ u32 fileSize; // the size of the BMG file + /* 0c */ u32 numSections; // the number of sections (INF1, DAT1, ...) + /* 10 */ u8 encoding; // see `BMGEncoding` + /* 11 */ u8 unk_11[0xF]; // alignment padding? + /* 20 */ +}; + +struct EntryINF1 { + /* 00 */ u32 offset; // relative to the end of the DAT1 header + /* 04 */ u8 mUnk_04; // flags/attributes? (+0x04 to +0x06) + /* 05 */ u8 mUnk_05; + /* 06 */ u8 mUnk_06; + /* 07 */ u8 mUnk_07; + /* 08 */ +}; + +struct SectionINF1 { + /* 00 */ SectionBase base; + /* 08 */ u16 numEntries; + /* 0a */ u16 entrySize; + /* 0c */ u16 groupId; + /* 0e */ u8 colorId; + /* 0f */ u8 mUnk_0F[0x1]; // alignment padding? + /* 10 */ EntryINF1 *entries; + /* 14 */ +}; + +enum InstrType { + /* 1 */ FLW1_TYPE_SHOW_MSG = 1, + /* 2 */ FLW1_TYPE_BRANCH = 2, + /* 3 */ FLW1_TYPE_EVENT = 3, + /* 4 */ +}; + +struct InstrShowMsg { + /* 01 */ u8 bmgFileIndex; // index into sBMGFiles + /* 02 */ u16 msgIndex; // index of INF1 entry + /* 04 */ s16 nextIndex; // index of FLW1 entry, 0xFFFF stops the conversation + /* 06 */ s16 nextBMGFileIndex; // index into sBMGFiles + /* 08 */ +}; + +struct InstrBranch { + /* 01 */ u8 mUnk_01; + /* 02 */ u16 funcIndex; // index of the query function to run + /* 04 */ u16 funcArg; // the argument to use in the function + /* 06 */ u16 flwEntry; // the index of the second section table to be used next in the conversation. + /* 08 */ +}; + +struct InstrEvent { + /* 01 */ u8 funcIndex; // index of the query function to run + /* 02 */ u16 flwEntry; // the index of the second section table to be used next in the conversation. + /* 04 */ u32 funcArg; // the argument to use in the function + /* 08 */ +}; + +struct FLW1Instr { + /* 00 */ u8 type; // see InstrType + /* 01 */ union { + InstrShowMsg showMsg; + InstrBranch branch; + InstrEvent event; + }; + /* 09 */ +}; + +struct SectionFLW1 { + /* 00 */ SectionBase base; + /* 04 */ u16 numInstructions; + /* 08 */ u16 numLabels; + /* 0c */ u32 mUnk_0c; // always zero? + /* 10 */ FLW1Instr *instructions; + /* 14 */ s16 *flwEntries; + /* 18 */ s8 *bmgFileIndices; + /* 1c */ +}; + +struct EntryFLI1 { + /* 00 */ u32 msgFlowID; + /* 04 */ u32 msgFlowNodeIndex; + /* 08 */ +}; + +struct SectionFLI1 { + /* 00 */ SectionBase base; + /* 04 */ u16 numEntries; + /* 08 */ u16 entrySize; + /* 0c */ u32 mUnk_0c; // always zero? + /* 10 */ EntryFLI1 *entries; + /* 14 */ +}; + +struct EntryDAT1 { + /* 00 */ char *text; + /* 04 */ +}; + +struct SectionDAT1 { + /* 00 */ SectionBase base; + /* 08 */ EntryDAT1 *entries; + /* 0c */ +}; + +struct BMGFileInfo { + /* 00 */ BMGHeader *pHeader; // pointer to the file's header + /* 04 */ SectionINF1 *pINF1; // pointer to the data informations (INF -> informations) + /* 08 */ SectionFLW1 *pFLW1; // pointer to the message flow data (FLW -> flow) + /* 0c */ SectionFLI1 *pFLI1; // pointer to the message flow index table (FLI -> flow index table) + /* 10 */ SectionDAT1 *pDAT1; // pointer to the data (DAT -> data) + /* 14 */ BMGHeader *mUnk_14; // same as pHeader (?) + /* 18 */ s16 mUnk_18; // stores `func_020372f0`->param_3 value (currently undetermined purpose) + /* 1a */ s16 groupId; // stores the group id + /* 1c */ + + void func_020371b4(); + u16 func_020371c8(u32 *pFile, s16 unk_18); + EntryINF1 *func_02037258(u16 param_2); + u16 func_0203728c(unk32 param_2); +}; + +class BMGGroups : public SysObject { +public: + /* 00 */ BMGFileInfo *entries; // accessed with `groupId` + /* 04 */ s32 numEntries; + /* 08 */ + + BMGGroups(); + ~BMGGroups(); + void func_020372f0(BMGFileIndex eIndex, s16 unk_18); + void func_020373b4(s16 unk_18); + u32 func_020373ec(unk32 param_2); +}; diff --git a/include/Message/MessageManager.hpp b/include/Message/MessageManager.hpp new file mode 100644 index 00000000..ed4ddcd2 --- /dev/null +++ b/include/Message/MessageManager.hpp @@ -0,0 +1,78 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "Debug/DebugHierarchy.hpp" +#include "Message/BMG.hpp" +#include "Message/MsgProc.hpp" +#include "System/SysNew.hpp" +#include "nds/math.h" + +#include "Unknown/UnkStruct_0202e1a0.hpp" +#include "Unknown/UnkStruct_02032f0c.hpp" +#include "Unknown/UnkStruct_02035064.hpp" +#include "Unknown/UnkStruct_02037750.hpp" +#include "Unknown/UnkStruct_02038aa0.hpp" +#include "Unknown/UnkStruct_020397f8.hpp" +#include "Unknown/UnkStruct_0203dae0.hpp" + +class MessageManager : public SysObject { +public: + /* 0x00 */ u8 mUnk_00[2]; + /* 0x02 */ u8 mUnk_02; + /* 0x03 */ u8 mUnk_03; + /* 0x04 */ u8 mUnk_04; // halts actors and hides the item menu + /* 0x05 */ u8 mUnk_05; + /* 0x06 */ unk16 mUnk_06; + /* 0x08 */ UnkStruct_020397f8 *mUnk_08; + /* 0x0C */ u8 mUnk_0c; + /* 0x0C */ u8 mUnk_0d; + /* 0x0C */ unk16 mUnk_0e; + /* 0x10 */ unk16 mUnk_10; + /* 0x10 */ unk16 mUnk_12; + /* 0x14 */ BMGGroups *pGroups; + /* 0x18 */ UnkStruct_020386d8 *mUnk_18[2]; + /* 0x20 */ UnkStruct_02037750 *mUnk_20[2]; + /* 0x28 */ UnkStruct_02038aa0 *mUnk_28[6]; //! TODO: is it the right type? + /* 0x40 */ UnkStruct_020397f8 *mUnk_40[2]; // is array size 6? + /* 0x48 */ DebugHierarchy *mDebug; + /* 0x4C */ + + static void func_0203643c(u32 *param_1, MessageManager *param_2, u32 param_3); + void func_02036490(unk32 param_2, unk32 param_3, unk32 param_4); + void func_0203665c(void); + MessageManager(); + ~MessageManager(); + UnkStruct_020397f8 *func_020366c4(void); + UnkStruct_020397f8 *func_02036700(void); + UnkStruct_020386d8 *func_0203673c(void); + bool func_02036770(u32 param_2); + unk32 func_02036798(void); + bool func_020367dc(int param_2); + bool MessageManager::func_020367ec(void); + bool func_02036808(void); + bool func_02036824(void); + bool func_02036850(void); + void func_02036888(UnkStruct_020386d8 *param_2); + bool func_020368f4(UnkStruct_02037750 *param_2); + void func_0203690c(unk32 param_2, unk32 param_3, unk32 param_4); + void func_02036bbc(void); + void func_02036c50(unk32 param_2); + void func_02036ca4(unk32 param_2); + bool func_02036ce4(UnkStruct_020386d8 *param_2, unk32 param_3); + bool func_02036d30(UnkStruct_02037750 *param_2); + bool func_02036d4c(UnkStruct_02037750 *param_2); + void func_02036d6c(void); + UnkStruct_02038aa0 *func_02036da8(u32 param_2, s16 *param_3); + void func_02036edc(u32 param_2, u8 param_3); + UnkStruct_020397f8 *func_02036f68(u32 param_2, u8 *param_3); + UnkStruct_020386d8 *func_020370d0(unk32 param_2, unk32 param_3); + UnkStruct_020386d8 *func_020370e8(unk32 param_2, unk16 param_3, unk16 param_4, unk32 param_5); + void func_02037158(UnkSubClass1_02256FF8 *param_2); + UnkStruct_02038aa0 *func_02037178(UnkSubClass1_02256FF8 *param_2); + + void func_ov004_021069c4(void); +}; + +extern MessageManager gMessageManager; diff --git a/include/Message/MsgProc.hpp b/include/Message/MsgProc.hpp new file mode 100644 index 00000000..bfdbc86b --- /dev/null +++ b/include/Message/MsgProc.hpp @@ -0,0 +1,186 @@ +#pragma once + +#include "Message/BMG.hpp" +#include "System/SysNew.hpp" +#include "Unknown/func_ov000_020d0644.hpp" +#include "nds/math.h" + +// temp +#define UNK_TYPE void + +#define ESCAPE_SEQUENCE_MARKER '\x1A' +#define CHECK_UNK_FLAGS(val) (((data_02056be4[data_027e077c.mUnk_0] & (val)) != 0)) + +typedef struct UnkStruct_0203b264 { + /* 0 */ u8 mUnk_0[0x4]; + /* 4 */ u16 *mUnk_4; + /* 8 */ +} UnkStruct_0203b264; + +class UnkStruct_020397f8_410 { +public: + /* 0x00 */ struct UnkStruct_020397f8 *mUnk_00; + /* 0x04 */ + + void func_0203ec34(void); + void func_0203ebe0(void); + void func_0203ebf8(void); + void func_0203ec4c(UnkStruct_0203b264 *param_2, unk32 param_3, s32 param_4, s32 param_5); +}; + +// same as UnkStruct_020397f8_410? +class UnkStruct_020397f8_424 { +public: + /* 0x00 */ struct UnkStruct_020397f8 *mUnk_00; + /* 0x04 */ + + void func_0203ee80(unk32); + void func_0203ef78(unk16, u16, unk8); + void func_0203ef78(unk16); // overload? + void func_0203ee48(void); + UnkStruct_0203b264 *func_0203eeb0(unk32 param_2, unk32 param_3); +}; + +class UnkStruct_0203dae0_114 : public SysObject { +public: + /* 0x00 (vtable) */ + /* 0x04 */ unk32 *mUnk_04; + /* 0x08 */ + + UnkStruct_0203dae0_114(); + /* 0x00 */ virtual ~UnkStruct_0203dae0_114() override; + /* 0x08 */ virtual unk32 vfunc_08(void *); + /* 0x08 */ virtual unk32 vfunc_0c(void); + /* 0x0C */ + + unk32 *func_0203d1b4(void); +}; + +struct func_02038f44_param4 { + u8 mUnk_00; + u8 mUnk_01; + u8 mUnk_02; + u8 mUnk_03; + unk32 mUnk_04; + unk32 mUnk_08; + unk32 mUnk_0c; + unk32 mUnk_10; + unk8 mUnk_14; + u8 mUnk_15; +}; + +// TEMPORARY + +extern "C" u32 func_01ff9b4c(unk32, unk32); +extern "C" unk32 func_0203c084(void); +extern "C" unk32 func_ov000_02079e04(void); +extern "C" unk32 func_02016fcc(unk32); +extern "C" void func_02032304(unk32 *, char *, unk32, unk32, unk32); +extern "C" unk32 func_0202d5b4(char *, char *, unk32, unk32, unk32); +extern unk32 data_020691a0; +extern unk32 *data_02068894; +extern unk32 data_02056af0; +extern unk32 *data_02056a00; +extern char *data_02057f08; // "MSP" +extern char *data_02057eec; // "Menu/UI_main/opening.bin" +extern char *data_02057ed8; // "MSP:opening.nclr" + +struct Struct_027e0db0 { + /* 0x00 */ unk32 mUnk_00; + /* 0x04 */ unk32 mUnk_04; +}; +extern Struct_027e0db0 data_027e0db0; + +// see Actor.cpp +struct UnkStruct2 { + /* 0 */ u32 mUnk_0; + /* 4 */ u32 mUnk_4; + /* 8 */ +}; +extern UnkStruct2 data_027e077c; +extern u8 data_02056be4[]; + +class UnkClass_027e0cbc { +public: + unk32 func_0203d7e0(unk32); + unk32 func_0203d77c(unk32, s32, s32); +}; +extern UnkClass_027e0cbc data_027e0cbc; +extern unk16 data_02056a10[]; +extern unk16 data_02056a16[]; +extern unk32 data_02056a04[]; +extern unk32 data_027e0c38[]; +extern "C" void func_0203489c(unk32, unk16, unk32 *, unk32 *); +extern "C" void func_020347b0(unk32, unk16, unk32 *, unk32 *, unk32, unk32); +extern THUMB unk32 func_0202ab48(void); +extern "C" void func_02034984(unk32, u8, unk32, unk32); +extern "C" void func_02034698(unk32, unk32, unk32 *, unk32 *); +extern struct TouchControl gTouchControl; + +class UnkClass_027e0e28 { +public: + unk32 func_ov000_0207bc48(); +}; +extern UnkClass_027e0e28 *data_027e0e28; +extern u8 data_027e0c54; +extern unk32 *data_ov009_0211f5b4; +extern "C" unk32 func_ov003_020f3f94(unk32 *); +extern unk32 *data_02057ed4; + +// see Actor.cpp +typedef struct UnkStruct_01ffbe34 { + /* 00 */ unk32 mUnk_00; + /* 04 */ unk32 mUnk_04; + /* 08 */ unk8 mUnk_08; + /* 09 */ unk8 mUnk_09; + /* 0a */ unk8 mUnk_0a; + /* 0b */ unk8 mUnk_0b; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk32 mUnk_10; + /* 14 */ unk8 mUnk_14; + /* 15 */ unk8 mUnk_15; + /* 16 */ unk16 mUnk_16; + /* 18 */ unk32 mUnk_18; + /* 1c */ unk32 mUnk_1c; + /* 20 */ +} UnkStruct_01ffbe34; +extern "C" void func_01ffbe34(UnkStruct_01ffbe34 *param1); + +struct UnkClass_027e1054_unk_00_unk00 { + /* 0x00 */ u8 mUnk_00[0x95]; + /* 0x95 */ u8 mUnk_95; +}; +struct UnkClass_027e1054_unk_00 { + /* 0x00 */ unk32 mUnk_04; + /* 0x00 */ UnkClass_027e1054_unk_00_unk00 *mUnk_00; +}; +class UnkClass_027e1054 { +public: + UnkClass_027e1054_unk_00 *mUnk_00; + unk32 mUnk_04; + + void func_ov003_020f4874(void); + void func_ov003_020f4760(u8, unk32); +}; +extern UnkClass_027e1054 data_027e1054; + +class UnkClass_ov000_020eec9c { +public: + void func_ov000_020d77e4(unk32); + unk32 func_ov000_020d7f18(unk32); +}; +extern UnkClass_ov000_020eec9c data_ov000_020eec9c; + +class UnkClass_ov000_027e0d04 { +public: + /* 0x00 */ unk16 mUnk_00; + + void func_0203fe60(unk32); +}; +extern UnkClass_ov000_027e0d04 data_027e0d04; + +class UnkClass_data_027e0f7c { +public: + u8 *func_ov000_0209d90c(s8, s8); +}; +extern UnkClass_data_027e0f7c data_027e0f7c; diff --git a/include/Player/LinkStateBase.hpp b/include/Player/LinkStateBase.hpp index bca6c796..14f4603d 100644 --- a/include/Player/LinkStateBase.hpp +++ b/include/Player/LinkStateBase.hpp @@ -14,13 +14,13 @@ typedef unk32 LinkStateId; enum LinkStateId_ { - LinkStateId_Move = 0, - LinkStateId_Item = 1, - LinkStateId_Grab = 2, - LinkStateId_Unk3 = 3, - LinkStateId_Unk4 = 4, - LinkStateId_Damage = 5, - LinkStateId_ItemGet = 6, + LinkStateId_Move = 0, + LinkStateId_Item = 1, + LinkStateId_Interact = 2, + LinkStateId_Follow = 3, + LinkStateId_Roll = 4, + LinkStateId_Damage = 5, + LinkStateId_Cutscene = 6, LinkStateId_COUNT }; @@ -60,7 +60,7 @@ public: void func_ov00_020a81b8(unk32 param1, unk32 param2); LinkStateItem *GetLinkItemState(); void LookAt(Vec3p *target); - void func_ov00_020a81fc(); + void func_ov00_020a81fc(Vec3p *param1, unk32 param2); void AddHealth(s16 amount); void func_ov00_020a8224(unk32 param1); void TurnTo(s16 angle, unk32 param2, unk32 speed); @@ -82,7 +82,7 @@ public: void Clear_PlayerLinkBase_Unk48(u16 flags); void func_ov00_020a8680(unk32 param1, unk16 param2, bool param3); void PlayerLinkBase_func_ov00_020bccc8(); - bool PlayerLinkBase_vfunc_58(); + bool PlayerLinkBase_vfunc_58(unk32 param1, ActorRef *param2); bool func_ov00_020a8704(s16 *pAngle); bool func_ov00_020a8774(Vec3p *param1, s32 angle); void func_ov00_020a8844(Vec3p *param1, bool param2, bool param3); @@ -90,7 +90,7 @@ public: void func_ov00_020a8994(); void func_ov00_020a89bc(unk32 param1, unk32 param2); void func_ov00_020a8a08(unk32 param1); - void func_ov00_020a8a4c(unk32 param1, unk32 param2); + void func_ov00_020a8a4c(const void *param1, unk32 param2); void func_ov00_020a8a90(unk32 param1); void func_ov00_020a8ab0(unk32 param1); void func_ov00_020a8ad0(unk32 param1); @@ -152,6 +152,6 @@ public: void func_ov005_021113c4(bool param1); }; -LinkStateBase *GetLinkState(s32 index); +LinkStateBase *GetLinkState(LinkStateId index); extern LinkStateBase **gLinkStates; diff --git a/include/Player/LinkStateCutscene.hpp b/include/Player/LinkStateCutscene.hpp index 224350fd..750f1b8a 100644 --- a/include/Player/LinkStateCutscene.hpp +++ b/include/Player/LinkStateCutscene.hpp @@ -16,7 +16,7 @@ public: /* 00 */ virtual ~UnkStruct_ov004_0210abb8() override; /* 08 */ virtual void vfunc_08(unk32 param1) override; - /* 24 */ virtual void vfunc_24(unk32 param1) override; + /* 24 */ virtual bool vfunc_24(unk32 param1) override; /* 2c */ virtual unk32 vfunc_2c(s32 param1) override; /* 34 */ }; diff --git a/include/Player/LinkStateDamage.hpp b/include/Player/LinkStateDamage.hpp index 0e3a70a7..02e2c526 100644 --- a/include/Player/LinkStateDamage.hpp +++ b/include/Player/LinkStateDamage.hpp @@ -8,6 +8,7 @@ #include "Render/ModelRender.hpp" class LinkStateDamage : public LinkStateBase { +public: /* 00 (base) */ /* 0c */ void *mUnk_0c; /* 10 */ unk32 mUnk_10; diff --git a/include/Player/LinkStateMove.hpp b/include/Player/LinkStateMove.hpp index 9b369e9c..a782b22d 100644 --- a/include/Player/LinkStateMove.hpp +++ b/include/Player/LinkStateMove.hpp @@ -7,13 +7,16 @@ class LinkStateMove : public LinkStateBase { public: + static unk32 data_ov000_020e56f0; + /* 00 (base) */ /* 0c */ s32 mUnk_0c; /* 10 */ unk16 mUnk_10; /* 12 */ unk16 mUnk_12; /* 14 */ bool mUnk_14; - /* 14 */ bool mUnk_15; - /* 16 */ unk8 mUnk_16[2]; + /* 15 */ bool mUnk_15; + /* 16 */ bool mUnk_16; + /* 17 */ bool mUnk_17; /* 18 */ /* 00 */ virtual void vfunc_00() override; diff --git a/include/Player/PlayerBase.hpp b/include/Player/PlayerBase.hpp index f7caf604..bb14a81f 100644 --- a/include/Player/PlayerBase.hpp +++ b/include/Player/PlayerBase.hpp @@ -48,8 +48,8 @@ public: void SetUpdatePos(bool updatePos); void SetVisible(bool visible); - EquipSword *GetEquipSword(); - EquipShield *GetEquipShield(); + static EquipSword *GetEquipSword(); + static EquipShield *GetEquipShield(); void LookAt(Vec3p *target); bool func_ov00_020a7c00(s32 param1); bool CollidesWith(Cylinder *cylinder); @@ -64,4 +64,4 @@ public: extern PlayerBase *gPlayer; extern Vec3p *gPlayerPos; extern Vec3p gPlayerVel; -extern s16 gPlayerAngle; +extern u16 gPlayerAngle; diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index f2cc23eb..11dd6488 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -11,7 +11,7 @@ #include "Player/TouchControl.hpp" #include "Player/TouchGesture.hpp" -typedef u16 TouchEdge; +typedef s16 TouchEdge; enum TouchEdge_ { TouchEdge_Right = 0, TouchEdge_Left = 1, @@ -28,7 +28,7 @@ public: /* 50 */ q20 mTouchSpeedX; // how fast the stylus moves /* 54 */ q20 mTouchSpeedY; /* 58 */ q20 mTouchDist; // pixel distance from touch to link, deadzone is 20 pixels - /* 5c */ unk32 mUnk_5c; + /* 5c */ q20 mTouchSpeed; /* 60 */ s16 mTouchDuration; /* 62 */ s16 mTouchSlowDuration; // resets to 0 if stylus is fast enough /* 64 */ s16 mTouchFastTime; // gets set to mTouchDuration if stylus is fast enough @@ -46,24 +46,23 @@ public: /* 79 */ bool mUsingEquipItem; /* 7a */ bool mUnk_7a; /* 7b */ bool mUnk_7b; - /* 7c */ s8 mUnk_7c; + /* 7c */ u8 mUnk_7c; /* 7d */ bool mUnk_7d; - /* 7e */ s8 mUnk_7e; + /* 7e */ u8 mUnk_7e; /* 7f */ bool mUnk_7f; /* 80 */ bool mUnk_80; /* 81 */ bool mFollowing; - /* 82 */ unk8 mUnk_82; + /* 82 */ bool mUnk_82; /* 83 */ bool mUnk_83; /* 84 */ ActorRef mFollowRef; /* 8c */ ActorRef mNextFollowRef; /* 94 */ ActorRef mLastFollowRef; - /* 9c */ unk8 mUnk_9c; - /* 9d */ unk8 mUnk_9d; + /* 9c */ Vec2b mUnk_9c; /* 9e */ unk8 mUnk_9e[2]; - /* a0 */ void *mFollowActor; + /* a0 */ void *mFollowObject; /* a4 */ q20 mFollowDist; - /* a8 */ u16 mFollowStuckTimer; - /* aa */ u16 mCutsceneEndTimer; + /* a8 */ s16 mFollowStuckTimer; + /* aa */ s16 mCutsceneEndTimer; /* ac */ s16 mUnk_ac; /* ae */ unk16 mUnk_ae; /* b0 */ Vec3p mAim; // used by boomerang, bow and rope @@ -75,11 +74,11 @@ public: /* d8 */ static bool func_ov00_020aeeac(); - void func_ov00_020aeef8(); + static bool func_ov00_020aeef8(); void func_ov00_020aef30(); void UpdateAim(); Actor *GetFollowActor(); - bool func_ov00_020af01c(unk8 *param1); + bool func_ov00_020af01c(Vec2b *param1); void SetUnk_80(); void StopFollowing(); void func_ov00_020af06c(); @@ -90,30 +89,30 @@ public: bool CheckTouching(u32 param1); bool CheckTouchFast(u32 param1); bool func_ov00_020af4a4(); - void func_ov00_020af538(); + void func_ov00_020af538(bool param1, u8 param2); void func_ov00_020af6e4(Vec3p *param1, s32 param3, s32 param4); bool func_ov00_020af778(); bool func_ov00_020afad8(Vec3p *param1); void func_ov00_020afb6c(); bool func_ov00_020afe88(s32 param1, bool param2); bool func_ov00_020afeec(unk32 param1, bool param2); - void func_ov00_020aff90(unk32 param1, unk32 param2); + void func_ov00_020aff90(Vec3p *param1, unk32 param2); void func_ov00_020affec(Vec3p *param1, s32 y, s32 param3, Vec3p *param4); - void func_ov00_020b014c(); - void SetAim(); + void func_ov00_020b014c(Vec3p *param1); + void ResetAim(); bool UpdateAimWorld(Vec3p *param1); s16 GetTouchAngle(); u32 func_ov00_020b034c(); s32 func_ov00_020b0418(); bool func_ov00_020b049c(Vec3p *param1, bool param2); bool func_ov00_020b05e8(Vec3p *param1); - bool func_ov00_020b0778(Vec3p *param1, u32 param2, unk32 param3); + bool func_ov00_020b0778(Vec3p *param1, u32 param2, unk32 *param3); bool CheckNotTouching(); bool func_ov00_020b0ad0(Actor *actor); bool func_ov00_020b0b0c(s16 *pAngle, ItemFlag *pEquipId, unk32 *pCardinal, bool *pFast); bool func_ov00_020b0de8(Vec3p *param1); bool func_ov00_020b0e54(Vec3p *param1, Vec3p *param2); - bool func_ov00_020b0f88(Vec3p *param1, unk32 param2, Vec3p *param3); + bool func_ov00_020b0f88(Vec3p *param1, unk32 scale, Vec3p *param3); bool func_ov00_020b1058(Vec3p *param1, unk32 param2, Vec3p *param3, Vec3p *param4); bool IsUntouchedNow(); bool IsNotUntouchedNow(); @@ -138,6 +137,8 @@ public: void Init(); void func_ov004_0210b1d0(); static void func_ov004_0210b1f0(); + + bool func_ov024_02178348(Vec3p *param1); }; extern PlayerControl *gPlayerControl; diff --git a/include/Player/PlayerControlData.hpp b/include/Player/PlayerControlData.hpp index 3527810c..cdcd8db8 100644 --- a/include/Player/PlayerControlData.hpp +++ b/include/Player/PlayerControlData.hpp @@ -87,8 +87,8 @@ public: /* 68 */ virtual void vfunc_68(unk32 param1, unk32 param2); /* 6c */ virtual void vfunc_6c(s32 param1, Vec3p *param2); /* 70 */ virtual void vfunc_70(s32 param1); - /* 74 */ virtual unk32 vfunc_74(); - /* 78 */ virtual unk32 vfunc_78(); + /* 74 */ virtual unk32 vfunc_74(s32 param1); + /* 78 */ virtual unk32 vfunc_78(s32 param1); /* 7c */ virtual unk32 vfunc_7c(); /* 80 */ @@ -105,3 +105,5 @@ public: PlayerControlData(); }; + +extern PlayerControlData *gPlayerControlData; diff --git a/include/Player/TouchControl.hpp b/include/Player/TouchControl.hpp index 1301e144..8970c032 100644 --- a/include/Player/TouchControl.hpp +++ b/include/Player/TouchControl.hpp @@ -5,6 +5,8 @@ #include "nds/math.h" #include "types.h" +extern u16 *data_0207aecc; + typedef u16 TouchFlags; enum TouchFlag_ { TouchFlag_TouchedNow = 0x0001, @@ -42,9 +44,11 @@ public: void Update(TouchState *state, u16 speed); bool func_ov00_0207aeac(); void UpdateConditionally(TouchState *state, u16 speed); - void func_ov00_0207af38(u16 speed, bool param2); + void func_ov00_0207af38(u16 speedIncrease, bool shouldIncrease); ~TouchControl(); static bool func_0202b864(Vec3p *param1, s32 size, unk8 param3); static bool func_0202b894(Vec3p *param1, s32 size, unk8 param3); }; + +void Fill16(int value, unsigned short *dst, int size); // TODO: Replace with header file diff --git a/include/Player/TouchGesture.hpp b/include/Player/TouchGesture.hpp index 5009525e..0ed897a7 100644 --- a/include/Player/TouchGesture.hpp +++ b/include/Player/TouchGesture.hpp @@ -22,7 +22,8 @@ public: class TouchGesture : public TouchGestureBase { public: /* 00 (base) */ - /* 05 */ unk8 mUnk_05[7]; + /* 05 */ unk8 mUnk_05[3]; + /* 08 */ s32 mUnk_08; /* 0c */ u16 mIndex; /* 0e */ unk16 mUnk_0e; /* 10 */ u16 mUnk_10[GESTURE_BUFFER_LENGTH]; diff --git a/include/Save/AdventureFlags.hpp b/include/Save/AdventureFlags.hpp index b076cd73..39d2e409 100644 --- a/include/Save/AdventureFlags.hpp +++ b/include/Save/AdventureFlags.hpp @@ -23,6 +23,10 @@ enum AdventureFlag_ { /* 0x30 */ AdventureFlag_Cannon = 48, + /* 0x33 */ AdventureFlag_RegalNecklace = 51, + + /* 0x7a */ AdventureFlag_CourageCrest = 122, + /* 0x7d */ AdventureFlag_Azurine = 125, /* 0x7e */ AdventureFlag_Crimsonine = 126, /* 0x7f */ AdventureFlag_Aquanine = 127, @@ -30,11 +34,26 @@ enum AdventureFlag_ { /* 0x8c */ AdventureFlag_SalvageArm = 140, + /* 0xa2 */ AdvantureFlag_HerosNewClothes = 162, + /* 0xa3 */ AdvantureFlag_Kaleidoscope = 163, + /* 0xa4 */ AdventureFlag_GuardNotebook = 164, + + /* 0xa7 */ AdventureFlag_WoodHeart = 167, + + /* 0xb6 */ AdventureFlag_SpawnFinalPhantoms = 182, + /* 0x126 */ AdventureFlag_ReceivedGoldenChimney = 294, /* 0x127 */ AdventureFlag_ReceivedGoldenHandrail = 295, /* 0x128 */ AdventureFlag_ReceivedGoldenCannon = 296, /* 0x129 */ AdventureFlag_ReceivedGoldenHull = 297, + /* 0x137 */ AdventureFlag_FrogGlyph_MercayIsland = 311, + /* 0x138 */ AdventureFlag_FrogGlyph_MolidaIsland = 312, + /* 0x139 */ AdventureFlag_FrogGlyph_BannanIsland = 313, + /* 0x13a */ AdventureFlag_FrogGlyph_DeeEssIsland = 314, + /* 0x13b */ AdventureFlag_FrogGlyph_IsleOfFrost = 315, + /* 0x13c */ AdventureFlag_FrogGlyph_NorthEast = 316, + /* 0x187 */ AdventureFlag_COUNT = 391, }; @@ -104,19 +123,19 @@ public: bool func_ov00_02097bcc(); bool func_ov00_02097bcc(s32 param2); s32 func_ov00_02097c08(); - bool Get_FlagsUnk_30_Flag(int index); - unk8 Get_FlagsUnk_49(int index); - unk8 Get_FlagsUnk_48(int index); - unk8 Get_FlagsUnk_4a(int index); - unk16 Get_FlagsUnk_42(int index); - unk16 Get_FlagsUnk_40(int index); - unk32 Get_FlagsUnk_38(int index); - unk32 Get_FlagsUnk_34(int index); - unk32 Get_FlagsUnk_44(int index); - static unk32 Get_FlagsUnk_30(int index); - static bool Get_FlagsUnk_00(int index, FlagsUnk2 *result); - bool Get_FlagsUnk_18(int index, FlagsUnk2 *result); - FlagsUnk *Get_FlagsUnk(int index); + bool Get_FlagsUnk_30_Flag(s32 index); + u8 Get_FlagsUnk_49(s32 index); + u8 Get_FlagsUnk_48(s32 index); + u8 Get_FlagsUnk_4a(s32 index); + u16 Get_FlagsUnk_42(s32 index); + u16 Get_FlagsUnk_40(s32 index); + unk32 Get_FlagsUnk_38(s32 index); + unk32 Get_FlagsUnk_34(s32 index); + unk32 Get_FlagsUnk_44(s32 index); + static unk32 Get_FlagsUnk_30(s32 index); + static bool Get_FlagsUnk_00(s32 index, FlagsUnk2 *result); + bool Get_FlagsUnk_18(s32 index, FlagsUnk2 *result); + FlagsUnk *Get_FlagsUnk(s32 index); bool func_ov00_02097e6c(); bool func_ov00_02097e7c(); bool func_ov00_02097ea4(); diff --git a/include/System/OverlayManager.hpp b/include/System/OverlayManager.hpp index 4c83bbe4..42118b57 100644 --- a/include/System/OverlayManager.hpp +++ b/include/System/OverlayManager.hpp @@ -2,74 +2,137 @@ #include "types.h" +#include <nds/overlay.h> + #include "Item/Item.hpp" +EXTERN_OVERLAY_ID(0); +EXTERN_OVERLAY_ID(1); +EXTERN_OVERLAY_ID(2); +EXTERN_OVERLAY_ID(3); +EXTERN_OVERLAY_ID(4); +EXTERN_OVERLAY_ID(5); +EXTERN_OVERLAY_ID(6); +EXTERN_OVERLAY_ID(7); +EXTERN_OVERLAY_ID(8); +EXTERN_OVERLAY_ID(9); +EXTERN_OVERLAY_ID(10); +EXTERN_OVERLAY_ID(11); +EXTERN_OVERLAY_ID(12); +EXTERN_OVERLAY_ID(13); +EXTERN_OVERLAY_ID(14); +EXTERN_OVERLAY_ID(15); +EXTERN_OVERLAY_ID(16); +EXTERN_OVERLAY_ID(17); +EXTERN_OVERLAY_ID(18); +EXTERN_OVERLAY_ID(19); +EXTERN_OVERLAY_ID(20); +EXTERN_OVERLAY_ID(21); +EXTERN_OVERLAY_ID(22); +EXTERN_OVERLAY_ID(23); +EXTERN_OVERLAY_ID(24); +EXTERN_OVERLAY_ID(25); +EXTERN_OVERLAY_ID(26); +EXTERN_OVERLAY_ID(27); +EXTERN_OVERLAY_ID(28); +EXTERN_OVERLAY_ID(29); +EXTERN_OVERLAY_ID(30); +EXTERN_OVERLAY_ID(31); +EXTERN_OVERLAY_ID(32); +EXTERN_OVERLAY_ID(33); +EXTERN_OVERLAY_ID(34); +EXTERN_OVERLAY_ID(35); +EXTERN_OVERLAY_ID(36); +EXTERN_OVERLAY_ID(37); +EXTERN_OVERLAY_ID(38); +EXTERN_OVERLAY_ID(39); +EXTERN_OVERLAY_ID(40); +EXTERN_OVERLAY_ID(41); +EXTERN_OVERLAY_ID(42); +EXTERN_OVERLAY_ID(43); +EXTERN_OVERLAY_ID(44); +EXTERN_OVERLAY_ID(45); +EXTERN_OVERLAY_ID(46); +EXTERN_OVERLAY_ID(47); +EXTERN_OVERLAY_ID(48); +EXTERN_OVERLAY_ID(49); +EXTERN_OVERLAY_ID(50); +EXTERN_OVERLAY_ID(51); +EXTERN_OVERLAY_ID(52); +EXTERN_OVERLAY_ID(53); +EXTERN_OVERLAY_ID(54); +EXTERN_OVERLAY_ID(55); +EXTERN_OVERLAY_ID(56); +EXTERN_OVERLAY_ID(57); +EXTERN_OVERLAY_ID(58); +EXTERN_OVERLAY_ID(59); +EXTERN_OVERLAY_ID(60); +EXTERN_OVERLAY_ID(61); + typedef u32 OverlayId; -enum OverlayId_ { - OverlayId_None = -1, - OverlayId_Core, - OverlayId_01, - OverlayId_02, - OverlayId_03, - OverlayId_Memory, - OverlayId_05, - OverlayId_06, - OverlayId_07, - OverlayId_08, - OverlayId_09, - OverlayId_10, - OverlayId_11, - OverlayId_12, - OverlayId_13, - OverlayId_Land, - OverlayId_15, - OverlayId_16, - OverlayId_17, - OverlayId_18, - OverlayId_19, - OverlayId_20, - OverlayId_21, - OverlayId_22, - OverlayId_23, - OverlayId_24, - OverlayId_25, - OverlayId_26, - OverlayId_27, - OverlayId_28, - OverlayId_29, - OverlayId_30, - OverlayId_31, - OverlayId_32, - OverlayId_33, - OverlayId_34, - OverlayId_35, - OverlayId_36, - OverlayId_37, - OverlayId_38, - OverlayId_39, - OverlayId_40, - OverlayId_41, - OverlayId_42, - OverlayId_43, - OverlayId_44, - OverlayId_45, - OverlayId_46, - OverlayId_47, - OverlayId_48, - OverlayId_49, - OverlayId_50, - OverlayId_51, - OverlayId_52, - OverlayId_PlayerBoomerang, - OverlayId_PlayerScoop, - OverlayId_PlayerBomb, - OverlayId_PlayerBow, - OverlayId_PlayerRope, - OverlayId_PlayerBombchu, - OverlayId_PlayerHammer, - OverlayId_60, - OverlayId_61, -}; +#define OverlayId_None -1 +#define OverlayId_Core OVERLAY_ID(0) +#define OverlayId_01 OVERLAY_ID(1) +#define OverlayId_02 OVERLAY_ID(2) +#define OverlayId_03 OVERLAY_ID(3) +#define OverlayId_Memory OVERLAY_ID(4) +#define OverlayId_05 OVERLAY_ID(5) +#define OverlayId_06 OVERLAY_ID(6) +#define OverlayId_07 OVERLAY_ID(7) +#define OverlayId_08 OVERLAY_ID(8) +#define OverlayId_09 OVERLAY_ID(9) +#define OverlayId_10 OVERLAY_ID(10) +#define OverlayId_11 OVERLAY_ID(11) +#define OverlayId_12 OVERLAY_ID(12) +#define OverlayId_13 OVERLAY_ID(13) +#define OverlayId_Land OVERLAY_ID(14) +#define OverlayId_15 OVERLAY_ID(15) +#define OverlayId_16 OVERLAY_ID(16) +#define OverlayId_17 OVERLAY_ID(17) +#define OverlayId_18 OVERLAY_ID(18) +#define OverlayId_19 OVERLAY_ID(19) +#define OverlayId_20 OVERLAY_ID(20) +#define OverlayId_21 OVERLAY_ID(21) +#define OverlayId_22 OVERLAY_ID(22) +#define OverlayId_23 OVERLAY_ID(23) +#define OverlayId_24 OVERLAY_ID(24) +#define OverlayId_25 OVERLAY_ID(25) +#define OverlayId_26 OVERLAY_ID(26) +#define OverlayId_27 OVERLAY_ID(27) +#define OverlayId_28 OVERLAY_ID(28) +#define OverlayId_29 OVERLAY_ID(29) +#define OverlayId_30 OVERLAY_ID(30) +#define OverlayId_31 OVERLAY_ID(31) +#define OverlayId_32 OVERLAY_ID(32) +#define OverlayId_33 OVERLAY_ID(33) +#define OverlayId_34 OVERLAY_ID(34) +#define OverlayId_35 OVERLAY_ID(35) +#define OverlayId_36 OVERLAY_ID(36) +#define OverlayId_37 OVERLAY_ID(37) +#define OverlayId_38 OVERLAY_ID(38) +#define OverlayId_39 OVERLAY_ID(39) +#define OverlayId_40 OVERLAY_ID(40) +#define OverlayId_41 OVERLAY_ID(41) +#define OverlayId_42 OVERLAY_ID(42) +#define OverlayId_43 OVERLAY_ID(43) +#define OverlayId_44 OVERLAY_ID(44) +#define OverlayId_45 OVERLAY_ID(45) +#define OverlayId_46 OVERLAY_ID(46) +#define OverlayId_47 OVERLAY_ID(47) +#define OverlayId_48 OVERLAY_ID(48) +#define OverlayId_49 OVERLAY_ID(49) +#define OverlayId_50 OVERLAY_ID(50) +#define OverlayId_51 OVERLAY_ID(51) +#define OverlayId_52 OVERLAY_ID(52) +#define OverlayId_PlayerBoomerang OVERLAY_ID(53) +#define OverlayId_PlayerScoop OVERLAY_ID(54) +#define OverlayId_PlayerBomb OVERLAY_ID(55) +#define OverlayId_PlayerBow OVERLAY_ID(56) +#define OverlayId_PlayerRope OVERLAY_ID(57) +#define OverlayId_PlayerBombchu OVERLAY_ID(58) +#define OverlayId_PlayerHammer OVERLAY_ID(59) +#define OverlayId_60 OVERLAY_ID(60) +#define OverlayId_61 OVERLAY_ID(61) typedef u32 OverlayIndex; enum OverlayIndex_ { diff --git a/include/System/Random.hpp b/include/System/Random.hpp index 4506466d..cc1f2a12 100644 --- a/include/System/Random.hpp +++ b/include/System/Random.hpp @@ -19,4 +19,4 @@ struct Random { } }; -extern Random *gRandom; +extern Random gRandom; diff --git a/include/Unknown/UnkStruct_0202e1a0.hpp b/include/Unknown/UnkStruct_0202e1a0.hpp index a99956bc..d6d6a793 100644 --- a/include/Unknown/UnkStruct_0202e1a0.hpp +++ b/include/Unknown/UnkStruct_0202e1a0.hpp @@ -3,6 +3,7 @@ #include "global.h" #include "types.h" +// astruct_11 struct UnkStruct_0202e1a0 { /* 00 */ unk16 mUnk_00; /* 02 */ unk16 mUnk_02; diff --git a/include/Unknown/UnkStruct_02032f0c.hpp b/include/Unknown/UnkStruct_02032f0c.hpp index 602861bd..ec589e51 100644 --- a/include/Unknown/UnkStruct_02032f0c.hpp +++ b/include/Unknown/UnkStruct_02032f0c.hpp @@ -3,10 +3,13 @@ #include "global.h" #include "types.h" -class UnkStruct_02032e7c { +#include "Message/BMG.hpp" +#include "System/SysNew.hpp" + +class UnkStruct_02032e7c : public SysObject { public: /* 00 (vtable) */ - /* 04 */ unk32 mUnk_04; + /* 04 */ u16 *mUnk_04; // pointer to the current position in the message to display /* 08 */ unk16 mUnk_08; /* 0a */ unk16 mUnk_0a; /* 0c */ unk16 mUnk_0c; @@ -20,20 +23,80 @@ public: UnkStruct_02032e7c(); }; -class UnkStruct_02032f0c { +class UnkSubClass1_02256FF8 { public: /* 00 (vtable) */ /* 04 */ unk32 mUnk_04; /* 08 */ unk32 mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk32 mUnk_10; + /* 14 */ unk32 mUnk_14; + /* 18 */ unk32 mUnk_18; + /* 1c */ u8 mUnk_1c; + /* 20 */ + + UnkSubClass1_02256FF8(); + /* 00 */ virtual ~UnkSubClass1_02256FF8() override; + /* 08 */ virtual void vfunc_08(void) override; + /* 0c */ virtual void vfunc_0c(void) override; + /* 10 */ virtual void vfunc_10(void) override; + /* 14 */ virtual void vfunc_14(void) override; + /* 18 */ virtual void vfunc_18(void) override; + /* 1c */ virtual void vfunc_1c(void) override; + /* 20 */ virtual void vfunc_20(void) override; + /* 24 */ virtual void vfunc_24(void) override; + /* 28 */ virtual void vfunc_28(void) override; + /* 2c */ virtual void vfunc_2c(void) override; + /* 30 */ virtual void vfunc_30(void) override; + /* 34 */ virtual void vfunc_34(void) override; + /* 38 */ virtual void vfunc_38(void) override; + /* 3c */ +}; + +struct UnkStruct_MsgProc_Base_unk_2C { + /* 00 */ s8 mUnk_00; + /* 01 */ s8 mUnk_01; + /* 02 */ s8 mUnk_02; + /* 03 */ s8 mUnk_03; + /* 04 */ unk32 mUnk_04; + /* 08 */ u8 *mUnk_08; + /* 0c */ +}; + +struct func_0203b410_param1 { + /* 00 */ unk32 mUnk_00; + /* 04 */ unk32 mUnk_04; + /* 08 */ unk32 mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk16 mUnk_10; + /* 12 */ unk16 mUnk_12; + /* 14 */ +}; + +// astruct_8, MsgProc_Base +class UnkStruct_02032f0c : public SysObject { +public: + /* 00 (vtable) */ + /* 04 */ unk32 *mUnk_04; + /* 08 */ UnkSubClass1_02256FF8 *mUnk_08; /* 0c */ u16 *mUnk_0c; - /* 10 */ unk32 mUnk_10[6]; - /* 28 */ unk32 mUnk_28; - /* 2c */ s32 **mUnk_2c; + /* 10 */ unk32 *mUnk_10; + /* 14 */ s32 mUnk_14; + /* 18 */ s32 mUnk_18; + /* 1c */ unk32 mUnk_1c; + /* 20 */ unk32 mUnk_20; + /* 24 */ unk32 *mUnk_24; + /* 28 */ unk32 *mUnk_28; + /* 2c */ UnkStruct_MsgProc_Base_unk_2C **mUnk_2c; /* 30 */ s32 mUnk_30; /* 34 */ s32 mUnk_34; /* 38 */ unk32 mUnk_38; /* 3c */ unk16 mUnk_3c; - /* 3e */ unk16 mUnk_3e[6]; + /* 3e */ unk16 mUnk_3e; + /* 40 */ unk32 mUnk_40; + /* 44 */ unk32 mUnk_44; + /* 48 */ u8 mUnk_48; + /* 49 */ u8 mUnk_49; /* 4a */ u16 mUnk_4a; /* 4c */ u8 mUnk_4c; /* 4d */ bool mUnk_4d; @@ -54,12 +117,47 @@ public: /* 24 */ virtual bool vfunc_24(s16 **param1); /* 28 */ + // /* 0x08 */ /* func_02033030 */ virtual void vfunc_08(unk32* param_2, unk32* param_3); + // /* 0x0C */ /* func_02033190 */ virtual void vfunc_0C(u8 param_2, u8 param_3, u8 param_4, unk32 param_5); + // /* 0x10 */ /* func_020331c4 */ virtual void vfunc_10(u8 param_2, u8 param_3); + // /* 0x14 */ /* func_02032fcc */ virtual bool vfunc_14(u16 param_2, u8 param_3); + // /* 0x18 */ /* func_020332e4 */ virtual unk32 vfunc_18(UnkStruct_0203b264* param_2, unk32 param_3, unk32 param_4); + // /* 0x1C */ /* func_02033360 */ virtual unk32 vfunc_1C(u16* param_2, UnkStruct_0203b264* param_3, unk8 param_4, unk32 + // param_5); + // /* 0x20 */ /* func_020333e0 */ virtual UNK_TYPE vfunc_20(UNK_TYPE); + // /* 0x24 */ /* func_02033af4 */ virtual UNK_TYPE vfunc_24(UNK_TYPE); + + //! TODO: fake? + /* 28 */ virtual bool vfunc_28(void); + /* 2c */ virtual void vfunc_2C(void); + /* 30 */ virtual void vfunc_30(void); + /* 34 */ virtual unk32 vfunc_34(unk32 param_2); + /* 38 */ virtual bool vfunc_38(void); + /* 3c */ virtual void vfunc_3C(unk32 param_2); + /* 40 */ virtual void vfunc_40(unk32 param_2, unk32 param_3); + /* 44 */ virtual void vfunc_44(s32 touchLastX, s32 touchLastY); + /* 48 */ virtual void vfunc_48(void); + /* 4c */ virtual void vfunc_4C(void); + /* 50 */ virtual void vfunc_50(EntryINF1 *param_2, u32 param_3, s16 *param_4, UnkSubClass1_02256FF8 *param_5); + /* 54 */ virtual void vfunc_54(void); + /* 58 */ virtual void vfunc_58(void); + /* 5c */ virtual void vfunc_5C(void); + /* 60 */ virtual void vfunc_60(func_0203b410_param1 *param_2, unk32 param_3, unk32 param_4); + /* 64 */ virtual void vfunc_64(s16 *param_2); + /* 68 */ virtual unk32 vfunc_68(unk32 param_2); + /* 6c */ virtual void vfunc_6C(unk32 *param_2, unk32 *param_3); + /* 70 */ virtual void vfunc_70(unk32 *param_2, unk32 *param_3); + /* 74 */ + UnkStruct_02032f0c(); void func_02032f94(); + unk32 *func_02032f98(unk32 param_2); u16 **SetUnk_0c(u16 *value); u8 func_02032fa4(); s32 func_02032fb4(); + void func_02032fcc(unk32, unk32); void func_02033214(unk32 param1, unk32 param2, unk32 param3, u8 param4, unk32 param5); + unk32 func_02033360(void); void func_020334b4(u32 param1, s32 param2, s32 param3, s32 param4); void func_02033628(unk32 param1, u16 *param2); u32 func_0203369c(u16 *param1, s32 param2); diff --git a/include/Unknown/UnkStruct_02035064.hpp b/include/Unknown/UnkStruct_02035064.hpp index 69011e21..a55b8808 100644 --- a/include/Unknown/UnkStruct_02035064.hpp +++ b/include/Unknown/UnkStruct_02035064.hpp @@ -8,19 +8,33 @@ class UnkStruct_02035064 { public: /* 00 (vtable) */ - /* 04 */ unk32 mUnk_04; - /* 08 */ unk8 mUnk_08[0xc]; + /* 04 */ unk16 mUnk_04; + /* 04 */ unk16 mUnk_06; + /* 08 */ u32 *mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk32 mUnk_10; /* 14 */ u32 mUnk_14; - /* 18 */ unk8 mUnk_18[0x4]; + /* 18 */ unk32 mUnk_18; /* 1c */ unk32 mUnk_1c; - /* 20 */ u32 mUnk_20; - /* 24 */ unk8 mUnk_24[0x28]; + /* 20 */ u32 *mUnk_20; + /* 24 */ unk32 mUnk_24; + /* 28 */ unk32 mUnk_28; + /* 2c */ unk32 mUnk_2c; + /* 30 */ unk32 mUnk_30; + /* 34 */ u32 *mUnk_34; + /* 38 */ u32 *mUnk_38; + /* 3c */ unk32 mUnk_3c; + /* 40 */ unk32 mUnk_40; + /* 44 */ unk32 mUnk_44; + /* 48 */ unk32 mUnk_48; /* 4c */ s16 mUnk_4c; /* 4e */ s16 mUnk_4e; - /* 50 */ unk8 mUnk_50[0xc]; + /* 50 */ unk32 mUnk_50; + /* 54 */ unk32 mUnk_54; + /* 58 */ unk32 mUnk_58; /* 5c */ UnkStruct_0202e1a0 mUnk_5c; /* 74 */ u16 *mUnk_74; - /* 78 */ s32 mUnk_78; + /* 78 */ s32 *mUnk_78; /* 7c */ u32 mUnk_7c; /* 80 */ u16 mUnk_80; /* 82 */ unk16 mUnk_82; @@ -29,13 +43,17 @@ public: /* 87 */ unk8 mUnk_87; /* 88 */ - /* 0 */ virtual s32 vfunc_0(); - /* 4 */ virtual s32 vfunc_4(); + /* 0 */ virtual s32 vfunc_00(); // func_020351a8 + /* 4 */ virtual s32 vfunc_04(); // func_020351b0 /* 8 */ UnkStruct_02035064(); ~UnkStruct_02035064(); + static u8 func_02035428(u8 param1); + + void func_02034a1c(unk32, unk32, struct UnkStruct_01ffbe34 *); + void func_02034b0c(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5, unk32 param_6); void func_020350b0(); void func_020350b4(s32 param1, unk32 param2, unk8 param3, unk16 param4, unk16 param5); void func_0203516c(); diff --git a/include/Unknown/UnkStruct_02037750.hpp b/include/Unknown/UnkStruct_02037750.hpp index 5fe84a89..a480c1a3 100644 --- a/include/Unknown/UnkStruct_02037750.hpp +++ b/include/Unknown/UnkStruct_02037750.hpp @@ -4,50 +4,77 @@ #include "types.h" #include "Player/LinkStateInteract.hpp" +#include "System/SysNew.hpp" -class UnkStruct_02037750 { +class UnkStruct_020397f8; +typedef unk32 (*UnkStruct_02037750_Callback1)(unk32); + +// astruct_14 +class UnkStruct_02037750 : public SysObject { public: /* 00 (vtable) */ - /* 04 */ unk32 mUnk_04[0x4]; + /* 04 */ UnkStruct_02037750_Callback1 mUnk_04[0x4]; /* 14 */ unk32 mUnk_14; - /* 18 */ unk32 mUnk_18; + /* 18 */ u32 mUnk_18; /* 1c */ u8 mUnk_1c; - /* 1d */ unk8 mUnk_1d; + /* 1d */ u8 mUnk_1d; /* 1e */ u16 mUnk_1e; /* 20 */ /* 00 */ virtual ~UnkStruct_02037750(); - /* 08 */ virtual void vfunc_08(unk32 param1); - /* 0c */ virtual void vfunc_0c(s32 param1); + /* 08 */ virtual void vfunc_08(u32 param1); + /* 0c */ virtual void vfunc_0c(class UnkStruct_020397f8 *param1); /* 10 */ virtual void vfunc_10(); /* 14 */ virtual void vfunc_14(); - /* 18 */ virtual void vfunc_18(); - /* 1c */ virtual unk32 vfunc_1c(); + /* 18 */ virtual void vfunc_18(unk32 *param1); + /* 1c */ virtual bool vfunc_1c(); /* 20 */ virtual void vfunc_20(); - /* 24 */ virtual void vfunc_24(unk32 param1); - /* 28 */ virtual void vfunc_28(s32 param1); + /* 24 */ virtual bool vfunc_24(unk32 param1); + /* 28 */ virtual unk32 vfunc_28(s32 param1); /* 2c */ virtual unk32 vfunc_2c(s32 param1); - /* 30 */ virtual unk32 vfunc_30(); + /* 30 */ virtual bool vfunc_30(); /* 34 */ UnkStruct_02037750(unk32 param1, unk32 param2); - LinkStateInteract *GetLinkStateInteract(); - void func_020385d0(s32 param1, unk32 *param2); + static LinkStateInteract *GetLinkStateInteract(); + unk32 func_020385d0(s32 param1, u8 *param2); +}; + +class UnkStruct_020386d8_24 { +public: + /* 00 */ u8 mUnk_00; + /* 00 */ u8 mUnk_01; + /* 00 */ u8 mUnk_02; + /* 00 */ u8 mUnk_03; + /* 04 */ + + void func_020376c0(const Vec3p *param_2); }; +// astruct_15 class UnkStruct_020386d8 : public UnkStruct_02037750 { public: /* 00 (base) */ /* 20 */ unk8 mUnk_20; - /* 21 */ unk8 mUnk_21[0x3]; - /* 24 */ unk32 mUnk_24; - /* 28 */ + /* 21 */ unk8 mUnk_21; + /* 21 */ unk8 mUnk_22; + /* 21 */ unk8 mUnk_23; + /* 24 */ UnkStruct_020386d8_24 mUnk_24; + /* 28 */ unk32 mUnk_28; + /* 2C */ unk32 mUnk_2C; + /* 30 */ unk32 mUnk_30; + /* 34 */ unk16 mUnk_34; + /* 36 */ unk16 mUnk_36; + /* 38 */ u8 mUnk_38; + /* 39 */ u8 mUnk_39; + /* 3A */ unk16 mUnk_3A; + /* 3C */ UnkStruct_020386d8(); /* 00 */ virtual ~UnkStruct_020386d8(); - /* 08 */ virtual void vfunc_08(unk32 param1); - /* 24 */ virtual void vfunc_24(unk32 param1); - /* 28 */ virtual void vfunc_28(); - /* 30 */ virtual unk32 vfunc_30(); + /* 08 */ virtual void vfunc_08(u32 param1); + /* 24 */ virtual bool vfunc_24(unk32 param1); + /* 28 */ virtual unk32 vfunc_28(s32 param1); + /* 30 */ virtual bool vfunc_30(); /* 34 */ }; diff --git a/include/Unknown/UnkStruct_02038aa0.hpp b/include/Unknown/UnkStruct_02038aa0.hpp index 63d63fe2..c0f31f16 100644 --- a/include/Unknown/UnkStruct_02038aa0.hpp +++ b/include/Unknown/UnkStruct_02038aa0.hpp @@ -3,17 +3,21 @@ #include "global.h" #include "types.h" +#include "Message/MsgProc.hpp" +#include "System/SysNew.hpp" #include "Unknown/UnkStruct_0203dae0.hpp" +#include "nds/math.h" class UnkStruct_02038aa0; +typedef bool (*UnknownCallback)(class UnkStruct_020397f8 *); class UnkStruct_0203881c : public UnkStruct_02032e7c { public: /* 00 (base) */ /* 14 */ unk32 mUnk_14; /* 18 */ unk32 mUnk_18; - /* 1c */ unk32 mUnk_1c; - /* 20 */ unk32 mUnk_20; + /* 1c */ UnknownCallback mUnk_1c; + /* 20 */ class UnkStruct_020397f8 *mUnk_20; /* 24 */ unk32 mUnk_24; /* 28 */ @@ -27,45 +31,65 @@ public: void func_02038a80(s32 param1); }; +class UnkSubClass1_unk_124 { +public: + /* 00 */ void *mUnk_00; // pointer to MsgProc_Main (well, the first members of the base class) + /* 04 */ unk32 mUnk_04; + /* 08 */ unk32 mUnk_08; + /* 0c */ unk32 mUnk_0c; + /* 10 */ unk32 mUnk_10; + /* 14 */ unk32 mUnk_14; + /* 18 */ unk32 mUnk_18; + /* 1c */ unk32 mUnk_1c; + /* 20 */ unk32 mUnk_20; + /* 24 */ unk32 mUnk_24; + /* 28 */ unk8 mUnk_28; + /* 29 */ unk8 mUnk_29; + /* 2a */ unk8 mUnk_2a; + /* 2b */ unk8 mUnk_2b; + /* 2c */ + + void func_0203f020(s16 *, unk32); +}; + +struct UnkStruct_0203b264; +struct func_02038f44_param4; + +// astruct_6, MsgProc_Main class UnkStruct_02038aa0 : public UnkStruct_0203dae0 { public: /* 000 (base) */ /* 123 */ unk8 mUnk_123; - /* 124 */ unk32 mUnk_124; - /* 128 */ unk32 mUnk_128; - /* 12c */ unk32 mUnk_12c; - /* 130 */ unk8 mUnk_130[0x20]; - /* 150 */ unk8 mUnk_150; - /* 151 */ unk8 mUnk_151; - /* 152 */ unk8 mUnk_152; - /* 153 */ unk8 mUnk_153; - /* 154 */ unk32 mUnk_154; - /* 158 */ unk8 mUnk_158[0x2]; - /* 15a */ unk16 mUnk_15a; - /* 15c */ unk16 mUnk_15c; - /* 15e */ u8 mUnk_15e; - /* 15f */ u8 mUnk_15f; + /* 124 */ UnkSubClass1_unk_124 *mUnk_124; + /* 128 */ UnkStruct_0203881c mUnk_128; + /* 150 */ u8 mUnk_150[4]; + /* 154 */ EntryINF1 *pInfoEntry; + /* 158 */ Vec2s mUnk_158; // textbox position? + /* 15c */ s16 mUnk_15c; + /* 15e */ s8 mUnk_15e; + /* 15f */ s8 mUnk_15f; /* 160 */ u8 mUnk_160; /* 161 */ /* 00 */ virtual ~UnkStruct_02038aa0(); - /* 08 */ virtual void vfunc_08(s32 param1, unk32 param2, s16 *param3, unk32 param4); - /* 10 */ virtual void vfunc_10(unk32 param1); + /* 08 */ virtual void vfunc_08(s32 param1, unk32 *param2, s16 *param3, unk32 param4); + /* 0c */ virtual void vfunc_0c(u8 param_2, u8 param_3, u8 param_4, unk32 param_5); + /* 10 */ virtual void vfunc_10(); /* 1c */ virtual unk32 vfunc_1c(s32 param1, unk32 *param2, unk32 param3, unk32 param4); /* 20 */ virtual unk32 vfunc_20(s32 param1, s32 *param2); /* 2c */ virtual void vfunc_2c(); - /* 30 */ virtual void vfunc_30(); + /* 30 */ virtual void vfunc_30(unk32 param_2, unk32 param_3); /* 34 */ virtual unk32 vfunc_34(s32 param1); - /* 38 */ virtual unk32 vfunc_38(); - /* 3c */ virtual void vfunc_3c() = 0; - /* 40 */ virtual void vfunc_40() = 0; - /* 44 */ virtual void vfunc_44(); + /* 38 */ virtual bool vfunc_38(); + /* 3c */ virtual void vfunc_3c(); + /* 40 */ virtual void vfunc_40(); + /* 44 */ virtual void vfunc_44(s32 touchLastX, s32 touchLastY); /* 48 */ virtual void vfunc_48(); - /* 4c */ virtual void vfunc_4c(); - /* 50 */ virtual void vfunc_50(unk32 param1, unk32 param2, s32 param3, unk32 param4); + /* 4c */ virtual void vfunc_4c(u32 param1, unk32 param2); + /* 50 */ virtual void vfunc_50(EntryINF1 *param1, u32 param2, s16 *param3, UnkSubClass1_02256FF8 *param4); /* 54 */ virtual void vfunc_54(); /* 58 */ virtual void vfunc_58(); - /* 5c */ virtual void vfunc_5c(); + /* 5c */ virtual void vfunc_5c(u16 *param_2, struct UnkStruct_0203b264 *param_3, unk8 param_4, unk32 param_5); /* 60 */ virtual void vfunc_60(); /* 64 */ virtual void vfunc_64(); /* 68 */ virtual s32 vfunc_68(unk32 param1); @@ -73,6 +97,21 @@ public: /* 70 */ virtual void vfunc_70(s32 *param1, s32 *param2); /* 74 */ + // /* 0x08 */ /* func_02039228 */ virtual void vfunc_08(unk32* param_2, unk32* param_3) override; + // /* 0x0C */ virtual void vfunc_0C(u8 param_2, u8 param_3, u8 param_4, unk32 param_5) override; + // /* 0x10 */ virtual void vfunc_10(u8 param_2, u8 param_3) override; // func_0203e060? + // /* 0x14 */ virtual bool vfunc_14(unk32 param_2, unk32 param_3) override; + // /* 0x18 */ virtual unk32 vfunc_18(UnkStruct_0203b264* param_2, unk32 param_3, unk32 param_4) override; + // /* 0x1C */ /* func_0203905c */ virtual unk32 vfunc_1C(u16* param_2, UnkStruct_0203b264* param_3, unk8 param_4, unk32 + // param_5) override; + // /* 0x20 */ /* func_020390a4 */ virtual UNK_TYPE vfunc_20(UNK_TYPE) override; + // /* 0x24 */ virtual UNK_TYPE vfunc_24(UNK_TYPE) override; + // /* 0x28 */ virtual bool vfunc_28(void) override; + // /* 0x2C */ /* func_02038d20 */ virtual void vfunc_2C(void) override; + // /* 0x30 */ /* func_02038ed0 */ virtual void vfunc_30(void) override; + // /* 0x34 */ /* func_02038c34 */ virtual unk32 vfunc_34(unk32 param_2) override; + // /* 0x38 */ /* func_02039570 */ virtual bool vfunc_38(void) override; + UnkStruct_02038aa0(u8 param1, u8 param2); void func_02038b40(); bool func_02038b78(); @@ -84,4 +123,38 @@ public: unk32 func_02039250(); void func_02039440(unk32 param1, unk32 param2); bool func_0203951c(); + + static void func_020387e0(u8 *param_2); + + unk32 func_02032fb4(void); + u16 *func_02037604(u16 **); + void func_02038b28(void); + void func_02038b74(void); // is this a dtor? + void func_02038f40(void); + void func_02038f44(EntryINF1 *param_2, u32 param_3, struct func_02038f44_param4 *param_4, UnkSubClass1_02256FF8 *param_5, + unk32 param_6); + void func_02039058(void); + unk32 func_0203905c(u16 *param_2, UnkStruct_0203b264 *param_3, unk8 param_4, unk32 param_5); + void func_02038d20(void); + void func_020392b4(void); + void func_02039398(void); + void func_020393a8(s16 *param_2); + void func_0203a188(unk32, unk32); + unk32 func_0203a3e0(void); + unk32 func_0203cb5c(unk8, s16); + + void func_0203dcfc(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5); + unk32 func_0203de14(unk32); + void func_0203e090(void); + void func_0203e1b0(unk32, unk32, unk32); + + //! TODO: not sure it belongs to this class: + + void func_02033190(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5); + void func_020331c4(unk32, unk32); + void func_0203947c(void); + void func_0203cabc(unk32); + unk32 func_0203e284(UnkStruct_0203b264 *, unk32, unk32); + void func_0203e2ac(unk32 *param_2); + s16 func_0203d318(s16, s16); }; diff --git a/include/Unknown/UnkStruct_020397f8.hpp b/include/Unknown/UnkStruct_020397f8.hpp index 53c37017..668f1922 100644 --- a/include/Unknown/UnkStruct_020397f8.hpp +++ b/include/Unknown/UnkStruct_020397f8.hpp @@ -3,42 +3,72 @@ #include "global.h" #include "types.h" +#include "Message/MsgProc.hpp" +#include "System/SysNew.hpp" #include "Unknown/UnkStruct_02035064.hpp" #include "Unknown/UnkStruct_02038aa0.hpp" +// does it host both choices? +struct UnknownMsgChoiceStruct { + /* 00 */ UnkStruct_0203b264 *mUnk_00; + /* 04 */ unk32 mUnk_04; + /* 08 */ +}; + +class UnkStruct_020397f8_410; + +// astruct_2, MsgProc_Type1 class UnkStruct_020397f8 : public UnkStruct_02038aa0 { public: /* 000 (base) */ /* 161 */ unk8 mUnk_161[0x3]; - /* 164 */ unk32 mUnk_164; + /* 164 */ UnkStruct_020397f8 *mUnk_164; /* 168 */ UnkStruct_02035064 mUnk_168; /* 1f0 */ UnkStruct_02035064 mUnk_1f0; /* 278 */ UnkStruct_02035064 mUnk_278; /* 300 */ UnkStruct_02035064 mUnk_300; /* 388 */ UnkStruct_02035064 mUnk_388; - /* 410 */ unk32 *mUnk_410; + /* 410 */ UnkStruct_020397f8_410 mUnk_410; /* 414 */ unk32 mUnk_414; - /* 418 */ unk32 mUnk_418; + /* 418 */ UnkStruct_02038aa0 *mUnk_418; /* 41c */ unk16 mUnk_41c; /* 41e */ unk16 mUnk_41e; /* 420 */ unk16 mUnk_420; - /* 422 */ unk8 mUnk_422[0x2]; - /* 424 */ unk32 *mUnk_424; - /* 428 */ unk32 mUnk_428; - /* 42c */ unk8 mUnk_42c[0x124]; + /* 422 */ unk16 mUnk_422; + /* 424 */ UnkStruct_020397f8_424 mUnk_424; + /* 428 */ UnknownMsgChoiceStruct mUnk_428[0x20]; + /* 528 */ unk16 mUnk_528[4]; // number of choices? + /* 530 */ unk32 mUnk_530; + /* 534 */ unk16 mUnk_534; + /* 536 */ unk16 mUnk_536; + /* 538 */ unk16 mUnk_538; + /* 53a */ unk16 mUnk_53a; + /* 53c */ unk32 mUnk_53c; + /* 540 */ unk32 mUnk_540; + /* 544 */ unk8 mUnk_544; + /* 545 */ unk8 mUnk_545; + /* 546 */ unk8 mUnk_546; + /* 547 */ unk8 mUnk_547; + /* 548 */ unk16 mUnk_548; + /* 54a */ unk16 mUnk_54a; + /* 54c */ unk16 mUnk_54c; + /* 54e */ unk16 mUnk_54e; /* 550 */ unk32 mUnk_550; /* 554 */ unk32 mUnk_554; - /* 558 */ unk8 mUnk_558[0x4]; + /* 558 */ unk8 mUnk_558; + /* 559 */ unk8 mUnk_559; + /* 55a */ unk8 mUnk_55a; + /* 55b */ unk8 mUnk_55b; /* 55c */ unk32 mUnk_55c; /* 560 */ unk32 mUnk_560; - /* 564 */ unk8 mUnk_564[0x8]; + /* 564 */ u16 mUnk_564[4]; /* 56c */ unk16 mUnk_56c; /* 56e */ unk16 mUnk_56e; /* 570 */ unk16 mUnk_570; - /* 572 */ unk16 mUnk_572; - /* 574 */ unk16 mUnk_574; + /* 572 */ u16 mUnk_572; + /* 574 */ s16 mUnk_574; /* 576 */ unk16 mUnk_576; - /* 578 */ unk16 mUnk_578; + /* 578 */ s16 mUnk_578; /* 57a */ u8 mUnk_57a; /* 57b */ u8 mUnk_57b; /* 57c */ u8 mUnk_57c; @@ -53,44 +83,130 @@ public: /* 585 */ u8 mUnk_585; /* 586 */ u8 mUnk_586; /* 587 */ unk8 mUnk_587; - /* 588 */ unk32 mUnk_588; - /* 58c */ + /* 588 */ UnkSubClass1_unk_124 mUnk_588; + /* 5b4 */ UnkStruct_020397f8(); /* 4c */ virtual void vfunc_4c(); /* 2c */ virtual void vfunc_2c(); void func_02039ca8(); - /* 3c */ virtual void vfunc_3c(); + /* 3c */ virtual void vfunc_3c(unk32 param1); /* 40 */ virtual void vfunc_40(s32 param1, s32 param2); - void func_0203a188(s32 param1, s32 param2); + void func_0203a188(s32 param1, s32 param2); // void func_0203a188(unk32 param_2, unk32 param_3, unk32 param_4); bool func_0203a2c0(); unk32 func_0203a30c(); /* 48 */ virtual void vfunc_48(); void func_0203a35c(); bool func_0203a3e0(); - /* 44 */ virtual void vfunc_44(s32 param1, s32 param2); - bool func_0203a6d0(unk32 param1); - /* 50 */ virtual void vfunc_50(unk32 param1, unk32 param2, s32 param3, unk32 param4); + /* 44 */ virtual void vfunc_44(s32 touchLastX, s32 touchLastY); + bool func_0203a6d0(unk32 param1, unk32 param2); + /* 50 */ virtual void vfunc_50(EntryINF1 *param1, unk32 param2, s32 *param3, unk32 param4); /* 54 */ virtual void vfunc_54(); /* 5c */ virtual void vfunc_5c(); /* 58 */ virtual void vfunc_58(); bool func_0203b0bc(); s32 func_0203b0ec(u32 param1); - /* 18 */ virtual unk32 vfunc_18(s32 param1); - /* 1c */ virtual unk32 vfunc_1c(s32 param1, unk32 *param2, unk32 param3, unk32 param4); - /* 60 */ virtual void vfunc_60(s32 param1); - /* 64 */ virtual void vfunc_64(unk32 param1); + /* 18 */ virtual unk32 vfunc_18(UnkStruct_0203b264 *param1, unk32 param2, unk32 param3); + /* 1c */ virtual unk32 vfunc_1c(u16 *param1, UnkStruct_0203b264 *param2, unk8 param3, unk32 param4); + /* 60 */ virtual void vfunc_60(func_0203b410_param1 *param1, unk32 param2, unk32 param3); + /* 64 */ virtual void vfunc_64(s16 *param1); void func_0203b764(); /* 20 */ virtual unk32 vfunc_20(s32 param1, s32 *param2); - void func_0203bd8c(s32 param1); + void func_0203bd8c(s32 param1); // void func_0203bd8c(u16 param_2); /* 6c */ virtual void vfunc_6c(s32 *param1, s32 *param2); void func_0203be08(); void func_0203be64(); bool func_0203c084(); bool func_0203c13c(); bool func_0203c1a0(); - bool func_0203c25c(); + static bool func_0203c25c(class UnkStruct_020397f8 *param1); /* 00 */ virtual ~UnkStruct_020397f8(); - /* 38 */ virtual unk32 vfunc_38(); + /* 38 */ virtual bool vfunc_38(); + /* 74 */ + + //! TODO: check if this is really here + void func_02039a3c(void); + unk32 func_02039250(void); +}; + +class MsgProc_Type3 : public UnkStruct_02038aa0 { +public: + /* 000 (base) */ + /* 161 */ unk8 mUnk_161; + /* 162 */ unk16 mUnk_162; + /* 164 */ unk16 mUnk_164; + /* 166 */ unk16 mUnk_166; + /* 168 */ unk16 mUnk_168; + /* 16a */ unk16 mUnk_16a; + /* 16c */ unk16 mUnk_16c; + /* 16e */ unk16 mUnk_16e; + /* 170 */ unk16 mUnk_170; + /* 172 */ unk16 mUnk_172; + /* 174 */ unk16 mUnk_174; + /* 178 */ unk32 mUnk_178; + /* 17c */ unk32 mUnk_17c; + /* 180 */ UnkClass_func_ov000_020d0644 mUnk_180[4]; + /* 1c0 */ + + MsgProc_Type3(); + MsgProc_Type3(unk32 param_2, unk16 param_3, unk32 param_4); + //! TODO: remove the function declarations that are not overridden + /* 00 */ virtual ~MsgProc_Type3(); + /* 08 */ virtual void vfunc_08(unk32 *param_2, unk32 *param_3) override; + /* 0c */ virtual void vfunc_0C(u8 param_2, u8 param_3, u8 param_4, unk32 param_5) override; + /* 10 */ virtual void vfunc_10(u8 param_2, u8 param_3) override; // func_0203e060? + /* 14 */ virtual bool vfunc_14(unk32 param_2, unk32 param_3) override; + /* 18 */ virtual unk32 vfunc_18(UnkStruct_0203b264 *param_2, unk32 param_3, unk32 param_4) override; + /* 1c */ virtual unk32 vfunc_1C(u16 *param_2, UnkStruct_0203b264 *param_3, unk8 param_4, unk32 param_5) override; + /* 20 */ virtual void vfunc_20(void) override; + /* 24 */ virtual void vfunc_24(void) override; + /* 28 */ virtual bool vfunc_28(void) override; + /* 2c */ virtual void vfunc_2C(void) override; + /* 30 */ virtual void vfunc_30(void) override; + /* 34 */ virtual unk32 vfunc_34(unk32 param_2) override; + /* 38 */ virtual bool vfunc_38(void) override; + /* 3c */ virtual void vfunc_3C(unk32 param_2) override; + /* 40 */ virtual void vfunc_40(unk32 param_2, unk32 param_3) override; + /* 44 */ virtual void vfunc_44(s32 touchLastX, s32 touchLastY) override; + /* 48 */ virtual void vfunc_48(void) override; + /* 4c */ virtual void vfunc_4C(void) override; // func_02039a3c? + /* 50 */ virtual void vfunc_50(EntryINF1 *param_2, u32 param_3, s16 *param_4, UnkSubClass1_02256FF8 *param_5) override; + /* 54 */ virtual void vfunc_54(void) override; + /* 58 */ virtual void vfunc_58(void) override; + /* 5c */ virtual void vfunc_5C(void) override; + /* 60 */ virtual void vfunc_60(func_0203b410_param1 *param_2, unk32 param_3, unk32 param_4) override; + /* 64 */ virtual void vfunc_64(s16 *param_2) override; + /* 68 */ virtual unk32 vfunc_68(unk32 param_2) override; + /* 6c */ virtual void vfunc_6C(unk32 *param_2, unk32 *param_3) override; + /* 70 */ virtual void vfunc_70(unk32 *param_2, unk32 *param_3) override; /* 74 */ + + static void func_0203c83c(void); +}; + +class MsgProc_Type2 : public UnkStruct_02038aa0 { +public: + /* 000 (base) */ + /* 161 */ unk8 mUnk_161; + /* 162 */ unk16 mUnk_162; + /* 164 */ unk16 mUnk_164; + /* 166 */ unk16 mUnk_166; + /* 168 */ unk16 mUnk_168; + /* 16a */ unk16 mUnk_16a; + /* 16c */ unk16 mUnk_16c; + /* 16e */ unk16 mUnk_16e; + /* 170 */ + + MsgProc_Type2(); + MsgProc_Type2(unk32 param_2, unk16 param_3, unk32 param_4); + /* 00 */ virtual ~MsgProc_Type2(); + /* 14 */ /* func_0203c5c4 */ virtual bool vfunc_14(unk32 param_2, unk32 param_3) override; + /* 3c */ /* func_0203c414 */ virtual void vfunc_3C(unk32 param_2) override; + /* 40 */ /* func_0203c460 */ virtual void vfunc_40(unk32 param_2, unk32 param_3) override; + /* 4c */ /* func_0203c39c */ virtual void vfunc_4C(void) override; // func_02039a3c? + + //! TODO: vfunc_4C? + void func_0203c39c(unk32 param_2, unk32 param_3); + + void func_0203c4ac(unk32, unk32); }; diff --git a/include/Unknown/UnkStruct_0203dae0.hpp b/include/Unknown/UnkStruct_0203dae0.hpp index cfda7368..7cb67a00 100644 --- a/include/Unknown/UnkStruct_0203dae0.hpp +++ b/include/Unknown/UnkStruct_0203dae0.hpp @@ -3,22 +3,80 @@ #include "global.h" #include "types.h" +#include "Message/MsgProc.hpp" #include "Unknown/UnkStruct_02032f0c.hpp" +class UnkStruct_0203dae0_114; + +// astruct_7, MsgProc_Base2 class UnkStruct_0203dae0 : public UnkStruct_02032f0c { public: /* 000 (base) */ - /* 052 */ unk8 mUnk_052[0x2]; - /* 054 */ unk32 mUnk_054[0x30]; - /* 114 */ void *mUnk_114; - /* 118 */ unk32 mUnk_118; - /* 11c */ unk16 mUnk_11c; + /* 052 */ unk16 mUnk_52; + /* 054 */ unk16 mUnk_54; + /* 054 */ unk16 mUnk_56; + /* 058 */ unk32 mUnk_58; + /* 05c */ s16 mUnk_5c; + /* 05e */ s16 mUnk_5e; + /* 060 */ unk32 mUnk_60; + /* 064 */ unk32 mUnk_64; + /* 068 */ unk32 mUnk_68; + /* 06c */ unk32 mUnk_6c; + /* 070 */ unk32 mUnk_70; + /* 074 */ unk32 mUnk_74; + /* 078 */ unk32 mUnk_78; + /* 07c */ unk32 mUnk_7c; + /* 080 */ unk32 mUnk_80; + /* 084 */ unk32 mUnk_84; + /* 088 */ unk32 mUnk_88; + /* 08c */ unk32 mUnk_8c; + /* 090 */ unk32 mUnk_90; + /* 094 */ unk32 mUnk_94; + /* 098 */ unk32 mUnk_98; + /* 09c */ unk32 mUnk_9c; + /* 0a0 */ unk32 mUnk_a0; + /* 0a4 */ unk32 mUnk_a4; + /* 0a8 */ unk32 mUnk_a8; + /* 0ac */ unk32 mUnk_ac; + /* 0b0 */ unk32 mUnk_b0; + /* 0b4 */ unk32 mUnk_b4; + /* 0b8 */ unk32 mUnk_b8; + /* 0bc */ unk32 mUnk_bc; + /* 0c0 */ unk32 mUnk_c0; + /* 0c4 */ unk32 mUnk_c4; + /* 0c8 */ unk32 mUnk_c8; + /* 0cc */ unk32 mUnk_cc; + /* 0d0 */ unk32 mUnk_d0; + /* 0d4 */ unk32 mUnk_d4; + /* 0d8 */ unk32 mUnk_d8; + /* 0dc */ unk32 mUnk_dc; + /* 0e0 */ unk32 mUnk_e0; + /* 0e4 */ unk32 mUnk_e4; + /* 0e8 */ unk8 mUnk_e8; + /* 0e8 */ unk8 mUnk_e9; + /* 0e8 */ unk8 mUnk_ea; + /* 0e8 */ unk8 mUnk_eb; + /* 0ec */ unk32 mUnk_ec; + /* 0f0 */ unk32 mUnk_f0; + /* 0f4 */ unk32 mUnk_f4; + /* 0f8 */ unk32 mUnk_f8; + /* 0fc */ unk32 mUnk_fc; + /* 100 */ unk32 mUnk_100; + /* 104 */ unk32 mUnk_104; + /* 108 */ unk8 mUnk_108; + /* 108 */ unk8 mUnk_109; + /* 108 */ unk8 mUnk_10a; + /* 108 */ unk8 mUnk_10b; + /* 10c */ unk32 mUnk_10c; + /* 110 */ unk32 mUnk_110; + /* 114 */ UnkStruct_0203dae0_114 *mUnk_114; + /* 118 */ s32 mUnk_118; + /* 11c */ u16 mUnk_11c; /* 11e */ u8 mUnk_11e; /* 11f */ u8 mUnk_11f; /* 120 */ u8 mUnk_120; - /* 121 */ u8 mUnk_121; - /* 122 */ u8 mUnk_122; - /* 123 */ + /* 121 */ s8 mUnk_121; + /* 123 */ u8 mUnk_122; /* 00 */ virtual ~UnkStruct_0203dae0(); /* 08 */ virtual void vfunc_08(s32 param1, unk32 param2, s16 *param3, unk32 param4); @@ -31,19 +89,54 @@ public: /* 30 */ virtual void vfunc_30(); /* 34 */ + // /* 0x08 */ /* func_0203e2ac */ virtual void vfunc_08(unk32* param_2, unk32* param_3) override; + // /* 0x0C */ /* func_02039578 */ virtual void vfunc_0C(u8 param_2, u8 param_3, u8 param_4, unk32 param_5) override; + // /* 0x10 */ /* func_0203e060 */ virtual void vfunc_10(u8 param_2, u8 param_3) override; // func_0203e060? + // /* 0x14 */ /* func_0203dcb4 */ virtual bool vfunc_14(unk32 param_2, unk32 param_3) override; + // /* 0x18 */ /* func_0203e284 */ virtual unk32 vfunc_18(UnkStruct_0203b264* param_2, unk32 param_3, unk32 param_4) + // override; + // /* 0x1C */ virtual unk32 vfunc_1C(u16* param_2, UnkStruct_0203b264* param_3, unk8 param_4, unk32 param_5) override; + // /* 0x20 */ virtual UNK_TYPE vfunc_20(UNK_TYPE) override; + // /* 0x24 */ virtual UNK_TYPE vfunc_24(UNK_TYPE) override; + // /* 0x28 */ /* func_0203e0c8 */ virtual bool vfunc_28(void) override; + // /* 0x2C */ /* func_0203e19c */ virtual void vfunc_2C(void) override; + // /* 0x30 */ /* func_0203e090 */ virtual void vfunc_30(void) override; + + //! TODO: fake? + /* 34 */ virtual unk32 vfunc_34(unk32 param_2) override; + /* 38 */ virtual bool vfunc_38(void) override; + /* 3c */ virtual void vfunc_3C(unk32 param_2) override; + /* 40 */ virtual void vfunc_40(unk32 param_2, unk32 param_3) override; + /* 44 */ virtual void vfunc_44(s32 touchLastX, s32 touchLastY) override; + /* 48 */ virtual void vfunc_48(void) override; + /* 4c */ virtual void vfunc_4C(void) override; // func_02039a3c? + /* 50 */ virtual void vfunc_50(EntryINF1 *param_2, u32 param_3, s16 *param_4, UnkSubClass1_02256FF8 *param_5) override; + /* 54 */ virtual void vfunc_54(void) override; + /* 58 */ virtual void vfunc_58(void) override; + /* 5c */ virtual void vfunc_5C(void) override; + /* 60 */ virtual void vfunc_60(func_0203b410_param1 *param_2, unk32 param_3, unk32 param_4) override; + /* 64 */ virtual void vfunc_64(s16 *param_2) override; + /* 68 */ virtual unk32 vfunc_68(unk32 param_2) override; + /* 6c */ virtual void vfunc_6C(unk32 *param_2, unk32 *param_3) override; + /* 70 */ virtual void vfunc_70(unk32 *param_2, unk32 *param_3) override; + /* 74 */ + UnkStruct_0203dae0(u8 param1); - void func_0203dc10(s32 param1); + void func_0203dc10(unk32 param1); + void func_0203dc10(unk32 param_2, unk32 param_3); bool func_0203dc74(s32 param1, s32 param2); void func_0203dcfc(u8 param1, unk32 param2, unk32 param3, s32 param4); - void func_0203ddec(); + unk32 *func_0203ddec(); void func_0203ddfc(); void func_0203de14(); s32 func_0203de24(); bool func_0203de58(s32 param1); - bool func_0203e0f8(unk32 param1, s32 param2); + bool func_0203e0f8(); bool func_0203e1b0(unk32 param1, unk32 param2, s32 param3); void func_0203e2e8(s32 param1, s32 param2, unk32 param3, u32 param4); void func_0203e510(s32 *param1, s32 param2, s32 param3); void func_0203e62c(s32 *param1, s32 param2); bool func_0203e6e4(u32 param1, u32 param2, s32 param3); + + void func_ov003_020f13b0(unk32 param1); }; diff --git a/include/Unknown/func_ov000_020d0644.hpp b/include/Unknown/func_ov000_020d0644.hpp new file mode 100644 index 00000000..74b88be3 --- /dev/null +++ b/include/Unknown/func_ov000_020d0644.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "System/SysNew.hpp" +#include "global.h" + +class UnkClass_func_ov000_020d0644 { +public: + /* 00 */ unk32 mUnk_00; + /* 04 */ unk32 mUnk_04; + /* 08 */ unk32 mUnk_08; + // /* 0c */ unk32 mUnk_0c; + /* 0x10 */ + + static void func_020d060c(void); + + UnkClass_func_ov000_020d0644(); + virtual ~UnkClass_func_ov000_020d0644(); + void func_ov000_020d0644(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5, unk32 param_6); +}; diff --git a/include/global.h b/include/global.h index 593c720b..ca961164 100644 --- a/include/global.h +++ b/include/global.h @@ -5,7 +5,8 @@ #define SET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] |= 1 << ((pos) & 0x1f)) #define RESET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] &= ~(1 << ((pos) & 0x1f))) -#define ARRAY_LEN(arr) ((sizeof(arr) / sizeof(*arr))) +#define ARRAY_LEN_U(arr) (u32)((sizeof(arr) / sizeof(*arr))) +#define ARRAY_LEN(arr) (s32)(sizeof(arr) / sizeof(*arr)) // Prevent the IDE from reporting errors that the compiler/linker won't report #ifdef __INTELLISENSE__ |
