aboutsummaryrefslogtreecommitdiffstats
path: root/engine/items/tm_prices.asm
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-08-30 17:55:02 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-08-30 17:55:02 -0400
commitd2ed7674f499b1fd6c4059da40b8b42c6bf96995 (patch)
treef581489b522fc647477d7b36dee072d553c44fd1 /engine/items/tm_prices.asm
parentMake pokeyellow build to baserom. (diff)
parentMerge pull request #114 from YamaArashi/master (diff)
downloadpokeyellow-d2ed7674f499b1fd6c4059da40b8b42c6bf96995.tar.gz
pokeyellow-d2ed7674f499b1fd6c4059da40b8b42c6bf96995.tar.xz
pokeyellow-d2ed7674f499b1fd6c4059da40b8b42c6bf96995.zip
Merge branch 'master' of https://github.com/iimarckus/pokered
Doesn't build.
Diffstat (limited to 'engine/items/tm_prices.asm')
-rwxr-xr-xengine/items/tm_prices.asm11
1 files changed, 5 insertions, 6 deletions
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
index ccc5fc5a..a3a8c608 100755
--- a/engine/items/tm_prices.asm
+++ b/engine/items/tm_prices.asm
@@ -1,12 +1,11 @@
GetMachinePrice: ; f65d4 (3d:65d4)
; 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: ; f65d4 (3d:65d4)
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"