diff options
Diffstat (limited to 'engine/items/tm_prices.asm')
-rwxr-xr-x | engine/items/tm_prices.asm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm index 7c5c56fa..80e6bf3c 100755 --- a/engine/items/tm_prices.asm +++ b/engine/items/tm_prices.asm @@ -1,12 +1,11 @@ -GetMachinePrice: ; 7bf86 (1e:7f86) +GetMachinePrice: ; Input: [wcf91] = Item Id of a TM -; Output: Stores the 2-byte TM price in [H_DOWNARROWBLINKCNT1] and [H_DOWNARROWBLINKCNT2] -; as a BCD +; Output: Stores the TM price at hItemPrice ld a, [wcf91] ; a contains TM item id sub TM_01 ret c ld d, a - ld hl, TechnicalMachinePrices ; $7fa7 + ld hl, TechnicalMachinePrices srl a ld c, a ld b, 0 @@ -17,10 +16,10 @@ GetMachinePrice: ; 7bf86 (1e:7f86) swap a .highNybbleIsPrice and $f0 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hItemPrice + 1], a xor a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - ld [$ff8d], a + ld [hItemPrice], a + ld [hItemPrice + 2], a ret INCLUDE "data/tm_prices.asm" |