summaryrefslogtreecommitdiff
path: root/include/Player
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-04-06 09:26:14 +0200
committerAetias <aetias@outlook.com>2024-04-06 09:26:14 +0200
commitcab451da34cee81d0cd8cd4c9827753890fa858f (patch)
tree609bc3408ae5fbdcf6acc22f8cdbe410af86e232 /include/Player
parentc7ee2f125881b62c77aca3be8ab50d0e9415759c (diff)
Add `PlayerControl` and move all .inc files
My worktree was too big to make two separate commits :p
Diffstat (limited to 'include/Player')
-rw-r--r--include/Player/LinkStateRoll.hpp1
-rw-r--r--include/Player/PlayerControl.hpp98
-rw-r--r--include/Player/TouchGesture.hpp3
3 files changed, 87 insertions, 15 deletions
diff --git a/include/Player/LinkStateRoll.hpp b/include/Player/LinkStateRoll.hpp
index 52b42b43..9ff28899 100644
--- a/include/Player/LinkStateRoll.hpp
+++ b/include/Player/LinkStateRoll.hpp
@@ -42,5 +42,4 @@ public:
void func_ov00_020aee58(s16 param1, u16 param2);
void func_ov00_020aee84();
- bool func_ov00_020aeeac();
};
diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp
index d10dce26..47c94d7a 100644
--- a/include/Player/PlayerControl.hpp
+++ b/include/Player/PlayerControl.hpp
@@ -3,9 +3,16 @@
#include "global.h"
#include "types.h"
+#include "lib/math.h"
+
#include "Player/TouchControl.hpp"
+#include "Player/TouchGesture.hpp"
+#include "Actor/ActorManager.hpp"
+#include "Actor/Actor.hpp"
+#include "Debug/DebugHierarchy.hpp"
+#include "Item/Item.hpp"
-typedef TouchEdge u16;
+typedef u16 TouchEdge;
enum TouchEdge_ {
TouchEdge_Right = 0,
TouchEdge_Left = 1,
@@ -15,6 +22,7 @@ enum TouchEdge_ {
};
class PlayerControl : public TouchControl {
+public:
/* 00 (base) */
/* 38 */ Vec3p mTouchWorld; // tile position
/* 44 */ Vec3p mUnk_44;
@@ -34,25 +42,87 @@ class PlayerControl : public TouchControl {
/* 72 */ s16 mTouchDiffX;
/* 74 */ s16 mTouchDiffY;
/* 76 */ bool mTouchFast;
- /* 78 */ unk32 mUnk_78;
- /* 7c */ unk32 mUnk_7c;
- /* 80 */ unk32 mUnk_80;
- /* 84 */ s32 mUnk_84;
- /* 88 */ s32 mUnk_88;
- /* 8c */ s32 mUnk_8c;
- /* 90 */ s32 mUnk_90;
- /* 94 */ s32 mUnk_94;
- /* 98 */ s32 mUnk_98;
- /* 9c */ q20 mUnk_9c;
+ /* 77 */ unk8 mUnk_77;
+ /* 78 */ bool mUnk_78;
+ /* 79 */ bool mUsingEquipItem;
+ /* 7a */ bool mUnk_7a;
+ /* 7b */ bool mUnk_7b;
+ /* 7c */ s8 mUnk_7c;
+ /* 7d */ bool mUnk_7d;
+ /* 7e */ s8 mUnk_7e;
+ /* 7f */ bool mUnk_7f;
+ /* 80 */ bool mUnk_80;
+ /* 81 */ bool mFollowing;
+ /* 82 */ unk8 mUnk_82;
+ /* 83 */ bool mUnk_83;
+ /* 84 */ ActorRef mFollowRef;
+ /* 8c */ ActorRef mNextFollowRef;
+ /* 94 */ ActorRef mLastFollowRef;
+ /* 9c */ unk8 mUnk_9c;
+ /* 9d */ unk8 mUnk_9d;
+ /* 9e */ unk8 mUnk_9e[2];
/* a0 */ void *mFollowActor;
/* a4 */ q20 mFollowDist;
/* a8 */ u16 mFollowStuckTimer;
/* aa */ u16 mCutsceneEndTimer;
- /* ac */ unk32 mUnk_ac;
+ /* ac */ s16 mUnk_ac;
+ /* ae */ unk16 mUnk_ae;
/* b0 */ Vec3p mAim; // used by boomerang, bow and rope
/* bc */ Vec3p mAimWorld; // used by hammer
/* c8 */ s32 mUnk_c8;
/* cc */ s32 mUnk_cc;
- /* d0 */ void *mTouchGesture;
- /* d4 */ void *mDebug;
+ /* d0 */ TouchGesture **mTouchGesture;
+ /* d4 */ DebugHierarchy *mDebug;
+ /* d8 */
+
+ static bool func_ov00_020aeeac();
+ void func_ov00_020aeef8();
+ void func_ov00_020aef30();
+ void UpdateAim();
+ Actor* GetFollowActor();
+ bool func_ov00_020af01c(unk8 *param1);
+ void SetUnk_80();
+ void StopFollowing();
+ void func_ov00_020af06c();
+ void UpdateUsingEquipItem();
+ bool func_ov00_020af2d4(u32 param1, bool param2);
+ bool CheckTouchedNow(u32 param1);
+ bool CheckUntouchedNow(u32 param1);
+ bool CheckTouching(u32 param1);
+ bool CheckTouchFast(u32 param1);
+ bool func_ov00_020af4a4();
+ void func_ov00_020af538();
+ 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_020affec(Vec3p *param1, s32 y, s32 param3, Vec3p *param4);
+ void func_ov00_020b014c();
+ void SetAim();
+ 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 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_020b1058(Vec3p *param1, unk32 param2, Vec3p *param3, Vec3p *param4);
+ bool IsUntouchedNow();
+ bool IsNotUntouchedNow();
+ bool func_ov00_020b1248(unk32 *param1);
+ bool func_ov00_020b129c();
+ bool func_ov00_020b12d0(s16 *pAngle);
+ bool IsNotTouching();
+ bool IsTouchingFast();
+ bool IsTappedNow();
+ bool func_ov00_020b13c4();
};
diff --git a/include/Player/TouchGesture.hpp b/include/Player/TouchGesture.hpp
new file mode 100644
index 00000000..25f5c8b9
--- /dev/null
+++ b/include/Player/TouchGesture.hpp
@@ -0,0 +1,3 @@
+#pragma once
+
+struct TouchGesture;