diff options
Diffstat (limited to 'include/Actor')
| -rw-r--r-- | include/Actor/Actor.hpp | 54 | ||||
| -rw-r--r-- | include/Actor/ActorManager.hpp | 8 | ||||
| -rw-r--r-- | include/Actor/ActorRef.hpp | 7 | ||||
| -rw-r--r-- | include/Actor/ActorRupee.hpp | 13 | ||||
| -rw-r--r-- | include/Actor/ActorType.hpp | 181 |
5 files changed, 145 insertions, 118 deletions
diff --git a/include/Actor/Actor.hpp b/include/Actor/Actor.hpp index 29d4da2a..64402237 100644 --- a/include/Actor/Actor.hpp +++ b/include/Actor/Actor.hpp @@ -13,8 +13,25 @@ #include "Player/EquipBoomerang.hpp" #include "System/SysNew.hpp" +struct Actor_UnkStruct_012 { + /* 00 */ u16 mUnk_00; + /* 02 */ u8 mUnk_02; + /* 03 */ u8 mUnk_03; + /* 04 */ u32 mUnk_04; + /* 08 */ u32 mUnk_08; + /* 0c */ u32 mUnk_0c; + /* 10 */ u8 mUnk_10; + /* 11 */ u8 mUnk_11; + /* 12 */ u8 mUnk_12[0x2]; + /* 14 */ u32 mUnk_14; + /* 18 */ u32 mUnk_18; + /* 1c */ + + Actor_UnkStruct_012(); +}; + struct Actor_UnkStruct_020 { - /* 00 */ unk16 mUnk_00[4]; + /* 00 */ u16 mUnk_00[4]; /* 08 */ u8 mUnk_08[2]; /* 0a */ u8 mUnk_0a[2]; /* 0c */ unk8 mUnk_0c; @@ -28,7 +45,7 @@ struct Actor_UnkStruct_020 { }; struct Actor_UnkStruct_09c { - /* 0 */ unk16 mUnk_0; + /* 0 */ u16 mUnk_0; /* 2 */ unk8 mUnk_2; /* 3 */ unk8 mUnk_3; /* 4 */ unk32 mUnk_4; @@ -40,8 +57,8 @@ struct Actor_UnkStruct_09c { struct Actor_UnkStruct_0a4 { /* 00 */ bool mUnk_00; /* 01 */ bool mUnk_01; - /* 01 */ bool mUnk_02; - /* 01 */ bool mUnk_03; + /* 02 */ bool mUnk_02; + /* 03 */ bool mUnk_03; /* 04 */ Vec3p mUnk_04; /* 10 */ s32 mUnk_10; /* 14 */ @@ -49,10 +66,10 @@ struct Actor_UnkStruct_0a4 { Actor_UnkStruct_0a4(q20 x, q20 y, q20 z, s32 unk_10); }; -class KillPickupsFilter: FilterActorReturn, public FilterActorBase { +class KillPickupsFilter : FilterActorReturn, public FilterActorBase { public: /* 00 (base) */ - /* 04 */ + /* 04 */ /* 0 */ virtual bool Filter(Actor *actor) override; /* 4 */ @@ -60,11 +77,13 @@ public: 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, }; struct Knockback { @@ -73,11 +92,10 @@ struct Knockback { /* 10 */ unk32 mUnk_10; /* 14 */ Actor *actor; - inline Knockback(): + inline Knockback() : mUnk_00(0), mUnk_10(0xb), - actor(NULL) - {} + actor(NULL) {} }; class Actor : public SysObject { @@ -119,7 +137,7 @@ public: /* 109 */ unk8 mUnk_109; /* 10a */ unk8 mUnk_10a[0x6]; /* 110 */ unk8 mUnk_110; - /* 111 */ unk8 mUnk_111; + /* 111 */ bool mUnk_111; /* 112 */ unk8 mUnk_112; /* 113 */ unk8 mUnk_113; /* 114 */ unk8 mUnk_114; @@ -160,7 +178,7 @@ public: /* 14 */ virtual void vfunc_14(u32 param1); /* 18 */ virtual void vfunc_18(u32 param1); /* 1c */ virtual void vfunc_1c(u16 *param1); - /* 20 */ virtual void vfunc_20(s32 param1); + /* 20 */ virtual void vfunc_20(bool param1); /* 24 */ virtual void vfunc_24(); /* 28 */ virtual void vfunc_28(); /* 2c */ virtual s32 vfunc_2c(); @@ -172,7 +190,7 @@ public: /* 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 bool SetUnk_11b(); /* 5c */ virtual bool SetVelocity(Vec3p *vel); @@ -198,7 +216,7 @@ public: /* ac */ virtual void vfunc_ac(); /* b0 */ virtual void vfunc_b0(); /* b4 */ - + Actor(); bool func_01fffd04(s32 param1); @@ -241,7 +259,7 @@ public: 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(); diff --git a/include/Actor/ActorManager.hpp b/include/Actor/ActorManager.hpp index d513df37..7b3b1b46 100644 --- a/include/Actor/ActorManager.hpp +++ b/include/Actor/ActorManager.hpp @@ -80,19 +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(s32 id); - Actor* GetActor(ActorRef *ref); + Actor *FindActorById(s32 id); + Actor *GetActor(ActorRef *ref); s32 FilterActors(FilterActorBase *filter, ActorList *filteredActors); 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); + 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(char *type,char **types); + static bool ActorTypeIsOneOf(char *type, char **types); }; extern ActorManager *gActorManager; diff --git a/include/Actor/ActorRef.hpp b/include/Actor/ActorRef.hpp index be82f8a8..eeace571 100644 --- a/include/Actor/ActorRef.hpp +++ b/include/Actor/ActorRef.hpp @@ -9,13 +9,12 @@ struct ActorRef { /* 8 */ inline ActorRef() {} - inline ActorRef(s32 id, s32 index): + inline ActorRef(s32 id, s32 index) : id(id), - index(index) - {} + index(index) {} inline void Reset() { - id = -1; + id = -1; index = -1; } }; diff --git a/include/Actor/ActorRupee.hpp b/include/Actor/ActorRupee.hpp index 4ec671b8..56519394 100644 --- a/include/Actor/ActorRupee.hpp +++ b/include/Actor/ActorRupee.hpp @@ -1,12 +1,13 @@ #pragma once #include "global.h" -#include "types.h" #include "lib/math.h" +#include "types.h" #include "Actor/Actor.hpp" #include "Actor/ActorType.hpp" -#include "Item/Item.hpp" +#include "Item/ItemManager.hpp" +#include "Player/PlayerLinkBase.hpp" typedef u32 RupeeId; enum RupeeId_ { @@ -27,7 +28,7 @@ public: /* 000 (base) */ /* 158 */ RupeeId mRupeeId; - /* 15c */ unk16 mUnk_15c; + /* 15c */ u16 mUnk_15c; /* 15e */ unk16 mUnk_15e; /* 160 */ @@ -35,18 +36,18 @@ public: /* 08 */ virtual bool vfunc_08() override; /* 14 */ virtual void vfunc_14(u32 param1) override; /* 18 */ virtual void vfunc_18(u32 param1) override; - /* 20 */ virtual void vfunc_20(s32 param1) override; + /* 20 */ virtual void vfunc_20(bool param1) override; /* 60 */ virtual bool vfunc_60() override; /* 64 */ virtual void vfunc_64() override; /* b4 */ - static ActorRupee* Create(); + static ActorRupee *Create(); ActorRupee(); void Move(); ItemId GetRupeeCutsceneItemId(); void func_ov14_0213b204(unk32 param1); void Update(bool param1); static void func_ov14_0213b5f4(RupeeId id, unk32 param2, Vec3p *param3, bool param4); - static void func_ov14_0213b6a4(RupeeId id, void *param2); + static void func_ov14_0213b6a4(RupeeId id, Actor_UnkStruct_012 *param2); static bool func_ov14_0213b70c(RupeeId id); }; diff --git a/include/Actor/ActorType.hpp b/include/Actor/ActorType.hpp index 06fd3b59..4adc3a7a 100644 --- a/include/Actor/ActorType.hpp +++ b/include/Actor/ActorType.hpp @@ -39,98 +39,107 @@ #define __ACTOR_TYPE_7 '7' #define __ACTOR_TYPE_8 '8' #define __ACTOR_TYPE_9 '9' -#define __CONCAT(a,b) a ## b +#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))) \ -) +#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_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), + 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) {} }; class Actor; -typedef Actor* (*ActorCreateFunc)(); +typedef Actor *(*ActorCreateFunc)(); struct ActorType { /* 00 */ ActorTypeId id; @@ -146,7 +155,7 @@ struct ActorType { unk32 func_0203e7c8(); void Register(); void Unregister(); - static ActorType* Find(ActorTypeId id); + static ActorType *Find(ActorTypeId id); }; struct ActorTypeList { |
