mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 15:12:18 +13:00
Add subdirectories to engine/ similar to pokecrystal
This commit is contained in:
parent
5559d51c86
commit
f275790aec
124 changed files with 342 additions and 346 deletions
17
engine/items/subtract_paid_money.asm
Normal file
17
engine/items/subtract_paid_money.asm
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
; subtracts the amount the player paid from their money
|
||||
; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
|
||||
SubtractAmountPaidFromMoney_::
|
||||
ld de, wPlayerMoney
|
||||
ld hl, hMoney ; total price of items
|
||||
ld c, 3 ; length of money in bytes
|
||||
call StringCmp
|
||||
ret c
|
||||
ld de, wPlayerMoney + 2
|
||||
ld hl, hMoney + 2 ; total price of items
|
||||
ld c, 3 ; length of money in bytes
|
||||
predef SubBCDPredef ; subtract total price from money
|
||||
ld a, MONEY_BOX
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID ; redraw money text box
|
||||
and a
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue