summaryrefslogtreecommitdiff
path: root/include/Actor
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/Actor
parent0d62c02f14bd122690306976d8a58c5449dd3040 (diff)
parentffdfd609fb9bc8f968ddc6f187da1d50731cbf69 (diff)
Merge branch 'main' into match_actor_rupee
Diffstat (limited to 'include/Actor')
-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
7 files changed, 270 insertions, 139 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);
+ }
+};