diff options
| author | Yanis <35189056+Yanis002@users.noreply.github.com> | 2025-07-22 16:17:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-22 16:17:02 +0200 |
| commit | cf8f5a80b13c4edd7fd8ebb33ab0de81d64f609b (patch) | |
| tree | a9ec152f01d7fa0760aa26a69dec69b4c77dce86 /src/00_Core/Item/ItemManager.cpp | |
| parent | 383ca6aaa2b322869fe304eb5c277150859bfcc0 (diff) | |
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 <Yanis002@users.noreply.github.com>
Co-authored-by: Aetias <aetias@outlook.com>
Diffstat (limited to 'src/00_Core/Item/ItemManager.cpp')
| -rw-r--r-- | src/00_Core/Item/ItemManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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);
}
|
