summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2018-03-05 20:16:05 +0100
committerxCrystal <rgr.crystal@gmail.com>2018-03-05 20:16:05 +0100
commit525242f4987903746596e828fff657aaed10105b (patch)
tree65c5ca5feff407d51d38aa44a5dae6501d881e11 /src/engine
parent242b529459eb4b8bc26f298568fbf0a82e2112d3 (diff)
TX_SYMBOL constants and clean up text
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/bank6.asm12
-rw-r--r--src/engine/home.asm16
2 files changed, 14 insertions, 14 deletions
diff --git a/src/engine/bank6.asm b/src/engine/bank6.asm
index 82e9cdd..1a85a24 100644
--- a/src/engine/bank6.asm
+++ b/src/engine/bank6.asm
@@ -56,16 +56,16 @@ _CopyCardNameAndLevel: ; 18000 (6:4000)
ld a, [wLoadedCard1Level]
or a
jr z, .done
- ld a, TX_LARGE
+ ld a, TX_SYMBOL
ld [hli], a
- ld [hl], $11 ; Lv
+ ld [hl], LOW("<Lv>")
inc hl
ld a, [wLoadedCard1Level]
cp 10
jr c, .one_digit
- ld [hl], TX_LARGE
+ ld [hl], TX_SYMBOL
inc hl
- ld b, $20 - 1
+ ld b, LOW("<0>") - 1
.first_digit_loop
inc b
sub 10
@@ -74,9 +74,9 @@ _CopyCardNameAndLevel: ; 18000 (6:4000)
ld [hl], b ; first digit
inc hl
.one_digit
- ld [hl], TX_LARGE
+ ld [hl], TX_SYMBOL
inc hl
- add $20
+ add LOW("<0>")
ld [hl], a ; last (or only) digit
inc hl
.done
diff --git a/src/engine/home.asm b/src/engine/home.asm
index d6d2bc0..002488d 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -6174,7 +6174,7 @@ Uppercase: ; 23b1 (0:23b1)
ret c
cp $7b
ret nc
- sub $20
+ sub "a" - "A"
ld e, a
ret
@@ -6228,7 +6228,7 @@ Func_23d3: ; 23d3 (0:23d3)
INCROM $23fd, $245d
-; convert the number at hl to large (TX_LARGE) text format and write it to wcaa0
+; convert the number at hl to TX_SYMBOL text format and write it to wcaa0
; replace leading zeros with $00
TwoByteNumberToLargeText_TrimLeadingZeros: ; 245d (0:245d)
push de
@@ -6252,14 +6252,14 @@ TwoByteNumberToLargeText_TrimLeadingZeros: ; 245d (0:245d)
.digit_loop
inc hl
ld a, [hl]
- cp $20
+ cp LOW("<0>")
jr nz, .done ; jump if not zero
- ld [hl], $0 ; trim leading zero
+ ld [hl], LOW("< >") ; trim leading zero
inc hl
dec e
jr nz, .digit_loop
dec hl
- ld [hl], $20
+ ld [hl], LOW("<0>")
.done
dec hl
pop bc
@@ -6267,10 +6267,10 @@ TwoByteNumberToLargeText_TrimLeadingZeros: ; 245d (0:245d)
ret
.get_digit
- ld a, TX_LARGE
+ ld a, TX_SYMBOL
ld [de], a
inc de
- ld a, $20 - 1
+ ld a, LOW("<0>") - 1
.substract_loop
inc a
add hl, bc
@@ -7486,7 +7486,7 @@ Func_2d43: ; 2d43 (0:2d43)
ld a, [hli]
or a ; TX_END
jr z, .asm_2d79
- cp TX_LARGE
+ cp TX_SYMBOL
jr c, .asm_2d65
cp $10
jr nc, .asm_2d65