summaryrefslogtreecommitdiff
path: root/engine/items/print_item_description.asm
blob: e2ed87853dd6a10050f9177fad0b81ccd025f4e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PrintItemDescription:
; Print the description for item [wCurSpecies] at de.

	ld a, [wCurSpecies]
	cp TM01
	jr c, .not_a_tm

	ld [wCurItem], a
	push de
	call GetTMHMItemMove
	pop hl
	ld a, [wTempTMHM]
	ld [wCurSpecies], a
	call PrintMoveDescription
	ret

.not_a_tm
	push de
	ld hl, ItemDescriptions
	ld a, [wCurSpecies]
	dec a
	ld c, a
	ld b, 0
	add hl, bc
	add hl, bc
	ld a, BANK(ItemDescriptions)
	call GetFarWord
	ld d, h
	ld e, l
	pop hl
	ld a, BANK(ItemDescriptions)
	jp PlaceFarString