pokecrystal-board/engine/tmhm.asm
Remy Oukaour 31cce83e9b Move lots of data tables into individual data/ files
(This is not expected to be their final location, but it makes them easier to relocate when necessary, and easier for users to edit until the whole project's file structure is finalized.)
2017-12-11 14:23:18 -05:00

51 lines
572 B
NASM
Executable File

CanLearnTMHMMove: ; 11639
ld a, [CurPartySpecies]
ld [CurSpecies], a
call GetBaseData
ld hl, BaseTMHM
push hl
ld a, [wPutativeTMHMMove]
ld b, a
ld c, 0
ld hl, TMHMMoves
.loop
ld a, [hli]
and a
jr z, .end
cp b
jr z, .asm_11659
inc c
jr .loop
.asm_11659
pop hl
ld b, CHECK_FLAG
push de
ld d, 0
predef FlagPredef
pop de
ret
.end
pop hl
ld c, 0
ret
; 1166a
GetTMHMMove: ; 1166a
ld a, [wd265]
dec a
ld hl, TMHMMoves
ld b, 0
ld c, a
add hl, bc
ld a, [hl]
ld [wd265], a
ret
; 1167a
TMHMMoves: ; 1167a
INCLUDE "data/tmhm_moves.asm"
; 116b7