ref: 3fb29975cac3027b7b7a0b52f58ae6e521045bd8
parent: ab0ca2b16a6c9bdc00e54174498ab3c935cc2d70
author: yenatch <[email protected]>
date: Thu Jul 24 15:27:21 EDT 2014
Relabel GetItemDescription -> PrintItemDescription.
--- a/items/item_descriptions.asm
+++ b/items/item_descriptions.asm
@@ -1,23 +1,26 @@
-GetItemDescription: ; 0x1c8955
- ld a, [$cf60]
+PrintItemDescription: ; 0x1c8955
+; Print the description for item [CurSpecies] at de.
+
+ ld a, [CurSpecies]
cp TM_01
- jr c, .nomovedesc ; if not a TM, use a predefined string
- ld [$d106], a
+ jr c, .not_a_tm
+
+ ld [CurItem], a
push de
- callba Function2c7b6
+ callba GetTMHMItemMove
pop hl
ld a, [$d265]
- ld [$cf60], a
+ ld [CurSpecies], a
predef PrintMoveDesc
ret
-.nomovedesc
+.not_a_tm
push de
ld hl, ItemDescriptions
- ld a, [$cf60]
+ ld a, [CurSpecies]
dec a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
add hl, bc
ld e, [hl]
--- a/main.asm
+++ b/main.asm
@@ -31701,7 +31701,7 @@
cp $ff
ret z
decoord 1, 14
- callba GetItemDescription
+ callba PrintItemDescription
ret
; 0x244e3
@@ -42253,7 +42253,7 @@
ld [$d265], a
ret
-Function2c7b6: ; 2c7b6 (b:47b6)
+GetTMHMItemMove: ; 2c7b6 (b:47b6)
call Function2c7a7
predef GetTMHMMove
ret
@@ -42264,9 +42264,9 @@
push af
res 4, [hl]
ld a, [CurItem] ; $d106
- cp $bf
+ cp TM_01
jr c, .asm_2c7f5
- call Function2c7b6
+ call GetTMHMItemMove
ld a, [$d265]
ld [$d262], a
call GetMoveName