summaryrefslogtreecommitdiff
path: root/engine/items
diff options
context:
space:
mode:
authorDaniel Harding <corrnondacqb@yahoo.com>2015-07-18 12:29:05 -0500
committerDaniel Harding <corrnondacqb@yahoo.com>2015-07-18 12:29:05 -0500
commit54c1893d579cdf6853c6a64953bae281a6075fe3 (patch)
tree11717604336caa83ddcdb1bd8b1c765d54cf708b /engine/items
parenta002d01860a2c5a745e5837c4ff9f5d3c9e110fe (diff)
parentfc9af362ae65d24c66b39ea7759637cc9c1f9b0a (diff)
Merge pull request #104 from YamaArashi/master
fix variable naming
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"