summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-10-19 13:34:42 +0200
committerAetias <aetias@outlook.com>2024-10-19 13:34:42 +0200
commit4826a6e764b92d623b8517883cd8e901a4348f86 (patch)
treebc8df7ba0805e37d1e44a18e755679f2ae1cc145 /include
parent0d62c02f14bd122690306976d8a58c5449dd3040 (diff)
parentffdfd609fb9bc8f968ddc6f187da1d50731cbf69 (diff)
Merge branch 'main' into match_actor_rupee
Diffstat (limited to 'include')
-rw-r--r--include/Actor/Actor.hpp130
-rw-r--r--include/Actor/ActorManager.hpp18
-rw-r--r--include/Actor/ActorPlayerDummy.hpp25
-rw-r--r--include/Actor/ActorRef.hpp10
-rw-r--r--include/Actor/ActorRupee.hpp6
-rw-r--r--include/Actor/ActorType.hpp203
-rw-r--r--include/Actor/FilterActorBase.hpp17
-rw-r--r--include/DTCM/UnkStruct_027e105c.hpp2
-rw-r--r--include/Item/Item.hpp416
-rw-r--r--include/Item/ItemManager.hpp32
-rw-r--r--include/Map/Course.hpp16
-rw-r--r--include/Map/MapBase.hpp12
-rw-r--r--include/Map/MapManager.hpp12
-rw-r--r--include/Map/TriggerAABB.hpp2
-rw-r--r--include/Map/TriggerSphere.hpp2
-rw-r--r--include/Physics/Cylinder.hpp11
-rw-r--r--include/Physics/Transform.hpp2
-rw-r--r--include/Player/EquipBomb.hpp3
-rw-r--r--include/Player/EquipBombchu.hpp1
-rw-r--r--include/Player/EquipBoomerang.hpp11
-rw-r--r--include/Player/EquipBow.hpp1
-rw-r--r--include/Player/EquipHammer.hpp3
-rw-r--r--include/Player/EquipItem.hpp5
-rw-r--r--include/Player/EquipPotion.hpp1
-rw-r--r--include/Player/EquipRope.hpp35
-rw-r--r--include/Player/EquipScoop.hpp2
-rw-r--r--include/Player/EquipShield.hpp3
-rw-r--r--include/Player/EquipSword.hpp6
-rw-r--r--include/Player/LinkStateBase.hpp49
-rw-r--r--include/Player/LinkStateCutscene.hpp5
-rw-r--r--include/Player/LinkStateDamage.hpp3
-rw-r--r--include/Player/LinkStateFollow.hpp5
-rw-r--r--include/Player/LinkStateInteract.hpp9
-rw-r--r--include/Player/LinkStateItem.hpp8
-rw-r--r--include/Player/LinkStateRoll.hpp1
-rw-r--r--include/Player/MotionParams.hpp2
-rw-r--r--include/Player/PlayerBase.hpp36
-rw-r--r--include/Player/PlayerControl.hpp19
-rw-r--r--include/Player/PlayerControlData.hpp3
-rw-r--r--include/Player/PlayerLinkBase.hpp31
-rw-r--r--include/Player/TouchControl.hpp10
-rw-r--r--include/Player/TouchGesture.hpp2
-rw-r--r--include/Render/ModelRender.hpp2
-rw-r--r--include/Save/AdventureFlags.hpp20
-rw-r--r--include/Sound/Sfx.hpp282
-rw-r--r--include/global.h23
-rw-r--r--include/lib/files.h1
-rw-r--r--include/lib/math.h47
-rw-r--r--include/types.h2
49 files changed, 887 insertions, 660 deletions
diff --git a/include/Actor/Actor.hpp b/include/Actor/Actor.hpp
index ba2f7449..ee9737c0 100644
--- a/include/Actor/Actor.hpp
+++ b/include/Actor/Actor.hpp
@@ -6,11 +6,12 @@
#include "lib/math.h"
#include "Actor/ActorRef.hpp"
+#include "Actor/ActorType.hpp"
#include "Actor/FilterActorBase.hpp"
#include "Physics/Cylinder.hpp"
#include "Physics/Transform.hpp"
#include "Player/EquipBoomerang.hpp"
-
+#include "System/SysNew.hpp"
struct Actor_UnkStruct_012 {
/* 00 */ u16 mUnk_00;
@@ -29,14 +30,16 @@ struct Actor_UnkStruct_012 {
struct Actor_UnkStruct_020 {
/* 00 */ u16 mUnk_00[4];
- /* 08 */ unk8 mUnk_08[2];
- /* 0a */ unk8 mUnk_0a[2];
+ /* 08 */ u8 mUnk_08[2];
+ /* 0a */ u8 mUnk_0a[2];
/* 0c */ unk8 mUnk_0c;
- /* 0c */ unk8 mUnk_0d;
- /* 0c */ unk8 mUnk_0e;
- /* 0c */ unk8 mUnk_0f;
+ /* 0d */ unk8 mUnk_0d;
+ /* 0e */ unk8 mUnk_0e;
+ /* 0f */ unk8 mUnk_0f;
/* 10 */ unk32 mUnk_10;
/* 14 */
+
+ Actor_UnkStruct_020();
};
struct Actor_UnkStruct_09c {
@@ -57,11 +60,14 @@ struct Actor_UnkStruct_0a4 {
/* 04 */ Vec3p mUnk_04;
/* 10 */ s32 mUnk_10;
/* 14 */
+
+ Actor_UnkStruct_0a4(q20 x, q20 y, q20 z, s32 unk_10);
};
-class KillPickupItemActors : public FilterActorBase {
- /* 0 (base) */
- /* 4 */
+class KillPickupsFilter : FilterActorReturn, public FilterActorBase {
+public:
+ /* 00 (base) */
+ /* 04 */
/* 0 */ virtual bool Filter(Actor *actor) override;
/* 4 */
@@ -69,54 +75,58 @@ class KillPickupItemActors : public FilterActorBase {
typedef u32 PlayerCollide;
enum PlayerCollide_ {
- PlayerCollide_Player = 0x1,
- PlayerCollide_Sword = 0x2,
- PlayerCollide_Shield = 0x4,
+ PlayerCollide_Player = 0x1,
+ PlayerCollide_Sword = 0x2,
+ PlayerCollide_Shield = 0x4,
PlayerCollide_Gongoron = 0x8,
- PlayerCollide_Hammer = 0x10,
-
+ PlayerCollide_Hammer = 0x10,
+
PlayerCollide_PickupFlags = PlayerCollide_Hammer | PlayerCollide_Gongoron | PlayerCollide_Sword | PlayerCollide_Player,
};
-#include "System/SysNew.hpp"
+struct Knockback {
+ /* 00 */ u8 mUnk_00;
+ /* 04 */ Vec3p vec;
+ /* 10 */ unk32 mUnk_10;
+ /* 14 */ Actor *actor;
-#include "Item/Item.hpp"
+ inline Knockback() :
+ mUnk_00(0),
+ mUnk_10(0xb),
+ actor(NULL) {}
+};
class Actor : public SysObject {
public:
/* 000 (vtable) */
- /* 004 */ unk32 mType;
- /* 008 */ unk32 mId;
- /* 00c */ unk32 mIndex;
- /* 010 */ unk8 mUnk_010;
- /* 011 */ unk8 mUnk_011;
+ /* 004 */ ActorTypeId mType;
+ /* 008 */ ActorRef mRef;
+ /* 010 */ u8 mUnk_010;
+ /* 011 */ u8 mUnk_011;
/* 012 */ unk16 mUnk_012;
- /* 014 */ unk32 mUnk_014;
- /* 018 */ unk32 mUnk_018;
- /* 01c */ unk32 mUnk_01c;
+ /* 014 */ Vec3p mUnk_014;
/* 020 */ Actor_UnkStruct_020 mUnk_020;
/* 034 */ unk32 mUnk_034;
/* 038 */ unk32 mUnk_038;
/* 03c */ unk32 mUnk_03c;
- /* 040 */ unk32 mUnk_040;
- /* 044 */ unk32 mUnk_044;
+ /* 040 */ ActorRef mUnk_040;
/* 048 */ Vec3p mPos;
/* 054 */ Vec3p mPrevPos;
/* 060 */ Vec3p mVel;
/* 06c */ unk32 mGravity;
/* 070 */ unk32 mMaxFall;
/* 074 */ unk32 mUnk_074;
- /* 078 */ s16 mRotation;
- /* 07a */ unk16 mUnk_07a;
+ /* 078 */ u16 mAngle;
+ /* 07a */ u16 mUnk_07a;
/* 07c */ Cylinder mHitbox;
/* 08c */ Cylinder mUnk_08c;
/* 09c */ Actor_UnkStruct_09c mUnk_09c;
/* 0a4 */ Actor_UnkStruct_0a4 mUnk_0a4;
/* 0b8 */ unk8 mUnk_0b8[0x24];
- /* 0dc */ unk16 mUnk_0dc;
- /* 0de */ unk16 mUnk_0de;
- /* 0e0 */ unk16 mUnk_0e0;
- /* 0e2 */ unk16 mUnk_0e2;
+ /* 0dc */ u16 mUnk_0dc;
+ /* 0de */ u16 mUnk_0de;
+ /* 0e0 */ u16 mUnk_0e0;
+ /* 0e2 */ u16 mUnk_0e2;
/* 0e4 */ unk16 mUnk_0e4;
/* 0e6 */ unk8 mUnk_0e6[0x20];
/* 106 */ unk8 mUnk_106;
@@ -133,17 +143,17 @@ public:
/* 116 */ unk8 mUnk_116;
/* 117 */ unk8 mUnk_117;
/* 118 */ bool mAlive;
- /* 119 */ unk8 mUnk_119;
+ /* 119 */ u8 mUnk_119;
/* 11a */ bool mVisible;
- /* 11b */ unk8 mUnk_11b;
+ /* 11b */ bool mUnk_11b;
/* 11c */ unk8 mUnk_11c;
- /* 11d */ unk8 mUnk_11d;
- /* 11e */ q4 yOffset;
+ /* 11d */ bool mUnk_11d;
+ /* 11e */ q4 mYOffset;
/* 120 */ s16 mUnk_120;
/* 122 */ unk16 mUnk_122;
- /* 124 */ unk8 mUnk_124;
- /* 125 */ unk8 mUnk_125;
- /* 126 */ unk16 mUnk_126;
+ /* 124 */ u8 mUnk_124;
+ /* 125 */ u8 mUnk_125;
+ /* 126 */ u16 mUnk_126;
/* 128 */ bool mUnk_128;
/* 129 */ bool mUnk_129;
/* 12a */ unk8 mUnk_12a;
@@ -165,7 +175,7 @@ public:
/* 10 */ virtual void vfunc_10(u32 param1);
/* 14 */ virtual void vfunc_14(u32 param1);
/* 18 */ virtual void vfunc_18(u32 param1);
- /* 1c */ virtual void vfunc_1c(u16 param1);
+ /* 1c */ virtual void vfunc_1c(u16 *param1);
/* 20 */ virtual void vfunc_20(s32 param1);
/* 24 */ virtual void vfunc_24();
/* 28 */ virtual void vfunc_28();
@@ -175,12 +185,12 @@ public:
/* 38 */ virtual unk32 vfunc_38();
/* 3c */ virtual bool CollidesWithLink();
/* 40 */ virtual bool IsHitboxTouched(bool param1);
- /* 44 */ virtual bool CollidesWith(const Actor *other);
- /* 48 */ virtual bool vfunc_48(unk32 param1);
+ /* 44 */ virtual bool CollidesWith(Actor *other);
+ /* 48 */ virtual bool vfunc_48(Knockback *param1);
/* 4c */ virtual bool vfunc_4c(unk32 *param1);
- /* 50 */ virtual Vec3p* GetPos();
+ /* 50 */ virtual Vec3p *GetPos();
/* 54 */ virtual void vfunc_54();
- /* 58 */ virtual void SetUnk_11b();
+ /* 58 */ virtual bool SetUnk_11b();
/* 5c */ virtual bool SetVelocity(Vec3p *vel);
/* 60 */ virtual bool vfunc_60();
/* 64 */ virtual void vfunc_64();
@@ -193,7 +203,7 @@ public:
/* 80 */ virtual void vfunc_80();
/* 84 */ virtual void vfunc_84();
/* 88 */ virtual void vfunc_88();
- /* 8c */ virtual void vfunc_8c();
+ /* 8c */ virtual bool vfunc_8c();
/* 90 */ virtual bool vfunc_90();
/* 94 */ virtual void vfunc_94();
/* 98 */ virtual bool vfunc_98();
@@ -204,47 +214,50 @@ public:
/* ac */ virtual void vfunc_ac();
/* b0 */ virtual void vfunc_b0();
/* b4 */
-
+
Actor();
- void func_ov00_020c1788();
+
+ bool func_01fffd04(s32 param1);
+
+ unk8 func_ov00_020c1788();
void SetUnk_129(bool value);
void SetUnk_11c(unk8 value);
bool func_ov00_020c195c();
bool func_ov00_020c198c();
void KillPickupItemActors();
void func_Ov00_020c1bfc(s32 param1);
- void func_ov00_020c1c20(s32 param1, unk32 param2, unk32 param3);
+ void func_ov00_020c1c20(s32 param1, unk32 param2);
bool IsNearLink();
void func_ov00_020c1cf8();
bool func_ov00_020c1d58();
bool func_ov00_020c1da0(s32 param1, Vec3p *param2);
bool func_ov00_020c1e2c(s32 param1, Vec3p *param2);
bool func_ov00_020c1ef8(Cylinder *param1, Vec3p *param2, s32 param3, s32 param4);
- bool func_ov00_020c1f5c(Vec3p *param1, Vec3p *param2, s32 param3, Vec3p *param4, s32 param5, s32 param6);
+ bool func_ov00_020c1f5c(Vec3p *param1, Vec3p *param2, s32 param3, Vec3p *param4, u8 param5, s32 param6);
bool func_ov00_020c1fc8(PlayerCollide flags);
bool CollidesWithShield(Cylinder *param1);
bool CollidesWithPlayer(PlayerCollide flags);
static void func_ov00_020c23c4(ActorRef *ref, Actor *actor);
static void func_ov00_020c23d4(ActorRef *ref, Actor *actor, Cylinder *cylinder);
- bool func_ov00_020c243c(unk32 param1, s32 *param2);
+ bool func_ov00_020c243c(ActorTypeId *actorTypes, Actor **result);
bool func_ov00_020c27a8(unk32 param1);
bool IsFollowedByLink();
void StopLinkFollow();
bool IsGrabbed();
- s32 XzDistanceTo(Vec3p *vec);
- s32 DistanceToLink();
- s32 XzDistanceToLink();
- s32 GetAngleTo(Vec3p *vec);
+ q20 XzDistanceTo(Vec3p *vec);
+ q20 DistanceToLink();
+ q20 XzDistanceToLink();
+ s16 GetAngleTo(Vec3p *vec);
s32 GetAngleToLink();
- void func_ov00_020c2988(Vec3p *param1, s32 param2, Vec3p *param3);
+ void func_ov00_020c2988(Vec3p *param1, q20 param2, Vec3p *param3);
void ResetWallTouch();
- bool func_ov00_020c29ec(s32 param1);
- void GetHitbox(Cylinder *param1);
+ bool func_ov00_020c29ec(q20 param1);
+ void GetHitbox(Cylinder *hitbox);
void GetUnk_08c(Cylinder *param1);
void IncreaseActiveFrames();
bool func_ov00_020c2c0c();
bool func_ov00_020c2c70();
- EquipBoomerang* GetEquipBoomerang();
+ EquipBoomerang *GetEquipBoomerang();
bool func_ov00_020c2d54();
bool func_ov00_020c2de4();
bool func_ov00_020c2e7c();
@@ -258,7 +271,6 @@ public:
void Kill();
void KillInBounds();
void func_ov00_020c31c0(unk32 param1);
- void vfunc_ac_Thunk();
void func_ov00_020c3200(s32 param1);
void GetLinkPos(Vec3p *result);
void GetLinkDummyPos(Vec3p *result);
diff --git a/include/Actor/ActorManager.hpp b/include/Actor/ActorManager.hpp
index bf659965..8ad14b2d 100644
--- a/include/Actor/ActorManager.hpp
+++ b/include/Actor/ActorManager.hpp
@@ -80,17 +80,19 @@ public:
void DeleteActor(u32 index, bool param2);
static void func_ov00_020c3484(ActorRef *ref, Actor *actor, unk32 param3);
void Actor_vfunc_10(u32 param1);
- Actor* FindActorById(u32 id);
- Actor* GetActor(ActorRef *ref);
+ Actor *FindActorById(u32 id);
+ Actor *GetActor(ActorRef *ref);
s32 FilterActors(FilterActorBase *filter, ActorList *filteredActors);
- static void FindActorByType(ActorRef *ref, ActorManager *manager, u32 type);
- static void FindNearestActorOfType(ActorRef *ref, ActorManager *manager, u32 type, Vec3p *pos);
- void func_ov00_020c398c();
- void func_ov00_020c399c();
- void func_ov00_020c39ac(u32 index, u32 *actorTypes, bool param3);
+ static void FindActorByType(ActorRef *ref, ActorManager *manager, ActorTypeId type);
+ static void FindNearestActorOfType(ActorRef *ref, ActorManager *manager, ActorTypeId type, Vec3p *pos);
+ bool func_ov00_020c398c(u32 index);
+ void func_ov00_020c399c(u32 index, Cylinder *cylinder);
+ Actor *func_ov00_020c39ac(u32 index, const ActorTypeId *actorTypes, bool param3);
s32 func_ov00_020c3b2c(s32 *param1);
s32 func_ov00_020c3bb0(unk32 param1, s32 *param2);
void func_ov00_020c3ce8(unk32 param1, unk32 param2);
void Actor_vfunc_28();
- static bool ActorTypeIsOneOf(u32 type, u32 *types);
+ static bool ActorTypeIsOneOf(u32 type, ActorTypeId *types);
};
+
+extern ActorManager *gActorManager;
diff --git a/include/Actor/ActorPlayerDummy.hpp b/include/Actor/ActorPlayerDummy.hpp
new file mode 100644
index 00000000..ceedc688
--- /dev/null
+++ b/include/Actor/ActorPlayerDummy.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "global.h"
+#include "types.h"
+
+#include "Actor/Actor.hpp"
+#include "Actor/ActorType.hpp"
+
+class ActorPlayerDummy : public Actor {
+public:
+ static ActorType gType;
+
+ /* 000 (base) */
+ /* 158 */ void *mUnk_158;
+ /* 15c */ u32 mUnk_15c;
+ /* 160 */ unk32 mUnk_160;
+ /* 164 */ u32 mUnk_164;
+ /* 168 */ unk32 mUnk_168;
+ /* 16c */ unk16 mUnk_16c;
+ /* 16e */ unk16 mUnk_16e;
+ /* 170 */ unk16 mUnk_170;
+ /* 172 */ unk8 mUnk_172[2];
+ /* 174 */ unk32 mUnk_174;
+ /* 178 */
+};
diff --git a/include/Actor/ActorRef.hpp b/include/Actor/ActorRef.hpp
index b98c86a9..eeace571 100644
--- a/include/Actor/ActorRef.hpp
+++ b/include/Actor/ActorRef.hpp
@@ -7,4 +7,14 @@ struct ActorRef {
/* 0 */ s32 id;
/* 4 */ s32 index;
/* 8 */
+
+ inline ActorRef() {}
+ inline ActorRef(s32 id, s32 index) :
+ id(id),
+ index(index) {}
+
+ inline void Reset() {
+ id = -1;
+ index = -1;
+ }
};
diff --git a/include/Actor/ActorRupee.hpp b/include/Actor/ActorRupee.hpp
index d62ed0a4..681a82a9 100644
--- a/include/Actor/ActorRupee.hpp
+++ b/include/Actor/ActorRupee.hpp
@@ -1,8 +1,8 @@
#pragma once
#include "global.h"
-#include "types.h"
#include "lib/math.h"
+#include "types.h"
#include "Actor/Actor.hpp"
#include "Actor/ActorType.hpp"
@@ -41,8 +41,8 @@ public:
/* 64 */ virtual void vfunc_64() override;
/* b4 */
- static ActorRupee* Create();
- ActorRupee(void);
+ static ActorRupee *Create();
+ ActorRupee();
void Move();
ItemId GetRupeeCutsceneItemId();
void func_ov14_0213b204(unk32 param1);
diff --git a/include/Actor/ActorType.hpp b/include/Actor/ActorType.hpp
index 1f1bb4d5..4adc3a7a 100644
--- a/include/Actor/ActorType.hpp
+++ b/include/Actor/ActorType.hpp
@@ -3,94 +3,159 @@
#include "global.h"
#include "types.h"
-#include "Actor/Actor.hpp"
-
-#define __ACTOR_TYPE_ID(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
+#define __ACTOR_TYPE_A 'A'
+#define __ACTOR_TYPE_B 'B'
+#define __ACTOR_TYPE_C 'C'
+#define __ACTOR_TYPE_D 'D'
+#define __ACTOR_TYPE_E 'E'
+#define __ACTOR_TYPE_F 'F'
+#define __ACTOR_TYPE_G 'G'
+#define __ACTOR_TYPE_H 'H'
+#define __ACTOR_TYPE_I 'I'
+#define __ACTOR_TYPE_J 'J'
+#define __ACTOR_TYPE_K 'K'
+#define __ACTOR_TYPE_L 'L'
+#define __ACTOR_TYPE_M 'M'
+#define __ACTOR_TYPE_N 'N'
+#define __ACTOR_TYPE_O 'O'
+#define __ACTOR_TYPE_P 'P'
+#define __ACTOR_TYPE_Q 'Q'
+#define __ACTOR_TYPE_R 'R'
+#define __ACTOR_TYPE_S 'S'
+#define __ACTOR_TYPE_T 'T'
+#define __ACTOR_TYPE_U 'U'
+#define __ACTOR_TYPE_V 'V'
+#define __ACTOR_TYPE_W 'W'
+#define __ACTOR_TYPE_X 'X'
+#define __ACTOR_TYPE_Y 'Y'
+#define __ACTOR_TYPE_Z 'Z'
+#define __ACTOR_TYPE_0 '0'
+#define __ACTOR_TYPE_1 '1'
+#define __ACTOR_TYPE_2 '2'
+#define __ACTOR_TYPE_3 '3'
+#define __ACTOR_TYPE_4 '4'
+#define __ACTOR_TYPE_5 '5'
+#define __ACTOR_TYPE_6 '6'
+#define __ACTOR_TYPE_7 '7'
+#define __ACTOR_TYPE_8 '8'
+#define __ACTOR_TYPE_9 '9'
+#define __CONCAT(a, b) a##b
+#define __EVAL(x) x
+#define __ACTOR_TYPE_ID(a, b, c, d) \
+ ((__EVAL(__CONCAT(__ACTOR_TYPE_, a)) << 24) | (__EVAL(__CONCAT(__ACTOR_TYPE_, b)) << 16) | \
+ (__EVAL(__CONCAT(__ACTOR_TYPE_, c)) << 8) | (__EVAL(__CONCAT(__ACTOR_TYPE_, d))))
typedef u32 ActorTypeId;
enum ActorTypeId_ {
- ActorTypeId_Navi = __ACTOR_TYPE_ID('N','A','V','I'),
- ActorTypeId_ForceNavi = __ACTOR_TYPE_ID('F','C','N','V'),
- ActorTypeId_WisdomNavi = __ACTOR_TYPE_ID('W','S','N','V'),
-
- ActorTypeId_TreasureMap = __ACTOR_TYPE_ID('T','M','A','P'),
- ActorTypeId_DigSpot = __ACTOR_TYPE_ID('D','G','T','G'),
-
- ActorTypeId_ShopItemBombchus = __ACTOR_TYPE_ID('I','T','B','T'),
- ActorTypeId_ShopItemBombs = __ACTOR_TYPE_ID('I','T','B','M'),
- ActorTypeId_ShopItemTreasure = __ACTOR_TYPE_ID('I','T','T','R'),
- ActorTypeId_ShopItemHeartContainer = __ACTOR_TYPE_ID('I','T','H','U'),
- ActorTypeId_ShopItemQuiver = __ACTOR_TYPE_ID('I','T','A','P'),
- ActorTypeId_ShopItemBombBag = __ACTOR_TYPE_ID('I','T','B','B'),
- ActorTypeId_ShopItemRedPotion = __ACTOR_TYPE_ID('I','T','P','B'),
- ActorTypeId_ShopItemCourageGem = __ACTOR_TYPE_ID('I','T','S','R'),
- ActorTypeId_ShopItemShield = __ACTOR_TYPE_ID('I','T','S','L'),
- ActorTypeId_ShopItemSoldOut = __ACTOR_TYPE_ID('I','T','S','O'),
-
- ActorTypeId_Heart = __ACTOR_TYPE_ID('H','A','R','T'),
- ActorTypeId_Rupee = __ACTOR_TYPE_ID('R','U','P','Y'),
-
- ActorTypeId_Bomb = __ACTOR_TYPE_ID('B','O','M','B'),
- ActorTypeId_Arrow = __ACTOR_TYPE_ID('A','R','R','W'),
-
- ActorTypeId_PlayerDummy = __ACTOR_TYPE_ID('P','L','D','M'),
- ActorTypeId_PushBlock = __ACTOR_TYPE_ID('P','S','B','L'),
- ActorTypeId_WindBlock = __ACTOR_TYPE_ID('W','B','L','K'),
- ActorTypeId_StorageDrum = __ACTOR_TYPE_ID('D','R','U','M'),
-
- ActorTypeId_SmallKey = __ACTOR_TYPE_ID('N','K','E','Y'),
-
- ActorTypeId_Sandworm = __ACTOR_TYPE_ID('M','L','D','W'),
- ActorTypeId_Tektite = __ACTOR_TYPE_ID('T','E','K','T'),
- ActorTypeId_PolsVoice = __ACTOR_TYPE_ID('P','L','S','V'),
- ActorTypeId_Yook = __ACTOR_TYPE_ID('Y','E','T','I'),
- ActorTypeId_Armos = __ACTOR_TYPE_ID('A','M','O','S'),
- ActorTypeId_Stalfos = __ACTOR_TYPE_ID('S','T','L','F'),
- ActorTypeId_StalfosWarrior = __ACTOR_TYPE_ID('S','T','L','W'),
- ActorTypeId_ChuChu = __ACTOR_TYPE_ID('C','H','U','C'),
- ActorTypeId_Gel = __ACTOR_TYPE_ID('G','E','L','L'),
- ActorTypeId_Bee = __ACTOR_TYPE_ID('B','E','E','0'),
- ActorTypeId_BeeHive = __ACTOR_TYPE_ID('B','E','E','H'),
- ActorTypeId_Cucco = __ACTOR_TYPE_ID('K','O','K','O'),
- ActorTypeId_Rope = __ACTOR_TYPE_ID('S','N','A','K'),
- ActorTypeId_Octorok = __ACTOR_TYPE_ID('O','C','T','A'),
- ActorTypeId_Keese = __ACTOR_TYPE_ID('K','E','T','H'),
- ActorTypeId_Rat = __ACTOR_TYPE_ID('R','A','T','0'),
- ActorTypeId_Beamos = __ACTOR_TYPE_ID('B','M','O','S'),
- ActorTypeId_LikeLike = __ACTOR_TYPE_ID('L','K','L','K'),
- ActorTypeId_Crow = __ACTOR_TYPE_ID('C','R','O','W'),
-
- ActorTypeId_Linebeck = __ACTOR_TYPE_ID('L','N','B','K'),
- ActorTypeId_Mailbox = __ACTOR_TYPE_ID('P','O','S','T'),
- ActorTypeId_Postman = __ACTOR_TYPE_ID('P','S','T','M'),
+ ActorTypeId_Null = __ACTOR_TYPE_ID(N, U, L, L),
+
+ ActorTypeId_Navi = __ACTOR_TYPE_ID(N, A, V, I),
+ ActorTypeId_ForceNavi = __ACTOR_TYPE_ID(F, C, N, V),
+ ActorTypeId_WisdomNavi = __ACTOR_TYPE_ID(W, S, N, V),
+
+ ActorTypeId_TreasureMap = __ACTOR_TYPE_ID(T, M, A, P),
+ ActorTypeId_DigSpot = __ACTOR_TYPE_ID(D, G, T, G),
+
+ ActorTypeId_ShopItemBombchus = __ACTOR_TYPE_ID(I, T, B, T),
+ ActorTypeId_ShopItemBombs = __ACTOR_TYPE_ID(I, T, B, M),
+ ActorTypeId_ShopItemTreasure = __ACTOR_TYPE_ID(I, T, T, R),
+ ActorTypeId_ShopItemHeartContainer = __ACTOR_TYPE_ID(I, T, H, U),
+ ActorTypeId_ShopItemQuiver = __ACTOR_TYPE_ID(I, T, A, P),
+ ActorTypeId_ShopItemBombBag = __ACTOR_TYPE_ID(I, T, B, B),
+ ActorTypeId_ShopItemRedPotion = __ACTOR_TYPE_ID(I, T, P, B),
+ ActorTypeId_ShopItemCourageGem = __ACTOR_TYPE_ID(I, T, S, R),
+ ActorTypeId_ShopItemShield = __ACTOR_TYPE_ID(I, T, S, L),
+ ActorTypeId_ShopItemSoldOut = __ACTOR_TYPE_ID(I, T, S, O),
+
+ ActorTypeId_Heart = __ACTOR_TYPE_ID(H, A, R, T),
+ ActorTypeId_Rupee = __ACTOR_TYPE_ID(R, U, P, Y),
+
+ ActorTypeId_Bomb = __ACTOR_TYPE_ID(B, O, M, B),
+ ActorTypeId_Arrow = __ACTOR_TYPE_ID(A, R, R, W),
+
+ ActorTypeId_PlayerDummy = __ACTOR_TYPE_ID(P, L, D, M),
+ ActorTypeId_PushBlock = __ACTOR_TYPE_ID(P, S, B, L),
+ ActorTypeId_WindBlock = __ACTOR_TYPE_ID(W, B, L, K),
+ ActorTypeId_StorageDrum = __ACTOR_TYPE_ID(D, R, U, M),
+
+ ActorTypeId_SmallKey = __ACTOR_TYPE_ID(N, K, E, Y),
+
+ ActorTypeId_Sandworm = __ACTOR_TYPE_ID(M, L, D, W),
+ ActorTypeId_Tektite = __ACTOR_TYPE_ID(T, E, K, T),
+ ActorTypeId_PolsVoice = __ACTOR_TYPE_ID(P, L, S, V),
+ ActorTypeId_Yook = __ACTOR_TYPE_ID(Y, E, T, I),
+ ActorTypeId_Armos = __ACTOR_TYPE_ID(A, M, O, S),
+ ActorTypeId_Stalfos = __ACTOR_TYPE_ID(S, T, L, F),
+ ActorTypeId_StalfosWarrior = __ACTOR_TYPE_ID(S, T, L, W),
+ ActorTypeId_ChuChu = __ACTOR_TYPE_ID(C, H, U, C),
+ ActorTypeId_Gel = __ACTOR_TYPE_ID(G, E, L, L),
+ ActorTypeId_Bee = __ACTOR_TYPE_ID(B, E, E, 0),
+ ActorTypeId_BeeHive = __ACTOR_TYPE_ID(B, E, E, H),
+ ActorTypeId_Cucco = __ACTOR_TYPE_ID(K, O, K, O),
+ ActorTypeId_Rope = __ACTOR_TYPE_ID(S, N, A, K),
+ ActorTypeId_Octorok = __ACTOR_TYPE_ID(O, C, T, A),
+ ActorTypeId_Keese = __ACTOR_TYPE_ID(K, E, T, H),
+ ActorTypeId_Rat = __ACTOR_TYPE_ID(R, A, T, 0),
+ ActorTypeId_Beamos = __ACTOR_TYPE_ID(B, M, O, S),
+ ActorTypeId_LikeLike = __ACTOR_TYPE_ID(L, K, L, K),
+ ActorTypeId_Crow = __ACTOR_TYPE_ID(C, R, O, W),
+
+ ActorTypeId_Linebeck = __ACTOR_TYPE_ID(L, N, B, K),
+ ActorTypeId_Mailbox = __ACTOR_TYPE_ID(P, O, S, T),
+ ActorTypeId_Postman = __ACTOR_TYPE_ID(P, S, T, M),
+
+ ActorTypeId_BIGR = __ACTOR_TYPE_ID(B, I, G, R),
+ ActorTypeId_BKEY = __ACTOR_TYPE_ID(B, K, E, Y),
+ ActorTypeId_BLST = __ACTOR_TYPE_ID(B, L, S, T),
+ ActorTypeId_BMRN = __ACTOR_TYPE_ID(B, M, R, N),
+ ActorTypeId_BMTY = __ACTOR_TYPE_ID(B, M, T, Y),
+ ActorTypeId_BTRF = __ACTOR_TYPE_ID(B, T, R, F),
+ ActorTypeId_CBLS = __ACTOR_TYPE_ID(C, B, L, S),
+ ActorTypeId_FLAL = __ACTOR_TYPE_ID(F, L, A, L),
+ ActorTypeId_FLBM = __ACTOR_TYPE_ID(F, L, B, M),
+ ActorTypeId_FLBT = __ACTOR_TYPE_ID(F, L, B, T),
+ ActorTypeId_FLTB = __ACTOR_TYPE_ID(F, L, T, B),
+ ActorTypeId_FLTM = __ACTOR_TYPE_ID(F, L, T, M),
+ ActorTypeId_FORC = __ACTOR_TYPE_ID(F, O, R, C),
+ ActorTypeId_ROPE = __ACTOR_TYPE_ID(R, O, P, E),
+ ActorTypeId_SBEM = __ACTOR_TYPE_ID(S, B, E, M),
+ ActorTypeId_STNE = __ACTOR_TYPE_ID(S, T, N, E),
+ ActorTypeId_TARU = __ACTOR_TYPE_ID(T, A, R, U),
+ ActorTypeId_TSBH = __ACTOR_TYPE_ID(T, S, B, H),
+ ActorTypeId_TSUB = __ACTOR_TYPE_ID(T, S, U, B),
+ ActorTypeId_VLR0 = __ACTOR_TYPE_ID(V, L, R, 0),
};
class ActorType_UnkClass {
- public:
- u32 unk_00;
- u32 unk_04;
- u32 unk_08;
- u32 unk_0C;
- u32 unk_10;
- ActorType_UnkClass(u32 unk_00, u32 unk_04): unk_00(unk_00), unk_04(unk_04) {}
+public:
+ u32 unk_00;
+ u32 unk_04;
+ u32 unk_08;
+ u32 unk_0C;
+ u32 unk_10;
+ ActorType_UnkClass(u32 unk_00, u32 unk_04) :
+ unk_00(unk_00),
+ unk_04(unk_04) {}
};
-typedef Actor* (*ActorCreateFunc)();
+class Actor;
+typedef Actor *(*ActorCreateFunc)();
struct ActorType {
/* 00 */ ActorTypeId id;
/* 04 */ ActorCreateFunc create;
- /* 08 */ void *unk_08;
+ /* 08 */ unk32 (*unk_08)();
/* 0c */ unk32 unk_0c;
/* 10 */ ActorType *next;
/* 14 */
- ActorType(ActorTypeId id, ActorCreateFunc create, void *unk_08);
+ inline ActorType() {}
+ ActorType(ActorTypeId id, ActorCreateFunc create, unk32 (*unk_08)());
~ActorType();
- void func_0203e7c8();
+ unk32 func_0203e7c8();
void Register();
void Unregister();
- static ActorType* Find(ActorTypeId id);
+ static ActorType *Find(ActorTypeId id);
};
struct ActorTypeList {
diff --git a/include/Actor/FilterActorBase.hpp b/include/Actor/FilterActorBase.hpp
index 6a969411..092987a7 100644
--- a/include/Actor/FilterActorBase.hpp
+++ b/include/Actor/FilterActorBase.hpp
@@ -3,6 +3,8 @@
#include "global.h"
#include "types.h"
+#include "Actor/ActorRef.hpp"
+
class Actor;
class FilterActorBase {
@@ -13,3 +15,18 @@ public:
/* 0 */ virtual bool Filter(Actor *actor) = 0;
/* 4 */
};
+
+class FilterActorReturn {
+public:
+ /* 00 */ ActorRef refs[20];
+
+ inline FilterActorReturn() {
+ ActorRef *ref = refs;
+ ActorRef *end;
+ do {
+ end = &refs[20];
+ ref->Reset();
+ ref++;
+ } while (ref < end);
+ }
+};
diff --git a/include/DTCM/UnkStruct_027e105c.hpp b/include/DTCM/UnkStruct_027e105c.hpp
index ac88044c..41c4f031 100644
--- a/include/DTCM/UnkStruct_027e105c.hpp
+++ b/include/DTCM/UnkStruct_027e105c.hpp
@@ -5,7 +5,7 @@
struct UnkStruct_027e105c {
/* 0 */ const char **unk_0;
/* 4 */
-
+
unk32 LoadTreasureItemFanfare(Treasure);
};
diff --git a/include/Item/Item.hpp b/include/Item/Item.hpp
index 39b1c6f3..1b67ada3 100644
--- a/include/Item/Item.hpp
+++ b/include/Item/Item.hpp
@@ -4,236 +4,236 @@
typedef s32 ItemFlag;
enum ItemFlag_ {
- ItemFlag_None = -1,
- /* 0x00 */ ItemFlag_OshusSword = 0,
- /* 0x01 */ ItemFlag_WoodenShield = 1,
- /* 0x02 */ ItemFlag_Boomerang = 2,
- /* 0x03 */ ItemFlag_Shovel = 3,
- /* 0x04 */ ItemFlag_BombBag = 4,
- /* 0x05 */ ItemFlag_Bow = 5,
- /* 0x06 */ ItemFlag_GrapplingHook = 6,
- /* 0x07 */ ItemFlag_BombchuBag = 7,
- /* 0x08 */ ItemFlag_Hammer = 8,
- /* 0x09 */ ItemFlag_PotionA = 9,
- /* 0x0a */ ItemFlag_PotionB = 10,
- ItemFlag_EQUIP_START = ItemFlag_OshusSword,
- ItemFlag_EQUIP_END = ItemFlag_PotionB + 1,
- ItemFlag_EQUIP_COUNT = ItemFlag_EQUIP_END - ItemFlag_EQUIP_START,
+ ItemFlag_None = -1,
+ /* 0x00 */ ItemFlag_OshusSword = 0,
+ /* 0x01 */ ItemFlag_WoodenShield = 1,
+ /* 0x02 */ ItemFlag_Boomerang = 2,
+ /* 0x03 */ ItemFlag_Shovel = 3,
+ /* 0x04 */ ItemFlag_BombBag = 4,
+ /* 0x05 */ ItemFlag_Bow = 5,
+ /* 0x06 */ ItemFlag_GrapplingHook = 6,
+ /* 0x07 */ ItemFlag_BombchuBag = 7,
+ /* 0x08 */ ItemFlag_Hammer = 8,
+ /* 0x09 */ ItemFlag_PotionA = 9,
+ /* 0x0a */ ItemFlag_PotionB = 10,
+ ItemFlag_EQUIP_START = ItemFlag_OshusSword,
+ ItemFlag_EQUIP_END = ItemFlag_PotionB + 1,
+ ItemFlag_EQUIP_COUNT = ItemFlag_EQUIP_END - ItemFlag_EQUIP_START,
- /* 0x14 */ ItemFlag_SpiritOfCourage = 20,
- /* 0x15 */ ItemFlag_SpiritOfPower = 21,
- /* 0x16 */ ItemFlag_SpiritOfWisdom = 22,
- /* 0x17 */ ItemFlag_CourageLv1 = 23,
- /* 0x18 */ ItemFlag_PowerLv1 = 24,
- /* 0x19 */ ItemFlag_WisdomLv1 = 25,
- ItemFlag_FAIRY_LV1 = ItemFlag_CourageLv1,
- /* 0x1a */ ItemFlag_CourageLv2 = 26,
- /* 0x1b */ ItemFlag_PowerLv2 = 27,
- /* 0x1c */ ItemFlag_WisdomLv2 = 28,
- ItemFlag_FAIRY_LV2 = ItemFlag_CourageLv2,
+ /* 0x14 */ ItemFlag_SpiritOfCourage = 20,
+ /* 0x15 */ ItemFlag_SpiritOfPower = 21,
+ /* 0x16 */ ItemFlag_SpiritOfWisdom = 22,
+ /* 0x17 */ ItemFlag_CourageLv1 = 23,
+ /* 0x18 */ ItemFlag_PowerLv1 = 24,
+ /* 0x19 */ ItemFlag_WisdomLv1 = 25,
+ ItemFlag_FAIRY_LV1 = ItemFlag_CourageLv1,
+ /* 0x1a */ ItemFlag_CourageLv2 = 26,
+ /* 0x1b */ ItemFlag_PowerLv2 = 27,
+ /* 0x1c */ ItemFlag_WisdomLv2 = 28,
+ ItemFlag_FAIRY_LV2 = ItemFlag_CourageLv2,
- /* 0x20 */ ItemFlag_Hourglass = 32,
- /* 0x21 */ ItemFlag_SeaChartSW = 33,
- /* 0x22 */ ItemFlag_SeaChartNW = 34,
- /* 0x23 */ ItemFlag_SeaChartSE = 35,
- /* 0x24 */ ItemFlag_SeaChartNE = 36,
- /* 0x25 */ ItemFlag_PhantomSword = 37,
- /* 0x26 */ ItemFlag_SunKey = 38,
- /* 0x27 */ ItemFlag_Unk_39 = 39,
- /* 0x28 */ ItemFlag_FishingRod = 40,
- /* 0x29 */ ItemFlag_Cannon = 41,
- /* 0x2a */ ItemFlag_KingsKey = 42,
- /* 0x2b */ ItemFlag_GhostKey = 43,
- /* 0x2c */ ItemFlag_SalvageArm = 44,
+ /* 0x20 */ ItemFlag_Hourglass = 32,
+ /* 0x21 */ ItemFlag_SeaChartSW = 33,
+ /* 0x22 */ ItemFlag_SeaChartNW = 34,
+ /* 0x23 */ ItemFlag_SeaChartSE = 35,
+ /* 0x24 */ ItemFlag_SeaChartNE = 36,
+ /* 0x25 */ ItemFlag_PhantomSword = 37,
+ /* 0x26 */ ItemFlag_SunKey = 38,
+ /* 0x27 */ ItemFlag_Unk_39 = 39,
+ /* 0x28 */ ItemFlag_FishingRod = 40,
+ /* 0x29 */ ItemFlag_Cannon = 41,
+ /* 0x2a */ ItemFlag_KingsKey = 42,
+ /* 0x2b */ ItemFlag_GhostKey = 43,
+ /* 0x2c */ ItemFlag_SalvageArm = 44,
/* 0x2d */ ItemFlag_SwordsmansScroll = 45,
/* 0x2e */ ItemFlag_CycloneSlate = 46,
/* 0x2f */ ItemFlag_Unk_47 = 47,
- /* 0x60 */ ItemFlag_TreasureChart1 = 96,
- /* 0x61 */ ItemFlag_TreasureChart2 = 97,
- /* 0x62 */ ItemFlag_TreasureChart3 = 98,
- /* 0x63 */ ItemFlag_TreasureChart4 = 99,
- /* 0x64 */ ItemFlag_TreasureChart5 = 100,
- /* 0x65 */ ItemFlag_TreasureChart6 = 101,
- /* 0x66 */ ItemFlag_TreasureChart7 = 102,
- /* 0x67 */ ItemFlag_TreasureChart8 = 103,
- /* 0x68 */ ItemFlag_TreasureChart9 = 104,
- /* 0x69 */ ItemFlag_TreasureChart10 = 105,
- /* 0x6a */ ItemFlag_TreasureChart11 = 106,
- /* 0x6b */ ItemFlag_TreasureChart12 = 107,
- /* 0x6c */ ItemFlag_TreasureChart13 = 108,
- /* 0x6d */ ItemFlag_TreasureChart14 = 109,
- /* 0x6e */ ItemFlag_TreasureChart15 = 110,
- /* 0x6f */ ItemFlag_TreasureChart16 = 111,
- /* 0x70 */ ItemFlag_TreasureChart17 = 112,
- /* 0x71 */ ItemFlag_TreasureChart18 = 113,
- /* 0x72 */ ItemFlag_TreasureChart19 = 114,
- /* 0x73 */ ItemFlag_TreasureChart20 = 115,
- /* 0x74 */ ItemFlag_TreasureChart21 = 116,
- /* 0x75 */ ItemFlag_TreasureChart22 = 117,
- /* 0x76 */ ItemFlag_TreasureChart23 = 118,
- /* 0x77 */ ItemFlag_TreasureChart24 = 119,
- /* 0x78 */ ItemFlag_TreasureChart25 = 120,
- /* 0x79 */ ItemFlag_TreasureChart26 = 121,
- /* 0x7a */ ItemFlag_TreasureChart27 = 122,
- /* 0x7b */ ItemFlag_TreasureChart28 = 123,
- /* 0x7c */ ItemFlag_TreasureChart29 = 124,
- /* 0x7d */ ItemFlag_TreasureChart30 = 125,
- /* 0x7e */ ItemFlag_TreasureChart31 = 126,
- /* 0x7f */ ItemFlag_TreasureChart32 = 127,
- ItemFlag_TREASURE_CHART_START = ItemFlag_TreasureChart1,
+ /* 0x60 */ ItemFlag_TreasureChart1 = 96,
+ /* 0x61 */ ItemFlag_TreasureChart2 = 97,
+ /* 0x62 */ ItemFlag_TreasureChart3 = 98,
+ /* 0x63 */ ItemFlag_TreasureChart4 = 99,
+ /* 0x64 */ ItemFlag_TreasureChart5 = 100,
+ /* 0x65 */ ItemFlag_TreasureChart6 = 101,
+ /* 0x66 */ ItemFlag_TreasureChart7 = 102,
+ /* 0x67 */ ItemFlag_TreasureChart8 = 103,
+ /* 0x68 */ ItemFlag_TreasureChart9 = 104,
+ /* 0x69 */ ItemFlag_TreasureChart10 = 105,
+ /* 0x6a */ ItemFlag_TreasureChart11 = 106,
+ /* 0x6b */ ItemFlag_TreasureChart12 = 107,
+ /* 0x6c */ ItemFlag_TreasureChart13 = 108,
+ /* 0x6d */ ItemFlag_TreasureChart14 = 109,
+ /* 0x6e */ ItemFlag_TreasureChart15 = 110,
+ /* 0x6f */ ItemFlag_TreasureChart16 = 111,
+ /* 0x70 */ ItemFlag_TreasureChart17 = 112,
+ /* 0x71 */ ItemFlag_TreasureChart18 = 113,
+ /* 0x72 */ ItemFlag_TreasureChart19 = 114,
+ /* 0x73 */ ItemFlag_TreasureChart20 = 115,
+ /* 0x74 */ ItemFlag_TreasureChart21 = 116,
+ /* 0x75 */ ItemFlag_TreasureChart22 = 117,
+ /* 0x76 */ ItemFlag_TreasureChart23 = 118,
+ /* 0x77 */ ItemFlag_TreasureChart24 = 119,
+ /* 0x78 */ ItemFlag_TreasureChart25 = 120,
+ /* 0x79 */ ItemFlag_TreasureChart26 = 121,
+ /* 0x7a */ ItemFlag_TreasureChart27 = 122,
+ /* 0x7b */ ItemFlag_TreasureChart28 = 123,
+ /* 0x7c */ ItemFlag_TreasureChart29 = 124,
+ /* 0x7d */ ItemFlag_TreasureChart30 = 125,
+ /* 0x7e */ ItemFlag_TreasureChart31 = 126,
+ /* 0x7f */ ItemFlag_TreasureChart32 = 127,
+ ItemFlag_TREASURE_CHART_START = ItemFlag_TreasureChart1,
ItemFlag_COUNT = 128,
};
typedef s32 ItemId;
enum ItemId_ {
- /* -1 */ ItemId_None = -1,
- /* 0x00 */ ItemId_Nothing = 0,
- /* 0x01 */ ItemId_SmallKey = 1,
- /* 0x02 */ ItemId_GreenRupee = 2,
- /* 0x03 */ ItemId_OshusSword = 3,
- /* 0x04 */ ItemId_WoodenShield = 4,
- /* 0x05 */ ItemId_Unk_5 = 5,
- /* 0x06 */ ItemId_Unk_6 = 6,
- /* 0x07 */ ItemId_BombBag = 7,
- /* 0x08 */ ItemId_Bow = 8,
- /* 0x09 */ ItemId_BigGreenRupee = 9,
- /* 0x0a */ ItemId_HeartContainer = 10,
- /* 0x0b */ ItemId_Unk_11 = 11,
- /* 0x0c */ ItemId_Boomerang = 12,
- /* 0x0d */ ItemId_Scoop = 13,
- /* 0x0e */ ItemId_BombchuBag = 14,
- /* 0x0f */ ItemId_BossKey = 15,
- /* 0x10 */ ItemId_Unk_16 = 16,
- /* 0x11 */ ItemId_Unk_17 = 17,
- /* 0x12 */ ItemId_PhantomHourglass = 18,
- /* 0x13 */ ItemId_SWSeaChart = 19,
- /* 0x14 */ ItemId_NWSeaChart = 20,
- /* 0x15 */ ItemId_SESeaChart = 21,
- /* 0x16 */ ItemId_NESeaChart = 22,
- /* 0x17 */ ItemId_Unk_23 = 23,
- /* 0x18 */ ItemId_BlueRupee = 24,
- /* 0x19 */ ItemId_RedRupee = 25,
- /* 0x1a */ ItemId_BigRedRupee = 26,
- /* 0x1b */ ItemId_GoldRupee = 27,
- /* 0x1c */ ItemId_Unk_28 = 28,
- /* 0x1d */ ItemId_Unk_29 = 29,
- /* 0x1e */ ItemId_Unk_30 = 30,
- /* 0x1f */ ItemId_Hammer = 31,
- /* 0x20 */ ItemId_Rope = 32,
- /* 0x21 */ ItemId_SquareCrystal = 33,
- /* 0x22 */ ItemId_RoundCrystal = 34,
- /* 0x23 */ ItemId_TriangleCrystal = 35,
- /* 0x24 */ ItemId_FishingRod = 36,
- /* 0x25 */ ItemId_Cannon = 37,
- /* 0x26 */ ItemId_SunKey = 38,
- /* 0x27 */ ItemId_Unk_39 = 39,
- /* 0x28 */ ItemId_Quiver = 40,
- /* 0x29 */ ItemId_BigBombBag = 41,
- /* 0x2a */ ItemId_BigBombchuBag = 42,
- /* 0x2b */ ItemId_Unk_43 = 43,
- /* 0x2c */ ItemId_KingsKey = 44,
- /* 0x2d */ ItemId_PowerGem = 45,
- /* 0x2e */ ItemId_WisdomGem = 46,
- /* 0x2f */ ItemId_CourageGem = 47,
- /* 0x30 */ ItemId_PinkCoral = 48,
- /* 0x31 */ ItemId_WhitePearlLoop = 49,
- /* 0x32 */ ItemId_DarkPearlLoop = 50,
- /* 0x33 */ ItemId_ZoraScale = 51,
- /* 0x34 */ ItemId_GoronAmber = 52,
- /* 0x35 */ ItemId_RutoCrown = 53,
- /* 0x36 */ ItemId_HelmarocPlume = 54,
- /* 0x37 */ ItemId_RegalRing = 55,
- ItemId_TREASURE_START = ItemId_PinkCoral,
- ItemId_TREASURE_END = ItemId_RegalRing,
- /* 0x38 */ ItemId_GhostKey = 56,
- /* 0x39 */ ItemId_FreebieCard = 57,
- /* 0x3a */ ItemId_ComplimentCard = 58,
+ /* -1 */ ItemId_None = -1,
+ /* 0x00 */ ItemId_Nothing = 0,
+ /* 0x01 */ ItemId_SmallKey = 1,
+ /* 0x02 */ ItemId_GreenRupee = 2,
+ /* 0x03 */ ItemId_OshusSword = 3,
+ /* 0x04 */ ItemId_WoodenShield = 4,
+ /* 0x05 */ ItemId_Unk_5 = 5,
+ /* 0x06 */ ItemId_Unk_6 = 6,
+ /* 0x07 */ ItemId_BombBag = 7,
+ /* 0x08 */ ItemId_Bow = 8,
+ /* 0x09 */ ItemId_BigGreenRupee = 9,
+ /* 0x0a */ ItemId_HeartContainer = 10,
+ /* 0x0b */ ItemId_Unk_11 = 11,
+ /* 0x0c */ ItemId_Boomerang = 12,
+ /* 0x0d */ ItemId_Scoop = 13,
+ /* 0x0e */ ItemId_BombchuBag = 14,
+ /* 0x0f */ ItemId_BossKey = 15,
+ /* 0x10 */ ItemId_Unk_16 = 16,
+ /* 0x11 */ ItemId_Unk_17 = 17,
+ /* 0x12 */ ItemId_PhantomHourglass = 18,
+ /* 0x13 */ ItemId_SWSeaChart = 19,
+ /* 0x14 */ ItemId_NWSeaChart = 20,
+ /* 0x15 */ ItemId_SESeaChart = 21,
+ /* 0x16 */ ItemId_NESeaChart = 22,
+ /* 0x17 */ ItemId_Unk_23 = 23,
+ /* 0x18 */ ItemId_BlueRupee = 24,
+ /* 0x19 */ ItemId_RedRupee = 25,
+ /* 0x1a */ ItemId_BigRedRupee = 26,
+ /* 0x1b */ ItemId_GoldRupee = 27,
+ /* 0x1c */ ItemId_Unk_28 = 28,
+ /* 0x1d */ ItemId_Unk_29 = 29,
+ /* 0x1e */ ItemId_Unk_30 = 30,
+ /* 0x1f */ ItemId_Hammer = 31,
+ /* 0x20 */ ItemId_Rope = 32,
+ /* 0x21 */ ItemId_SquareCrystal = 33,
+ /* 0x22 */ ItemId_RoundCrystal = 34,
+ /* 0x23 */ ItemId_TriangleCrystal = 35,
+ /* 0x24 */ ItemId_FishingRod = 36,
+ /* 0x25 */ ItemId_Cannon = 37,
+ /* 0x26 */ ItemId_SunKey = 38,
+ /* 0x27 */ ItemId_Unk_39 = 39,
+ /* 0x28 */ ItemId_Quiver = 40,
+ /* 0x29 */ ItemId_BigBombBag = 41,
+ /* 0x2a */ ItemId_BigBombchuBag = 42,
+ /* 0x2b */ ItemId_Unk_43 = 43,
+ /* 0x2c */ ItemId_KingsKey = 44,
+ /* 0x2d */ ItemId_PowerGem = 45,
+ /* 0x2e */ ItemId_WisdomGem = 46,
+ /* 0x2f */ ItemId_CourageGem = 47,
+ /* 0x30 */ ItemId_PinkCoral = 48,
+ /* 0x31 */ ItemId_WhitePearlLoop = 49,
+ /* 0x32 */ ItemId_DarkPearlLoop = 50,
+ /* 0x33 */ ItemId_ZoraScale = 51,
+ /* 0x34 */ ItemId_GoronAmber = 52,
+ /* 0x35 */ ItemId_RutoCrown = 53,
+ /* 0x36 */ ItemId_HelmarocPlume = 54,
+ /* 0x37 */ ItemId_RegalRing = 55,
+ ItemId_TREASURE_START = ItemId_PinkCoral,
+ ItemId_TREASURE_END = ItemId_RegalRing,
+ /* 0x38 */ ItemId_GhostKey = 56,
+ /* 0x39 */ ItemId_FreebieCard = 57,
+ /* 0x3a */ ItemId_ComplimentCard = 58,
/* 0x3b */ ItemId_ComplimentaryCard = 59,
- /* 0x3c */ ItemId_RegalNecklace = 60,
- /* 0x3d */ ItemId_SalvageArm = 61,
- /* 0x3e */ ItemId_HerosNewClothes = 62,
- /* 0x3f */ ItemId_Kaleidoscope = 63,
- /* 0x40 */ ItemId_GuardNotebook = 64,
- /* 0x41 */ ItemId_JolenesLetter = 65,
- /* 0x42 */ ItemId_PrizePostcard = 66,
- /* 0x43 */ ItemId_WoodHeart = 67,
+ /* 0x3c */ ItemId_RegalNecklace = 60,
+ /* 0x3d */ ItemId_SalvageArm = 61,
+ /* 0x3e */ ItemId_HerosNewClothes = 62,
+ /* 0x3f */ ItemId_Kaleidoscope = 63,
+ /* 0x40 */ ItemId_GuardNotebook = 64,
+ /* 0x41 */ ItemId_JolenesLetter = 65,
+ /* 0x42 */ ItemId_PrizePostcard = 66,
+ /* 0x43 */ ItemId_WoodHeart = 67,
/* 0x44 */ ItemId_PhantomSwordBlade = 68,
- /* 0x45 */ ItemId_PhantomSword = 69,
- /* 0x46 */ ItemId_Unk_70 = 70,
+ /* 0x45 */ ItemId_PhantomSword = 69,
+ /* 0x46 */ ItemId_Unk_70 = 70,
- /* 0x4b */ ItemId_TreasureChart1 = 75,
- /* 0x4c */ ItemId_TreasureChart2 = 76,
- /* 0x4d */ ItemId_TreasureChart3 = 77,
- /* 0x4e */ ItemId_TreasureChart4 = 78,
- /* 0x4f */ ItemId_TreasureChart5 = 79,
- /* 0x50 */ ItemId_TreasureChart6 = 80,
- /* 0x51 */ ItemId_TreasureChart7 = 81,
- /* 0x52 */ ItemId_TreasureChart8 = 82,
- /* 0x53 */ ItemId_TreasureChart9 = 83,
- /* 0x54 */ ItemId_TreasureChart10 = 84,
- /* 0x55 */ ItemId_TreasureChart11 = 85,
- /* 0x56 */ ItemId_TreasureChart12 = 86,
- /* 0x57 */ ItemId_TreasureChart13 = 87,
- /* 0x58 */ ItemId_TreasureChart14 = 88,
- /* 0x59 */ ItemId_TreasureChart15 = 89,
- /* 0x5a */ ItemId_TreasureChart16 = 90,
- /* 0x5b */ ItemId_TreasureChart17 = 91,
- /* 0x5c */ ItemId_TreasureChart18 = 92,
- /* 0x5d */ ItemId_TreasureChart19 = 93,
- /* 0x5e */ ItemId_TreasureChart20 = 94,
- /* 0x5f */ ItemId_TreasureChart21 = 95,
- /* 0x60 */ ItemId_TreasureChart22 = 96,
- /* 0x61 */ ItemId_TreasureChart23 = 97,
- /* 0x62 */ ItemId_TreasureChart24 = 98,
- /* 0x63 */ ItemId_TreasureChart25 = 99,
- /* 0x64 */ ItemId_TreasureChart26 = 100,
- /* 0x65 */ ItemId_TreasureChart27 = 101,
- /* 0x66 */ ItemId_TreasureChart28 = 102,
- /* 0x67 */ ItemId_TreasureChart29 = 103,
- /* 0x68 */ ItemId_TreasureChart30 = 104,
- /* 0x69 */ ItemId_TreasureChart31 = 105,
- /* 0x6a */ ItemId_TreasureChart32 = 106,
- ItemId_TREASURE_CHART_START = ItemId_TreasureChart1,
- ItemId_TREASURE_CHART_END = ItemId_TreasureChart32,
- /* 0x6b */ ItemId_SpiritOfPowerUpgradeLvl1 = 107,
- /* 0x6c */ ItemId_SpiritOfWisdomUpgradeLvl1 = 108,
+ /* 0x4b */ ItemId_TreasureChart1 = 75,
+ /* 0x4c */ ItemId_TreasureChart2 = 76,
+ /* 0x4d */ ItemId_TreasureChart3 = 77,
+ /* 0x4e */ ItemId_TreasureChart4 = 78,
+ /* 0x4f */ ItemId_TreasureChart5 = 79,
+ /* 0x50 */ ItemId_TreasureChart6 = 80,
+ /* 0x51 */ ItemId_TreasureChart7 = 81,
+ /* 0x52 */ ItemId_TreasureChart8 = 82,
+ /* 0x53 */ ItemId_TreasureChart9 = 83,
+ /* 0x54 */ ItemId_TreasureChart10 = 84,
+ /* 0x55 */ ItemId_TreasureChart11 = 85,
+ /* 0x56 */ ItemId_TreasureChart12 = 86,
+ /* 0x57 */ ItemId_TreasureChart13 = 87,
+ /* 0x58 */ ItemId_TreasureChart14 = 88,
+ /* 0x59 */ ItemId_TreasureChart15 = 89,
+ /* 0x5a */ ItemId_TreasureChart16 = 90,
+ /* 0x5b */ ItemId_TreasureChart17 = 91,
+ /* 0x5c */ ItemId_TreasureChart18 = 92,
+ /* 0x5d */ ItemId_TreasureChart19 = 93,
+ /* 0x5e */ ItemId_TreasureChart20 = 94,
+ /* 0x5f */ ItemId_TreasureChart21 = 95,
+ /* 0x60 */ ItemId_TreasureChart22 = 96,
+ /* 0x61 */ ItemId_TreasureChart23 = 97,
+ /* 0x62 */ ItemId_TreasureChart24 = 98,
+ /* 0x63 */ ItemId_TreasureChart25 = 99,
+ /* 0x64 */ ItemId_TreasureChart26 = 100,
+ /* 0x65 */ ItemId_TreasureChart27 = 101,
+ /* 0x66 */ ItemId_TreasureChart28 = 102,
+ /* 0x67 */ ItemId_TreasureChart29 = 103,
+ /* 0x68 */ ItemId_TreasureChart30 = 104,
+ /* 0x69 */ ItemId_TreasureChart31 = 105,
+ /* 0x6a */ ItemId_TreasureChart32 = 106,
+ ItemId_TREASURE_CHART_START = ItemId_TreasureChart1,
+ ItemId_TREASURE_CHART_END = ItemId_TreasureChart32,
+ /* 0x6b */ ItemId_SpiritOfPowerUpgradeLvl1 = 107,
+ /* 0x6c */ ItemId_SpiritOfWisdomUpgradeLvl1 = 108,
/* 0x6d */ ItemId_SpiritOfCourageUpgradeLvl1 = 109,
- /* 0x6e */ ItemId_SpiritOfPowerUpgradeLvl2 = 110,
- /* 0x6f */ ItemId_SpiritOfWisdomUpgradeLvl2 = 111,
+ /* 0x6e */ ItemId_SpiritOfPowerUpgradeLvl2 = 110,
+ /* 0x6f */ ItemId_SpiritOfWisdomUpgradeLvl2 = 111,
/* 0x70 */ ItemId_SpiritOfCourageUpgradeLvl2 = 112,
- /* 0x71 */ ItemId_SwordsmanScroll = 113,
- /* 0x72 */ ItemId_Crimsonine = 114,
- /* 0x73 */ ItemId_Azurine = 115,
- /* 0x74 */ ItemId_Aquanine = 116,
- /* 0x75 */ ItemId_RedPotion = 117,
- /* 0x76 */ ItemId_PurplePotion = 118,
- /* 0x77 */ ItemId_YellowPotion = 119,
- /* 0x78 */ ItemId_SandOfHours = 120,
- /* 0x79 */ ItemId_GoldenChimney = 121,
- /* 0x7a */ ItemId_GoldenHandrail = 122,
- /* 0x7b */ ItemId_GoldenCannon = 123,
- /* 0x7c */ ItemId_GoldenHull = 124,
- ItemId_GOLDEN_SHIP_START = ItemId_GoldenChimney,
- ItemId_GOLDEN_SHIP_END = ItemId_GoldenHull,
+ /* 0x71 */ ItemId_SwordsmanScroll = 113,
+ /* 0x72 */ ItemId_Crimsonine = 114,
+ /* 0x73 */ ItemId_Azurine = 115,
+ /* 0x74 */ ItemId_Aquanine = 116,
+ /* 0x75 */ ItemId_RedPotion = 117,
+ /* 0x76 */ ItemId_PurplePotion = 118,
+ /* 0x77 */ ItemId_YellowPotion = 119,
+ /* 0x78 */ ItemId_SandOfHours = 120,
+ /* 0x79 */ ItemId_GoldenChimney = 121,
+ /* 0x7a */ ItemId_GoldenHandrail = 122,
+ /* 0x7b */ ItemId_GoldenCannon = 123,
+ /* 0x7c */ ItemId_GoldenHull = 124,
+ ItemId_GOLDEN_SHIP_START = ItemId_GoldenChimney,
+ ItemId_GOLDEN_SHIP_END = ItemId_GoldenHull,
- /* 0x7d */ ItemId_Unk_125 = 125,
- /* 0x7e */ ItemId_Unk_126 = 126,
+ /* 0x7d */ ItemId_Unk_125 = 125,
+ /* 0x7e */ ItemId_Unk_126 = 126,
/* 0x7f */ ItemId_CycloneSlate = 127,
- /* 0x80 */ ItemId_Unk_128 = 128,
- /* 0x81 */ ItemId_Rupoor10 = 129,
- /* 0x82 */ ItemId_Rupoor50 = 130,
- /* 0x83 */ ItemId_Unk_131 = 131,
- /* 0x84 */ ItemId_Unk_132 = 132,
- /* 0x85 */ ItemId_Unk_133 = 133,
- /* 0x86 */ ItemId_Unk_134 = 134,
- /* 0x87 */ ItemId_Unk_135 = 135,
- /* 0x88 */ ItemId_Unk_136 = 136,
+ /* 0x80 */ ItemId_Unk_128 = 128,
+ /* 0x81 */ ItemId_Rupoor10 = 129,
+ /* 0x82 */ ItemId_Rupoor50 = 130,
+ /* 0x83 */ ItemId_Unk_131 = 131,
+ /* 0x84 */ ItemId_Unk_132 = 132,
+ /* 0x85 */ ItemId_Unk_133 = 133,
+ /* 0x86 */ ItemId_Unk_134 = 134,
+ /* 0x87 */ ItemId_Unk_135 = 135,
+ /* 0x88 */ ItemId_Unk_136 = 136,
};
namespace Item {
bool func_ov00_020ad020(ItemId item);
bool func_ov00_020ad068(ItemId item);
-}
+} // namespace Item
diff --git a/include/Item/ItemManager.hpp b/include/Item/ItemManager.hpp
index e50fb673..1cc75738 100644
--- a/include/Item/ItemManager.hpp
+++ b/include/Item/ItemManager.hpp
@@ -1,24 +1,24 @@
#pragma once
extern "C" {
- #include <string.h>
+#include <string.h>
}
#include "global.h"
-#include "types.h"
#include "lib/math.h"
+#include "types.h"
#include "Actor/ActorNavi.hpp"
#include "DTCM/UnkStruct_027e0f78.hpp"
-#include "Save/AdventureFlags.hpp"
#include "Item/Item.hpp"
#include "Map/MapManager.hpp"
#include "Player/EquipItem.hpp"
#include "Player/HealthManager.hpp"
+#include "Render/ModelRender.hpp"
+#include "Save/AdventureFlags.hpp"
#include "Sound/Sfx.hpp"
-#include "System/SysNew.hpp"
#include "System/OverlayManager.hpp"
-#include "Render/ModelRender.hpp"
+#include "System/SysNew.hpp"
#define MAX_HOURGLASS_SECONDS 1500 // 25 minutes
#define MAX_AMMO_UPGRADE 2
@@ -69,7 +69,7 @@ enum ShipType_ {
};
typedef u32 ShipItem;
-#define SHIP_ITEM(part, ship) (ShipPart_ ## part * ShipPart_COUNT + ShipType_ ## type)
+#define SHIP_ITEM(part, ship) (ShipPart_##part * ShipPart_COUNT + ShipType_##type)
#define ShipItem_COUNT (ShipPart_COUNT * ShipType_COUNT)
typedef u32 Treasure;
@@ -96,7 +96,6 @@ enum Potion_ {
Potion_COUNT,
};
-
struct ItemFlags {
/* 00 */ u32 flags[CEIL_DIV(ItemFlag_COUNT, 32)];
/* 10 */
@@ -229,7 +228,7 @@ private:
/* 150 */
public:
- static ItemManager* Create();
+ static ItemManager *Create();
static void Destroy();
ItemManager();
~ItemManager();
@@ -240,7 +239,7 @@ public:
// Fairy
FairyId GetEquippedFairy() const;
- ActorNavi* GetFairy(FairyId id) const;
+ ActorNavi *GetFairy(FairyId id) const;
u32 GetActiveFairyLevel(FairyId id) const;
u32 GetFairyLevel(FairyId id) const;
@@ -251,16 +250,17 @@ public:
void Sword_vfunc_38(unk32 param1);
void Shield_vfunc_38(unk32 param1);
void EquipItem_vfunc_38(unk32 param1);
- bool EquipItem_vfunc_3c(Vec4p *param1, ItemFlag equipId);
- void EquipItem_vfunc_2c(ItemFlag equipId);
- EquipItem* GetEquipItem(ItemFlag equipId);
+ bool EquipCollidesWith(Cylinder *cylinder, ItemFlag equipId);
+ s32 EquipItem_vfunc_2c(ItemFlag equipId);
+ EquipItem *GetEquipItem(ItemFlag equipId);
bool func_ov00_020ad790(unk32 param1);
bool SetEquippedItem(ItemFlag equipId);
void EquipPreviousItem();
void ForceEquipItem(ItemFlag equipId);
bool ClearForcedEquipItem();
void UpdateSwordShieldInUse();
-
+ static EquipItem *GetEquipItemUnchecked(ItemFlag equipId);
+
// Ammo
u16 GetAmmo(ItemFlag equipId) const;
void GiveAmmo(ItemFlag equipId, u16 amount);
@@ -271,10 +271,10 @@ public:
// Item model
void func_ov00_020ad528();
- ItemModel* GetItemModel(ItemModelId id);
+ ItemModel *GetItemModel(ItemModelId id);
void func_ov00_020ad538(unk32 param1) const;
void func_ov00_020ad560(unk32 param1) const;
- ItemModel* GetDungeonItemModel(DungeonItemModelId id);
+ ItemModel *GetDungeonItemModel(DungeonItemModelId id);
void func_ov00_020ad594(unk32 param1) const;
void LoadFanfareItem(ItemId id);
bool GetFanfareItemScale(Vec3p *pScale) const;
@@ -298,7 +298,7 @@ public:
bool IsTreasureSalvaged(u32 index) const;
void SetTreasureSalvaged(u32 index);
u8 GetMaxTreasureCount() const;
-
+
// mUnk_098, mUnk_09e
u8 GetUnk_098(u32 index) const;
u16 GetUnk_09e(u32 index) const;
diff --git a/include/Map/Course.hpp b/include/Map/Course.hpp
index 352cae1b..8f87379c 100644
--- a/include/Map/Course.hpp
+++ b/include/Map/Course.hpp
@@ -12,11 +12,11 @@
typedef unk32 CourseType;
enum CourseType_ {
- CourseType_Normal = 0,
- CourseType_Dungeon = 1,
- CourseType_Sea = 2,
+ CourseType_Normal = 0,
+ CourseType_Dungeon = 1,
+ CourseType_Sea = 2,
CourseType_TempleOfTheOceanKing = 3,
- CourseType_Battle = 4,
+ CourseType_Battle = 4,
};
struct CourseProgress {
@@ -64,12 +64,12 @@ class Course : public SysObject {
void GetDungeonProgress(CourseProgress *param_2);
void func_ov00_0207ca28(s32 param_2, unk32 param_3, unk32 param_4);
- char* SetCourseName(char *src);
+ char *SetCourseName(char *src);
void func_ov00_0207ca78(unk32 param_2, unk8 param_3, unk32 param_4);
bool func_ov00_0207caa8(s32 param_2, unk32 *param_3, unk8 *param_4);
unk32 func_ov00_0207cb30(s32 param_2);
static void FindMapGridPos(Vec2b *pos, Course *param_2, u32 map);
- Vec3p* FindMapCenter(unk32 map);
+ Vec3p *FindMapCenter(unk32 map);
void func_ov00_0207cbe8(s32 param_2);
unk8 func_ov00_0207cc24(s32 param_2);
unk32 FindMapData_Unk_08(unk32 map);
@@ -109,6 +109,6 @@ class Course : public SysObject {
bool GetMapDataFlag3(unk32 param_2);
void SetMapDataFlag4(unk32 param_2, unk32 param_3);
bool GetMapDataFlag4(unk32 param_2);
- MapData* FindMapData(u32 map);
- MapData* FindCurrentMapData();
+ MapData *FindMapData(u32 map);
+ MapData *FindCurrentMapData();
};
diff --git a/include/Map/MapBase.hpp b/include/Map/MapBase.hpp
index c9497a0a..f9d08cac 100644
--- a/include/Map/MapBase.hpp
+++ b/include/Map/MapBase.hpp
@@ -7,11 +7,11 @@
#include "lib/math.h"
+#include "Map/CameraViewpoint.hpp"
#include "Map/Course.hpp"
#include "Map/Entrance.hpp"
-#include "Map/TriggerBase.hpp"
#include "Map/Exit.hpp"
-#include "Map/CameraViewpoint.hpp"
+#include "Map/TriggerBase.hpp"
#include "System/SysNew.hpp"
#define MAX_ENTRANCES 0x40
@@ -94,10 +94,10 @@ public:
/* 0e8 */ Vec3p mUnk_0e8;
/* 0f4 */ Vec3p mUnk_0f4;
/* 100 */ std::vector<Entrance> mEntrances;
- /* 10c */ std::vector<TriggerBase*> mTriggers;
+ /* 10c */ std::vector<TriggerBase *> mTriggers;
/* 118 */ std::vector<Exit> mExits;
/* 124 */ std::vector<CameraViewpoint> mViewpoints;
- /* 130 */ std::vector<TriggerBase*> mUnk_130;
+ /* 130 */ std::vector<TriggerBase *> mUnk_130;
/* 13c */ unk32 mUnk_13c;
/* 140 */ unk32 mUnk_140;
/* 144 */ void *mUnk_144;
@@ -144,7 +144,7 @@ public:
/* 68 */ virtual unk8 vfunc_68(unk32 param_2, unk32 param_3);
/* 6c */ virtual unk8 vfunc_6c(unk32 param_2, unk32 param_3, unk32 param_4);
/* 70 */ virtual unk32 vfunc_70(Vec3p *param_2);
- /* 74 */ virtual s32* vfunc_74(Vec3p *param_2);
+ /* 74 */ virtual s32 *vfunc_74(Vec3p *param_2);
/* 78 */ virtual unk32 vfunc_78();
/* 7c */ virtual unk32 vfunc_7c();
/* 80 */ virtual unk32 vfunc_80();
@@ -206,7 +206,7 @@ public:
unk8 GetTriggerBoundingBoxes(unk32 param_2, AABB *param_3, unk32 param_4);
unk32 GetOverlappingTrigger(Vec3p *param_2);
unk8 FindTrigger(unk32 type);
- unk8 GetOverlappingTriggers(Vec3p *param_2, TriggerBase * *triggers, unk32 capacity);
+ unk8 GetOverlappingTriggers(Vec3p *param_2, TriggerBase **triggers, unk32 capacity);
bool IsTriggerTypeOverlapped(unk32 type, Vec3p *param_3);
bool AnyTrigger_func_0c(unk32 type);
unk8 Trigger_vfunc_08();
diff --git a/include/Map/MapManager.hpp b/include/Map/MapManager.hpp
index 632b9e25..4e969c5a 100644
--- a/include/Map/MapManager.hpp
+++ b/include/Map/MapManager.hpp
@@ -57,7 +57,7 @@ public:
unk8 func_ov00_02082494(unk32 param_2);
unk8 func_ov00_020824cc(unk32 param_2);
unk8 func_ov00_02082504();
- unk8 * func_ov00_02082538();
+ unk8 *func_ov00_02082538();
void func_ov00_02082594();
void func_ov00_020825ac();
s32 GetCourseFilePath(char *courseName, char *buf);
@@ -79,7 +79,7 @@ public:
unk8 GetCourseData_Unk_b0();
s32 func_ov00_02082914(unk32 param_2);
unk8 func_ov00_02082acc();
- unk32 * func_ov00_02082adc();
+ unk32 *func_ov00_02082adc();
unk8 func_ov00_02082af4();
bool func_ov00_02082b3c(s32 param_2);
unk8 func_ov00_02082d08();
@@ -167,7 +167,7 @@ public:
unk8 MapData_vfunc_60();
static unk8 func_ov00_02083e70();
unk8 MapData_vfunc_68();
- void func_ov00_02083ef8(Vec3p *param_2, Vec3p *param_3);
+ s32 func_ov00_02083ef8(Vec3p *param_2, Vec3p *param_3, unk32 param_4);
void func_ov00_02083f44(Vec3p *param_2);
unk8 MapData_vfunc_6c();
unk8 MapData_vfunc_70();
@@ -236,8 +236,10 @@ public:
s32 func_ov00_02085a34(unk32 param_2, unk32 param_3);
unk8 func_ov00_02085c60(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5);
unk8 func_ov00_02086044(unk32 param_2, unk32 param_3, unk32 param_4);
- bool func_ov00_02086284(s32 *param_2, Vec3p *param_3, Vec3p *param_4, s32 param_5, u16 param_6, Vec3p *param_7, Vec3p *param_8);
- bool func_ov00_02086a84(s32 *param_2, Vec3p *param_3, Vec3p *param_4, s32 param_5, s32 param_6, unk32 param_7, Vec3p *param_8, Vec3p *param_9);
+ bool func_ov00_02086284(s32 *param_2, Vec3p *param_3, Vec3p *param_4, s32 param_5, u16 param_6, Vec3p *param_7,
+ Vec3p *param_8);
+ bool func_ov00_02086a84(s32 *param_2, Vec3p *param_3, Vec3p *param_4, s32 param_5, s32 param_6, unk32 param_7,
+ Vec3p *param_8, Vec3p *param_9);
};
extern MapManager *gMapManager;
diff --git a/include/Map/TriggerAABB.hpp b/include/Map/TriggerAABB.hpp
index 19ac0f55..a1d7e782 100644
--- a/include/Map/TriggerAABB.hpp
+++ b/include/Map/TriggerAABB.hpp
@@ -3,8 +3,8 @@
#include "global.h"
#include "types.h"
-#include "Physics/AABB.hpp"
#include "Map/TriggerBase.hpp"
+#include "Physics/AABB.hpp"
class TriggerAABB : public TriggerBase {
/* 00 (base) */
diff --git a/include/Map/TriggerSphere.hpp b/include/Map/TriggerSphere.hpp
index e6bb6b39..56a874df 100644
--- a/include/Map/TriggerSphere.hpp
+++ b/include/Map/TriggerSphere.hpp
@@ -3,8 +3,8 @@
#include "global.h"
#include "types.h"
-#include "Physics/Sphere.hpp"
#include "Map/TriggerBase.hpp"
+#include "Physics/Sphere.hpp"
class TriggerSphere : public TriggerBase {
/* 00 (base) */
diff --git a/include/Physics/Cylinder.hpp b/include/Physics/Cylinder.hpp
index d25eaf22..59c03c46 100644
--- a/include/Physics/Cylinder.hpp
+++ b/include/Physics/Cylinder.hpp
@@ -8,4 +8,15 @@
struct Cylinder {
Vec3p pos;
q20 size; // height and radius
+
+ inline Cylinder() {}
+ inline Cylinder(q20 size) {
+ pos.x = 0;
+ pos.y = size;
+ pos.z = 0;
+
+ this->size = size;
+ }
+
+ bool Overlaps(Cylinder *other);
};
diff --git a/include/Physics/Transform.hpp b/include/Physics/Transform.hpp
index 20dae584..6b72af57 100644
--- a/include/Physics/Transform.hpp
+++ b/include/Physics/Transform.hpp
@@ -7,6 +7,6 @@
struct Transform {
Vec3p pos;
- s16 rotation;
+ s16 angle;
bool visible;
};
diff --git a/include/Player/EquipBomb.hpp b/include/Player/EquipBomb.hpp
index 033755b2..d21e12f1 100644
--- a/include/Player/EquipBomb.hpp
+++ b/include/Player/EquipBomb.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipBomb : public EquipItem {
@@ -9,7 +10,7 @@ private:
/* 09 */ unk8 mUnk_09[3];
/* 0c */ unk32 mUnk_0c;
/* 10 */ unk8 mUnk_10[0x14];
- /* 24 */
+ /* 24 */
public:
EquipBomb();
diff --git a/include/Player/EquipBombchu.hpp b/include/Player/EquipBombchu.hpp
index 609fd317..449e6512 100644
--- a/include/Player/EquipBombchu.hpp
+++ b/include/Player/EquipBombchu.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipBombchu : public EquipItem {
diff --git a/include/Player/EquipBoomerang.hpp b/include/Player/EquipBoomerang.hpp
index 9b17f103..1fc97caa 100644
--- a/include/Player/EquipBoomerang.hpp
+++ b/include/Player/EquipBoomerang.hpp
@@ -1,15 +1,20 @@
#pragma once
+#include "global.h"
#include "types.h"
+
+#include "Actor/ActorRef.hpp"
#include "Player/EquipItem.hpp"
+class Actor;
+
class EquipBoomerang : public EquipItem {
private:
/* 00 (base) */
/* 09 */ u8 mUnk_09[3];
/* 0c */ void *mUnk_0c;
- /* 10 */ u32 mUnk_10;
- /* 14 */ u8 mUnk_18[8];
+ /* 10 */ ActorRef mRef;
+ /* 18 */ u8 mUnk_18[8];
/* 20 */ u32 mUnk_20;
/* 24 */ u32 mUnk_24;
/* 28 */ u32 mUnk_28;
@@ -29,4 +34,6 @@ public:
/* 30 */ virtual void vfunc_30() override; // func_ov53_0219913c
/* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov53_02199318
/* 50 */
+
+ Actor *GetActor();
};
diff --git a/include/Player/EquipBow.hpp b/include/Player/EquipBow.hpp
index e3280d7f..d9cf0433 100644
--- a/include/Player/EquipBow.hpp
+++ b/include/Player/EquipBow.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipBow : public EquipItem {
diff --git a/include/Player/EquipHammer.hpp b/include/Player/EquipHammer.hpp
index 8015d5f4..4cf56a21 100644
--- a/include/Player/EquipHammer.hpp
+++ b/include/Player/EquipHammer.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipHammer : public EquipItem {
@@ -31,7 +32,7 @@ public:
/* 2c */ virtual unk32 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 vfunc_3c(Vec4p *param1) const override; // func_ov14_0213ee10
+ /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const override; // func_ov14_0213ee10
/* 4c */ virtual s32 vfunc_4c() const override; // func_ov14_0213eea8
/* 50 */
};
diff --git a/include/Player/EquipItem.hpp b/include/Player/EquipItem.hpp
index c4159185..d429a2e7 100644
--- a/include/Player/EquipItem.hpp
+++ b/include/Player/EquipItem.hpp
@@ -1,9 +1,10 @@
#pragma once
-#include "types.h"
#include "global.h"
+#include "types.h"
#include "Item/Item.hpp"
+#include "Physics/Cylinder.hpp"
#include "System/SysNew.hpp"
class EquipItem : public SysObject {
@@ -33,7 +34,7 @@ public:
/* 30 */ virtual void vfunc_30() = 0;
/* 34 */ virtual void vfunc_34(unk16 *param1); // func_ov00_020be96c
/* 38 */ virtual void vfunc_38(unk32 param1) = 0;
- /* 3c */ virtual bool vfunc_3c(Vec4p *param1) const; // func_ov00_020beb90
+ /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const; // func_ov00_020beb90
/* 40 */ virtual unk32 vfunc_40() const; // func_ov00_020be970
/* 44 */ virtual unk32 vfunc_44(unk32 param1) const; // func_ov00_020be978
/* 48 */ virtual unk32 vfunc_48(unk32 param1) const; // func_ov00_020be980
diff --git a/include/Player/EquipPotion.hpp b/include/Player/EquipPotion.hpp
index 9cb35c6e..a80c0492 100644
--- a/include/Player/EquipPotion.hpp
+++ b/include/Player/EquipPotion.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipPotion : public EquipItem {
diff --git a/include/Player/EquipRope.hpp b/include/Player/EquipRope.hpp
index 994cc1b2..9eb7cdec 100644
--- a/include/Player/EquipRope.hpp
+++ b/include/Player/EquipRope.hpp
@@ -1,17 +1,32 @@
#pragma once
+#include "global.h"
+#include "lib/math.h"
#include "types.h"
+
+#include "Actor/ActorRef.hpp"
+#include "Physics/Cylinder.hpp"
#include "Player/EquipItem.hpp"
+struct EquipRope_Unk_18 {
+ /* 00 */ Vec3p vec;
+ /* 0c */ unk8 mUnk_0c[0x10];
+ /* 1c */
+};
+
+class Actor;
+
class EquipRope : public EquipItem {
-private:
+public:
/* 00 (base) */
/* 09 */ unk8 mUnk_09;
/* 0a */ unk16 mUnk_0a;
/* 0c */ unk8 mUnk_0c[4];
- /* 10 */ unk32 mUnk_10;
- /* 14 */ unk32 mUnk_14;
- /* 18 */ unk8 mUnk_18[0x54];
+ /* 10 */ ActorRef mRef;
+ /* 18 */ EquipRope_Unk_18 mUnk_18[2];
+ /* 50 */ unk8 mUnk_50[0x1a];
+ /* 6a */ bool mUnk_6a;
+ /* 6b */ unk8 mUnk_6b;
/* 6c */ unk16 mUnk_6c;
/* 6e */ unk8 mUnk_6e[2];
/* 70 */ unk16 mUnk_70;
@@ -21,7 +36,6 @@ private:
/* a0 */ unk32 mUnk_a0;
/* a4 */
-public:
EquipRope();
/* 04 */ virtual ~EquipRope() override;
@@ -31,9 +45,18 @@ public:
u16 GetAmmo();
/* 14 */ virtual bool IsUsable(unk32 param1) const override;
/* 18 */ virtual void vfunc_18() override; // func_ov57_021992f4
- /* 1c */ virtual void vfunc_1c() override; // func_ov57_0219935c
+ /* 1c */ virtual void vfunc_1c() override; // func_ov57_0219935c
/* 30 */ virtual void vfunc_30() override; // func_ov57_02199744
/* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov57_021998f0
/* 50 */
+
+ Actor *func_ov14_0213d420();
+ s32 func_ov14_0213d440(s32 actorId);
+ s32 func_ov14_0213d480(s32 actorId);
+ bool func_ov14_0213d81c(s32 index, Vec3p *vec);
+ void func_ov14_0213d91c(s32 index);
+ bool func_ov14_0213dadc(s32 index, Cylinder *cylinder);
+ s32 func_ov14_0213ddd4(Actor *actor);
+ bool func_ov14_0213defc(Actor *actor);
};
diff --git a/include/Player/EquipScoop.hpp b/include/Player/EquipScoop.hpp
index 778f99ba..f0958df5 100644
--- a/include/Player/EquipScoop.hpp
+++ b/include/Player/EquipScoop.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipScoop : public EquipItem {
@@ -24,4 +25,3 @@ public:
/* 48 */ virtual unk32 vfunc_48(unk32 param1) const override; // func_ov54_02198d48
/* 50 */
};
-
diff --git a/include/Player/EquipShield.hpp b/include/Player/EquipShield.hpp
index a66da083..b83a5557 100644
--- a/include/Player/EquipShield.hpp
+++ b/include/Player/EquipShield.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
class EquipShield {
@@ -30,6 +31,6 @@ public:
/* 30 */ virtual void vfunc_30() override; // func_ov00_020c0804
/* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov00_020c086c
- /* 3c */ virtual bool vfunc_3c(Vec4p *param1) const; // func_ov00_020c0a88
+ /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const; // func_ov00_020c0a88
/* 50 */
};
diff --git a/include/Player/EquipSword.hpp b/include/Player/EquipSword.hpp
index 57b64443..d7cd47ad 100644
--- a/include/Player/EquipSword.hpp
+++ b/include/Player/EquipSword.hpp
@@ -1,7 +1,9 @@
#pragma once
#include "types.h"
+
#include "Player/EquipItem.hpp"
+#include "Player/EquipRope.hpp"
class EquipSword : public EquipItem {
private:
@@ -53,6 +55,8 @@ public:
/* 2c */ virtual u32 vfunc_2c() override; // func_ov00_020c0674
/* 30 */ virtual void vfunc_30() override; // func_ov00_020bf538
/* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov00_020bff94
- /* 3c */ virtual bool vfunc_3c(Vec4p *param1) const override; // func_ov00_020c01dc
+ /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const override; // func_ov00_020c01dc
/* 50 */
+
+ static EquipRope *GetEquipRope();
};
diff --git a/include/Player/LinkStateBase.hpp b/include/Player/LinkStateBase.hpp
index 58d6fb57..f4591991 100644
--- a/include/Player/LinkStateBase.hpp
+++ b/include/Player/LinkStateBase.hpp
@@ -1,26 +1,25 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
-#include "System/SysNew.hpp"
-#include "Player/PlayerLinkBase.hpp"
-#include "Player/PlayerControlData.hpp"
#include "Actor/Actor.hpp"
#include "Actor/ActorManager.hpp"
-#include "Player/EquipItem.hpp"
#include "Debug/DebugHierarchy.hpp"
+#include "Player/EquipItem.hpp"
+#include "Player/PlayerControlData.hpp"
+#include "Player/PlayerLinkBase.hpp"
+#include "System/SysNew.hpp"
typedef unk32 LinkStateId;
enum LinkStateId_ {
- LinkStateId_Move = 0,
- LinkStateId_Item = 1,
- LinkStateId_Grab = 2,
- LinkStateId_Unk3 = 3,
- LinkStateId_Unk4 = 4,
- LinkStateId_Damage = 5,
+ LinkStateId_Move = 0,
+ LinkStateId_Item = 1,
+ LinkStateId_Grab = 2,
+ LinkStateId_Unk3 = 3,
+ LinkStateId_Unk4 = 4,
+ LinkStateId_Damage = 5,
LinkStateId_ItemGet = 6,
LinkStateId_COUNT
};
@@ -59,7 +58,7 @@ public:
void EquipItem_vfunc_28();
void UpdateSwordShieldInUse();
void func_ov00_020a81b8(unk32 param1, unk32 param2);
- LinkStateItem* GetLinkItemState();
+ LinkStateItem *GetLinkItemState();
void LookAt(Vec3p *target);
void func_ov00_020a81fc();
void AddHealth(s16 amount);
@@ -102,30 +101,30 @@ public:
unk8 Get_PlayerLinkBase_Unk5e();
unk32 Get_PlayerControlData_Unk004();
PlayerCharacter GetCurrentCharacter();
- PlayerControlData* GetPlayerControlData();
+ PlayerControlData *GetPlayerControlData();
LinkStateId GetStateId();
s32 GetHealth();
s32 GetCurrentCharacterHealth();
bool func_ov00_020a8c34();
- Vec3p* GetPlayerPos();
- Vec3p* GetPlayerVel();
- unk8* func_ov00_020a8c64();
- s16* GetPlayerAngle();
- void* GetPlayer_Unk18();
+ Vec3p *GetPlayerPos();
+ Vec3p *GetPlayerVel();
+ unk8 *func_ov00_020a8c64();
+ s16 *GetPlayerAngle();
+ void *GetPlayer_Unk18();
s32 Get_PlayerControlData_Unk32();
- Actor* GetGrabActor();
- ActorRef* GetGrabActorRef();
+ Actor *GetGrabActor();
+ ActorRef *GetGrabActorRef();
unk32 Grab();
s32 Get_PlayerLinkBase_Unk44();
bool IsEquipBeingUsed(ItemFlag id);
- EquipItem* GetEquipItem(ItemFlag id);
- void* func_ov00_020a8d40();
+ EquipItem *GetEquipItem(ItemFlag id);
+ void *func_ov00_020a8d40();
unk32 func_ov00_020a8d50();
unk32 func_ov00_020a8d6c();
s32 PlayerControlData_vfunc_14(s32 param1);
unk32 Get_PlayerControlData_Unk100();
unk32 Get_PlayerControlData_Unk120();
s32 Get_PlayerLinkBase_Unk38();
- DebugHierarchy* GetDebugHierarchy0();
- DebugHierarchy* GetDebugHierarchy1();
+ DebugHierarchy *GetDebugHierarchy0();
+ DebugHierarchy *GetDebugHierarchy1();
};
diff --git a/include/Player/LinkStateCutscene.hpp b/include/Player/LinkStateCutscene.hpp
index 4b16c4e1..f39c7430 100644
--- a/include/Player/LinkStateCutscene.hpp
+++ b/include/Player/LinkStateCutscene.hpp
@@ -1,12 +1,11 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
-#include "Player/LinkStateBase.hpp"
#include "Item/Item.hpp"
+#include "Player/LinkStateBase.hpp"
class LinkStateCutscene : public LinkStateBase {
public:
diff --git a/include/Player/LinkStateDamage.hpp b/include/Player/LinkStateDamage.hpp
index e682c2b3..2c5e6e00 100644
--- a/include/Player/LinkStateDamage.hpp
+++ b/include/Player/LinkStateDamage.hpp
@@ -1,9 +1,8 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
#include "Player/LinkStateBase.hpp"
#include "Render/ModelRender.hpp"
diff --git a/include/Player/LinkStateFollow.hpp b/include/Player/LinkStateFollow.hpp
index 0206e493..c422faa1 100644
--- a/include/Player/LinkStateFollow.hpp
+++ b/include/Player/LinkStateFollow.hpp
@@ -1,9 +1,8 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
#include "Actor/Actor.hpp"
#include "Player/LinkStateBase.hpp"
@@ -35,7 +34,7 @@ public:
/* 44 */
void MoveTowardTarget();
- LinkStateCutscene* GetLinkStateCutscene();
+ LinkStateCutscene *GetLinkStateCutscene();
bool func_ov00_020a9180(Vec3p *param1);
bool func_ov00_020a9210(Vec3p *param1, Actor *param2);
};
diff --git a/include/Player/LinkStateInteract.hpp b/include/Player/LinkStateInteract.hpp
index a994fb06..150983b8 100644
--- a/include/Player/LinkStateInteract.hpp
+++ b/include/Player/LinkStateInteract.hpp
@@ -1,14 +1,13 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
+#include "Actor/Actor.hpp"
+#include "Actor/ActorManager.hpp"
#include "Player/LinkStateBase.hpp"
#include "Player/LinkStateRoll.hpp"
-#include "Actor/ActorManager.hpp"
-#include "Actor/Actor.hpp"
class LinkStateInteract : public LinkStateBase {
public:
@@ -37,7 +36,7 @@ public:
s32 GetGrabActorId();
bool func_ov00_020aa818();
void func_ov00_020aa844(Actor *param1);
- LinkStateRoll* GetLinkStateRoll();
+ LinkStateRoll *GetLinkStateRoll();
void SetGrabActorVelocity(Vec3p *velocity);
void SetBombVelocity(Vec3p *velocity);
void func_ov00_020ab6c8();
diff --git a/include/Player/LinkStateItem.hpp b/include/Player/LinkStateItem.hpp
index 680ebbd9..591614f2 100644
--- a/include/Player/LinkStateItem.hpp
+++ b/include/Player/LinkStateItem.hpp
@@ -3,10 +3,10 @@
#include "global.h"
#include "types.h"
+#include "Item/Item.hpp"
+#include "Player/EquipBombchu.hpp"
#include "Player/LinkStateBase.hpp"
#include "Player/LinkStateMove.hpp"
-#include "Player/EquipBombchu.hpp"
-#include "Item/Item.hpp"
class LinkStateItem : public LinkStateBase {
public:
@@ -47,7 +47,7 @@ public:
/* 44 */
s32 IsHammerEquipped(); // returns 0 if hammer is equipped, otherwise -1
- EquipBombchu* GetEquipBombchu();
- LinkStateMove* GetLinkStateMove();
+ EquipBombchu *GetEquipBombchu();
+ LinkStateMove *GetLinkStateMove();
bool func_ov00_020abf70();
};
diff --git a/include/Player/LinkStateRoll.hpp b/include/Player/LinkStateRoll.hpp
index 9ff28899..52b42b43 100644
--- a/include/Player/LinkStateRoll.hpp
+++ b/include/Player/LinkStateRoll.hpp
@@ -42,4 +42,5 @@ public:
void func_ov00_020aee58(s16 param1, u16 param2);
void func_ov00_020aee84();
+ bool func_ov00_020aeeac();
};
diff --git a/include/Player/MotionParams.hpp b/include/Player/MotionParams.hpp
index 017800ff..f04f8a08 100644
--- a/include/Player/MotionParams.hpp
+++ b/include/Player/MotionParams.hpp
@@ -1,8 +1,8 @@
#pragma once
#include "global.h"
-#include "types.h"
#include "lib/files.h"
+#include "types.h"
struct MotionParams {
/* 00 */ FileEntry motionBhio; // motion.bhio
diff --git a/include/Player/PlayerBase.hpp b/include/Player/PlayerBase.hpp
index 7fac1b3c..578f3e27 100644
--- a/include/Player/PlayerBase.hpp
+++ b/include/Player/PlayerBase.hpp
@@ -4,10 +4,9 @@
#include "types.h"
#include "Item/Item.hpp"
-#include "Player/EquipSword.hpp"
-#include "Player/EquipShield.hpp"
-
#include "Physics/Cylinder.hpp"
+#include "Player/EquipShield.hpp"
+#include "Player/EquipSword.hpp"
#include "Render/FadeControl.hpp"
#include "System/SysNew.hpp"
@@ -28,14 +27,14 @@ public:
/* 04 */ virtual bool vfunc_04();
/* 08 */ virtual ItemFlag GetEquipId();
/* 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;
- /* 1c */ virtual void Init() = 0;
- /* 20 */ virtual void vfunc_20() = 0;
- /* 24 */ virtual void vfunc_24() = 0;
- /* 28 */ virtual void vfunc_28(s32 param1) = 0;
- /* 2c */ virtual void vfunc_2c(s32 param1, unk8 param2) = 0;
+ /* 10 */ virtual void vfunc_10(Cylinder *param1) = 0;
+ /* 14 */ virtual void vfunc_14(Cylinder *param1) = 0;
+ /* 18 */ virtual void vfunc_18() = 0;
+ /* 1c */ virtual void Init() = 0;
+ /* 20 */ virtual void vfunc_20() = 0;
+ /* 24 */ virtual void vfunc_24() = 0;
+ /* 28 */ virtual void vfunc_28(s32 param1) = 0;
+ /* 2c */ virtual void vfunc_2c(s32 param1, unk8 param2) = 0;
/* 30 */ virtual bool vfunc_30(s32 param1, Vec3p *param2, s32 param3) = 0;
/* 34 */ virtual bool Teleport(Vec3p *pos, s16 angle, unk32 param3, bool param4, bool param5);
/* 38 */ virtual bool TeleportToEntrance(unk32 entranceId, bool param2);
@@ -49,13 +48,18 @@ public:
void SetUpdatePos(bool updatePos);
void SetVisible(bool visible);
- EquipSword* GetEquipSword();
- EquipShield* GetEquipShield();
+ EquipSword *GetEquipSword();
+ EquipShield *GetEquipShield();
void LookAt(Vec3p *target);
bool func_ov00_020a7c00(s32 param1);
- bool func_ov00_020a7c1c(Cylinder *cylinder);
+ bool CollidesWith(Cylinder *cylinder);
bool func_ov00_020a7c60(Vec3p *param1, Vec3p *param2, s32 param3);
- void EquipItem_vfunc_3c(Cylinder *cylinder, ItemFlag equipId);
- void EquipItem_vfunc_2c();
+ bool EquipCollidesWith(Cylinder *cylinder, ItemFlag equipId);
+ s32 EquipItem_vfunc_2c();
void SetHealth(s16 health);
};
+
+extern PlayerBase *gPlayer;
+extern Vec3p gPlayerPos;
+extern Vec3p gPlayerVel;
+extern s16 gPlayerAngle;
diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp
index 47c94d7a..0e0da8ae 100644
--- a/include/Player/PlayerControl.hpp
+++ b/include/Player/PlayerControl.hpp
@@ -1,23 +1,22 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
-#include "Player/TouchControl.hpp"
-#include "Player/TouchGesture.hpp"
-#include "Actor/ActorManager.hpp"
#include "Actor/Actor.hpp"
+#include "Actor/ActorManager.hpp"
#include "Debug/DebugHierarchy.hpp"
#include "Item/Item.hpp"
+#include "Player/TouchControl.hpp"
+#include "Player/TouchGesture.hpp"
typedef u16 TouchEdge;
enum TouchEdge_ {
- TouchEdge_Right = 0,
- TouchEdge_Left = 1,
+ TouchEdge_Right = 0,
+ TouchEdge_Left = 1,
TouchEdge_Bottom = 2,
- TouchEdge_Top = 3,
+ TouchEdge_Top = 3,
TouchEdge_Middle = 4
};
@@ -79,7 +78,7 @@ public:
void func_ov00_020aeef8();
void func_ov00_020aef30();
void UpdateAim();
- Actor* GetFollowActor();
+ Actor *GetFollowActor();
bool func_ov00_020af01c(unk8 *param1);
void SetUnk_80();
void StopFollowing();
@@ -126,3 +125,5 @@ public:
bool IsTappedNow();
bool func_ov00_020b13c4();
};
+
+extern PlayerControl *gPlayerControl;
diff --git a/include/Player/PlayerControlData.hpp b/include/Player/PlayerControlData.hpp
index e772b474..3f998186 100644
--- a/include/Player/PlayerControlData.hpp
+++ b/include/Player/PlayerControlData.hpp
@@ -1,9 +1,8 @@
#pragma once
#include "global.h"
-#include "types.h"
-
#include "lib/math.h"
+#include "types.h"
#include "System/SysNew.hpp"
diff --git a/include/Player/PlayerLinkBase.hpp b/include/Player/PlayerLinkBase.hpp
index 16510ee3..02cf3219 100644
--- a/include/Player/PlayerLinkBase.hpp
+++ b/include/Player/PlayerLinkBase.hpp
@@ -1,24 +1,23 @@
#pragma once
#include "global.h"
-#include "types.h"
#include "lib/math.h"
-
-#include "Player/PlayerBase.hpp"
-#include "Player/MotionParams.hpp"
+#include "types.h"
#include "Actor/ActorManager.hpp"
-
#include "Debug/DebugHierarchy.hpp"
+#include "Player/MotionParams.hpp"
+#include "Player/PlayerBase.hpp"
typedef s32 PlayerCharacter;
enum PlayerCharacter_ {
- PlayerCharacter_Link = 0,
+ PlayerCharacter_Link = 0,
PlayerCharacter_Gongoron = 1,
- PlayerCharacter_COUNT = 2,
+ PlayerCharacter_COUNT = 2,
};
-class PlayerLinkBase: public PlayerBase {
+class PlayerLinkBase : public PlayerBase {
+public:
/* 00 (base) */
/* 14 */ Vec3p mPos;
/* 20 */ Vec3p mVel;
@@ -43,7 +42,7 @@ class PlayerLinkBase: public PlayerBase {
/* 68 */ DebugHierarchy *mDebugHierarchy_1;
/* 6c */ DebugHierarchy *mDebugHierarchy_2;
/* 70 */
-
+
/* 00 */ s32 GetMaxHealth() override;
/* 08 */ ItemFlag GetEquipId() override;
/* 0c */ bool CanMove() override;
@@ -68,11 +67,19 @@ class PlayerLinkBase: public PlayerBase {
/* 6c */ virtual void vfunc_6c();
/* 70 */ virtual void vfunc_70(s32 param1, Vec3p *param2, unk32 param3);
/* 74 */ virtual void vfunc_74();
- /* 78 */ virtual bool vfunc_78();
+ /* 78 */ virtual unk32 vfunc_78();
/* 7c */ virtual void vfunc_7c();
/* 80 */ virtual void SetUnk_5e();
/* 84 */ virtual void ResetUnk_5e();
/* 88 */
- public:
- bool func_ov00_020bce48(ItemId cutsceneItemId); // PlayItemCutscene
+
+ bool func_ov00_020bbd80(s32 param1);
+ void func_ov00_020bc854(Vec3p *param1);
+ bool func_ov00_020bce48(ItemId cutsceneItemId); // PlayItemCutscene
+ bool func_ov00_020bd304();
+ bool GongoronCollidesWith(Cylinder *hitbox);
+ s32 GetGrabActorId();
+ PlayerCharacter GetCurrentCharacter();
};
+
+extern PlayerLinkBase *gPlayerLink;
diff --git a/include/Player/TouchControl.hpp b/include/Player/TouchControl.hpp
index b5c79750..47349d28 100644
--- a/include/Player/TouchControl.hpp
+++ b/include/Player/TouchControl.hpp
@@ -1,14 +1,15 @@
#pragma once
#include "global.h"
-#include "types.h"
+#include "lib/math.h"
#include "lib/touch.h"
+#include "types.h"
typedef u16 TouchFlags;
enum TouchFlag_ {
- TouchFlag_TouchedNow = 0x0001,
+ TouchFlag_TouchedNow = 0x0001,
TouchFlag_UntouchedNow = 0x0002,
- TouchFlag_Repeat = 0x0004,
+ TouchFlag_Repeat = 0x0004,
};
class TouchControl {
@@ -43,4 +44,7 @@ public:
void UpdateConditionally(TouchState *state, u16 speed);
void func_ov00_0207af38(u16 speed, bool param2);
~TouchControl();
+
+ static bool func_0202b864(Vec3p *param1, s32 size, unk8 param3);
+ static bool func_0202b894(Vec3p *param1, s32 size, unk8 param3);
};
diff --git a/include/Player/TouchGesture.hpp b/include/Player/TouchGesture.hpp
index 59a756ef..5009525e 100644
--- a/include/Player/TouchGesture.hpp
+++ b/include/Player/TouchGesture.hpp
@@ -29,7 +29,7 @@ public:
/* 2c */ u16 mTouchX[GESTURE_BUFFER_LENGTH];
/* 48 */ u16 mTouchY[GESTURE_BUFFER_LENGTH];
/* 64 */
-
+
/* 00 */ virtual ~TouchGesture() override;
/* 08 */ virtual void ResetTouchHistory() override;
/* 0c */ virtual void Update(void *param1) override;
diff --git a/include/Render/ModelRender.hpp b/include/Render/ModelRender.hpp
index d511175b..e6c26635 100644
--- a/include/Render/ModelRender.hpp
+++ b/include/Render/ModelRender.hpp
@@ -22,7 +22,7 @@ public:
/* 5c */
/* 00 */ virtual ~ModelRender();
- /* 08 */ virtual void* GetLcdcAddress();
+ /* 08 */ virtual void *GetLcdcAddress();
/* 0c */ virtual void vfunc_0c(ItemModel *model);
/* 10 */ virtual void SetTransform(Vec3p *scale, Mat3p *rotation, Vec3p *translation);
/* 14 */ virtual void SetRotationTranslation(Mat3p *rotation, Vec3p *translation);
diff --git a/include/Save/AdventureFlags.hpp b/include/Save/AdventureFlags.hpp
index bfe511f9..65831d20 100644
--- a/include/Save/AdventureFlags.hpp
+++ b/include/Save/AdventureFlags.hpp
@@ -23,17 +23,17 @@ enum AdventureFlag_ {
/* 0x30 */ AdventureFlag_Cannon = 48,
- /* 0x7d */ AdventureFlag_Azurine = 125,
+ /* 0x7d */ AdventureFlag_Azurine = 125,
/* 0x7e */ AdventureFlag_Crimsonine = 126,
- /* 0x7f */ AdventureFlag_Aquanine = 127,
- /* 0x80 */ AdventureFlag_Unk_128 = 128,
+ /* 0x7f */ AdventureFlag_Aquanine = 127,
+ /* 0x80 */ AdventureFlag_Unk_128 = 128,
/* 0x8c */ AdventureFlag_SalvageArm = 140,
- /* 0x126 */ AdventureFlag_ReceivedGoldenChimney = 294,
+ /* 0x126 */ AdventureFlag_ReceivedGoldenChimney = 294,
/* 0x127 */ AdventureFlag_ReceivedGoldenHandrail = 295,
- /* 0x128 */ AdventureFlag_ReceivedGoldenCannon = 296,
- /* 0x129 */ AdventureFlag_ReceivedGoldenHull = 297,
+ /* 0x128 */ AdventureFlag_ReceivedGoldenCannon = 296,
+ /* 0x129 */ AdventureFlag_ReceivedGoldenHull = 297,
/* 0x187 */ AdventureFlag_COUNT = 391,
};
@@ -110,14 +110,14 @@ public:
static unk32 Get_FlagsUnk_30(int index);
static bool Get_FlagsUnk_00(int index, FlagsUnk2 *result);
bool Get_FlagsUnk_18(int index, FlagsUnk2 *result);
- FlagsUnk* Get_FlagsUnk(int index);
+ FlagsUnk *Get_FlagsUnk(int index);
bool func_ov00_02097e6c();
bool func_ov00_02097e7c();
bool func_ov00_02097ea4();
static unk32 func_ov00_02097ecc();
- void* func_ov00_02097f8c();
- void* func_ov00_02097fac();
- void* func_ov00_02097fd0();
+ void *func_ov00_02097f8c();
+ void *func_ov00_02097fac();
+ void *func_ov00_02097fd0();
void func_ov00_02097ff4(bool param1, bool param2);
unk32 func_ov00_02098058();
bool func_ov00_02098064(unk32 param1);
diff --git a/include/Sound/Sfx.hpp b/include/Sound/Sfx.hpp
index 38b66d51..81eda28f 100644
--- a/include/Sound/Sfx.hpp
+++ b/include/Sound/Sfx.hpp
@@ -7,111 +7,111 @@ typedef u32 SfxId;
enum SfxId_ {
SfxId_None = 0x0,
- SfxId_Music_StoryIntro = 0x2,
- SfxId_Music_StoryOutsetIsland = 0x3,
+ SfxId_Music_StoryIntro = 0x2,
+ SfxId_Music_StoryOutsetIsland = 0x3,
SfxId_Music_StoryZeldasLullaby = 0x4,
- SfxId_Music_DarkKingGanon = 0x5,
- SfxId_Music_TheHeroOfTheWinds = 0x6,
- SfxId_Music_OffToTheSeas = 0x7,
- SfxId_Music_ThePirateShip_1 = 0x8,
+ SfxId_Music_DarkKingGanon = 0x5,
+ SfxId_Music_TheHeroOfTheWinds = 0x6,
+ SfxId_Music_OffToTheSeas = 0x7,
+ SfxId_Music_ThePirateShip_1 = 0x8,
SfxId_Music_TheKingOfTheOceans = 0x9,
SfxId_Music_InTheDarkDungeon_1 = 0xa,
- SfxId_Music_LinebecksTheme = 0xb,
- SfxId_Fanfare_KeyDizzy = 0xc,
- SfxId_Music_MagicInTheAir_1 = 0xd,
- SfxId_Music_TheSandsOfTime_1 = 0xe,
- SfxId_Fanfare_Discovery_1 = 0xf,
- SfxId_Music_MagicInTheAir_2 = 0x10,
- SfxId_Music_TheSandsOfTime_2 = 0x11,
- SfxId_Fanfare_Discovery_2 = 0x12,
- SfxId_Music_MagicInTheAir_3 = 0x13,
+ SfxId_Music_LinebecksTheme = 0xb,
+ SfxId_Fanfare_KeyDizzy = 0xc,
+ SfxId_Music_MagicInTheAir_1 = 0xd,
+ SfxId_Music_TheSandsOfTime_1 = 0xe,
+ SfxId_Fanfare_Discovery_1 = 0xf,
+ SfxId_Music_MagicInTheAir_2 = 0x10,
+ SfxId_Music_TheSandsOfTime_2 = 0x11,
+ SfxId_Fanfare_Discovery_2 = 0x12,
+ SfxId_Music_MagicInTheAir_3 = 0x13,
SfxId_Music_MagicInTheAir_4 = 0x15,
- SfxId_Music_Credits = 0x16,
+ SfxId_Music_Credits = 0x16,
- SfxId_Music_DarkMemories = 0x18,
+ SfxId_Music_DarkMemories = 0x18,
SfxId_Music_TheSandsOfTime_3 = 0x19,
- SfxId_Fanfare_Discovery_3 = 0x1a,
+ SfxId_Fanfare_Discovery_3 = 0x1a,
- SfxId_Fanfare_Nothing_1 = 0x1c,
+ SfxId_Fanfare_Nothing_1 = 0x1c,
SfxId_Music_TheSandsOfTime_4 = 0x1d,
- SfxId_Music_ZeldasLullaby = 0x1e,
+ SfxId_Music_ZeldasLullaby = 0x1e,
SfxId_Music_BellumLoop = 0x21,
SfxId_Music_ThePirateShip_2 = 0x25,
- SfxId_Music_FairyFountain = 0x27,
- SfxId_Fanfare_Treasure = 0x28,
- SfxId_Fanfare_Rupee = 0x29,
- SfxId_Fanfare_GoldRupee = 0x2a,
- SfxId_Fanfare_Rupoor = 0x2b,
- SfxId_Fanfare_Nothing_2 = 0x2c,
+ SfxId_Music_FairyFountain = 0x27,
+ SfxId_Fanfare_Treasure = 0x28,
+ SfxId_Fanfare_Rupee = 0x29,
+ SfxId_Fanfare_GoldRupee = 0x2a,
+ SfxId_Fanfare_Rupoor = 0x2b,
+ SfxId_Fanfare_Nothing_2 = 0x2c,
SfxId_Fanfare_HeartContainer = 0x2d,
- SfxId_Fanfare_Gem = 0x2e,
- SfxId_Fanfare_Discovery_4 = 0x2f,
- SfxId_Music_Indoors_1 = 0x30,
- SfxId_Music_Indoors_2 = 0x31,
- SfxId_Music_Lithoroves = 0x32,
- SfxId_Music_Indoors_3 = 0x33,
- SfxId_Music_AstridsTheme = 0x34,
+ SfxId_Fanfare_Gem = 0x2e,
+ SfxId_Fanfare_Discovery_4 = 0x2f,
+ SfxId_Music_Indoors_1 = 0x30,
+ SfxId_Music_Indoors_2 = 0x31,
+ SfxId_Music_Lithoroves = 0x32,
+ SfxId_Music_Indoors_3 = 0x33,
+ SfxId_Music_AstridsTheme = 0x34,
SfxId_Music_Indoors_4 = 0x38,
SfxId_Music_Indoors_5 = 0x39,
SfxId_Music_Indoors_6 = 0x3a,
SfxId_Music_Indoors_7 = 0x3b,
SfxId_Music_Indoors_8 = 0x3c,
-
- SfxId_Music_ThePirateShip_3 = 0x3e,
+
+ SfxId_Music_ThePirateShip_3 = 0x3e,
SfxId_Music_BeedlesShopShip_1 = 0x3f,
SfxId_Music_BeedlesShopShip_2 = 0x40,
- SfxId_Music_Indoors_9 = 0x42,
- SfxId_Music_Indoors_10 = 0x43,
- SfxId_Music_Indoors_11 = 0x44,
- SfxId_Music_Indoors_12 = 0x45,
- SfxId_Music_Indoors_13 = 0x46,
+ SfxId_Music_Indoors_9 = 0x42,
+ SfxId_Music_Indoors_10 = 0x43,
+ SfxId_Music_Indoors_11 = 0x44,
+ SfxId_Music_Indoors_12 = 0x45,
+ SfxId_Music_Indoors_13 = 0x46,
SfxId_Music_DangerInTheGreatBlueSea_1 = 0x47,
SfxId_Music_DangerInTheGreatBlueSea_2 = 0x48,
- SfxId_Music_TheDarkCaves_1 = 0x49,
- SfxId_Fanfare_OhNo = 0x4a,
- SfxId_Music_GameOver = 0x4b,
- SfxId_Fanfare_TempleOfTheOceanKing = 0x4c,
- SfxId_Music_EnemyBattle_1 = 0x4d,
- SfxId_Music_MercayIsland_1 = 0x4e,
- SfxId_Music_UnchartedTerritory_1 = 0x4f,
- SfxId_Music_MercayIsland_2 = 0x50,
- SfxId_Music_UnchartedTerritory_2 = 0x51,
- SfxId_Music_MercayIsland_3 = 0x52,
- SfxId_Music_UnchartedTerritory_3 = 0x53,
- SfxId_Music_UnchartedTerritory_4 = 0x54,
- SfxId_Music_UnchartedTerritory_5 = 0x55,
- SfxId_Music_MercayIsland_4 = 0x56,
- SfxId_Music_UnchartedTerritory_6 = 0x57,
- SfxId_Music_TheGorons = 0x58,
- SfxId_Music_UnchartedTerritory_7 = 0x59,
- SfxId_Music_UnchartedTerritory_8 = 0x5a,
- SfxId_Music_UnchartedTerritory_9 = 0x5b,
- SfxId_Music_UnchartedTerritory_10 = 0x5c,
- SfxId_Music_MercayIsland_5 = 0x5d,
- SfxId_Music_UnchartedTerritory_11 = 0x5e,
- SfxId_Music_UnchartedTerritory_12 = 0x5f,
-
- SfxId_Music_MercayIsland_6 = 0x61,
- SfxId_Music_MercayIsland_7 = 0x62,
- SfxId_Music_MercayIsland_8 = 0x63,
+ SfxId_Music_TheDarkCaves_1 = 0x49,
+ SfxId_Fanfare_OhNo = 0x4a,
+ SfxId_Music_GameOver = 0x4b,
+ SfxId_Fanfare_TempleOfTheOceanKing = 0x4c,
+ SfxId_Music_EnemyBattle_1 = 0x4d,
+ SfxId_Music_MercayIsland_1 = 0x4e,
+ SfxId_Music_UnchartedTerritory_1 = 0x4f,
+ SfxId_Music_MercayIsland_2 = 0x50,
+ SfxId_Music_UnchartedTerritory_2 = 0x51,
+ SfxId_Music_MercayIsland_3 = 0x52,
+ SfxId_Music_UnchartedTerritory_3 = 0x53,
+ SfxId_Music_UnchartedTerritory_4 = 0x54,
+ SfxId_Music_UnchartedTerritory_5 = 0x55,
+ SfxId_Music_MercayIsland_4 = 0x56,
+ SfxId_Music_UnchartedTerritory_6 = 0x57,
+ SfxId_Music_TheGorons = 0x58,
+ SfxId_Music_UnchartedTerritory_7 = 0x59,
+ SfxId_Music_UnchartedTerritory_8 = 0x5a,
+ SfxId_Music_UnchartedTerritory_9 = 0x5b,
+ SfxId_Music_UnchartedTerritory_10 = 0x5c,
+ SfxId_Music_MercayIsland_5 = 0x5d,
+ SfxId_Music_UnchartedTerritory_11 = 0x5e,
+ SfxId_Music_UnchartedTerritory_12 = 0x5f,
+
+ SfxId_Music_MercayIsland_6 = 0x61,
+ SfxId_Music_MercayIsland_7 = 0x62,
+ SfxId_Music_MercayIsland_8 = 0x63,
SfxId_Music_UnchartedTerritory_13 = 0x64,
- SfxId_Music_GhostShip = 0x66,
+ SfxId_Music_GhostShip = 0x66,
SfxId_Music_ChasingTheGhostShip = 0x67,
- SfxId_Music_EnemyBattle_2 = 0x68,
- SfxId_Music_JoleneAppears = 0x69,
- SfxId_Music_JoleneAppearsLoop = 0x6a,
- SfxId_Music_JoleneVsLink_1 = 0x6b,
- SfxId_Music_JoleneVsLink_2 = 0x6c,
- SfxId_Music_JoleneVsLinkEnd = 0x6d,
- SfxId_Music_InTheDarkDungeon_2 = 0x6e,
- SfxId_Music_InTheDarkDungeon_3 = 0x6f,
+ SfxId_Music_EnemyBattle_2 = 0x68,
+ SfxId_Music_JoleneAppears = 0x69,
+ SfxId_Music_JoleneAppearsLoop = 0x6a,
+ SfxId_Music_JoleneVsLink_1 = 0x6b,
+ SfxId_Music_JoleneVsLink_2 = 0x6c,
+ SfxId_Music_JoleneVsLinkEnd = 0x6d,
+ SfxId_Music_InTheDarkDungeon_2 = 0x6e,
+ SfxId_Music_InTheDarkDungeon_3 = 0x6f,
SfxId_Music_InTheDarkDungeon_4 = 0x72,
@@ -121,16 +121,16 @@ enum SfxId_ {
SfxId_Music_InTheDarkDungeon_7 = 0x79,
SfxId_Music_InTheDarkDungeon_8 = 0x7a,
SfxId_Music_InTheDarkDungeon_9 = 0x7b,
- SfxId_Music_TheDarkCaves_2 = 0x7c,
+ SfxId_Music_TheDarkCaves_2 = 0x7c,
SfxId_Music_InTheDarkDungeon_10 = 0x7f,
- SfxId_Music_TheDarkCaves_3 = 0x80,
+ SfxId_Music_TheDarkCaves_3 = 0x80,
SfxId_Music_InTheDarkDungeon_11 = 0x83,
- SfxId_Music_TheDarkCaves_4 = 0x84,
+ SfxId_Music_TheDarkCaves_4 = 0x84,
SfxId_Music_InTheDarkDungeon_12 = 0x87,
- SfxId_Music_TheDarkCaves_5 = 0x88,
+ SfxId_Music_TheDarkCaves_5 = 0x88,
SfxId_Music_InTheDarkDungeon_13 = 0x89,
SfxId_Music_InTheDarkDungeon_14 = 0x8b,
SfxId_Music_InTheDarkDungeon_15 = 0x8c,
@@ -144,78 +144,78 @@ enum SfxId_ {
SfxId_Music_InTheDarkDungeon_23 = 0x94,
SfxId_Music_InTheDarkDungeon_24 = 0x95,
SfxId_Music_InTheDarkDungeon_25 = 0x96,
- SfxId_Music_TheDarkCaves_6 = 0x97,
- SfxId_Music_TheDarkCaves_7 = 0x98,
- SfxId_Music_TheDarkCaves_8 = 0x99,
- SfxId_Music_TheDarkCaves_9 = 0x9a,
- SfxId_Music_TheDarkCaves_10 = 0x9b,
+ SfxId_Music_TheDarkCaves_6 = 0x97,
+ SfxId_Music_TheDarkCaves_7 = 0x98,
+ SfxId_Music_TheDarkCaves_8 = 0x99,
+ SfxId_Music_TheDarkCaves_9 = 0x9a,
+ SfxId_Music_TheDarkCaves_10 = 0x9b,
SfxId_Music_InTheDarkDungeon_26 = 0x9e,
SfxId_Music_InTheDarkDungeon_27 = 0x9f,
SfxId_Music_InTheDarkDungeon_28 = 0xa0,
- SfxId_Music_TheDarkCaves_11 = 0xa1,
- SfxId_Music_TheDarkCaves_12 = 0xa2,
+ SfxId_Music_TheDarkCaves_11 = 0xa1,
+ SfxId_Music_TheDarkCaves_12 = 0xa2,
SfxId_Music_InTheDarkDungeon_29 = 0xa3,
- SfxId_Music_TheDarkCaves_13 = 0xa4,
- SfxId_Music_TheDarkCaves_14 = 0xa5,
-
- SfxId_Music_PhantomChase_1 = 0xa7,
- SfxId_Music_FencingPractice_1 = 0xa8,
- SfxId_Music_FencingPractice_2 = 0xa9,
- SfxId_Music_FencingPractice_3 = 0xaa,
- SfxId_Music_FencingPractice_4 = 0xab,
- SfxId_Music_FencingPractice_5 = 0xac,
- SfxId_Music_FencingPractice_6 = 0xad,
- SfxId_Music_FencingPractice_7 = 0xae,
- SfxId_Music_FencingPractice_8 = 0xaf,
- SfxId_Music_FencingPractice_9 = 0xb0,
+ SfxId_Music_TheDarkCaves_13 = 0xa4,
+ SfxId_Music_TheDarkCaves_14 = 0xa5,
+
+ SfxId_Music_PhantomChase_1 = 0xa7,
+ SfxId_Music_FencingPractice_1 = 0xa8,
+ SfxId_Music_FencingPractice_2 = 0xa9,
+ SfxId_Music_FencingPractice_3 = 0xaa,
+ SfxId_Music_FencingPractice_4 = 0xab,
+ SfxId_Music_FencingPractice_5 = 0xac,
+ SfxId_Music_FencingPractice_6 = 0xad,
+ SfxId_Music_FencingPractice_7 = 0xae,
+ SfxId_Music_FencingPractice_8 = 0xaf,
+ SfxId_Music_FencingPractice_9 = 0xb0,
SfxId_Music_FencingPractice_10 = 0xb1,
SfxId_Music_FencingPractice_11 = 0xb2,
SfxId_Music_FencingPractice_12 = 0xb3,
- SfxId_Mandolin_Chord_1 = 0xb4,
- SfxId_Mandolin_Chord_2 = 0xb5,
- SfxId_Mandolin_Chord_3 = 0xb6,
- SfxId_Mandolin_Chord_4 = 0xb7,
- SfxId_Mandolin_Chord_5 = 0xb8,
- SfxId_Mandolin_Chord_6 = 0xb9,
- SfxId_Mandolin_Chord_7 = 0xba,
- SfxId_Mandolin_Chord_8 = 0xbb,
- SfxId_Music_BeginContactMode = 0xbc,
- SfxId_Fanfare_Checkpoint_1 = 0xbd,
- SfxId_Fanfare_Checkpoint_2 = 0xbe,
- SfxId_Fanfare_Checkpoint_3 = 0xbf,
- SfxId_Fanfare_Checkpoint_4 = 0xc0,
- SfxId_Fanfare_Checkpoint_5 = 0xc1,
- SfxId_Fanfare_Victory = 0xc2,
- SfxId_Drumroll = 0xc3,
- SfxId_Fanfare_Stumble = 0xc4,
- SfxId_Music_BossBattle_1 = 0xc5,
- SfxId_Music_BossBattle_2 = 0xc6,
- SfxId_Music_BossBattle_3 = 0xc7,
- SfxId_Music_BossBattle_4 = 0xc8,
- SfxId_Music_BossBattle_5 = 0xc9,
- SfxId_Music_BossBattle_6 = 0xca,
- SfxId_Music_BossBattle_7 = 0xcb,
+ SfxId_Mandolin_Chord_1 = 0xb4,
+ SfxId_Mandolin_Chord_2 = 0xb5,
+ SfxId_Mandolin_Chord_3 = 0xb6,
+ SfxId_Mandolin_Chord_4 = 0xb7,
+ SfxId_Mandolin_Chord_5 = 0xb8,
+ SfxId_Mandolin_Chord_6 = 0xb9,
+ SfxId_Mandolin_Chord_7 = 0xba,
+ SfxId_Mandolin_Chord_8 = 0xbb,
+ SfxId_Music_BeginContactMode = 0xbc,
+ SfxId_Fanfare_Checkpoint_1 = 0xbd,
+ SfxId_Fanfare_Checkpoint_2 = 0xbe,
+ SfxId_Fanfare_Checkpoint_3 = 0xbf,
+ SfxId_Fanfare_Checkpoint_4 = 0xc0,
+ SfxId_Fanfare_Checkpoint_5 = 0xc1,
+ SfxId_Fanfare_Victory = 0xc2,
+ SfxId_Drumroll = 0xc3,
+ SfxId_Fanfare_Stumble = 0xc4,
+ SfxId_Music_BossBattle_1 = 0xc5,
+ SfxId_Music_BossBattle_2 = 0xc6,
+ SfxId_Music_BossBattle_3 = 0xc7,
+ SfxId_Music_BossBattle_4 = 0xc8,
+ SfxId_Music_BossBattle_5 = 0xc9,
+ SfxId_Music_BossBattle_6 = 0xca,
+ SfxId_Music_BossBattle_7 = 0xcb,
SfxId_Music_SpinSpinSpin_1 = 0xcf,
- SfxId_Music_SpinSpinSpin_2 = 0xd2,
- SfxId_Music_FencingPractice_13 = 0xd3,
- SfxId_Music_FencingPracticeStart = 0xd4,
+ SfxId_Music_SpinSpinSpin_2 = 0xd2,
+ SfxId_Music_FencingPractice_13 = 0xd3,
+ SfxId_Music_FencingPracticeStart = 0xd4,
SfxId_Music_BattleStageSelection_1 = 0xd5,
- SfxId_Music_FencingPractice_14 = 0xd6,
- SfxId_Music_FencingPractice_15 = 0xd7,
- SfxId_Music_FencingPractice_16 = 0xd8,
- SfxId_Music_FencingPractice_17 = 0xd9,
- SfxId_Music_IntoTheCrystalBall = 0xe0,
-
- SfxId_Music_PhantomChase_2 = 0xe2,
- SfxId_Fanfare_GreatLoss = 0xe3,
- SfxId_Fanfare_Incoming = 0xe4,
- SfxId_Fanfare_GoalReached = 0xe5,
- SfxId_Fanfare_LostGame_1 = 0xe6,
- SfxId_Fanfare_LostGame_2 = 0xe7,
- SfxId_Fanfare_BattleStart = 0xe8,
- SfxId_Music_BattleEnd = 0xe9,
+ SfxId_Music_FencingPractice_14 = 0xd6,
+ SfxId_Music_FencingPractice_15 = 0xd7,
+ SfxId_Music_FencingPractice_16 = 0xd8,
+ SfxId_Music_FencingPractice_17 = 0xd9,
+ SfxId_Music_IntoTheCrystalBall = 0xe0,
+
+ SfxId_Music_PhantomChase_2 = 0xe2,
+ SfxId_Fanfare_GreatLoss = 0xe3,
+ SfxId_Fanfare_Incoming = 0xe4,
+ SfxId_Fanfare_GoalReached = 0xe5,
+ SfxId_Fanfare_LostGame_1 = 0xe6,
+ SfxId_Fanfare_LostGame_2 = 0xe7,
+ SfxId_Fanfare_BattleStart = 0xe8,
+ SfxId_Music_BattleEnd = 0xe9,
SfxId_Music_BattleStageSelection_2 = 0xea,
};
diff --git a/include/global.h b/include/global.h
index 10a927aa..83b4c87f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -3,20 +3,9 @@
#define NULL 0
-#define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[((u32)(pos)) >> 5]) != 0)
-#define SET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] |= 1 << ((pos) & 0x1f))
-#define RESET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] &= ~(1 << ((pos) & 0x1f)))
-
-// NONMATCH(name) marks the function `name` as nonmatching
-// The reason for the macro is to easily detect it in progress.py
-#ifdef NONMATCHING
-#define NONMATCH(name) name
-#else
-#define NONMATCH(name) asm name
-#endif
-
-// KILL(name) causes a function to be excluded from the output ROM, see elfkill.cpp
-#define KILL(name)
+#define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[((u32) (pos)) >> 5]) != 0)
+#define SET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] |= 1 << ((pos) & 0x1f))
+#define RESET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] &= ~(1 << ((pos) & 0x1f)))
// Prevent the IDE from reporting errors that the compiler/linker won't report
#ifdef __INTELLISENSE__
@@ -29,9 +18,11 @@
#define override
// Define .sbss variables by using #pragma section sbss begin|end
-#pragma define_section sbss ".data" ".sbss"
+#pragma define_section sbss ".data" \
+ ".sbss"
// Force variables to be in .data by using #pragma section force_data begin|end
-#pragma define_section force_data ".data" ".data"
+#pragma define_section force_data ".data" \
+ ".data"
#endif
diff --git a/include/lib/files.h b/include/lib/files.h
index e65e4d09..8fae3247 100644
--- a/include/lib/files.h
+++ b/include/lib/files.h
@@ -10,4 +10,3 @@ struct FileEntry {
/* 0c */ unk32 mUnk_0c;
/* 10 */
};
-
diff --git a/include/lib/math.h b/include/lib/math.h
index a8951eb4..f11bd10e 100644
--- a/include/lib/math.h
+++ b/include/lib/math.h
@@ -8,10 +8,17 @@ typedef s32 q20;
// Q4.12 fixed point number
typedef s16 q4;
-#define INT_TO_Q20(n) ((s32)((n) << 12))
-#define FLOAT_TO_Q20(n) ((s32)(((n) * 8192 + 1) / 2))
+#define INT_TO_Q20(n) ((s32) ((n) << 12))
+#define FLOAT_TO_Q20(n) ((s32) (((n) * 8192 + 1) / 2))
+#define ROUND_Q20(n) (((s32) (n) + 0x800) >> 12)
+#define MUL_Q20(a, b) (q20)((((s64) (a)) * ((s64) (b)) + 0x800) >> 12)
-#define ROUND_Q20(n) (((s32)(n) + 0x800) >> 12)
+#define DEG_TO_ANG(n) ((n) * 0x10000 / 360)
+#define SIN(n) (gSinCosTable[2 * ((n) >> 4)])
+#define COS(n) (gSinCosTable[2 * ((n) >> 4) + 1])
+
+extern "C" s32 Atan2(s32 x, s32 y);
+extern q4 gSinCosTable[];
typedef struct {
/* 0 */ s8 x;
@@ -32,6 +39,39 @@ typedef struct {
/* c */
} Vec3p;
+extern const Vec3p gVec3p_ZERO;
+
+extern "C" void Vec3p_Add(Vec3p *a, Vec3p *b, Vec3p *out);
+extern "C" void Vec3p_Sub(Vec3p *a, Vec3p *b, Vec3p *out);
+extern "C" q20 Vec3p_Dot(Vec3p *a, Vec3p *b);
+extern "C" void Vec3p_Cross(Vec3p *a, Vec3p *b, Vec3p *out);
+extern "C" q20 Vec3p_Length(Vec3p *a);
+extern "C" void Vec3p_Normalize(Vec3p *vec, Vec3p *out);
+extern "C" void Vec3p_Axpy(q20 a, Vec3p *x, Vec3p *y, Vec3p *out);
+extern "C" q20 Vec3p_Distance(Vec3p *a, Vec3p *b);
+
+inline void Vec3p_Rotate(Vec3p *vec, q20 sin, q20 cos, Vec3p *out) {
+ out->x += MUL_Q20(vec->z, sin);
+ out->z += MUL_Q20(vec->z, cos);
+ out->x += MUL_Q20(vec->x, cos);
+ out->z += MUL_Q20(vec->x, -sin);
+}
+
+inline void Vec3p_CopyXZ(Vec3p *vec, Vec3p *out) {
+ q20 z = vec->z;
+ q20 x = vec->x;
+
+ out->x = x;
+ out->y = 0;
+ out->z = z;
+}
+
+inline void Vec3p_Copy(Vec3p *vec, Vec3p *out) {
+ out->x = vec->x;
+ out->y = vec->y;
+ out->z = vec->z;
+}
+
typedef struct {
/* 00 */ q20 x;
/* 04 */ q20 y;
@@ -51,4 +91,3 @@ extern "C" u32 FastDivide(u32 a, u32 b);
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);
diff --git a/include/types.h b/include/types.h
index baa3fb32..a0952eff 100644
--- a/include/types.h
+++ b/include/types.h
@@ -1,10 +1,12 @@
#ifndef PH_TYPES_H
#define PH_TYPES_H
+typedef unsigned long long u64;
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
+typedef long long s64;
typedef int s32;
typedef short s16;
typedef char s8;