Decomp ItemManager::GetEquipItem

This commit is contained in:
Aetias
2024-02-17 00:44:31 +01:00
parent 91643888ca
commit de3c2636d7
4 changed files with 13 additions and 11 deletions
-11
View File
@@ -3,17 +3,6 @@
.text
.global _ZN11ItemManager12GetEquipItemEj
arm_func_start _ZN11ItemManager12GetEquipItemEj
_ZN11ItemManager12GetEquipItemEj: ; 0x020ad714
mvn r2, #0
cmp r1, r2
moveq r0, #0
ldrne r0, [r0, #0xac]
ldrne r0, [r0, r1, lsl #2]
bx lr
arm_func_end _ZN11ItemManager12GetEquipItemEj
.global _ZNK11ItemManager7GetAmmoEj
arm_func_start _ZNK11ItemManager7GetAmmoEj
_ZNK11ItemManager7GetAmmoEj: ; 0x020ad72c
@@ -81,3 +81,4 @@
.extern data_ov00_020eec68
.extern _ZN11ItemManager14Sword_vfunc_38Ej
.extern _ZN11ItemManager15Shield_vfunc_38Ej
.extern _ZN11ItemManager12GetEquipItemEj
+2
View File
@@ -1,6 +1,8 @@
#ifndef PH_GLOBAL_H
#define PH_GLOBAL_H
#define NULL 0
#define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[pos >> 5]) != 0)
#ifdef NONMATCHING
+10
View File
@@ -253,3 +253,13 @@ bool ItemManager::EquipItem_vfunc_3c(Vec4p *param1, ItemFlag equipId) {
void ItemManager::EquipItem_vfunc_2c(ItemFlag equipId) {
(*this->mEquipItems)[equipId]->vfunc_2c();
}
#pragma interworking on
EquipItem* ItemManager::GetEquipItem(ItemFlag equipId) {
if (equipId == ItemFlag_None) {
return NULL;
} else {
return (*this->mEquipItems)[equipId];
}
}
#pragma interworking off