summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
Diffstat (limited to 'engine/items')
-rwxr-xr-xengine/items/items.asm4
-rwxr-xr-xengine/items/tm_prices.asm9
2 files changed, 6 insertions, 7 deletions
diff --git a/engine/items/items.asm b/engine/items/items.asm
index b65e8f1e..7617ba6c 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -556,11 +556,11 @@ ItemUseSurfboard: ; d9b4 (3:59b4)
jp PrintText
.tryToStopSurfing
xor a
- ld [$ff8c],a
+ ld [hSpriteIndexOrTextID],a
ld d,16 ; talking range in pixels (normal range)
call IsSpriteInFrontOfPlayer2
res 7,[hl]
- ld a,[$ff8c]
+ ld a,[hSpriteIndexOrTextID]
and a ; is there a sprite in the way?
jr nz,.cannotStopSurfing
ld hl,TilePairCollisionsWater
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
index 4decc82d..6bb7f711 100755
--- a/engine/items/tm_prices.asm
+++ b/engine/items/tm_prices.asm
@@ -1,7 +1,6 @@
GetMachinePrice: ; 7bf86 (1e:7f86)
; 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
@@ -17,10 +16,10 @@ GetMachinePrice: ; 7bf86 (1e:7f86)
swap a
.highNybbleIsPrice
and $f0
- ld [H_DOWNARROWBLINKCNT2], a
+ ld [hItemPrice + 1], a
xor a
- ld [H_DOWNARROWBLINKCNT1], a
- ld [$ff8d], a
+ ld [hItemPrice], a
+ ld [hItemPrice + 2], a
ret
INCLUDE "data/tm_prices.asm"