pokecrystal/engine/items/print_item_description.asm

33 lines
469 B
NASM
Raw Normal View History

PrintItemDescription:
2018-01-23 22:39:09 +00:00
; Print the description for item [wCurSpecies] at de.
2018-01-12 08:15:58 +00:00
2018-01-23 22:39:09 +00:00
ld a, [wCurSpecies]
2018-01-12 08:15:58 +00:00
cp TM01
jr c, .not_a_tm
2018-01-23 22:39:09 +00:00
ld [wCurItem], a
2018-01-12 08:15:58 +00:00
push de
farcall GetTMHMItemMove
pop hl
ld a, [wTempTMHM]
2018-01-23 22:39:09 +00:00
ld [wCurSpecies], a
predef PrintMoveDescription
2018-01-12 08:15:58 +00:00
ret
.not_a_tm
push de
ld hl, ItemDescriptions
2018-01-23 22:39:09 +00:00
ld a, [wCurSpecies]
2018-01-12 08:15:58 +00:00
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld e, [hl]
inc hl
ld d, [hl]
pop hl
jp PlaceString
INCLUDE "data/items/descriptions.asm"