2018-06-24 14:09:41 +00:00
|
|
|
PrintLevel::
|
2018-04-05 04:35:14 +00:00
|
|
|
; 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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
PrintLevel_Force3Digits::
|
2018-04-05 04:35:14 +00:00
|
|
|
; Print :L and all 3 digits
|
|
|
|
ld [hl], "<LV>"
|
|
|
|
inc hl
|
|
|
|
ld c, 3
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Print8BitNumRightAlign::
|
2018-04-05 04:35:14 +00:00
|
|
|
ld [wd265], a
|
|
|
|
ld de, wd265
|
|
|
|
ld b, PRINTNUM_RIGHTALIGN | 1
|
|
|
|
jp PrintNum
|