mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Separate maps.asm, pics.asm, sprites.asm, and tilesets.asm from main.asm (#251)
Each new file builds its own .o, along with separate main.o and home.o, which necessitates many more "exported::" labels.
This commit is contained in:
parent
ff927ba730
commit
4b853ad676
317 changed files with 2290 additions and 2240 deletions
|
|
@ -4,7 +4,7 @@
|
|||
; [wcf91] = item ID
|
||||
; [wItemQuantity] = item quantity
|
||||
; sets carry flag if successful, unsets carry flag if unsuccessful
|
||||
AddItemToInventory_:
|
||||
AddItemToInventory_::
|
||||
ld a, [wItemQuantity] ; a = item quantity
|
||||
push af
|
||||
push bc
|
||||
|
|
@ -97,7 +97,7 @@ AddItemToInventory_:
|
|||
; hl = address of inventory (either wNumBagItems or wNumBoxItems)
|
||||
; [wWhichPokemon] = index (within the inventory) of the item to remove
|
||||
; [wItemQuantity] = quantity to remove
|
||||
RemoveItemFromInventory_:
|
||||
RemoveItemFromInventory_::
|
||||
push hl
|
||||
inc hl
|
||||
ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
UseItem_:
|
||||
UseItem_::
|
||||
ld a, 1
|
||||
ld [wActionResultOrTookBattleTurn], a ; initialise to success value
|
||||
ld a, [wcf91] ;contains item_ID
|
||||
|
|
@ -2588,7 +2588,7 @@ GetSelectedMoveOffset2:
|
|||
; [wItemQuantity] = quantity to toss
|
||||
; OUTPUT:
|
||||
; clears carry flag if the item is tossed, sets carry flag if not
|
||||
TossItem_:
|
||||
TossItem_::
|
||||
push hl
|
||||
ld a, [wcf91]
|
||||
call IsItemHM
|
||||
|
|
@ -2657,7 +2657,7 @@ TooImportantToTossText:
|
|||
; [wIsKeyItem] = result
|
||||
; 00: item is not key item
|
||||
; 01: item is key item
|
||||
IsKeyItem_:
|
||||
IsKeyItem_::
|
||||
ld a, $01
|
||||
ld [wIsKeyItem], a
|
||||
ld a, [wcf91]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GetMachinePrice:
|
||||
GetMachinePrice::
|
||||
; Input: [wcf91] = Item Id of a TM
|
||||
; Output: Stores the TM price at hItemPrice
|
||||
ld a, [wcf91] ; a contains TM item id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue