diff --git a/include/Item/ItemManager.hpp b/include/Item/ItemManager.hpp index a069b5e8..e248d08f 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -104,17 +104,24 @@ private: public: // clang-format off const ItemFlag GetCurrentItem() const { return this->mEquippedItem; } + void SetCurrentItem(ItemFlag item) { this->mEquippedItem = item; } const bool HasItem(int flag) const { return GET_FLAG(this->mFlags, flag); } const u16 GetNumRupees() const { return this->mNumRupees; } const u16 GetRestrictions() const { return this->mItemRestrictions; } const bool HasUnk12(int value) const { return (this->mUnk_12 & value) != 0; } const bool HasRestriction(int flag) const { return IS_ITEM_RESTRICTED(this->mItemRestrictions, flag); } const u8 GetTearsAmount() const { return this->mTearsAmount; } + void SetTearsAmount(u8 amount) { this->mTearsAmount = amount; } const u8 GetKeyAmount() const { return this->mKeyAmount; } + void SetKeyAmount(u8 amount) { this->mKeyAmount = amount; } const UpgradeCapacity GetQuiverCap() const { return this->mQuiverCapacity; } + void SetQuiverCap(UpgradeCapacity value) { this->mQuiverCapacity = value; } const UpgradeCapacity GetBombsCap() const { return this->mBombBagCapacity; } + void SetBombsCap(UpgradeCapacity value) { this->mBombBagCapacity = value; } const UpgradeCapacity GetArrowAmount() const { return this->mArrowAmount; } + void SetArrowAmount(UpgradeCapacity value) { this->mArrowAmount = value; } const UpgradeCapacity GetBombAmount() const { return this->mBombAmount; } + void SetBombAmount(UpgradeCapacity value) { this->mBombAmount = value; } void FlipUnk12(int value) { this->mUnk_12 ^= value; } // clang-format on @@ -186,6 +193,7 @@ public: const Inventory* GetInventory() const { return &this->mInventory; } const ItemFlag GetCurrentItem() const { return this->GetInventory()->GetCurrentItem(); } + void SetCurrentItem(ItemFlag item) { this->GetInventory()->SetCurrentItem(item); } const bool HasItem(int flag) const { return this->GetInventory()->HasItem(flag); } const u16 GetNumRupees() const { return this->GetInventory()->GetNumRupees(); } const u16 GetRestrictions() const { return this->GetInventory()->GetRestrictions(); } @@ -193,10 +201,16 @@ public: const bool HasRestriction(int flag) const { return this->GetInventory()->HasRestriction(flag); } const u8 GetTearsAmount() const { return this->GetInventory()->GetTearsAmount(); } const u8 GetKeyAmount() const { return this->GetInventory()->GetKeyAmount(); } + void SetTearsAmount(u8 amount) { this->GetInventory()->SetTearsAmount(amount); } + void SetKeyAmount(u8 amount) { this->GetInventory()->SetKeyAmount(amount); } const UpgradeCapacity GetQuiverCap() const { return this->GetInventory()->GetQuiverCap(); } + void SetQuiverCap(UpgradeCapacity value) { this->GetInventory()->SetQuiverCap(value); } const UpgradeCapacity GetBombsCap() const { return this->GetInventory()->GetBombsCap(); } + void SetBombsCap(UpgradeCapacity value) { this->GetInventory()->SetBombsCap(value); } const UpgradeCapacity GetArrowAmount() const { return this->GetInventory()->GetArrowAmount(); } + void SetArrowAmount(UpgradeCapacity value) { this->GetInventory()->SetArrowAmount(value); } const UpgradeCapacity GetBombAmount() const { return this->GetInventory()->GetBombAmount(); } + void SetBombAmount(UpgradeCapacity value) { this->GetInventory()->SetBombAmount(value); } void FlipUnk12(int value) { this->GetInventory()->FlipUnk12(value); } // clang-format on diff --git a/include/Unknown/UnkStruct_02049bac.hpp b/include/Unknown/UnkStruct_02049bac.hpp index 1544edba..531408a2 100644 --- a/include/Unknown/UnkStruct_02049bac.hpp +++ b/include/Unknown/UnkStruct_02049bac.hpp @@ -12,7 +12,11 @@ union Date { u16 data[1]; void operator=(Date &from) { +#if __MWERKS__ this->data = from.data; +#else + this->data[0] = from.data[0]; +#endif } void operator=(s16 from) { diff --git a/include/Unknown/UnkStruct_027e0ce0.hpp b/include/Unknown/UnkStruct_027e0ce0.hpp index 0e3d4ddb..6ecb3315 100644 --- a/include/Unknown/UnkStruct_027e0ce0.hpp +++ b/include/Unknown/UnkStruct_027e0ce0.hpp @@ -439,7 +439,7 @@ public: // data_ov026_0213562c /* 00 */ virtual ~UnkStruct_027e0ce0_38() override; - /* 0C */ virtual bool vfunc_0C() override; + /* 0C */ virtual bool vfunc_0C(const UnkStruct_ov031_020e54d4 *param1, unk32 param2) override; // overlay 26 void func_ov026_020dc8f0(); diff --git a/include/files.h b/include/files.h index 0a84887f..610404e7 100644 --- a/include/files.h +++ b/include/files.h @@ -516,8 +516,9 @@ typedef struct ZCBSectionVTXB { } ZCBSectionVTXB; typedef struct ZCBEntryNRMB { - /* 00 */ unk32 unk_00; - /* 04 */ unk16 unk_04; + /* 00 */ s16 unk_00; + /* 02 */ s16 unk_02; + /* 04 */ s16 unk_04; } ZCBEntryNRMB; // size = 0x06 typedef struct ZCBSectionNRMB { @@ -535,8 +536,12 @@ typedef struct ZCBSectionPCLB { } ZCBSectionPCLB; typedef struct ZCBEntryTRIB { - /* 00 */ unk32 unk_00; -} ZCBEntryTRIB; // size = ? + /* 00 */ u16 nIndexPosX; + /* 02 */ u16 nIndexPosY; + /* 04 */ u16 nIndexPosZ; + /* 06 */ u16 nIndexPolyClass; + /* 08 */ u16 unk_06; +} ZCBEntryTRIB; // size = 0x10 typedef struct ZCBSectionTRIB { /* 00 */ ZCBSectionHeader header;