ref: f0ae1dcc352cb0f3a2867fdb56e7519ad69a0fd7
parent: abf21e5383b74c82e37d57617b6596fe8b273b30
author: IIMarckus <[email protected]>
date: Fri Oct 29 16:35:17 EDT 2010
decompose PrintText hg-commit-id: 2541bb953956
--- a/pokered.asm
+++ b/pokered.asm
@@ -1151,8 +1151,22 @@
jr nz,.loop\@
ret
-INCBIN "baserom.gbc",$3A8E,$4000 - $3A8E
+INCBIN "baserom.gbc",$3A8E,$3C49 - $3A8E
+PrintText: ; 3C49
+; given a pointer in hl, print the text there
+ push hl
+ ld a,1
+ ld [$D125],a
+ call $30E8
+ call $2429
+ call $3DD7
+ pop hl
+ ld bc,$C4B9
+ jp $1B40
+
+INCBIN "baserom.gbc",$3C5F,$4000 - $3C5F
+
SECTION "bank1",DATA,BANK[$1]
INCBIN "baserom.gbc",$4000,$4000
@@ -3727,7 +3741,7 @@
call CopyData
ld hl,BattleWithdrawText
- call $3C49 ; print text
+ call PrintText
ld a,1
ld [$D11D],a
ld hl,$490E
@@ -3866,7 +3880,7 @@
ld [$D11E],a
call $2FCF ; get item name
ld hl,AIBattleUseItemText
- jp $3C49 ; print text
+ jp PrintText
AIBattleUseItemText:
db $17