summaryrefslogtreecommitdiff
path: root/engine/routines/printitemdescription.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2018-01-22 01:06:48 -0500
committerGitHub <noreply@github.com>2018-01-22 01:06:48 -0500
commitc60f1331fef22b886adf3472d2b4f348832cfaf7 (patch)
tree5a471fad61e406f5b3ca1aba67ced0186de01c52 /engine/routines/printitemdescription.asm
parentf27f79488a460f0a89670f3611e1e9e175baf5d6 (diff)
parent7fba864883732ccecb1221ae7ff97492d112362a (diff)
Merge pull request #456 from Rangi42/master
OAM data documentation; move more content into data/; move palettes into gfx/; more code+script constants; consistent map naming
Diffstat (limited to 'engine/routines/printitemdescription.asm')
-rw-r--r--engine/routines/printitemdescription.asm31
1 files changed, 31 insertions, 0 deletions
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