pokecrystal-board/engine/pokedex/unown_dex.asm

50 lines
561 B
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
UpdateUnownDex:
2018-01-23 14:39:09 -08:00
ld a, [wUnownLetter]
2015-11-30 08:04:14 -08:00
ld c, a
2017-12-09 16:41:03 -08:00
ld b, NUM_UNOWN
2018-01-23 14:39:09 -08:00
ld hl, wUnownDex
2015-11-30 08:04:14 -08:00
.loop
ld a, [hli]
and a
jr z, .done
cp c
ret z
dec b
jr nz, .loop
ret
.done
dec hl
ld [hl], c
ret
2018-06-24 07:09:41 -07:00
PrintUnownWord:
2015-11-30 08:04:14 -08:00
hlcoord 4, 15
ld bc, 12
ld a, " "
call ByteFill
2018-09-09 12:09:51 -07:00
ld a, [wDexCurUnownIndex]
2015-11-30 08:04:14 -08:00
ld e, a
ld d, 0
2018-01-23 14:39:09 -08:00
ld hl, wUnownDex
2015-11-30 08:04:14 -08:00
add hl, de
ld a, [hl]
ld e, a
ld d, 0
ld hl, UnownWords
add hl, de
add hl, de
2015-11-30 08:04:14 -08:00
ld a, [hli]
ld e, a
ld d, [hl]
hlcoord 4, 15
.loop
ld a, [de]
cp -1
ret z
inc de
ld [hli], a
jr .loop
2018-01-25 19:19:24 -08:00
INCLUDE "data/pokemon/unown_words.asm"