summaryrefslogtreecommitdiff
path: root/engine/items/tms.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-07-12 09:02:49 -0400
committeryenatch <yenatch@gmail.com>2014-07-12 09:02:49 -0400
commitfb11ff7e55be56cef9234c8443614f04f2157a1e (patch)
treea6aa8d0745bd07d0b80090491b5e4b6652de4420 /engine/items/tms.asm
parent15427f532085846ab6b51719be687951a094cb6c (diff)
parent9f29f21d9d43baa7124991dcf3b093fc6c615706 (diff)
Merge pull request #48 from yenatch/master
Clean up post-split main.asm. Get rid of static wram addresses. Lay out a foundation for Yellow.
Diffstat (limited to 'engine/items/tms.asm')
-rwxr-xr-xengine/items/tms.asm19
1 files changed, 9 insertions, 10 deletions
diff --git a/engine/items/tms.asm b/engine/items/tms.asm
index b0cfd29c..ef427860 100755
--- a/engine/items/tms.asm
+++ b/engine/items/tms.asm
@@ -1,11 +1,11 @@
-; tests if mon [$cf91] can learn move [$d0e0]
-TestMonMoveCompatibility: ; 1373e (4:773e)
- ld a, [$cf91]
- ld [$d0b5], a
+; tests if mon [wcf91] can learn move [wd0e0]
+CanLearnTM: ; 1373e (4:773e)
+ ld a, [wcf91]
+ ld [wd0b5], a
call GetMonHeader
ld hl, W_MONHLEARNSET
push hl
- ld a, [$d0e0]
+ ld a, [wd0e0]
ld b, a
ld c, $0
ld hl, TechnicalMachines
@@ -18,20 +18,19 @@ TestMonMoveCompatibility: ; 1373e (4:773e)
.TMfoundLoop
pop hl
ld b, $2 ; read corresponding bit from TM compatibility array
- ld a, $10
- jp Predef ; indirect jump to HandleBitArray (f666 (3:7666))
+ predef_jump FlagActionPredef
-; converts TM/HM number in $d11e into move number
+; converts TM/HM number in wd11e into move number
; HMs start at 51
TMToMove: ; 13763 (4:7763)
- ld a, [$d11e]
+ ld a, [wd11e]
dec a
ld hl, TechnicalMachines
ld b, $0
ld c, a
add hl, bc
ld a, [hl]
- ld [$d11e], a
+ ld [wd11e], a
ret
INCLUDE "data/tms.asm"