From 6b9c7701fe475de8456b7fd67969486c604fc834 Mon Sep 17 00:00:00 2001 From: Aetias Date: Mon, 6 Jan 2025 22:09:32 +0100 Subject: PlayerControl: Decomp 5% --- include/DTCM/UnkStruct_027e05f8.hpp | 13 +++++++++++++ include/DTCM/UnkStruct_027e077c.hpp | 15 +++++++++++++++ include/DTCM/UnkStruct_027e0c68.hpp | 27 +++++++++++++++++++++++++++ include/DTCM/UnkStruct_027e0d38.hpp | 28 ++++++++++++++++++++++++++++ include/DTCM/UnkStruct_027e103c.hpp | 2 ++ include/Debug/DebugHierarchy.hpp | 12 ++++++++++++ include/Item/ItemManager.hpp | 23 +---------------------- include/Player/PlayerControl.hpp | 13 ++++++++++--- 8 files changed, 108 insertions(+), 25 deletions(-) create mode 100644 include/DTCM/UnkStruct_027e05f8.hpp create mode 100644 include/DTCM/UnkStruct_027e077c.hpp create mode 100644 include/DTCM/UnkStruct_027e0c68.hpp create mode 100644 include/DTCM/UnkStruct_027e0d38.hpp (limited to 'include') diff --git a/include/DTCM/UnkStruct_027e05f8.hpp b/include/DTCM/UnkStruct_027e05f8.hpp new file mode 100644 index 00000000..ad976a06 --- /dev/null +++ b/include/DTCM/UnkStruct_027e05f8.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e05f8 { + /* 0 */ unk16 mUnk_0; + /* 2 */ unk16 mUnk_2; + /* 4 */ unk16 mUnk_4; + /* 6 */ +}; + +extern UnkStruct_027e05f8 data_027e05f8; diff --git a/include/DTCM/UnkStruct_027e077c.hpp b/include/DTCM/UnkStruct_027e077c.hpp new file mode 100644 index 00000000..2e34cf7f --- /dev/null +++ b/include/DTCM/UnkStruct_027e077c.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e077c { + /* 0 */ unk32 mUnk_0; + /* 4 */ unk32 mUnk_4; + /* 8 */ unk16 mUnk_8; + /* a */ unk8 mUnk_a; + /* b */ +}; + +extern UnkStruct_027e077c data_027e077c; +extern u8 data_02056be4[]; diff --git a/include/DTCM/UnkStruct_027e0c68.hpp b/include/DTCM/UnkStruct_027e0c68.hpp new file mode 100644 index 00000000..c052b79c --- /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 new file mode 100644 index 00000000..46bca505 --- /dev/null +++ b/include/DTCM/UnkStruct_027e0d38.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "global.h" +#include "types.h" + +struct UnkStruct_027e0d38 { + /* 00 */ unk8 mUnk_00; + /* 01 */ unk8 mUnk_01[3]; // padding? + /* 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 */ unk16 mUnk_1c; + /* 1e */ unk8 mUnk_1e; + /* 1f */ unk8 mUnk_1f; + /* 20 */ unk8 mUnk_20; + /* 21 */ unk8 mUnk_21; + /* 22 */ unk8 mUnk_22[2]; // padding? + /* 24 */ void *mUnk_24; + /* 28 */ void *mUnk_28; + /* 2c */ + + s32 func_ov000_02078b40(); +}; + +extern UnkStruct_027e0d38 *data_027e0d38; diff --git a/include/DTCM/UnkStruct_027e103c.hpp b/include/DTCM/UnkStruct_027e103c.hpp index c95f759a..62798d92 100644 --- a/include/DTCM/UnkStruct_027e103c.hpp +++ b/include/DTCM/UnkStruct_027e103c.hpp @@ -18,6 +18,8 @@ struct UnkStruct_027e103c { /* 24 */ u8 mUnk_24; /* 25 */ unk8 mUnk_25[7]; /* 2c */ + + void func_ov000_020cf2b8(); }; extern UnkStruct_027e103c *data_027e103c; diff --git a/include/Debug/DebugHierarchy.hpp b/include/Debug/DebugHierarchy.hpp index 05ab803f..2a03fed3 100644 --- a/include/Debug/DebugHierarchy.hpp +++ b/include/Debug/DebugHierarchy.hpp @@ -6,6 +6,18 @@ #include "Debug/DebugHierarchyBase.hpp" class DebugHierarchy : public DebugHierarchyBase { +public: /* 00 (base) */ /* 08 */ + + /* 00 */ virtual void vfunc_00(); + /* 04 */ virtual void vfunc_04(); + /* 08 */ virtual void vfunc_08(); + /* 0c */ virtual void vfunc_0c(); + /* 10 */ virtual void vfunc_10(); + /* 14 */ virtual void vfunc_14(); + /* 18 */ virtual void vfunc_18(); + /* 1c */ virtual void vfunc_1c(); + /* 20 */ virtual void vfunc_20(unk32 param1, const char *param2, unk32 param3, unk32 param4, unk32 param5, unk32 param6); + /* 24 */ }; diff --git a/include/Item/ItemManager.hpp b/include/Item/ItemManager.hpp index ae5e8cad..f3554a25 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -106,26 +106,6 @@ struct ShipPartPricesShown { /* c */ }; -struct UnkStruct_027e0d38 { - /* 00 */ unk8 mUnk_00; - /* 01 */ unk8 mUnk_01[3]; // padding? - /* 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 */ unk16 mUnk_1c; - /* 1e */ unk8 mUnk_1e; - /* 1f */ unk8 mUnk_1f; - /* 20 */ unk8 mUnk_20; - /* 21 */ unk8 mUnk_21; - /* 22 */ unk8 mUnk_22[2]; // padding? - /* 24 */ void *mUnk_24; - /* 28 */ void *mUnk_28; - /* 2c */ -}; - typedef u32 ItemModelId; enum ItemModelId_ { ItemModelId_OshusSword, // swA @@ -186,7 +166,7 @@ struct SaveItemManager { }; 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 @@ -227,7 +207,6 @@ private: /* 14e */ unk8 mUnk_14e[0x2]; // padding? /* 150 */ -public: static ItemManager *Create(); static void Destroy(); ItemManager(); diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 0e0da8ae..015c22bd 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -57,8 +57,8 @@ public: /* 84 */ ActorRef mFollowRef; /* 8c */ ActorRef mNextFollowRef; /* 94 */ ActorRef mLastFollowRef; - /* 9c */ unk8 mUnk_9c; - /* 9d */ unk8 mUnk_9d; + /* 9c */ u8 mUnk_9c; + /* 9d */ u8 mUnk_9d; /* 9e */ unk8 mUnk_9e[2]; /* a0 */ void *mFollowActor; /* a4 */ q20 mFollowDist; @@ -75,7 +75,7 @@ public: /* d8 */ static bool func_ov00_020aeeac(); - void func_ov00_020aeef8(); + bool func_ov00_020aeef8(); void func_ov00_020aef30(); void UpdateAim(); Actor *GetFollowActor(); @@ -124,6 +124,13 @@ public: bool IsTouchingFast(); bool IsTappedNow(); bool func_ov00_020b13c4(); + + // More methods starting from 020b78a0, different TU? + void ResetTouchWorld(); + void InitTouchMovement(); + void func_ov000_020b7924(s32 param1); + void ApplyTouchWorld(Vec3p *result, q20 scale); + bool func_ov000_020b7d6c(); }; extern PlayerControl *gPlayerControl; -- cgit v1.2.3 From a76eefa1a52f9d985ad5352c13cae1d4299cecb2 Mon Sep 17 00:00:00 2001 From: Aetias Date: Thu, 9 Jan 2025 08:24:32 +0100 Subject: PlayerControl: Decomp 7% --- include/Actor/ActorNavi.hpp | 28 +++++++++++++++++++++++++++- include/Actor/ActorNaviBase.hpp | 34 ++++++++++++++++++++++++++++++++++ include/DTCM/UnkStruct_027e05f8.hpp | 2 +- include/DTCM/UnkStruct_027e103c.hpp | 5 ++++- include/DTCM/UnkStruct_027e1098.hpp | 21 +++++++++++++++++++++ include/Item/ItemManager.hpp | 6 +++--- include/Player/EquipBombchu.hpp | 2 ++ include/Player/PlayerControl.hpp | 2 +- 8 files changed, 93 insertions(+), 7 deletions(-) create mode 100644 include/Actor/ActorNaviBase.hpp create mode 100644 include/DTCM/UnkStruct_027e1098.hpp (limited to 'include') diff --git a/include/Actor/ActorNavi.hpp b/include/Actor/ActorNavi.hpp index 36ce860d..bb6b15d4 100644 --- a/include/Actor/ActorNavi.hpp +++ b/include/Actor/ActorNavi.hpp @@ -1,3 +1,29 @@ #pragma once -class ActorNavi; +#include "global.h" +#include "types.h" + +#include "Actor/Actor.hpp" +#include "Actor/ActorNaviBase.hpp" +#include "Render/ModelRender.hpp" + +class ActorNavi : public ActorNaviBase { +public: + /* 000 (base) */ + /* 294 */ ModelRender mUnk_294; + /* 2f0 */ void *mUnk_2f0; + /* 2f4 */ unk8 mUnk_2f4[0x40]; + /* 334 */ unk32 mUnk_334; + /* 338 */ unk32 mUnk_338; + /* 33c */ unk32 mUnk_33c; + /* 340 */ unk16 mUnk_340; + /* 342 */ unk8 mUnk_342[0x2]; + /* 344 */ unk32 mUnk_344; + /* 348 */ unk32 mUnk_348; + /* 34c */ unk8 mUnk_34c[0x68]; + /* 3b4 */ unk32 mUnk_3b4; + /* 3b8 */ unk32 mUnk_3b8; + /* 3bc */ unk32 mUnk_3bc; + /* 3c0 */ unk8 mUnk_3c0[0x8]; + /* 3c8 */ +}; diff --git a/include/Actor/ActorNaviBase.hpp b/include/Actor/ActorNaviBase.hpp new file mode 100644 index 00000000..9b49aa13 --- /dev/null +++ b/include/Actor/ActorNaviBase.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "Actor/Actor.hpp" +#include "Render/ModelRender.hpp" + +class ActorNaviBase : public Actor { +public: + /* 000 (base) */ + /* 158 */ Vec3p mOffsetPos; + /* 164 */ u32 mUnk_164; + /* 168 */ unk8 mUnk_168[0x68]; + /* 1d0 */ void *mUnk_1d0; + /* 164 */ unk8 mUnk_1d4[0x40]; + /* 214 */ unk16 mUnk_214; + /* 216 */ unk8 mUnk_216[0xc]; + /* 222 */ unk16 mUnk_222; + /* 224 */ unk8 mUnk_224[0x28]; + /* 24c */ unk32 mUnk_24c; + /* 250 */ unk32 mUnk_250; + /* 254 */ unk32 mUnk_254; + /* 258 */ unk32 mUnk_258; + /* 25c */ unk32 mUnk_25c; + /* 260 */ unk32 mUnk_260; + /* 264 */ unk8 mUnk_264[0x1c]; + /* 280 */ unk32 mUnk_280; + /* 284 */ unk32 mUnk_284; + /* 288 */ unk8 mUnk_288[0x2]; + /* 28a */ unk16 mUnk_28a; + /* 28c */ unk8 mUnk_28c[0x8]; + /* 294 */ +}; diff --git a/include/DTCM/UnkStruct_027e05f8.hpp b/include/DTCM/UnkStruct_027e05f8.hpp index ad976a06..b46748ec 100644 --- a/include/DTCM/UnkStruct_027e05f8.hpp +++ b/include/DTCM/UnkStruct_027e05f8.hpp @@ -4,7 +4,7 @@ #include "types.h" struct UnkStruct_027e05f8 { - /* 0 */ unk16 mUnk_0; + /* 0 */ u16 mUnk_0; /* 2 */ unk16 mUnk_2; /* 4 */ unk16 mUnk_4; /* 6 */ diff --git a/include/DTCM/UnkStruct_027e103c.hpp b/include/DTCM/UnkStruct_027e103c.hpp index 62798d92..53550fe0 100644 --- a/include/DTCM/UnkStruct_027e103c.hpp +++ b/include/DTCM/UnkStruct_027e103c.hpp @@ -16,10 +16,13 @@ struct UnkStruct_027e103c { /* 20 */ unk16 mUnk_20; /* 22 */ s16 mUnk_22; /* 24 */ u8 mUnk_24; - /* 25 */ unk8 mUnk_25[7]; + /* 25 */ unk8 mUnk_25[5]; + /* 2a */ unk8 mUnk_2a; /* 2c */ + unk32 func_ov000_020cf01c(); void func_ov000_020cf2b8(); + void func_ov000_020cf9dc(s32 param1, s32 param2); }; extern UnkStruct_027e103c *data_027e103c; 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/Item/ItemManager.hpp b/include/Item/ItemManager.hpp index f3554a25..3599c17c 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -8,7 +8,7 @@ extern "C" { #include "lib/math.h" #include "types.h" -#include "Actor/ActorNavi.hpp" +#include "Actor/ActorNaviBase.hpp" #include "DTCM/UnkStruct_027e0f78.hpp" #include "Item/Item.hpp" #include "Map/MapManager.hpp" @@ -172,7 +172,7 @@ public: /* 008 */ ItemFlag mForcedItem; // game crashes when any item besides this one is equipped /* 00c */ u32 mHourglassSandFrames; /* 010 */ FairyId mEquippedFairy; - /* 014 */ ActorNavi *mFairies[FairyId_COUNT]; + /* 014 */ ActorNaviBase *mFairies[FairyId_COUNT]; /* 020 */ u16 mEquipLoadTimer; /* 022 */ u16 mNumRupees; /* 024 */ u8 mNumGems[Gem_COUNT]; @@ -218,7 +218,7 @@ public: // Fairy FairyId GetEquippedFairy() const; - ActorNavi *GetFairy(FairyId id) const; + ActorNaviBase *GetFairy(FairyId id) const; u32 GetActiveFairyLevel(FairyId id) const; u32 GetFairyLevel(FairyId id) const; diff --git a/include/Player/EquipBombchu.hpp b/include/Player/EquipBombchu.hpp index 449e6512..4e9651cf 100644 --- a/include/Player/EquipBombchu.hpp +++ b/include/Player/EquipBombchu.hpp @@ -41,4 +41,6 @@ public: /* 34 */ virtual void vfunc_34(unk16 *param1) override; // func_ov58_0213ecb4 /* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov58_02199170 /* 50 */ + + void func_ov014_0213ec64(); }; diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 015c22bd..e00aafaa 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -48,7 +48,7 @@ public: /* 7b */ bool mUnk_7b; /* 7c */ s8 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; -- cgit v1.2.3 From 8cda3ca2d7f5fe424cc1a649baec2ff992368e62 Mon Sep 17 00:00:00 2001 From: Aetias Date: Fri, 10 Jan 2025 09:27:01 +0100 Subject: PlayerControl: Decomp 9% --- include/Player/PlayerControl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index e00aafaa..de2dd560 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -46,7 +46,7 @@ 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 */ u8 mUnk_7e; /* 7f */ bool mUnk_7f; -- cgit v1.2.3 From 57de07939724a1a1762422c915814ca2f9dc760c Mon Sep 17 00:00:00 2001 From: Aetias Date: Sun, 9 Feb 2025 09:38:23 +0100 Subject: PlayerControl: Decomp 27% --- include/Actor/ActorRef.hpp | 4 +--- include/Actor/Navi/ActorNaviBase.hpp | 1 + include/DTCM/UnkStruct_027e0d38.hpp | 8 +++++++- include/DTCM/UnkStruct_027e0e2c.hpp | 22 ++++++++++++++++++++++ include/DTCM/UnkStruct_027e0ffc.hpp | 26 ++++++++++++++++++++++++++ include/Map/MapManager.hpp | 10 +++++----- include/Player/EquipItem.hpp | 2 +- include/Player/PlayerControl.hpp | 15 +++++++-------- 8 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 include/DTCM/UnkStruct_027e0e2c.hpp create mode 100644 include/DTCM/UnkStruct_027e0ffc.hpp (limited to 'include') 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/Navi/ActorNaviBase.hpp b/include/Actor/Navi/ActorNaviBase.hpp index c98bf84f..95a34c6c 100644 --- a/include/Actor/Navi/ActorNaviBase.hpp +++ b/include/Actor/Navi/ActorNaviBase.hpp @@ -10,6 +10,7 @@ class ActorNaviBase_Unk1 {}; class ActorNaviBase : public Actor { +public: /* 000 (base) */ /* 158 */ Vec3p mOffsetPos; /* 164 */ unk32 mUnk_164; diff --git a/include/DTCM/UnkStruct_027e0d38.hpp b/include/DTCM/UnkStruct_027e0d38.hpp index fd616496..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,7 +25,7 @@ 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 */ s32 func_ov000_02078b40(); 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_027e0ffc.hpp b/include/DTCM/UnkStruct_027e0ffc.hpp new file mode 100644 index 00000000..d422ae19 --- /dev/null +++ b/include/DTCM/UnkStruct_027e0ffc.hpp @@ -0,0 +1,26 @@ +#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); +}; + +extern UnkStruct_027e0ffc data_027e0ffc; diff --git a/include/Map/MapManager.hpp b/include/Map/MapManager.hpp index 13ca4348..f597a37a 100644 --- a/include/Map/MapManager.hpp +++ b/include/Map/MapManager.hpp @@ -158,7 +158,7 @@ public: bool func_ov00_020839c4(s32 param_2); static unk8 func_ov00_020839d4(); static unk8 func_ov00_020839f8(); - static void func_ov00_02083a1c(unk32 param_1, MapManager *param_2, Vec3p *param_3); + static void func_ov00_02083a1c(Vec2b *param_1, MapManager *param_2, Vec3p *param_3); static unk8 func_ov00_02083a54(unk32 param_1, MapManager *param_2, unk32 param_3, unk32 param_4, unk32 param_5); static unk8 func_ov00_02083b84(); static unk8 func_ov00_02083bac(); @@ -166,7 +166,7 @@ public: static unk8 func_ov00_02083bfc(); unk8 func_ov00_02083c24(unk32 param_2); unk8 func_ov00_02083c50(unk32 param_2); - unk8 func_ov00_02083c7c(Vec3p *param_2, unk32 param_3); + unk8 func_ov00_02083c7c(Vec3p *param_2, Vec2b param_3); static unk8 func_ov00_02083ce8(unk8 param_1, unk8 param_2, unk8 param_3, unk8 param_4, unk32 param_5); unk8 func_ov00_02083e34(unk8 param_2, unk8 param_3, unk32 param_4); unk8 MapData_vfunc_60(); @@ -180,7 +180,7 @@ public: void GetTileWorldBounds(Vec2b *tile, AABB *tileBounds); unk8 MapData_vfunc_54(); unk8 func_ov00_020840a0(unk8 param_2, unk8 param_3, unk32 param_4); - unk8 MapData_vfunc_78(); + unk32 MapData_vfunc_78(); static unk8 func_ov00_020840dc(); static unk8 func_ov00_02084100(unk32 param_1, MapManager *param_2); unk8 GetMapData_Unk_48(); @@ -232,10 +232,10 @@ public: unk8 func_ov00_02084d24(unk8 param_2, unk8 param_3, unk32 param_4); s32 func_ov00_02084d4c(unk32 param_2, unk32 param_3, Vec3p *param_4); unk8 func_ov00_02084ebc(unk32 param_2); - s32 func_ov00_02085108(s32 *param_2); + s32 func_ov00_02085108(Vec3p *param_2); static unk8 func_ov00_0208527c(); static unk8 func_ov00_020853fc(); - static unk8 func_ov00_02085594(); + unk8 func_ov00_02085594(Vec3p *param_1); static void func_ov00_0208583c(unk32 param_1, Vec3p *param_2, unk32 param_3); static unk8 func_ov00_020858b0(); s32 func_ov00_02085a34(unk32 param_2, unk32 param_3); diff --git a/include/Player/EquipItem.hpp b/include/Player/EquipItem.hpp index 6702bc48..21f114da 100644 --- a/include/Player/EquipItem.hpp +++ b/include/Player/EquipItem.hpp @@ -34,7 +34,7 @@ public: /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const; /* 40 */ virtual unk32 vfunc_40() const; /* 44 */ virtual unk32 vfunc_44(unk32 param1) const; - /* 48 */ virtual unk32 vfunc_48(unk32 param1) const; + /* 48 */ virtual unk32 vfunc_48() const; /* 4c */ virtual s32 vfunc_4c() const; /* 50 */ diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 39e118da..1bfdd833 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -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 @@ -57,13 +57,12 @@ public: /* 84 */ ActorRef mFollowRef; /* 8c */ ActorRef mNextFollowRef; /* 94 */ ActorRef mLastFollowRef; - /* 9c */ u8 mUnk_9c; - /* 9d */ u8 mUnk_9d; + /* 9c */ Vec2b mUnk_9c; /* 9e */ unk8 mUnk_9e[2]; /* a0 */ void *mFollowActor; /* a4 */ q20 mFollowDist; /* a8 */ u16 mFollowStuckTimer; - /* aa */ u16 mCutsceneEndTimer; + /* 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(); - bool 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,14 +89,14 @@ 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(Cylinder *param1, unk32 param2); void func_ov00_020affec(Vec3p *param1, s32 y, s32 param3, Vec3p *param4); void func_ov00_020b014c(); void SetAim(); -- cgit v1.2.3 From d057996378f1235c67d93014595e9fd929a4efb6 Mon Sep 17 00:00:00 2001 From: Aetias Date: Mon, 10 Feb 2025 23:07:55 +0100 Subject: PlayerControl: Decomp 38% --- include/Actor/Navi/ActorNaviBase.hpp | 2 +- include/Player/PlayerControl.hpp | 8 +++++--- include/Player/PlayerControlData.hpp | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/Actor/Navi/ActorNaviBase.hpp b/include/Actor/Navi/ActorNaviBase.hpp index 95a34c6c..1571fdc0 100644 --- a/include/Actor/Navi/ActorNaviBase.hpp +++ b/include/Actor/Navi/ActorNaviBase.hpp @@ -97,7 +97,7 @@ public: bool func_ov000_020ba458(); void func_ov000_020ba4e4(); void func_ov000_020ba53c(); - void func_ov000_020baca8(Vec3p *param1, unk32 param2); + void func_ov000_020baca8(Cylinder *param1, unk32 param2); void func_ov000_020bad18(); static void func_ov000_020bb0ac(); static void func_ov000_020bb0e0(); diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 1bfdd833..c11ad0ce 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -59,7 +59,7 @@ public: /* 94 */ ActorRef mLastFollowRef; /* 9c */ Vec2b mUnk_9c; /* 9e */ unk8 mUnk_9e[2]; - /* a0 */ void *mFollowActor; + /* a0 */ void *mFollowObject; /* a4 */ q20 mFollowDist; /* a8 */ u16 mFollowStuckTimer; /* aa */ s16 mCutsceneEndTimer; @@ -98,8 +98,8 @@ public: bool func_ov00_020afeec(unk32 param1, bool param2); void func_ov00_020aff90(Cylinder *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(); @@ -137,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; -- cgit v1.2.3 From 83bdfdb8925d84d85b36ffbe69f256cc87da8116 Mon Sep 17 00:00:00 2001 From: Aetias Date: Sun, 16 Feb 2025 16:07:22 +0100 Subject: PlayerControl: Decomp 68% --- include/DTCM/UnkStruct_027e05f8.hpp | 2 +- include/DTCM/UnkStruct_027e0f64.hpp | 15 +++++++++++++++ include/Player/PlayerBase.hpp | 2 +- include/Player/PlayerControl.hpp | 8 ++++---- include/Player/TouchGesture.hpp | 3 ++- 5 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 include/DTCM/UnkStruct_027e0f64.hpp (limited to 'include') diff --git a/include/DTCM/UnkStruct_027e05f8.hpp b/include/DTCM/UnkStruct_027e05f8.hpp index 7270ade1..a5bc24d6 100644 --- a/include/DTCM/UnkStruct_027e05f8.hpp +++ b/include/DTCM/UnkStruct_027e05f8.hpp @@ -5,7 +5,7 @@ struct UnkStruct_027e05f8 { /* 0 */ u16 mUnk_0; - /* 2 */ unk16 mUnk_2; + /* 2 */ u16 mUnk_2; /* 4 */ unk16 mUnk_4; /* 6 */ 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/Player/PlayerBase.hpp b/include/Player/PlayerBase.hpp index 354e1078..b08e71a4 100644 --- a/include/Player/PlayerBase.hpp +++ b/include/Player/PlayerBase.hpp @@ -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 c11ad0ce..962a3fe0 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, @@ -52,7 +52,7 @@ public: /* 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; @@ -106,13 +106,13 @@ public: 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(); 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]; -- cgit v1.2.3 From 4a764f9d58cb16343c02afb3592aad7aabf66d6d Mon Sep 17 00:00:00 2001 From: Aetias Date: Tue, 18 Feb 2025 18:33:12 +0100 Subject: PlayerControl: Decomp 80% --- include/Actor/Navi/ActorNaviBase.hpp | 2 +- include/DTCM/UnkStruct_027e0c68.hpp | 2 +- include/DTCM/UnkStruct_027e0ffc.hpp | 3 ++- include/Map/MapManager.hpp | 2 +- include/Player/EquipItem.hpp | 2 +- include/Player/PlayerControl.hpp | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/Actor/Navi/ActorNaviBase.hpp b/include/Actor/Navi/ActorNaviBase.hpp index 1571fdc0..95a34c6c 100644 --- a/include/Actor/Navi/ActorNaviBase.hpp +++ b/include/Actor/Navi/ActorNaviBase.hpp @@ -97,7 +97,7 @@ public: bool func_ov000_020ba458(); void func_ov000_020ba4e4(); void func_ov000_020ba53c(); - void func_ov000_020baca8(Cylinder *param1, unk32 param2); + void func_ov000_020baca8(Vec3p *param1, unk32 param2); void func_ov000_020bad18(); static void func_ov000_020bb0ac(); static void func_ov000_020bb0e0(); diff --git a/include/DTCM/UnkStruct_027e0c68.hpp b/include/DTCM/UnkStruct_027e0c68.hpp index c052b79c..e172e51e 100644 --- a/include/DTCM/UnkStruct_027e0c68.hpp +++ b/include/DTCM/UnkStruct_027e0c68.hpp @@ -24,4 +24,4 @@ struct UnkStruct_027e0c68 { /* 4c */ }; -extern UnkStruct_027e0c68 *data_027e0c68; +extern UnkStruct_027e0c68 data_027e0c68; diff --git a/include/DTCM/UnkStruct_027e0ffc.hpp b/include/DTCM/UnkStruct_027e0ffc.hpp index d422ae19..463d9ec8 100644 --- a/include/DTCM/UnkStruct_027e0ffc.hpp +++ b/include/DTCM/UnkStruct_027e0ffc.hpp @@ -20,7 +20,8 @@ struct UnkStruct_027e0ffc { /* 39 */ void func_ov000_020cebcc(u32 param1, unk16 param2, unk32 param3); - void func_ov000_020ced64(Cylinder *param1, u32 param2); + 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/Map/MapManager.hpp b/include/Map/MapManager.hpp index f597a37a..5fdbcabf 100644 --- a/include/Map/MapManager.hpp +++ b/include/Map/MapManager.hpp @@ -180,7 +180,7 @@ public: void GetTileWorldBounds(Vec2b *tile, AABB *tileBounds); unk8 MapData_vfunc_54(); unk8 func_ov00_020840a0(unk8 param_2, unk8 param_3, unk32 param_4); - unk32 MapData_vfunc_78(); + unk32 MapData_vfunc_78(Vec2b *param1); static unk8 func_ov00_020840dc(); static unk8 func_ov00_02084100(unk32 param_1, MapManager *param_2); unk8 GetMapData_Unk_48(); diff --git a/include/Player/EquipItem.hpp b/include/Player/EquipItem.hpp index 21f114da..6702bc48 100644 --- a/include/Player/EquipItem.hpp +++ b/include/Player/EquipItem.hpp @@ -34,7 +34,7 @@ public: /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const; /* 40 */ virtual unk32 vfunc_40() const; /* 44 */ virtual unk32 vfunc_44(unk32 param1) const; - /* 48 */ virtual unk32 vfunc_48() const; + /* 48 */ virtual unk32 vfunc_48(unk32 param1) const; /* 4c */ virtual s32 vfunc_4c() const; /* 50 */ diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 962a3fe0..11dd6488 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -61,7 +61,7 @@ public: /* 9e */ unk8 mUnk_9e[2]; /* a0 */ void *mFollowObject; /* a4 */ q20 mFollowDist; - /* a8 */ u16 mFollowStuckTimer; + /* a8 */ s16 mFollowStuckTimer; /* aa */ s16 mCutsceneEndTimer; /* ac */ s16 mUnk_ac; /* ae */ unk16 mUnk_ae; @@ -96,7 +96,7 @@ public: void func_ov00_020afb6c(); bool func_ov00_020afe88(s32 param1, bool param2); bool func_ov00_020afeec(unk32 param1, bool param2); - void func_ov00_020aff90(Cylinder *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(Vec3p *param1); void ResetAim(); -- cgit v1.2.3 From ef04313d458adf37d2e3eb83fd291e4eb9b30a7d Mon Sep 17 00:00:00 2001 From: Aetias Date: Sat, 24 May 2025 12:23:03 +0200 Subject: Decomp `PlayerControl` 98% --- include/DTCM/UnkStruct_027e077c.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/DTCM/UnkStruct_027e077c.hpp b/include/DTCM/UnkStruct_027e077c.hpp index b0bc5f57..57ef477d 100644 --- a/include/DTCM/UnkStruct_027e077c.hpp +++ b/include/DTCM/UnkStruct_027e077c.hpp @@ -4,15 +4,26 @@ #include "types.h" struct UnkStruct_027e077c { +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 u8 data_02056be4[]; +extern volatile u8 data_02056be4[]; -- cgit v1.2.3