summaryrefslogtreecommitdiff
path: root/engine/items/tm_prices.asm
diff options
context:
space:
mode:
authorU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-22 18:13:20 -0400
committerU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-22 18:13:20 -0400
commit15427f532085846ab6b51719be687951a094cb6c (patch)
treeedea9b189e91641a12dd521756894df84aeeace7 /engine/items/tm_prices.asm
parentea3ba4cde3706b7c77efb705555ec0c86321cbe2 (diff)
Pull a lot of engine out of main.asm
Diffstat (limited to 'engine/items/tm_prices.asm')
-rwxr-xr-xengine/items/tm_prices.asm23
1 files changed, 23 insertions, 0 deletions
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
new file mode 100755
index 00000000..cf74ade2
--- /dev/null
+++ b/engine/items/tm_prices.asm
@@ -0,0 +1,23 @@
+GetMachinePrice: ; 7bf86 (1e:7f86)
+ ld a, [$cf91]
+ sub TM_01
+ ret c
+ ld d, a
+ ld hl, TechnicalMachinePrices ; $7fa7
+ srl a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ srl d
+ jr nc, .asm_7bf9d
+ swap a
+.asm_7bf9d
+ and $f0
+ ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ xor a
+ ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [$ff8d], a
+ ret
+
+INCLUDE "data/tm_prices.asm"