summaryrefslogtreecommitdiff
path: root/include/Player
diff options
context:
space:
mode:
authorYanis002 <35189056+Yanis002@users.noreply.github.com>2025-06-29 21:29:34 +0200
committerYanis002 <35189056+Yanis002@users.noreply.github.com>2025-06-29 21:29:34 +0200
commit0f53991581f38ff989aec005414d46a4ace702d1 (patch)
tree305793c706925ee7328b4a1a9a3fe4dab08d01c7 /include/Player
parent1c9bf116969f08fbca76f1b8630f17f683519c7f (diff)
parent3fe49695b4936ea29526eb8b7d07250a69a06c38 (diff)
Merge remote-tracking branch 'upstream/main' into displaytext
Diffstat (limited to 'include/Player')
-rw-r--r--include/Player/LinkStateBase.hpp22
-rw-r--r--include/Player/LinkStateDamage.hpp1
-rw-r--r--include/Player/LinkStateMove.hpp7
-rw-r--r--include/Player/PlayerBase.hpp8
-rw-r--r--include/Player/PlayerControl.hpp37
-rw-r--r--include/Player/PlayerControlData.hpp6
-rw-r--r--include/Player/PlayerLinkBase.hpp2
-rw-r--r--include/Player/TouchControl.hpp6
-rw-r--r--include/Player/TouchGesture.hpp3
9 files changed, 52 insertions, 40 deletions
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/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 354e1078..744ff464 100644
--- a/include/Player/PlayerBase.hpp
+++ b/include/Player/PlayerBase.hpp
@@ -29,7 +29,7 @@ public:
/* 0c */ virtual bool CanMove();
/* 10 */ virtual void vfunc_10(Cylinder *param1) = 0;
/* 14 */ virtual void vfunc_14(Cylinder *param1) = 0;
- /* 18 */ virtual void vfunc_18() = 0;
+ /* 18 */ virtual bool vfunc_18(s32 param1) = 0;
/* 1c */ virtual void Init() = 0;
/* 20 */ virtual void vfunc_20() = 0;
/* 24 */ virtual void UpdatePos() = 0;
@@ -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/PlayerLinkBase.hpp b/include/Player/PlayerLinkBase.hpp
index 2a208365..b5bf77ed 100644
--- a/include/Player/PlayerLinkBase.hpp
+++ b/include/Player/PlayerLinkBase.hpp
@@ -50,7 +50,7 @@ public:
/* 0c */ virtual bool CanMove() override;
/* 10 */ virtual void vfunc_10(Cylinder *param1) override;
/* 14 */ virtual void vfunc_14(Cylinder *param1) override;
- /* 18 */ virtual void vfunc_18(s32 param1) override;
+ /* 18 */ virtual bool vfunc_18(s32 param1) override;
/* 1c */ virtual void Init() override;
/* 20 */ virtual void vfunc_20() override;
/* 24 */ virtual void UpdatePos() override;
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];