summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2018-07-04 02:08:21 +0200
committerxCrystal <rgr.crystal@gmail.com>2018-07-04 02:08:21 +0200
commitd27fb4554dda2b858b2fb3c0ea8585a2e782c0e6 (patch)
treef11717e83ab1105378698de708280988a6e8995c /src
parentffb6f0cee9d9654d3ddb00b60cc8dc436aea5dc0 (diff)
Func_2832
Diffstat (limited to 'src')
-rw-r--r--src/engine/home.asm11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 513113d..29c9de2 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -7081,15 +7081,18 @@ Func_2827: ; 2827 (0:2827)
ret
; 0x2832
-Func_2832: ; 2832 (0:2832)
+; convert the number at a to TX_SYMBOL text format and write it to wDefaultText
+; if the first digit is a 0, delete it and shift the number one tile to the left
+OneByteNumberToTxSymbol_TrimLeadingZerosAndAlign: ; 2832 (0:2832)
call OneByteNumberToTxSymbol
ld a, [hli]
- cp $20
- jr nz, .asm_283e
+ cp SYM_0
+ jr nz, .not_zero
+ ; shift number one tile to the left
ld a, [hld]
ld [hli], a
ld [hl], $00
-.asm_283e
+.not_zero
ret
; 0x283f