summaryrefslogtreecommitdiff
path: root/home/inventory.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-11-05 23:50:03 -0500
committerGitHub <noreply@github.com>2020-11-05 23:50:03 -0500
commitd3f13528754b985e892385dbd88c3c9a95681f1b (patch)
tree4a18885606996ff59bb714afb5db9a548e2f94a7 /home/inventory.asm
parentabaf9fee7c73e708ef8c3e7a1ed710bfc9ec6f6e (diff)
parente16dec874a239c162680b169391d3c0c7ee1fc70 (diff)
Merge pull request #301 from Rangi42/master
Sync home and macro code with pokeyellow
Diffstat (limited to 'home/inventory.asm')
-rw-r--r--home/inventory.asm21
1 files changed, 2 insertions, 19 deletions
diff --git a/home/inventory.asm b/home/inventory.asm
index ebaa4047..1100666f 100644
--- a/home/inventory.asm
+++ b/home/inventory.asm
@@ -22,15 +22,7 @@ AddAmountSoldToMoney::
; [wWhichPokemon] = index (within the inventory) of the item to remove
; [wItemQuantity] = quantity to remove
RemoveItemFromInventory::
- ldh a, [hLoadedROMBank]
- push af
- ld a, BANK(RemoveItemFromInventory_)
- ldh [hLoadedROMBank], a
- ld [MBC1RomBank], a
- call RemoveItemFromInventory_
- pop af
- ldh [hLoadedROMBank], a
- ld [MBC1RomBank], a
+ homecall RemoveItemFromInventory_
ret
; function to add an item (in varying quantities) to the player's bag or PC box
@@ -41,15 +33,6 @@ RemoveItemFromInventory::
; sets carry flag if successful, unsets carry flag if unsuccessful
AddItemToInventory::
push bc
- ldh a, [hLoadedROMBank]
- push af
- ld a, BANK(AddItemToInventory_)
- ldh [hLoadedROMBank], a
- ld [MBC1RomBank], a
- call AddItemToInventory_
- pop bc
- ld a, b
- ldh [hLoadedROMBank], a
- ld [MBC1RomBank], a
+ homecall_sf AddItemToInventory_
pop bc
ret