diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..8d5fb049 --- /dev/null +++ b/.clang-format @@ -0,0 +1,32 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +ColumnLimit: 127 + +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: false + +IndentCaseLabels: true +IndentExternBlock: Indent +IndentPPDirectives: BeforeHash +NamespaceIndentation: All +IndentAccessModifiers: false +AccessModifierOffset: -4 + +AlignConsecutiveAssignments: Consecutive +AlignEscapedNewlines: DontAlign +AlignTrailingComments: Leave + +BreakConstructorInitializers: AfterColon + +PackConstructorInitializers: Never + +SpaceAfterCStyleCast: true +SpaceBeforeParens: Custom +SpaceBeforeParensOptions: + AfterPlacementOperator: false + +BreakBeforeBraces: Custom +BraceWrapping: + AfterControlStatement: MultiLine diff --git a/include/Actor/Actor.hpp b/include/Actor/Actor.hpp index 29d4da2a..8f9378d2 100644 --- a/include/Actor/Actor.hpp +++ b/include/Actor/Actor.hpp @@ -49,10 +49,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 +60,11 @@ 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, }; struct Knockback { @@ -73,11 +73,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 { @@ -172,7 +171,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 +197,7 @@ public: /* ac */ virtual void vfunc_ac(); /* b0 */ virtual void vfunc_b0(); /* b4 */ - + Actor(); bool func_01fffd04(s32 param1); @@ -241,7 +240,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 9222bc6d..8ad14b2d 100644 --- a/include/Actor/ActorManager.hpp +++ b/include/Actor/ActorManager.hpp @@ -80,14 +80,14 @@ 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, 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); 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..c0618394 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" @@ -40,7 +40,7 @@ public: /* 64 */ virtual void vfunc_64() override; /* b4 */ - static ActorRupee* Create(); + static ActorRupee *Create(); ActorRupee(); void Move(); ItemId GetRupeeCutsceneItemId(); diff --git a/include/Actor/ActorType.hpp b/include/Actor/ActorType.hpp index 06fd3b59..76fb560d 100644 --- a/include/Actor/ActorType.hpp +++ b/include/Actor/ActorType.hpp @@ -39,98 +39,95 @@ #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_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_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_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_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_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_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_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_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_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_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_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 Actor; -typedef Actor* (*ActorCreateFunc)(); +typedef Actor *(*ActorCreateFunc)(); struct ActorType { /* 00 */ ActorTypeId id; @@ -146,7 +143,7 @@ struct ActorType { unk32 func_0203e7c8(); void Register(); void Unregister(); - static ActorType* Find(ActorTypeId id); + static ActorType *Find(ActorTypeId id); }; struct ActorTypeList { 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 9535d9d2..cc3b9777 100644 --- a/include/Item/Item.hpp +++ b/include/Item/Item.hpp @@ -4,235 +4,235 @@ 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_ { - /* 0x00 */ ItemId_None = 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, + /* 0x00 */ ItemId_None = 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 3dcb77b9..1cc75738 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -1,24 +1,24 @@ #pragma once extern "C" { - #include +#include } #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 "Sound/Sfx.hpp" -#include "System/SysNew.hpp" -#include "System/OverlayManager.hpp" #include "Render/ModelRender.hpp" +#include "Save/AdventureFlags.hpp" +#include "Sound/Sfx.hpp" +#include "System/OverlayManager.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; @@ -253,15 +252,15 @@ public: void EquipItem_vfunc_38(unk32 param1); bool EquipCollidesWith(Cylinder *cylinder, ItemFlag equipId); s32 EquipItem_vfunc_2c(ItemFlag equipId); - EquipItem* GetEquipItem(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); - + static EquipItem *GetEquipItemUnchecked(ItemFlag equipId); + // Ammo u16 GetAmmo(ItemFlag equipId) const; void GiveAmmo(ItemFlag equipId, u16 amount); @@ -272,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; @@ -299,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 mEntrances; - /* 10c */ std::vector mTriggers; + /* 10c */ std::vector mTriggers; /* 118 */ std::vector mExits; /* 124 */ std::vector mViewpoints; - /* 130 */ std::vector mUnk_130; + /* 130 */ std::vector 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 3a7ab48b..8df6e51e 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(); @@ -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 1ba5e7b7..59c03c46 100644 --- a/include/Physics/Cylinder.hpp +++ b/include/Physics/Cylinder.hpp @@ -14,6 +14,7 @@ struct Cylinder { pos.x = 0; pos.y = size; pos.z = 0; + this->size = size; } 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 3b33bbd9..1fc97caa 100644 --- a/include/Player/EquipBoomerang.hpp +++ b/include/Player/EquipBoomerang.hpp @@ -35,5 +35,5 @@ public: /* 38 */ virtual void vfunc_38(unk32 param1) override; // func_ov53_02199318 /* 50 */ - Actor* GetActor(); + 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 934b3386..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 { diff --git a/include/Player/EquipItem.hpp b/include/Player/EquipItem.hpp index 93fe9e3e..d429a2e7 100644 --- a/include/Player/EquipItem.hpp +++ b/include/Player/EquipItem.hpp @@ -1,7 +1,7 @@ #pragma once -#include "types.h" #include "global.h" +#include "types.h" #include "Item/Item.hpp" #include "Physics/Cylinder.hpp" 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 19aa6997..9eb7cdec 100644 --- a/include/Player/EquipRope.hpp +++ b/include/Player/EquipRope.hpp @@ -1,8 +1,8 @@ #pragma once #include "global.h" -#include "types.h" #include "lib/math.h" +#include "types.h" #include "Actor/ActorRef.hpp" #include "Physics/Cylinder.hpp" @@ -45,13 +45,13 @@ 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(); + Actor *func_ov14_0213d420(); s32 func_ov14_0213d440(s32 actorId); s32 func_ov14_0213d480(s32 actorId); bool func_ov14_0213d81c(s32 index, Vec3p *vec); 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 8bf435df..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 { diff --git a/include/Player/EquipSword.hpp b/include/Player/EquipSword.hpp index 988ccdda..d7cd47ad 100644 --- a/include/Player/EquipSword.hpp +++ b/include/Player/EquipSword.hpp @@ -1,6 +1,7 @@ #pragma once #include "types.h" + #include "Player/EquipItem.hpp" #include "Player/EquipRope.hpp" @@ -57,5 +58,5 @@ public: /* 3c */ virtual bool GetHitbox(Cylinder *hitbox) const override; // func_ov00_020c01dc /* 50 */ - static EquipRope* GetEquipRope(); + 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 "lib/math.h" #include "types.h" -#include "lib/math.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 "lib/math.h" #include "types.h" -#include "lib/math.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 "lib/math.h" #include "types.h" -#include "lib/math.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/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 0b6a5187..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,8 +48,8 @@ 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 CollidesWith(Cylinder *cylinder); diff --git a/include/Player/PlayerControl.hpp b/include/Player/PlayerControl.hpp index 5b424979..0e0da8ae 100644 --- a/include/Player/PlayerControl.hpp +++ b/include/Player/PlayerControl.hpp @@ -1,23 +1,22 @@ #pragma once #include "global.h" +#include "lib/math.h" #include "types.h" -#include "lib/math.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(); 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 09eefeb1..7d9c4b75 100644 --- a/include/Player/PlayerLinkBase.hpp +++ b/include/Player/PlayerLinkBase.hpp @@ -1,24 +1,22 @@ #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; @@ -44,7 +42,7 @@ public: /* 68 */ DebugHierarchy *mDebugHierarchy_1; /* 6c */ DebugHierarchy *mDebugHierarchy_2; /* 70 */ - + /* 00 */ s32 GetMaxHealth() override; /* 08 */ ItemFlag GetEquipId() override; /* 0c */ bool CanMove() override; diff --git a/include/Player/TouchControl.hpp b/include/Player/TouchControl.hpp index 480ee42c..47349d28 100644 --- a/include/Player/TouchControl.hpp +++ b/include/Player/TouchControl.hpp @@ -1,15 +1,15 @@ #pragma once #include "global.h" -#include "types.h" -#include "lib/touch.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 { 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_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_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_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_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_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_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 4bb45910..83b4c87f 100644 --- a/include/global.h +++ b/include/global.h @@ -3,10 +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))) - +#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__ 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 8242284e..f11bd10e 100644 --- a/include/lib/math.h +++ b/include/lib/math.h @@ -8,10 +8,10 @@ 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 ROUND_Q20(n) (((s32)(n) + 0x800) >> 12) -#define MUL_Q20(a,b) (q20)((((s64)(a)) * ((s64)(b)) + 0x800) >> 12) +#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 DEG_TO_ANG(n) ((n) * 0x10000 / 360) #define SIN(n) (gSinCosTable[2 * ((n) >> 4)]) @@ -60,6 +60,7 @@ inline void Vec3p_Rotate(Vec3p *vec, q20 sin, q20 cos, Vec3p *out) { 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; diff --git a/libs/c/include/string.h b/libs/c/include/string.h index cd56cef6..6c1c86a7 100644 --- a/libs/c/include/string.h +++ b/libs/c/include/string.h @@ -4,12 +4,12 @@ typedef unsigned int size_t; size_t strlen(const char *str); -char* strcpy(char *dest, const char *src); -char* strncpy(char *dest, const char *src, size_t num); -char* strcat(char *dest, const char *src); +char *strcpy(char *dest, const char *src); +char *strncpy(char *dest, const char *src, size_t num); +char *strcat(char *dest, const char *src); int strcmp(char *str1, char *str2); int strncmp(char *str1, char *str2, size_t num); -const char* strchr(const char *str, char ch); -const char* strstr(const char *str1, const char *str2); +const char *strchr(const char *str, char ch); +const char *strstr(const char *str1, const char *str2); #endif diff --git a/libs/cpp/include/global_destructor_chain.h b/libs/cpp/include/global_destructor_chain.h index 5939216e..c5043126 100644 --- a/libs/cpp/include/global_destructor_chain.h +++ b/libs/cpp/include/global_destructor_chain.h @@ -7,4 +7,4 @@ typedef struct DestructorChain { /* c */ } DestructorChain; -void* __register_global_object(void *object, void *destructor, DestructorChain *link); +void *__register_global_object(void *object, void *destructor, DestructorChain *link); diff --git a/libs/cpp/include/vector b/libs/cpp/include/vector index e775aba0..7d78e50c 100644 --- a/libs/cpp/include/vector +++ b/libs/cpp/include/vector @@ -1,11 +1,10 @@ #pragma once namespace std { - template - class vector { + template class vector { public: T *elements; int size; int capacity; }; -} +} // namespace std diff --git a/libs/cpp/src/__register_global_object.c b/libs/cpp/src/__register_global_object.c index 9571faef..7d1e188f 100644 --- a/libs/cpp/src/__register_global_object.c +++ b/libs/cpp/src/__register_global_object.c @@ -1,13 +1,14 @@ #include "global_destructor_chain.h" -#define CALL_DTOR(dtor, obj) (((void (*)(void*, int))(dtor))((obj), -1)) +#define CALL_DTOR(dtor, obj) (((void (*)(void *, int))(dtor))((obj), -1)) DestructorChain *__global_destructor_chain; -void* __register_global_object(void *object, void *destructor, DestructorChain *link) { - link->next = __global_destructor_chain; +void *__register_global_object(void *object, void *destructor, DestructorChain *link) { + link->next = __global_destructor_chain; link->destructor = destructor; - link->object = object; + link->object = object; + __global_destructor_chain = link; return object; } diff --git a/src/00_Core/Actor/Actor.cpp b/src/00_Core/Actor/Actor.cpp index 04994a03..57f405b8 100644 --- a/src/00_Core/Actor/Actor.cpp +++ b/src/00_Core/Actor/Actor.cpp @@ -1,5 +1,5 @@ extern "C" { - #include +#include } #include "Actor/Actor.hpp" @@ -13,7 +13,7 @@ extern "C" { #include "Player/TouchControl.hpp" #include "Save/AdventureFlags.hpp" -static char *sShipTypes[] = { "brg", "anc", "bow", "hul", "can", "dco", "pdl", "fnl" }; +static char *sShipTypes[] = {"brg", "anc", "bow", "hul", "can", "dco", "pdl", "fnl"}; struct UnkStruct3 { /* 0 */ s16 mUnk_0; @@ -21,44 +21,16 @@ struct UnkStruct3 { /* 3 */ }; const UnkStruct3 sUnkTable[] = { - { 0xff, 2 }, - { 0xff, 2 }, - { 0xff, 2 }, - { 0xff, 2 }, - { 0xff, 2 }, - { 6, 2 }, - { 4, 2 }, - { 4, 2 }, - { 4, 2 }, - { 1, 2 }, - { 12, 2 }, - { 4, 2 }, - { 4, 2 }, - { 8, 2 }, - { 12, 2 }, - { 2, 2 }, - { 2, 2 }, - { 20, 2 }, - { 20, 2 }, - { 1, 2 }, - { 4, 2 }, - { 4, 2 }, - { 4, 2 }, - { 8, 2 }, - { 4, 2 }, - { 0xff, 2 }, - { 20, 2 }, - { 6, 2 }, - { 6, 2 }, - { 2, 2 }, + {0xff, 2}, {0xff, 2}, {0xff, 2}, {0xff, 2}, {0xff, 2}, {6, 2}, {4, 2}, {4, 2}, {4, 2}, {1, 2}, + {12, 2}, {4, 2}, {4, 2}, {8, 2}, {12, 2}, {2, 2}, {2, 2}, {20, 2}, {20, 2}, {1, 2}, + {4, 2}, {4, 2}, {4, 2}, {8, 2}, {4, 2}, {0xff, 2}, {20, 2}, {6, 2}, {6, 2}, {2, 2}, }; -Actor_UnkStruct_020::Actor_UnkStruct_020(): +Actor_UnkStruct_020::Actor_UnkStruct_020() : mUnk_0c(-1), mUnk_0d(0), mUnk_0e(1), - mUnk_10(-1) -{ + mUnk_10(-1) { for (s32 i = 0; i < 4; ++i) { mUnk_00[i] = 0; } @@ -122,20 +94,19 @@ ARM Actor::Actor() : mActiveFrames(0), mUnk_13c(0), mUnk_140(0), - mUnk_144(0) -{ + mUnk_144(0) { mUnk_014.x = 0; mUnk_014.y = 0; mUnk_014.z = 0; - mPos.x = 0; - mPos.y = 0; - mPos.z = 0; + mPos.x = 0; + mPos.y = 0; + mPos.z = 0; mPrevPos.x = 0; mPrevPos.y = 0; mPrevPos.z = 0; - mVel.x = 0; - mVel.y = 0; - mVel.z = 0; + mVel.x = 0; + mVel.y = 0; + mVel.z = 0; } ARM Actor::~Actor() {} @@ -196,7 +167,8 @@ struct UnkStruct1 { }; extern void *data_027e0d3c; extern unk32 data_02063e4c; -extern "C" bool func_ov00_02079470(void *param1, Vec3p *param2, unk32 param3, unk32 param4, unk32 *param5, unk32 *param6, unk32 param7, unk32 param8); +extern "C" bool func_ov00_02079470(void *param1, Vec3p *param2, unk32 param3, unk32 param4, unk32 *param5, unk32 *param6, + unk32 param7, unk32 param8); extern "C" void func_01ffbe34(UnkStruct1 *param1); extern "C" void func_020313c8(unk32 *param1, unk32 param2, unk32 param3, u32 param4, UnkStruct1 *param5); ARM void Actor::vfunc_1c(u16 *param1) { @@ -229,7 +201,7 @@ ARM bool Actor::SetUnk_11b() { ARM bool Actor::SetVelocity(Vec3p *vel) { if (!mUnk_11b) return false; - mVel = *vel; + mVel = *vel; mUnk_11b = false; return true; } @@ -295,13 +267,9 @@ extern s32 data_027e103c; ARM bool Actor::func_ov00_020c198c() { u32 unk1 = data_027e077c.mUnk_0; u32 unk2 = data_027e077c.mUnk_4; - if ( - data_027e077c.mUnk_0 != data_027e077c.mUnk_4 - || (data_02056be4[unk1] & 1) != 0 - || (data_02056be4[unk2] & 4) != 0 - || func_ov05_02103f4c(data_027e103c) - || gPlayer->mHealth <= 0 - ) { + if (data_027e077c.mUnk_0 != data_027e077c.mUnk_4 || (data_02056be4[unk1] & 1) != 0 || (data_02056be4[unk2] & 4) != 0 || + func_ov05_02103f4c(data_027e103c) || gPlayer->mHealth <= 0) + { return false; } if (gPlayerLink && !gPlayerLink->func_ov00_020bd304()) return false; @@ -319,8 +287,7 @@ ARM bool KillPickupsFilter::Filter(Actor *actor) { case ActorTypeId_FLAL: case ActorTypeId_FLBM: case ActorTypeId_FLBT: - case ActorTypeId_FLTM: - { + case ActorTypeId_FLTM: { actor->Kill(); return true; } @@ -336,16 +303,16 @@ ARM void Actor::KillPickupItemActors() { ARM bool Actor::TrySetTransform(Transform *transform) { mPrevPos = mPos; - mPos = transform->pos; - mAngle = transform->angle; + mPos = transform->pos; + mAngle = transform->angle; mVisible = transform->visible; return true; } ARM void Actor::SetTransform(Transform *transform) { mPrevPos = mPos; - mPos = transform->pos; - mAngle = transform->angle; + mPos = transform->pos; + mAngle = transform->angle; mVisible = transform->visible; } @@ -376,7 +343,8 @@ ARM bool Actor::vfunc_4c(unk32 *param1) { ARM bool Actor::IsNearLink() { Vec3p playerPos = gPlayerPos; - q20 z = playerPos.z; + + q20 z = playerPos.z; q20 dx = abs(playerPos.x - mPos.x); if (dx > FLOAT_TO_Q20(10.0)) return false; q20 dz = abs(playerPos.z - mPos.z); @@ -457,38 +425,42 @@ ARM bool Actor::func_ov00_020c1fc8(PlayerCollide flags) { if (this->CollidesWithPlayer(flags & PlayerCollide_Sword)) { Knockback knockback; knockback.mUnk_00 = gPlayer->EquipItem_vfunc_2c(); - knockback.vec = vecFromPlayer; + knockback.vec = vecFromPlayer; knockback.mUnk_10 = 0; - knockback.actor = NULL; + knockback.actor = NULL; + result = this->vfunc_48(&knockback); } else if (this->CollidesWithPlayer(flags & PlayerCollide_Shield)) { Knockback knockback; knockback.mUnk_00 = 0; - knockback.vec = vecFromPlayer; + knockback.vec = vecFromPlayer; if ((s32) gItemManager->GetActiveFairyLevel(FairyId_Wisdom) >= 1) { knockback.mUnk_10 = 3; } else { knockback.mUnk_10 = 2; } knockback.actor = NULL; + result = this->vfunc_48(&knockback); } else if (this->CollidesWithPlayer(flags & PlayerCollide_Hammer)) { Knockback knockback; knockback.mUnk_00 = gPlayer->EquipItem_vfunc_2c(); - knockback.vec = vecFromPlayer; + knockback.vec = vecFromPlayer; knockback.mUnk_10 = 4; - knockback.actor = NULL; + knockback.actor = NULL; + result = this->vfunc_48(&knockback); } else if (this->CollidesWithPlayer(flags & PlayerCollide_Gongoron)) { Knockback knockback; knockback.mUnk_00 = gPlayerLink->vfunc_78(); - knockback.vec = vecFromPlayer; + knockback.vec = vecFromPlayer; if (knockback.mUnk_00 != 0) { knockback.mUnk_10 = 9; } else { knockback.mUnk_10 = 2; } knockback.actor = NULL; + result = this->vfunc_48(&knockback); } } @@ -499,8 +471,8 @@ ARM bool Actor::CollidesWithShield(Cylinder *param1) { Vec3p vecFromPlayer; Vec3p_Sub(&mPos, &gPlayerPos, &vecFromPlayer); s32 currAngle = gPlayerAngle; - s32 angle = Atan2(vecFromPlayer.x, vecFromPlayer.z); - s32 angleDiff = (s16)angle - currAngle; + s32 angle = Atan2(vecFromPlayer.x, vecFromPlayer.z); + s32 angleDiff = (s16) angle - currAngle; if (angleDiff < 0) angleDiff = -angleDiff; if (angleDiff <= DEG_TO_ANG(90) && gPlayer->EquipCollidesWith(param1, ItemFlag_WoodenShield)) { return true; @@ -556,6 +528,7 @@ ARM bool Actor::func_ov00_020c243c(ActorTypeId *actorTypes, Actor **out) { if (actor->mType == ActorTypeId_Arrow || actor->mType == ActorTypeId_SBEM) { q20 cos = COS(actor->mAngle); q20 sin = SIN(actor->mAngle); + knockback.vec.x = sin; knockback.vec.y = 0; knockback.vec.z = cos; @@ -563,7 +536,7 @@ ARM bool Actor::func_ov00_020c243c(ActorTypeId *actorTypes, Actor **out) { Vec3p_Sub(&mPos, &actor->mPrevPos, &knockback.vec); } knockback.mUnk_00 = actor->mUnk_125; - knockback.actor = actor; + knockback.actor = actor; switch (actor->mType) { case ActorTypeId_SBEM: { @@ -597,8 +570,7 @@ ARM bool Actor::func_ov00_020c243c(ActorTypeId *actorTypes, Actor **out) { case ActorTypeId_BKEY: case ActorTypeId_FORC: case ActorTypeId_FLTB: - case ActorTypeId_TSUB: - { + case ActorTypeId_TSUB: { knockback.mUnk_10 = 10; } break; @@ -676,12 +648,14 @@ ARM q20 Actor::XzDistanceToLink() { Vec3p src; Vec3p_CopyXZ(&mPos, &src); Vec3p dest = gPlayerPos; + dest.y = 0; return Vec3p_Distance(&src, &dest); } ARM s16 Actor::GetAngleTo(Vec3p *vec) { s16 angle = mAngle; + q20 dz = vec->z - mPos.z; q20 dx = vec->x - mPos.x; if (dx != 0 || dz != 0) { @@ -698,10 +672,11 @@ extern "C" void func_0202d95c(Vec3p *param1, q20 param2); ARM void Actor::func_ov00_020c2988(Vec3p *param1, q20 param2, Vec3p *param3) { q20 z1 = param1->z; q20 z0 = mPos.z; + param3->x = param1->x - mPos.x; param3->y = 0; param3->z = z1 - z0; - q20 dist = this->XzDistanceTo(param1); + q20 dist = this->XzDistanceTo(param1); if (dist < param2) param2 = dist; func_0202d95c(param3, param2); } @@ -717,8 +692,8 @@ ARM bool Actor::func_ov00_020c29ec(q20 param1) { } ARM void Actor::GetHitbox(Cylinder *hitbox) { - hitbox->size = mHitbox.size; - u32 angle = 2 * (mAngle >> 4); + hitbox->size = mHitbox.size; + u32 angle = 2 * (mAngle >> 4); hitbox->pos.x = mPos.x; hitbox->pos.y = mPos.y; hitbox->pos.z = mPos.z; @@ -730,8 +705,8 @@ ARM void Actor::GetHitbox(Cylinder *hitbox) { } ARM void Actor::GetUnk_08c(Cylinder *param1) { - param1->size = mUnk_08c.size; - u32 angle = 2 * (mAngle >> 4); + param1->size = mUnk_08c.size; + u32 angle = 2 * (mAngle >> 4); param1->pos.x = mPos.x; param1->pos.y = mPos.y; param1->pos.z = mPos.z; @@ -778,8 +753,8 @@ ARM bool Actor::func_ov00_020c2c70() { return boomerang != NULL; } -ARM EquipBoomerang* Actor::GetEquipBoomerang() { - return (EquipBoomerang*) ItemManager::GetEquipItemUnchecked(ItemFlag_Boomerang); +ARM EquipBoomerang *Actor::GetEquipBoomerang() { + return (EquipBoomerang *) ItemManager::GetEquipItemUnchecked(ItemFlag_Boomerang); } ARM bool Actor::func_ov00_020c2d54() { @@ -804,6 +779,7 @@ ARM bool Actor::func_ov00_020c2de4() { Vec3p vel; EquipRope *rope = EquipSword::GetEquipRope(); + Actor *actor = rope->func_ov14_0213d420(); if (actor) { Vec3p_Sub(&actor->mPos, &mPos, &vel); @@ -820,6 +796,7 @@ ARM bool Actor::func_ov00_020c2de4() { ARM bool Actor::func_ov00_020c2e7c() { bool result = false; + EquipRope *rope = EquipSword::GetEquipRope(); if (!mUnk_11d) { s32 unk1 = rope->func_ov14_0213ddd4(this); @@ -839,6 +816,7 @@ ARM bool Actor::func_ov00_020c2ebc() { ARM bool Actor::func_ov00_020c2ed4() { EquipRope *rope = EquipSword::GetEquipRope(); + s32 index = rope->func_ov14_0213d440(mRef.id); if (index >= 0) { bool unk1 = rope->func_ov14_0213d420(); @@ -868,6 +846,7 @@ ARM bool Actor::func_ov00_020c2ed4() { ARM bool Actor::IsHitboxTouched(bool param1) { q20 size = mHitbox.size; + bool result = false; if (size >= 0) { Vec3p pos = mPos; @@ -899,7 +878,7 @@ ARM bool Actor::func_ov00_020c3094() { return result; } -ARM Vec3p* Actor::GetPos() { +ARM Vec3p *Actor::GetPos() { return &mPos; } @@ -946,6 +925,7 @@ ARM void Actor::vfunc_ac() {} ARM void Actor::func_ov00_020c3200(s32 param1) { const UnkStruct3 *entry = &sUnkTable[param1]; + mUnk_122 = sUnkTable[param1].mUnk_0; mUnk_120 = sUnkTable[param1].mUnk_0; mUnk_124 = entry->mUnk_2; @@ -963,7 +943,7 @@ ARM void Actor::GetLinkPos(Vec3p *result) { ARM void Actor::GetLinkDummyPos(Vec3p *result) { ActorRef dummyRef; ActorManager::FindActorByType(&dummyRef, gActorManager, ActorTypeId_PlayerDummy); - ActorPlayerDummy *dummy = (ActorPlayerDummy*) gActorManager->GetActor(&dummyRef); + ActorPlayerDummy *dummy = (ActorPlayerDummy *) gActorManager->GetActor(&dummyRef); if (dummy != NULL && dummy->mUnk_16e == 0) { *result = dummy->mPos; return; @@ -977,4 +957,3 @@ Actor_UnkStruct_09c::Actor_UnkStruct_09c() { mUnk_3 = 0; mUnk_4 = 0; } - diff --git a/src/00_Core/Actor/ActorManager.cpp b/src/00_Core/Actor/ActorManager.cpp index 472eede2..467196d7 100644 --- a/src/00_Core/Actor/ActorManager.cpp +++ b/src/00_Core/Actor/ActorManager.cpp @@ -3,18 +3,17 @@ void ActorManager::DeleteActor(u32 index, bool param2) {} void ActorManager::func_ov00_020c3484(ActorRef *ref, Actor *actor, unk32 param3) {} void ActorManager::Actor_vfunc_10(u32 param1) {} -Actor* ActorManager::FindActorById(u32 id) {} -Actor* ActorManager::GetActor(ActorRef *ref) {} +Actor *ActorManager::FindActorById(u32 id) {} +Actor *ActorManager::GetActor(ActorRef *ref) {} bool FilterActor::Filter(Actor *actor) {} s32 ActorManager::FilterActors(FilterActorBase *filter, ActorList *filteredActors) {} void ActorManager::FindActorByType(ActorRef *ref, ActorManager *manager, ActorTypeId type) {} void ActorManager::FindNearestActorOfType(ActorRef *ref, ActorManager *manager, ActorTypeId type, Vec3p *pos) {} bool ActorManager::func_ov00_020c398c(u32 index) {} void ActorManager::func_ov00_020c399c(u32 index, Cylinder *cylinder) {} -Actor* ActorManager::func_ov00_020c39ac(u32 index, const ActorTypeId *actorTypes, bool param3) {} +Actor *ActorManager::func_ov00_020c39ac(u32 index, const ActorTypeId *actorTypes, bool param3) {} s32 ActorManager::func_ov00_020c3b2c(s32 *param1) {} s32 ActorManager::func_ov00_020c3bb0(unk32 param1, s32 *param2) {} void ActorManager::func_ov00_020c3ce8(unk32 param1, unk32 param2) {} void ActorManager::Actor_vfunc_28() {} bool ActorManager::ActorTypeIsOneOf(u32 type, ActorTypeId *types) {} - diff --git a/src/00_Core/Item/ItemManager.cpp b/src/00_Core/Item/ItemManager.cpp index 0f28dd2f..46a0add0 100644 --- a/src/00_Core/Item/ItemManager.cpp +++ b/src/00_Core/Item/ItemManager.cpp @@ -1,10 +1,10 @@ #include "Item/ItemManager.hpp" #include "Player/PlayerLinkBase.hpp" -static const char *sShipPartTypes[] = { "anc", "bow", "hul", "can", "dco", "pdl", "fnl", "brg" }; +static const char *sShipPartTypes[] = {"anc", "bow", "hul", "can", "dco", "pdl", "fnl", "brg"}; extern u32 *data_027e0ce0[]; -THUMB ItemManager* ItemManager::Create() { +THUMB ItemManager *ItemManager::Create() { gItemManager = new(data_027e0ce0[1], 4) ItemManager(); return gItemManager; } @@ -24,12 +24,12 @@ THUMB void ItemManager::Save(SaveItemManager *save) { for (s32 i = 0; i < NUM_POTIONS; ++i) { save->potions[i] = mPotions[i]; } - save->numBombs = (u8) (*mAmmo)[ItemFlag_BombBag]; - save->numBombchus = (u8) (*mAmmo)[ItemFlag_BombchuBag]; - save->numArrows = (u8) (*mAmmo)[ItemFlag_Bow]; - save->equippedItem = (u8) mEquippedItem; + save->numBombs = (u8) (*mAmmo)[ItemFlag_BombBag]; + save->numBombchus = (u8) (*mAmmo)[ItemFlag_BombchuBag]; + save->numArrows = (u8) (*mAmmo)[ItemFlag_Bow]; + save->equippedItem = (u8) mEquippedItem; save->salvagedTreasureFlags = mSalvagedTreasureFlags; - save->hourglassSeconds = FastDivide(mHourglassSandFrames, 60); + save->hourglassSeconds = FastDivide(mHourglassSandFrames, 60); for (s32 i = 0; i < Gem_COUNT; ++i) { save->numGems[i] = mNumGems[i]; } @@ -48,8 +48,8 @@ THUMB void ItemManager::Save(SaveItemManager *save) { save->unk_9f[i] = mUnk_098[i]; save->unk_82[i] = mUnk_09e[i]; } - save->quiverSize = mQuiverSize; - save->bombBagSize = mBombBagSize; + save->quiverSize = mQuiverSize; + save->bombBagSize = mBombBagSize; save->bombchuBagSize = mBombchuBagSize; if (mEquippedFairy == FairyId_None) { save->equippedFairy = 3; @@ -61,21 +61,20 @@ THUMB void ItemManager::Save(SaveItemManager *save) { THUMB void ItemManager::Load(const SaveItemManager *save) { mItemFlags = save->itemFlags; mNumRupees = save->numRupees; - mHourglassSandFrames = save->hourglassSeconds <= MAX_HOURGLASS_SECONDS - ? save->hourglassSeconds * 60 - : MAX_HOURGLASS_SECONDS * 60; + mHourglassSandFrames = + save->hourglassSeconds <= MAX_HOURGLASS_SECONDS ? save->hourglassSeconds * 60 : MAX_HOURGLASS_SECONDS * 60; for (s32 i = ItemFlag_EQUIP_START; i < ItemFlag_EQUIP_END; ++i) { if (GET_FLAG(mItemFlags.flags, (u32) i)) { (*mAmmo)[i] = 1; } } - (*mAmmo)[ItemFlag_BombBag] = save->numBombs; + (*mAmmo)[ItemFlag_BombBag] = save->numBombs; (*mAmmo)[ItemFlag_BombchuBag] = save->numBombchus; - (*mAmmo)[ItemFlag_Bow] = save->numArrows; + (*mAmmo)[ItemFlag_Bow] = save->numArrows; for (s32 i = 0; i < NUM_POTIONS; ++i) { mPotions[i] = save->potions[i]; } - mEquippedItem = save->equippedItem; + mEquippedItem = save->equippedItem; mSalvagedTreasureFlags = save->salvagedTreasureFlags; for (s32 i = 0; i < Gem_COUNT; ++i) { mNumGems[i] = save->numGems[i]; @@ -95,10 +94,10 @@ THUMB void ItemManager::Load(const SaveItemManager *save) { mUnk_098[i] = save->unk_9f[i]; mUnk_09e[i] = save->unk_82[i]; } - mQuiverSize = save->quiverSize; - mBombBagSize = save->bombBagSize; + mQuiverSize = save->quiverSize; + mBombBagSize = save->bombBagSize; mBombchuBagSize = save->bombchuBagSize; - mEquippedFairy = save->equippedFairy; + mEquippedFairy = save->equippedFairy; if (mEquippedFairy >= FairyId_COUNT) { mEquippedFairy = FairyId_None; } @@ -121,7 +120,7 @@ ARM FairyId ItemManager::GetEquippedFairy() const { return fairy; } -ARM ActorNavi* ItemManager::GetFairy(FairyId id) const { +ARM ActorNavi *ItemManager::GetFairy(FairyId id) const { return mFairies[id]; } @@ -150,29 +149,29 @@ ARM void ItemManager::TickEquipItem(void) { ARM void ItemManager::func_ov00_020ad528() {} -ARM ItemModel* ItemManager::GetItemModel(ItemModelId id) { +ARM ItemModel *ItemManager::GetItemModel(ItemModelId id) { return mItemModels[id]; } extern unk32 data_027e0fc4; -extern "C" void* func_ov00_020bb3a8(unk32 param1, u32 index); +extern "C" void *func_ov00_020bb3a8(unk32 param1, u32 index); extern "C" void func_ov00_020c0bdc(void *param1, unk32 param2); ARM void ItemManager::func_ov00_020ad538(unk32 param1) const { - void* unk1 = func_ov00_020bb3a8(data_027e0fc4, 6); + void *unk1 = func_ov00_020bb3a8(data_027e0fc4, 6); func_ov00_020c0bdc(unk1, param1); } ARM void ItemManager::func_ov00_020ad560(unk32 param1) const { - void* unk1 = func_ov00_020bb3a8(data_027e0fc4, 7); + void *unk1 = func_ov00_020bb3a8(data_027e0fc4, 7); func_ov00_020c0bdc(unk1, param1); } -ARM ItemModel* ItemManager::GetDungeonItemModel(u32 index) { +ARM ItemModel *ItemManager::GetDungeonItemModel(u32 index) { return mDungeonItemModels[index]; } ARM void ItemManager::func_ov00_020ad594(unk32 param1) const { - void* unk1 = func_ov00_020bb3a8(data_027e0fc4, 11); + void *unk1 = func_ov00_020bb3a8(data_027e0fc4, 11); func_ov00_020c0bdc(unk1, param1); } @@ -191,7 +190,7 @@ ARM void ItemManager::EquipItem_vfunc_38(unk32 param1) { this->Shield_vfunc_38(param1); } if (data_027e0d38->mUnk_14 == 1) return; - + ItemFlag equip = this->GetEquippedItem(); if (equip == ItemFlag_None) return; if (mEquipLoadTimer > 0) return; @@ -215,7 +214,7 @@ ARM s32 ItemManager::EquipItem_vfunc_2c(ItemFlag equipId) { return (*mEquipItems)[equipId]->vfunc_2c(); } -ARM EquipItem* ItemManager::GetEquipItem(ItemFlag equipId) { +ARM EquipItem *ItemManager::GetEquipItem(ItemFlag equipId) { if (equipId == ItemFlag_None) { return NULL; } else { @@ -248,18 +247,15 @@ ARM bool ItemManager::func_ov00_020ad790(unk32 param1) { if (gOverlayManager.mLoadedOverlays[OverlayIndex_6] == OverlayId_29 && data_ov29_0217a4ac[0x54] != 0) { return false; } - + ItemFlag equipId = mForcedItem; - bool unk2 = !gMapManager->func_ov00_020849f8(equipId); - if ( - mEquippedItem != ItemFlag_None && - (unk2 || (u32) mEquippedItem - 9 <= 1) && - (gPlayerLink == 0 || gPlayerLink->func_ov00_020bbd80(param1)) && - this->HasItem(mEquippedItem) - ) { + bool unk2 = !gMapManager->func_ov00_020849f8(equipId); + if (mEquippedItem != ItemFlag_None && (unk2 || (u32) mEquippedItem - 9 <= 1) && + (gPlayerLink == 0 || gPlayerLink->func_ov00_020bbd80(param1)) && this->HasItem(mEquippedItem)) + { equipId = mEquippedItem; } - + if (equipId != ItemFlag_None) { if (mEquipLoadTimer != 0) return param1 == 0; return this->GetEquipItem(equipId)->IsUsable(param1); @@ -303,7 +299,7 @@ THUMB u16 ItemManager::GetUnk_09e(u32 index) const { THUMB s32 ItemManager::GetUnk_09e_Divided(u32 index) const { q20 quotient = Divide(INT_TO_Q20(mUnk_09e[index]), FLOAT_TO_Q20(2.54)); - s32 result = ROUND_Q20(quotient); + s32 result = ROUND_Q20(quotient); if (result < 1) result = 1; return result; } @@ -318,7 +314,7 @@ THUMB void ItemManager::SetUnk_09e(u32 index, u16 value) { } } -const u16 sQuiverSizes[] = {20, 20, 30, 50}; +const u16 sQuiverSizes[] = {20, 20, 30, 50}; const u16 sBombBagSizes[] = {10, 20, 30}; THUMB u16 ItemManager::GetMaxAmmo(ItemFlag equipId) const { @@ -378,9 +374,10 @@ THUMB void ItemManager::RemoveItem(ItemFlag item) { extern ItemModel **data_027e1058; extern ItemModel **data_027e105c; -extern "C" ItemModel* func_ov00_02079ffc(void*, const char *modelName, const char *textureName, unk32 param4, unk8 param5, unk8 param6, bool param7); -extern "C" ItemModel* LoadTreasureItemFanfare(ItemModel**, s32 treasureType, bool, bool); -static char *sDefaultItemModel = "key"; +extern "C" ItemModel *func_ov00_02079ffc(void *, const char *modelName, const char *textureName, unk32 param4, unk8 param5, + unk8 param6, bool param7); +extern "C" ItemModel *LoadTreasureItemFanfare(ItemModel **, s32 treasureType, bool, bool); +static char *sDefaultItemModel = "key"; static char *sItemModelNames[70] = { [ItemId_None] = "key", [ItemId_SmallKey] = "key", @@ -475,37 +472,24 @@ static char *sItemModelNames3[9] = { [ItemId_Unk_135 - ItemId_CycloneSlate] = NULL, }; char *sSpecialItemModelNames[7] = { - "mapTakara\0\0", - "arrowpodL\0\0", - "bmbagL\0", - "bcbagL\0", - "Player/get/gd_\0", - ".nsbmd\0", - ".nsbtx\0", + "mapTakara\0\0", "arrowpodL\0\0", "bmbagL\0", "bcbagL\0", "Player/get/gd_\0", ".nsbmd\0", ".nsbtx\0", }; THUMB void ItemManager::LoadFanfareItem(ItemId id) { mFanfareItem = id; - + ItemModel *model; - if ( - id == ItemId_Unk_43 || - id == ItemId_Cannon || - (id >= ItemId_GOLDEN_SHIP_START && id <= ItemId_GOLDEN_SHIP_END) || - id == ItemId_Unk_126 || - id == ItemId_Unk_133 - ) { + if (id == ItemId_Unk_43 || id == ItemId_Cannon || (id >= ItemId_GOLDEN_SHIP_START && id <= ItemId_GOLDEN_SHIP_END) || + id == ItemId_Unk_126 || id == ItemId_Unk_133) + { model = *data_027e1058; - } else if ( - id >= ItemId_TREASURE_START && - id <= ItemId_TREASURE_END - ) { + } else if (id >= ItemId_TREASURE_START && id <= ItemId_TREASURE_END) { model = LoadTreasureItemFanfare(data_027e105c, id - ItemId_TREASURE_START, true, false); } else if (id == ItemId_Unk_125) { model = *data_027e105c; } else { - char modelName[0x80] = {}; + char modelName[0x80] = {}; char textureName[0x80] = {}; - const char *itemName = NULL; + const char *itemName = NULL; if (id == ItemId_Quiver && (s32) mQuiverSize >= 1) { itemName = sSpecialItemModelNames[1]; } else if (id == ItemId_BigBombBag && (s32) mBombBagSize >= 1) { @@ -769,11 +753,11 @@ THUMB void ItemManager::GiveItem(ItemId id) { break; } } break; - + case ItemId_SandOfHours: { mHourglassSandFrames += 3600; } break; - + case ItemId_GoldenChimney: { gAdventureFlags->Set(AdventureFlag_ReceivedGoldenChimney, true); GiveShipPart(ShipPart_Chimney, ShipType_Golden); @@ -809,7 +793,7 @@ THUMB void ItemManager::GiveItem(ItemId id) { case ItemId_Rupoor50: { this->GiveRupees(-50, true); } break; - + case ItemId_None: break; case ItemId_Unk_5: break; case ItemId_Unk_16: break; @@ -822,11 +806,9 @@ THUMB void ItemManager::GiveItem(ItemId id) { } } break; } - if ( - gAdventureFlags->Get(AdventureFlag_Azurine) && - gAdventureFlags->Get(AdventureFlag_Crimsonine) && - gAdventureFlags->Get(AdventureFlag_Aquanine) - ) { + if (gAdventureFlags->Get(AdventureFlag_Azurine) && gAdventureFlags->Get(AdventureFlag_Crimsonine) && + gAdventureFlags->Get(AdventureFlag_Aquanine)) + { gAdventureFlags->Set(AdventureFlag_Unk_128, true); } } @@ -836,7 +818,7 @@ THUMB void ItemManager::GiveEquipItem(ItemFlag item, u16 ammo) { SET_FLAG(mItemFlags.flags, flag); this->GetEquipItem(item)->GiveAmmo(ammo); if (mEquippedItem == ItemFlag_None) { - this->mEquippedItem = item; + this->mEquippedItem = item; this->mEquipLoadTimer = 1; } } @@ -893,8 +875,8 @@ ARM ItemFlag ItemManager::GetEquippedItem() const { ARM bool ItemManager::SetEquippedItem(ItemFlag equipId) { mPrevEquippedItem = mEquippedItem; - mEquippedItem = equipId; - mEquipLoadTimer = 2; + mEquippedItem = equipId; + mEquipLoadTimer = 2; return true; } @@ -907,7 +889,7 @@ THUMB void ItemManager::ForceEquipItem(ItemFlag equipId) { if (i == equipId) continue; (*mEquipItems)[i - ItemFlag_EQUIP_START]->UpdateInUse(0); } - mForcedItem = equipId; + mForcedItem = equipId; mEquipLoadTimer = 1; } @@ -961,12 +943,10 @@ ARM bool ItemManager::HasPotion(u32 index) const { switch (mPotions[index]) { case Potion_Red: case Potion_Purple: - case Potion_Yellow: - return true; - + case Potion_Yellow: return true; + case Potion_None: - default: - return false; + default: return false; } } @@ -1027,7 +1007,7 @@ THUMB void ItemManager::PlayItemFanfareSfx(ItemId item) { case ItemId_GoldRupee: { sfx = SfxId_Fanfare_GoldRupee; } break; - + case ItemId_SmallKey: case ItemId_GreenRupee: case ItemId_BlueRupee: @@ -1035,7 +1015,7 @@ THUMB void ItemManager::PlayItemFanfareSfx(ItemId item) { sfx = SfxId_Fanfare_Rupee; } break; - case ItemId_Rupoor10: + case ItemId_Rupoor10: case ItemId_Rupoor50: { sfx = SfxId_Fanfare_Rupoor; } break; @@ -1048,13 +1028,14 @@ THUMB void ItemManager::PlayItemFanfareSfx(ItemId item) { case ItemId_HeartContainer: { sfx = SfxId_Fanfare_HeartContainer; } break; - + default: { sfx = SfxId_Fanfare_Treasure; } break; } if (gItemManager->mFanfareSfx != SfxId_None) { sfx = gItemManager->mFanfareSfx; + gItemManager->mFanfareSfx = SfxId_None; } PlaySoundEffect(&data_ov00_020eec68, sfx); diff --git a/src/00_Core/Map/Course.cpp b/src/00_Core/Map/Course.cpp index 316b05ee..4771048d 100644 --- a/src/00_Core/Map/Course.cpp +++ b/src/00_Core/Map/Course.cpp @@ -2,12 +2,12 @@ void Course::GetDungeonProgress(CourseProgress *param_2) {} void Course::func_ov00_0207ca28(s32 param_2, unk32 param_3, unk32 param_4) {} -char* Course::SetCourseName(char *src) {} +char *Course::SetCourseName(char *src) {} void Course::func_ov00_0207ca78(unk32 param_2, unk8 param_3, unk32 param_4) {} bool Course::func_ov00_0207caa8(s32 param_2, unk32 *param_3, unk8 *param_4) {} unk32 Course::func_ov00_0207cb30(s32 param_2) {} void Course::FindMapGridPos(Vec2b *pos, Course *param_2, u32 map) {} -Vec3p* Course::FindMapCenter(unk32 map) {} +Vec3p *Course::FindMapCenter(unk32 map) {} void Course::func_ov00_0207cbe8(s32 param_2) {} unk8 Course::func_ov00_0207cc24(s32 param_2) {} unk32 Course::FindMapData_Unk_08(unk32 map) {} @@ -47,5 +47,5 @@ void Course::SetMapDataFlag3(unk32 param_2, bool param_3) {} bool Course::GetMapDataFlag3(unk32 param_2) {} void Course::SetMapDataFlag4(unk32 param_2, unk32 param_3) {} bool Course::GetMapDataFlag4(unk32 param_2) {} -MapData* Course::FindMapData(u32 map) {} -MapData* Course::FindCurrentMapData() {} +MapData *Course::FindMapData(u32 map) {} +MapData *Course::FindCurrentMapData() {} diff --git a/src/00_Core/Map/MapBase.cpp b/src/00_Core/Map/MapBase.cpp index 1afc8c29..8d6d3c96 100644 --- a/src/00_Core/Map/MapBase.cpp +++ b/src/00_Core/Map/MapBase.cpp @@ -29,7 +29,7 @@ unk8 MapBase::func_ov00_0207e968() {} unk8 MapBase::func_ov00_0207e96c() {} unk8 MapBase::vfunc_6c(unk32 param_2, unk32 param_3, unk32 param_4) {} unk32 MapBase::vfunc_70(Vec3p *param_2) {} -s32* MapBase::vfunc_74(Vec3p *param_2) {} +s32 *MapBase::vfunc_74(Vec3p *param_2) {} unk8 MapBase::func_ov00_0207f100() {} bool MapBase::func_ov00_0207f104(unk32 param_2, unk32 param_3) {} unk32 MapBase::func_ov00_0207f1f4(Vec3p *param_2, unk32 *param_3) {} @@ -74,7 +74,7 @@ unk8 MapBase::GetTriggerBoundingBoxes(unk32 param_2, AABB *param_3, unk32 param_ unk32 MapBase::GetOverlappingTrigger(Vec3p *param_2) {} bool TriggerBase::Overlaps() {} unk8 MapBase::FindTrigger(unk32 type) {} -unk8 MapBase::GetOverlappingTriggers(Vec3p *param_2, TriggerBase * *triggers, unk32 capacity) {} +unk8 MapBase::GetOverlappingTriggers(Vec3p *param_2, TriggerBase **triggers, unk32 capacity) {} bool MapBase::IsTriggerTypeOverlapped(unk32 type, Vec3p *param_3) {} bool MapBase::AnyTrigger_func_0c(unk32 type) {} unk32 TriggerBase::vfunc_0c() {} @@ -99,7 +99,7 @@ bool MapBase::func_ov00_02080824(unk32 param_2, unk32 param_3) {} bool MapBase::AddUnk_130(unk32 param_2) {} bool MapBase::func_ov00_020809b8(unk32 param_2) {} unk8 MapBase::func_ov00_02080a78(Vec3p *param_2) {} -void MapBase_Unk2::func_ov00_02080ad0(TriggerBase * *param_2, TriggerBase * *param_3) {} +void MapBase_Unk2::func_ov00_02080ad0(TriggerBase **param_2, TriggerBase **param_3) {} unk8 MapBase::func_ov00_02080b24(Vec2b *param_2) {} void MapBase::func_ov00_02080d08(unk32 param_2) {} void MapBase::vfunc_bc() {} diff --git a/src/00_Core/Map/MapManager.cpp b/src/00_Core/Map/MapManager.cpp index 93dc3579..83ebbbf7 100644 --- a/src/00_Core/Map/MapManager.cpp +++ b/src/00_Core/Map/MapManager.cpp @@ -17,7 +17,7 @@ unk8 MapManager::func_ov00_02082454(unk32 param_2, unk32 param_3) {} unk8 MapManager::func_ov00_02082494(unk32 param_2) {} unk8 MapManager::func_ov00_020824cc(unk32 param_2) {} unk8 MapManager::func_ov00_02082504() {} -unk8 * MapManager::func_ov00_02082538() {} +unk8 *MapManager::func_ov00_02082538() {} void MapManager::func_ov00_02082594() {} void MapManager::func_ov00_020825ac() {} s32 MapManager::GetCourseFilePath(char *courseName, char *buf) {} @@ -39,7 +39,7 @@ bool MapManager::func_ov00_020828f8(s32 *param_2) {} unk8 MapManager::GetCourseData_Unk_b0() {} s32 MapManager::func_ov00_02082914(unk32 param_2) {} unk8 MapManager::func_ov00_02082acc() {} -unk32 * MapManager::func_ov00_02082adc() {} +unk32 *MapManager::func_ov00_02082adc() {} unk8 MapManager::func_ov00_02082af4() {} bool MapManager::func_ov00_02082b3c(s32 param_2) {} unk8 MapManager::func_ov00_02082d08() {} @@ -196,5 +196,7 @@ unk8 MapManager::func_ov00_020858b0() {} s32 MapManager::func_ov00_02085a34(unk32 param_2, unk32 param_3) {} unk8 MapManager::func_ov00_02085c60(unk32 param_2, unk32 param_3, unk32 param_4, unk32 param_5) {} unk8 MapManager::func_ov00_02086044(unk32 param_2, unk32 param_3, unk32 param_4) {} -bool MapManager::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 MapManager::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 MapManager::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 MapManager::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) {} diff --git a/src/00_Core/Player/LinkStateBase.cpp b/src/00_Core/Player/LinkStateBase.cpp index abe7bd34..7479667e 100644 --- a/src/00_Core/Player/LinkStateBase.cpp +++ b/src/00_Core/Player/LinkStateBase.cpp @@ -14,7 +14,7 @@ void LinkStateBase::ChangeLinkSubState(LinkStateId id, s32 subState) {} void LinkStateBase::EquipItem_vfunc_28() {} void LinkStateBase::UpdateSwordShieldInUse() {} void LinkStateBase::func_ov00_020a81b8(unk32 param1, unk32 param2) {} -LinkStateItem* LinkStateBase::GetLinkItemState() {} +LinkStateItem *LinkStateBase::GetLinkItemState() {} void LinkStateBase::LookAt(Vec3p *target) {} void LinkStateBase::func_ov00_020a81fc() {} void LinkStateBase::AddHealth(s16 amount) {} @@ -57,29 +57,29 @@ bool LinkStateBase::HasFlags_PlayerLinkBase_Unk48(u16 flags) {} unk8 LinkStateBase::Get_PlayerLinkBase_Unk5e() {} unk32 LinkStateBase::Get_PlayerControlData_Unk004() {} PlayerCharacter LinkStateBase::GetCurrentCharacter() {} -PlayerControlData* LinkStateBase::GetPlayerControlData() {} +PlayerControlData *LinkStateBase::GetPlayerControlData() {} LinkStateId LinkStateBase::GetStateId() {} s32 LinkStateBase::GetHealth() {} s32 LinkStateBase::GetCurrentCharacterHealth() {} bool LinkStateBase::func_ov00_020a8c34() {} -Vec3p* LinkStateBase::GetPlayerPos() {} -Vec3p* LinkStateBase::GetPlayerVel() {} -unk8* LinkStateBase::func_ov00_020a8c64() {} -s16* LinkStateBase::GetPlayerAngle() {} -void* LinkStateBase::GetPlayer_Unk18() {} +Vec3p *LinkStateBase::GetPlayerPos() {} +Vec3p *LinkStateBase::GetPlayerVel() {} +unk8 *LinkStateBase::func_ov00_020a8c64() {} +s16 *LinkStateBase::GetPlayerAngle() {} +void *LinkStateBase::GetPlayer_Unk18() {} s32 LinkStateBase::Get_PlayerControlData_Unk32() {} -Actor* LinkStateBase::GetGrabActor() {} -ActorRef* LinkStateBase::GetGrabActorRef() {} +Actor *LinkStateBase::GetGrabActor() {} +ActorRef *LinkStateBase::GetGrabActorRef() {} unk32 LinkStateBase::Grab() {} s32 LinkStateBase::Get_PlayerLinkBase_Unk44() {} bool LinkStateBase::IsEquipBeingUsed(ItemFlag id) {} -EquipItem* LinkStateBase::GetEquipItem(ItemFlag id) {} -void* LinkStateBase::func_ov00_020a8d40() {} +EquipItem *LinkStateBase::GetEquipItem(ItemFlag id) {} +void *LinkStateBase::func_ov00_020a8d40() {} unk32 LinkStateBase::func_ov00_020a8d50() {} unk32 LinkStateBase::func_ov00_020a8d6c() {} s32 LinkStateBase::PlayerControlData_vfunc_14(s32 param1) {} unk32 LinkStateBase::Get_PlayerControlData_Unk100() {} unk32 LinkStateBase::Get_PlayerControlData_Unk120() {} s32 LinkStateBase::Get_PlayerLinkBase_Unk38() {} -DebugHierarchy* LinkStateBase::GetDebugHierarchy0() {} -DebugHierarchy* LinkStateBase::GetDebugHierarchy1() {} +DebugHierarchy *LinkStateBase::GetDebugHierarchy0() {} +DebugHierarchy *LinkStateBase::GetDebugHierarchy1() {} diff --git a/src/00_Core/Player/LinkStateFollow.cpp b/src/00_Core/Player/LinkStateFollow.cpp index 69d173dd..4ffbb0a4 100644 --- a/src/00_Core/Player/LinkStateFollow.cpp +++ b/src/00_Core/Player/LinkStateFollow.cpp @@ -6,7 +6,7 @@ void LinkStateFollow::MoveTowardTarget() {} void LinkStateFollow::OnStateLeave(s32 param1) {} bool LinkStateFollow::vfunc_24(s32 param1) {} bool LinkStateFollow::vfunc_28() {} -LinkStateCutscene* LinkStateFollow::GetLinkStateCutscene() {} +LinkStateCutscene *LinkStateFollow::GetLinkStateCutscene() {} bool LinkStateFollow::vfunc_34(Vec3p *param1) {} bool LinkStateFollow::func_ov00_020a9180(Vec3p *param1) {} bool LinkStateFollow::func_ov00_020a9210(Vec3p *param1, Actor *param2) {} diff --git a/src/00_Core/Player/LinkStateInteract.cpp b/src/00_Core/Player/LinkStateInteract.cpp index 6cbda713..cf71654d 100644 --- a/src/00_Core/Player/LinkStateInteract.cpp +++ b/src/00_Core/Player/LinkStateInteract.cpp @@ -9,7 +9,7 @@ void LinkStateInteract::OnStateLeave(s32 param1) {} bool LinkStateInteract::func_ov00_020aa818() {} void LinkStateInteract::func_ov00_020aa844(Actor *param1) {} bool LinkStateInteract::vfunc_20(s32 param1) {} -LinkStateRoll* LinkStateInteract::GetLinkStateRoll() {} +LinkStateRoll *LinkStateInteract::GetLinkStateRoll() {} bool LinkStateInteract::vfunc_24(s32 param1) {} bool LinkStateInteract::vfunc_34(Vec3p *param1) {} void LinkStateInteract::SetGrabActorVelocity(Vec3p *velocity) {} diff --git a/src/00_Core/Player/LinkStateItem.cpp b/src/00_Core/Player/LinkStateItem.cpp index eaf3c8b6..ecedca78 100644 --- a/src/00_Core/Player/LinkStateItem.cpp +++ b/src/00_Core/Player/LinkStateItem.cpp @@ -4,7 +4,7 @@ void LinkStateItem::vfunc_00() {} LinkStateId LinkStateItem::GetId() {} s32 LinkStateItem::IsHammerEquipped() {} void LinkStateItem::OnStateLeave(s32 param1) {} -EquipBombchu* LinkStateItem::GetEquipBombchu() {} -LinkStateMove* LinkStateItem::GetLinkStateMove() {} +EquipBombchu *LinkStateItem::GetEquipBombchu() {} +LinkStateMove *LinkStateItem::GetLinkStateMove() {} bool LinkStateItem::func_ov00_020abf70() {} bool LinkStateItem::vfunc_28() {} diff --git a/src/00_Core/Player/PlayerBase.cpp b/src/00_Core/Player/PlayerBase.cpp index 4736b928..a33dc210 100644 --- a/src/00_Core/Player/PlayerBase.cpp +++ b/src/00_Core/Player/PlayerBase.cpp @@ -5,8 +5,8 @@ ItemFlag PlayerBase::GetEquipId() {} bool PlayerBase::CanMove() {} void PlayerBase::SetUpdatePos(bool updatePos) {} void PlayerBase::SetVisible(bool visible) {} -EquipSword* PlayerBase::GetEquipSword() {} -EquipShield* PlayerBase::GetEquipShield() {} +EquipSword *PlayerBase::GetEquipSword() {} +EquipShield *PlayerBase::GetEquipShield() {} void PlayerBase::LookAt(Vec3p *target) {} bool PlayerBase::func_ov00_020a7c00(s32 param1) {} bool PlayerBase::CollidesWith(Cylinder *cylinder) {} diff --git a/src/00_Core/Player/PlayerControl.cpp b/src/00_Core/Player/PlayerControl.cpp index f51d0a89..6cf39bda 100644 --- a/src/00_Core/Player/PlayerControl.cpp +++ b/src/00_Core/Player/PlayerControl.cpp @@ -4,7 +4,7 @@ bool PlayerControl::func_ov00_020aeeac() {} void PlayerControl::func_ov00_020aeef8() {} void PlayerControl::func_ov00_020aef30() {} void PlayerControl::UpdateAim() {} -Actor* PlayerControl::GetFollowActor() {} +Actor *PlayerControl::GetFollowActor() {} bool PlayerControl::func_ov00_020af01c(unk8 *param1) {} void PlayerControl::SetUnk_80() {} void PlayerControl::StopFollowing() {} diff --git a/src/00_Core/Save/AdventureFlags.cpp b/src/00_Core/Save/AdventureFlags.cpp index 14f377c1..03bb6c76 100644 --- a/src/00_Core/Save/AdventureFlags.cpp +++ b/src/00_Core/Save/AdventureFlags.cpp @@ -32,14 +32,14 @@ unk32 AdventureFlags::Get_FlagsUnk_44(int index) {} unk32 AdventureFlags::Get_FlagsUnk_30(int index) {} bool AdventureFlags::Get_FlagsUnk_00(int index, FlagsUnk2 *result) {} bool AdventureFlags::Get_FlagsUnk_18(int index, FlagsUnk2 *result) {} -FlagsUnk* AdventureFlags::Get_FlagsUnk(int index) {} +FlagsUnk *AdventureFlags::Get_FlagsUnk(int index) {} bool AdventureFlags::func_ov00_02097e6c() {} bool AdventureFlags::func_ov00_02097e7c() {} bool AdventureFlags::func_ov00_02097ea4() {} unk32 AdventureFlags::func_ov00_02097ecc() {} -void* AdventureFlags::func_ov00_02097f8c() {} -void* AdventureFlags::func_ov00_02097fac() {} -void* AdventureFlags::func_ov00_02097fd0() {} +void *AdventureFlags::func_ov00_02097f8c() {} +void *AdventureFlags::func_ov00_02097fac() {} +void *AdventureFlags::func_ov00_02097fd0() {} void AdventureFlags::func_ov00_02097ff4(bool param1, bool param2) {} unk32 AdventureFlags::func_ov00_02098058() {} bool AdventureFlags::func_ov00_02098064(unk32 param1) {} diff --git a/src/14_Land/Actor/ActorRupee.cpp b/src/14_Land/Actor/ActorRupee.cpp index 5288f3bd..8725dd4f 100644 --- a/src/14_Land/Actor/ActorRupee.cpp +++ b/src/14_Land/Actor/ActorRupee.cpp @@ -2,7 +2,7 @@ ActorType ActorRupee::gType; -ActorRupee* ActorRupee::Create() {} +ActorRupee *ActorRupee::Create() {} ActorRupee::ActorRupee() {} bool ActorRupee::vfunc_08() {} bool ActorRupee::vfunc_60() {} diff --git a/src/Main/Actor/ActorType.cpp b/src/Main/Actor/ActorType.cpp index 69282898..ec5f564f 100644 --- a/src/Main/Actor/ActorType.cpp +++ b/src/Main/Actor/ActorType.cpp @@ -3,11 +3,11 @@ ActorTypeList sActorTypeList; ARM ActorType::ActorType(ActorTypeId id, ActorCreateFunc create, unk32 (*unk_08)()) { - this->id = id; + this->id = id; this->create = create; this->unk_08 = unk_08; this->unk_0c = 0; - this->next = NULL; + this->next = NULL; this->Register(); sActorTypeList.tail = this; } @@ -37,13 +37,13 @@ ARM void ActorType::Register() { ARM void ActorType::Unregister() { ActorType *actorType; - ActorType **current = &sActorTypeList.head; + ActorType **current = &sActorTypeList.head; ActorType **previous = NULL; for (actorType = sActorTypeList.head; actorType != NULL; actorType = actorType->next) { if (actorType == this) break; previous = current; - current = &actorType->next; + current = &actorType->next; } if (previous != NULL) {