From 82ba3ff31176383a6cd7902aaf6e2941d039e02e Mon Sep 17 00:00:00 2001 From: mike8699 Date: Tue, 31 Dec 2024 01:21:30 -0500 Subject: Start decompiling `LinkStateItem` --- include/Save/AdventureFlags.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/Save/AdventureFlags.hpp b/include/Save/AdventureFlags.hpp index 65831d20..2a353075 100644 --- a/include/Save/AdventureFlags.hpp +++ b/include/Save/AdventureFlags.hpp @@ -92,7 +92,7 @@ public: void func_Ov00_02097810(s32 param1); unk32 func_ov00_02097968(unk32 param1); unk32 func_ov00_02097a44(unk32 param1, s32 param2); - bool func_ov00_02097b9c(); + bool func_ov00_02097b9c(s32 param1); bool func_ov00_02097bac(); bool func_ov00_02097bbc(); bool func_ov00_02097bcc(); -- cgit v1.2.3 From f9da67860b7e6cc55bf48c251c8ecfd2bcde6369 Mon Sep 17 00:00:00 2001 From: mike8699 Date: Tue, 31 Dec 2024 15:11:25 -0500 Subject: Decompile `GetLinkState` arm9 function This is not part of the `LinkStateItem` class, but it is called by a method in that class. I wasn't sure the best place to put this. --- include/Player/LinkStateBase.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/Player/LinkStateBase.hpp b/include/Player/LinkStateBase.hpp index f4591991..46038d2d 100644 --- a/include/Player/LinkStateBase.hpp +++ b/include/Player/LinkStateBase.hpp @@ -128,3 +128,7 @@ public: DebugHierarchy *GetDebugHierarchy0(); DebugHierarchy *GetDebugHierarchy1(); }; + +unk32 GetLinkState(s32 index); + +extern LinkStateBase **gLinkStates; -- cgit v1.2.3 From be7b197c340463e9225c4180e1286b827685d783 Mon Sep 17 00:00:00 2001 From: mike8699 Date: Tue, 31 Dec 2024 15:12:32 -0500 Subject: Decompile `LinkStateItem::GetLinkStateMove` --- include/Player/LinkStateBase.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/Player/LinkStateBase.hpp b/include/Player/LinkStateBase.hpp index 46038d2d..3371b937 100644 --- a/include/Player/LinkStateBase.hpp +++ b/include/Player/LinkStateBase.hpp @@ -129,6 +129,6 @@ public: DebugHierarchy *GetDebugHierarchy1(); }; -unk32 GetLinkState(s32 index); +LinkStateBase *GetLinkState(s32 index); extern LinkStateBase **gLinkStates; -- cgit v1.2.3 From dc09e23c6068913ec96708e0e49597252043cdb6 Mon Sep 17 00:00:00 2001 From: mike8699 Date: Tue, 31 Dec 2024 16:09:11 -0500 Subject: Add `StopUsing` methods to several classes These are used in `LinkStateItem::OnStateLeave` --- include/Player/EquipBomb.hpp | 4 ++++ include/Player/EquipHammer.hpp | 6 +++++- include/Player/EquipRope.hpp | 3 +++ include/Player/EquipScoop.hpp | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Player/EquipBomb.hpp b/include/Player/EquipBomb.hpp index d21e12f1..8b5fde65 100644 --- a/include/Player/EquipBomb.hpp +++ b/include/Player/EquipBomb.hpp @@ -4,6 +4,8 @@ #include "Player/EquipItem.hpp" +class LinkStateItem; + class EquipBomb : public EquipItem { private: /* 00 (base) */ @@ -26,4 +28,6 @@ public: /* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov55_2198df8 /* 50 */ virtual void vfunc_50(); // func_ov14_0213d228 /* 54 */ + + static void StopUsing(LinkStateItem *param1); }; diff --git a/include/Player/EquipHammer.hpp b/include/Player/EquipHammer.hpp index 4cf56a21..9d3f0394 100644 --- a/include/Player/EquipHammer.hpp +++ b/include/Player/EquipHammer.hpp @@ -4,6 +4,8 @@ #include "Player/EquipItem.hpp" +class LinkStateItem; + class EquipHammer : public EquipItem { private: /* 00 (base) */ @@ -29,10 +31,12 @@ public: /* 18 */ virtual void vfunc_18() override; // func_ov59_02198e3c /* 1c */ virtual void vfunc_1c() override; // func_ov59_02198e58 - /* 2c */ virtual unk32 vfunc_2c() override; // func_ov59_02198fcc + /* 2c */ virtual u32 vfunc_2c() override; // func_ov59_02198fcc /* 30 */ virtual void vfunc_30() override; // func_ov59_02198e6c /* 38 */ virtual void vfunc_38(unk32 param1) override; // func_0v59_02198fc8 /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const override; // func_ov14_0213ee10 /* 4c */ virtual s32 vfunc_4c() const override; // func_ov14_0213eea8 /* 50 */ + + static void StopUsing(LinkStateItem *param1); }; diff --git a/include/Player/EquipRope.hpp b/include/Player/EquipRope.hpp index 9eb7cdec..127eb974 100644 --- a/include/Player/EquipRope.hpp +++ b/include/Player/EquipRope.hpp @@ -15,6 +15,7 @@ struct EquipRope_Unk_18 { }; class Actor; +class LinkStateItem; class EquipRope : public EquipItem { public: @@ -59,4 +60,6 @@ public: bool func_ov14_0213dadc(s32 index, Cylinder *cylinder); s32 func_ov14_0213ddd4(Actor *actor); bool func_ov14_0213defc(Actor *actor); + + static void StopUsing(LinkStateItem *param1); }; diff --git a/include/Player/EquipScoop.hpp b/include/Player/EquipScoop.hpp index f0958df5..8c4694bc 100644 --- a/include/Player/EquipScoop.hpp +++ b/include/Player/EquipScoop.hpp @@ -4,6 +4,8 @@ #include "Player/EquipItem.hpp" +class LinkStateItem; + class EquipScoop : public EquipItem { private: /* 0 (base) */ @@ -24,4 +26,6 @@ public: /* 44 */ virtual unk32 vfunc_44(unk32 param1) const override; // func_ov54_02198d38 /* 48 */ virtual unk32 vfunc_48(unk32 param1) const override; // func_ov54_02198d48 /* 50 */ + + static void StopUsing(LinkStateItem *param1); }; -- cgit v1.2.3 From ae2062bb589f7df214464d67c546246c368ddccb Mon Sep 17 00:00:00 2001 From: mike8699 Date: Wed, 1 Jan 2025 22:17:28 -0500 Subject: Properly define static methods as static --- include/Player/LinkStateItem.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Player/LinkStateItem.hpp b/include/Player/LinkStateItem.hpp index 591614f2..b7877502 100644 --- a/include/Player/LinkStateItem.hpp +++ b/include/Player/LinkStateItem.hpp @@ -47,7 +47,7 @@ public: /* 44 */ s32 IsHammerEquipped(); // returns 0 if hammer is equipped, otherwise -1 - EquipBombchu *GetEquipBombchu(); - LinkStateMove *GetLinkStateMove(); + static EquipBombchu *GetEquipBombchu(); + static LinkStateMove *GetLinkStateMove(); bool func_ov00_020abf70(); }; -- cgit v1.2.3 From 11a3df2d99a16600d40a04da43122bd12b6e3b92 Mon Sep 17 00:00:00 2001 From: mike8699 Date: Wed, 1 Jan 2025 22:20:00 -0500 Subject: Update `EquipBomb::StopUsing` method signature This method has an additional argument. --- include/Player/EquipBomb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/Player/EquipBomb.hpp b/include/Player/EquipBomb.hpp index 8b5fde65..9eb26ec9 100644 --- a/include/Player/EquipBomb.hpp +++ b/include/Player/EquipBomb.hpp @@ -29,5 +29,5 @@ public: /* 50 */ virtual void vfunc_50(); // func_ov14_0213d228 /* 54 */ - static void StopUsing(LinkStateItem *param1); + static void StopUsing(LinkStateItem *param1, unk32 param2); }; -- cgit v1.2.3 From 6f33b0c7ad02f6cf0e886f6b1287c061851b2d40 Mon Sep 17 00:00:00 2001 From: Aetias Date: Mon, 6 Jan 2025 16:36:05 +0100 Subject: LinkStateItem: Use enums --- include/Player/LinkStateItem.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Player/LinkStateItem.hpp b/include/Player/LinkStateItem.hpp index b7877502..0c5f4a4d 100644 --- a/include/Player/LinkStateItem.hpp +++ b/include/Player/LinkStateItem.hpp @@ -13,8 +13,8 @@ public: /* 00 (base) */ /* 0c */ void *mUnk_0c; /* 10 */ unk32 mUnk_10; - /* 14 */ ItemId mEquipId; - /* 18 */ ItemId mNextEquip; + /* 14 */ ItemFlag mEquipId; + /* 18 */ ItemFlag mNextEquip; /* 1c */ unk32 mUnk_1c; /* 20 */ unk16 mUnk_20; /* 22 */ unk8 mUnk_22[2]; -- cgit v1.2.3 From 01102bf317119076f70ce7a110a8b2e7247c91dc Mon Sep 17 00:00:00 2001 From: mike8699 Date: Mon, 6 Jan 2025 11:26:11 -0500 Subject: Fix `clang-format` error --- include/System/SysNew.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/System/SysNew.hpp b/include/System/SysNew.hpp index 20d4a46f..78f3b290 100644 --- a/include/System/SysNew.hpp +++ b/include/System/SysNew.hpp @@ -4,6 +4,6 @@ class SysObject { public: - static void* operator new(unsigned long length, u32 *id, u32 idLength); + static void *operator new(unsigned long length, u32 *id, u32 idLength); static void operator delete(void *ptr); }; -- cgit v1.2.3