blob: d10b8f8a12f0e5f447ce878742ae8ea32313055c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
PrintLevel::
; Print wTempMonLevel at hl
ld a, [wTempMonLevel]
ld [hl], "<LV>"
inc hl
; How many digits?
ld c, 2
cp 100 ; This is distinct from MAX_LEVEL.
jr c, Print8BitNumRightAlign
; 3-digit numbers overwrite the :L.
dec hl
inc c
jr Print8BitNumRightAlign
PrintLevel_Force3Digits::
; Print :L and all 3 digits
ld [hl], "<LV>"
inc hl
ld c, 3
Print8BitNumRightAlign::
ld [wDeciramBuffer], a
ld de, wDeciramBuffer
ld b, PRINTNUM_RIGHTALIGN | 1
jp PrintNum
|