2018-06-24 07:09:41 -07:00
|
|
|
PrintLevel::
|
2018-04-04 21:35:14 -07: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.
|
2019-11-03 17:17:04 -08:00
|
|
|
jr c, Print8BitNumLeftAlign
|
2018-04-04 21:35:14 -07:00
|
|
|
|
|
|
|
; 3-digit numbers overwrite the :L.
|
|
|
|
dec hl
|
|
|
|
inc c
|
2019-11-03 17:17:04 -08:00
|
|
|
jr Print8BitNumLeftAlign
|
2018-04-04 21:35:14 -07:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintLevel_Force3Digits::
|
2018-04-04 21:35:14 -07:00
|
|
|
; Print :L and all 3 digits
|
|
|
|
ld [hl], "<LV>"
|
|
|
|
inc hl
|
|
|
|
ld c, 3
|
|
|
|
|
2019-11-03 17:17:04 -08:00
|
|
|
Print8BitNumLeftAlign::
|
2018-07-28 16:27:34 -07:00
|
|
|
ld [wDeciramBuffer], a
|
|
|
|
ld de, wDeciramBuffer
|
2019-11-03 17:17:04 -08:00
|
|
|
ld b, PRINTNUM_LEFTALIGN | 1
|
2018-04-04 21:35:14 -07:00
|
|
|
jp PrintNum
|