mirror of
https://github.com/zeldaret/ph
synced 2026-05-30 00:46:38 -04:00
Decomp ItemManager::GetEquipItem
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user