summaryrefslogtreecommitdiff
path: root/home/text.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-07-18 01:17:03 -0500
committerdannye <corrnondacqb@yahoo.com>2016-07-18 01:17:03 -0500
commit80bae03975a84dadf080c79f52216866dd410cf8 (patch)
tree282a30407e6d6f9e8aa6e665ebf0e826ccc79569 /home/text.asm
parenta51037eeeedb03e29d8675626018cf02750882fa (diff)
Clean up text commands
Diffstat (limited to 'home/text.asm')
-rw-r--r--home/text.asm50
1 files changed, 27 insertions, 23 deletions
diff --git a/home/text.asm b/home/text.asm
index e9c0efdd..88db9377 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -11,7 +11,7 @@ TextBoxBorder::
ld [hl], a
pop hl
- ld de, 20
+ ld de, SCREEN_WIDTH
add hl, de
; middle rows
@@ -24,7 +24,7 @@ TextBoxBorder::
ld [hl], "│"
pop hl
- ld de, 20
+ ld de, SCREEN_WIDTH
add hl, de
dec b
jr nz, .next
@@ -268,7 +268,7 @@ Char58::
ld a,[wLinkState]
cp LINK_STATE_BATTLING
jp z,Next1AA2
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
Next1AA2::
call ProtectedDelay3
@@ -286,7 +286,7 @@ Char58Text::
Char51::
push de
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
@@ -301,7 +301,7 @@ Char51::
Char49::
push de
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
@@ -317,7 +317,7 @@ Char49::
jp PlaceNextChar_inc
Char4B::
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
push de
@@ -328,29 +328,33 @@ Char4B::
;fall through
Char4C::
push de
- call Next1B18
- call Next1B18
+ call ScrollTextUp
+ call ScrollTextUp
coord hl, 1, 16
pop de
jp PlaceNextChar_inc
-Next1B18::
- coord hl, 0, 14
- coord de, 0, 13
- ld b,60
-.next
+; move both rows of text in the normal text box up one row
+; always called twice in a row
+; first time, copy the two rows of text to the "in between" rows that are usually emtpy
+; second time, copy the bottom row of text into the top row of text
+ScrollTextUp::
+ coord hl, 0, 14 ; top row of text
+ coord de, 0, 13 ; empty line above text
+ ld b, SCREEN_WIDTH * 3
+.copyText
ld a,[hli]
ld [de],a
inc de
dec b
- jr nz,.next
+ jr nz,.copyText
coord hl, 1, 16
ld a, " "
ld b,SCREEN_WIDTH - 2
-.next2
+.clearText
ld [hli],a
dec b
- jr nz,.next2
+ jr nz,.clearText
; wait five frames
ld b,5
@@ -509,7 +513,7 @@ TextCommand06::
ld a,[wLinkState]
cp a,LINK_STATE_BATTLING
jp z,TextCommand0D
- ld a,$ee ; down arrow
+ ld a,"▼"
Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box
push bc
call ManualTextScroll ; blink arrow and wait for A or B to be pressed
@@ -525,8 +529,8 @@ TextCommand06::
TextCommand07::
ld a," "
Coorda 18, 16 ; place blank space in lower right corner of dialogue text box
- call Next1B18 ; scroll up text
- call Next1B18
+ call ScrollTextUp
+ call ScrollTextUp
pop hl
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
@@ -626,10 +630,10 @@ TextCommand0B::
; format: text command ID, sound ID or cry ID
TextCommandSounds::
- db $0B,SFX_GET_ITEM_1
+ db $0B,SFX_GET_ITEM_1 ; actually plays SFX_LEVEL_UP when the battle music engine is loaded
db $12,SFX_CAUGHT_MON
- db $0E,SFX_POKEDEX_RATING
- db $0F,SFX_GET_ITEM_1
+ db $0E,SFX_POKEDEX_RATING ; unused?
+ db $0F,SFX_GET_ITEM_1 ; unused?
db $10,SFX_GET_ITEM_2
db $11,SFX_GET_KEY_ITEM
db $13,SFX_DEX_PAGE_ADDED
@@ -648,7 +652,7 @@ TextCommand0C::
ld h,b
ld l,c
.loop
- ld a,$75 ; ellipsis
+ ld a,"…"
ld [hli],a
push de
call Joypad