From d27fb4554dda2b858b2fb3c0ea8585a2e782c0e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Wed, 4 Jul 2018 02:08:21 +0200 Subject: Func_2832 --- src/engine/home.asm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3