mirror of
https://github.com/zeldaret/ph
synced 2026-07-09 06:03:28 -04:00
Decomp ItemManager::GiveKeys
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "Map/MapManager.hpp"
|
||||
|
||||
extern u32 *data_027e0ce0[];
|
||||
|
||||
@@ -785,3 +784,10 @@ ARM void ItemManager::GiveRupees(s16 amount, bool param2) {
|
||||
ARM unk32 ItemManager::GetNumKeys() const {
|
||||
return gMapManager->GetNumKeys();
|
||||
}
|
||||
|
||||
THUMB void ItemManager::GiveKeys(u32 amount) {
|
||||
s32 keys = amount + gMapManager->GetNumKeys();
|
||||
if (keys >= MAX_KEYS) keys = MAX_KEYS;
|
||||
if (keys <= 0) keys = 0;
|
||||
gMapManager->SetNumKeys(keys);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user