From 0e1148fb2c754c579284b609c4edbfd676c8d044 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 12 Jan 2018 03:15:58 -0500 Subject: Move code out of data/ --- engine/routines/printitemdescription.asm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 engine/routines/printitemdescription.asm (limited to 'engine/routines/printitemdescription.asm') diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm new file mode 100644 index 000000000..e6d087dae --- /dev/null +++ b/engine/routines/printitemdescription.asm @@ -0,0 +1,31 @@ +PrintItemDescription: ; 0x1c8955 +; Print the description for item [CurSpecies] at de. + + ld a, [CurSpecies] + cp TM01 + jr c, .not_a_tm + + ld [CurItem], a + push de + farcall GetTMHMItemMove + pop hl + ld a, [wd265] + ld [CurSpecies], a + predef PrintMoveDesc + ret + +.not_a_tm + push de + ld hl, ItemDescriptions + ld a, [CurSpecies] + 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 +; 0x1c8987 -- cgit v1.2.3 From 80480821142d7a7b16dd2b1a98a213e7b389af0f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 14:30:10 -0500 Subject: Remove Predef_ prefix from routines listed in PredefPointers --- engine/routines/printitemdescription.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/routines/printitemdescription.asm') diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm index 4da061fda..e6d087dae 100644 --- a/engine/routines/printitemdescription.asm +++ b/engine/routines/printitemdescription.asm @@ -11,7 +11,7 @@ PrintItemDescription: ; 0x1c8955 pop hl ld a, [wd265] ld [CurSpecies], a - predef Predef_PrintMoveDesc + predef PrintMoveDesc ret .not_a_tm -- cgit v1.2.3