summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-03-20 19:48:26 +0100
committerAetias <aetias@outlook.com>2024-03-20 19:48:26 +0100
commit29e5b949c0bcd43af41effe6ecab677aecf28a29 (patch)
tree574535b53b6c00ae901b3e28b49cb3285799adda /include
parentbd0a74f62fa297ddcd041d8fb5f1149d3a4a4669 (diff)
Add `LinkDamage` class definition
Diffstat (limited to 'include')
-rw-r--r--include/Actors/ActorManager.hpp9
-rw-r--r--include/Debug/DebugHierarchy.hpp11
-rw-r--r--include/Debug/DebugHierarchyBase.hpp12
-rw-r--r--include/Player/LinkDamage.hpp28
-rw-r--r--include/Player/LinkStateHandler.hpp14
-rw-r--r--include/Player/MotionParams.hpp11
-rw-r--r--include/Player/PlayerLink.hpp37
-rw-r--r--include/Player/PlayerLinkBase.hpp19
-rw-r--r--include/Render/ModelRender.hpp20
-rw-r--r--include/lib/files.h13
-rw-r--r--include/lib/math.h6
-rw-r--r--include/lib/touch.h3
12 files changed, 179 insertions, 4 deletions
diff --git a/include/Actors/ActorManager.hpp b/include/Actors/ActorManager.hpp
new file mode 100644
index 00000000..139c0079
--- /dev/null
+++ b/include/Actors/ActorManager.hpp
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+struct ActorRef {
+ s32 id;
+ s32 index;
+};
diff --git a/include/Debug/DebugHierarchy.hpp b/include/Debug/DebugHierarchy.hpp
new file mode 100644
index 00000000..05ab803f
--- /dev/null
+++ b/include/Debug/DebugHierarchy.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "Debug/DebugHierarchyBase.hpp"
+
+class DebugHierarchy : public DebugHierarchyBase {
+ /* 00 (base) */
+ /* 08 */
+};
diff --git a/include/Debug/DebugHierarchyBase.hpp b/include/Debug/DebugHierarchyBase.hpp
new file mode 100644
index 00000000..718ce1eb
--- /dev/null
+++ b/include/Debug/DebugHierarchyBase.hpp
@@ -0,0 +1,12 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "System/SysNew.hpp"
+
+class DebugHierarchyBase : public SysObject {
+ /* 00 (vtable) */
+ /* 04 */ void *mNodes;
+ /* 08 */
+};
diff --git a/include/Player/LinkDamage.hpp b/include/Player/LinkDamage.hpp
new file mode 100644
index 00000000..b5b1f847
--- /dev/null
+++ b/include/Player/LinkDamage.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "Player/LinkStateHandler.hpp"
+#include "Render/ModelRender.hpp"
+
+class LinkDamage : public LinkStateHandler {
+ /* 00 (base) */
+ /* 0c */ void *mUnk_0c;
+ /* 10 */ unk32 mUnk_10;
+ /* 14 */ unk32 mUnk_14;
+ /* 18 */ unk32 mUnk_18;
+ /* 1c */ unk32 mUnk_1c;
+ /* 20 */ unk8 mUnk_20[2];
+ /* 22 */ unk16 mUnk_22;
+ /* 24 */ unk8 mUnk_24[0xe];
+ /* 32 */ unk16 mUnk_32;
+ /* 34 */ unk32 mUnk_34[2];
+ /* 3c */ ModelRender mUnk_3c;
+ /* 98 */ void *mUnk_98;
+ /* 9c */ void *mUnk_9c;
+ /* a0 */ unk32 mUnk_a0[3];
+ /* ac */ unk32 mUnk_ac;
+ /* b0 */ unk8 mUnk_b0[4];
+ /* b4 */
+};
diff --git a/include/Player/LinkStateHandler.hpp b/include/Player/LinkStateHandler.hpp
new file mode 100644
index 00000000..0247d42a
--- /dev/null
+++ b/include/Player/LinkStateHandler.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "System/SysNew.hpp"
+#include "Player/PlayerLink.hpp"
+
+class LinkStateHandler : public SysObject {
+ /* 0 (vtable) */
+ /* 4 */ unk32 mSubState;
+ /* 8 */ PlayerLink *mLink;
+ /* c */
+};
diff --git a/include/Player/MotionParams.hpp b/include/Player/MotionParams.hpp
new file mode 100644
index 00000000..017800ff
--- /dev/null
+++ b/include/Player/MotionParams.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+#include "lib/files.h"
+
+struct MotionParams {
+ /* 00 */ FileEntry motionBhio; // motion.bhio
+ /* 10 */ unk8 mUnk_10;
+ /* 11 */
+};
diff --git a/include/Player/PlayerLink.hpp b/include/Player/PlayerLink.hpp
new file mode 100644
index 00000000..235810eb
--- /dev/null
+++ b/include/Player/PlayerLink.hpp
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+#include "lib/math.h"
+
+#include "Player/PlayerLinkBase.hpp"
+#include "Player/MotionParams.hpp"
+
+#include "Debug/DebugHierarchy.hpp"
+
+class PlayerLink: public PlayerLinkBase {
+ /* 00 (base) */
+ /* 14 */ Vec3p mPos;
+ /* 20 */ Vec3p mVel;
+ /* 2c */ unk8[2][2] mTilePos;
+ /* 30 */ unk32 mAltitude;
+ /* 34 */ unk8 mUnk_34[4];
+ /* 38 */ s32 mUnk_38;
+ /* 3c */ ActorRef mUnkRef_03c;
+ /* 44 */ s32 mUnk_44;
+ /* 48 */ unk16 mUnk_48;
+ /* 4a */ unk16 mUnk_4a;
+ /* 4c */ unk32 mUnk_4c;
+ /* 50 */ unk32 mUnk_50;
+ /* 54 */ s16 mUnk_54;
+ /* 56 */ unk16 mUnk_56;
+ /* 58 */ unk16 mUnk_58;
+ /* 5a */ s16 mUnk_5a;
+ /* 5c */ unk8 mUnk_5c[3];
+ /* 5f */ bool mUnk_5f;
+ /* 60 */ MotionParams *mMotionParams;
+ /* 64 */ DebugHierarchy *mDebugHierarchy_0;
+ /* 68 */ DebugHierarchy *mDebugHierarchy_1;
+ /* 6c */ DebugHierarchy *mDebugHierarchy_2;
+ /* 70 */
+};
diff --git a/include/Player/PlayerLinkBase.hpp b/include/Player/PlayerLinkBase.hpp
new file mode 100644
index 00000000..8a3ccd2b
--- /dev/null
+++ b/include/Player/PlayerLinkBase.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "System/SysNew.hpp"
+
+class PlayerLinkBase : public SysObject {
+ /* 00 (vtable) */
+ /* 04 */ void *mUnk_04;
+ /* 08 */ s16 mUnk_08;
+ /* 0a */ s16 mHealth;
+ /* 0c */ unk8 mUnk_0c[2];
+ /* 0e */ unk16 mUnk_0e;
+ /* 10 */ unk8 mUnk_10;
+ /* 11 */ bool mUnk_11;
+ /* 12 */ bool mUnk_12;
+ /* 13 */
+};
diff --git a/include/Render/ModelRender.hpp b/include/Render/ModelRender.hpp
new file mode 100644
index 00000000..b7a99bb8
--- /dev/null
+++ b/include/Render/ModelRender.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "System/SysNew.hpp"
+
+class ModelRender : public SysObject {
+ /* 00 (vtable) */
+ /* 04 */ u32 mUnk_04;
+ /* 08 */ void *mLcdcAddr;
+ /* 0c */ s32 mUnk_0c;
+ /* 10 */ unk32 mUnk_10;
+ /* 14 */ s32 mUnk_14;
+ /* 18 */ unk32 mUnk_18;
+ /* 1c */ s32 mUnk_1c;
+ /* 20 */ unk8 mUnk_20[0x38];
+ /* 58 */ void *mUnk_58;
+ /* 5c */
+};
diff --git a/include/lib/files.h b/include/lib/files.h
new file mode 100644
index 00000000..e65e4d09
--- /dev/null
+++ b/include/lib/files.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+struct FileEntry {
+ /* 00 (vtable )*/
+ /* 04 */ void *path;
+ /* 08 */ unk32 mUnk_08;
+ /* 0c */ unk32 mUnk_0c;
+ /* 10 */
+};
+
diff --git a/include/lib/math.h b/include/lib/math.h
index 86c483a0..0eae4aa1 100644
--- a/include/lib/math.h
+++ b/include/lib/math.h
@@ -1,6 +1,6 @@
-#ifndef LIB_MATH_H
-#define LIB_MATH_H
+#pragma once
+#include "global.h"
#include "types.h"
// Q20.12 fixed point number
@@ -33,5 +33,3 @@ extern "C" u32 Divide(u32 a, u32 b);
extern "C" bool Approach(unk32 *src, unk32 dest, unk32 step);
extern "C" bool Approach_thunk(unk32 *src, unk32 dest, unk32 step);
extern "C" bool func_01ffec34(Vec4p *param1, Vec4p *param2);
-
-#endif
diff --git a/include/lib/touch.h b/include/lib/touch.h
index 41d29e4d..4bc0ed30 100644
--- a/include/lib/touch.h
+++ b/include/lib/touch.h
@@ -1,5 +1,8 @@
#pragma once
+#include "global.h"
+#include "types.h"
+
struct TouchStateFlags {
u16 touchX;
u16 touchY;