From cf8f5a80b13c4edd7fd8ebb33ab0de81d64f609b Mon Sep 17 00:00:00 2001 From: Yanis <35189056+Yanis002@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:17:02 +0200 Subject: Decompile more of `AdventureFlags.cpp` (#118) * fix flags getters and associated relocs * explicit ARM and improve existing matches * match CopyTo * document a bit the flag system and progress on unmatched functions * remaining bottom functions * func_ov00_02097810 params and name fix * fix build issues * move flag base definition to its own file * document item flags --------- Co-authored-by: Yanis002 Co-authored-by: Aetias --- src/00_Core/Item/ItemManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/00_Core/Item/ItemManager.cpp') diff --git a/src/00_Core/Item/ItemManager.cpp b/src/00_Core/Item/ItemManager.cpp index 7b63966b..9fed2bf7 100644 --- a/src/00_Core/Item/ItemManager.cpp +++ b/src/00_Core/Item/ItemManager.cpp @@ -10,6 +10,7 @@ #include "Save/AdventureFlags.hpp" #include "System/OverlayManager.hpp" #include "Unknown/UnkStruct_020eec68.hpp" +#include "flags.h" static const char *sShipPartTypes[] = {"anc", "bow", "hul", "can", "dco", "pdl", "fnl", "brg"}; @@ -408,7 +409,7 @@ THUMB void ItemManager::SetTreasureSalvaged(u32 index) { } THUMB void ItemManager::RemoveItem(ItemFlag item) { - RESET_FLAG(mItemFlags.flags, item); + UNSET_FLAG(mItemFlags.flags, item); if (item >= ItemFlag_EQUIP_START && item <= ItemFlag_EQUIP_END) { (*mAmmo)[item] = 0; } @@ -993,7 +994,7 @@ ARM void ItemManager::func_ov00_020ae4dc(s32 param1) { ARM void ItemManager::SetPotion(u32 index, Potion potion) { mPotions[index] = potion; if (potion == Potion_None) { - RESET_FLAG(mItemFlags.flags, index + ItemFlag_PotionA); + UNSET_FLAG(mItemFlags.flags, index + ItemFlag_PotionA); } else { SET_FLAG(mItemFlags.flags, index + ItemFlag_PotionA); } -- cgit v1.2.3