mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Document high nybble of PrintNum c
register
This commit is contained in:
parent
c048b24d25
commit
d6db010429
@ -2,6 +2,8 @@ _PrintNum::
|
|||||||
; Print c digits of the b-byte value from de to hl.
|
; Print c digits of the b-byte value from de to hl.
|
||||||
; Allows 2 to 7 digits. For 1-digit numbers, add
|
; Allows 2 to 7 digits. For 1-digit numbers, add
|
||||||
; the value to char "0" instead of calling PrintNum.
|
; the value to char "0" instead of calling PrintNum.
|
||||||
|
; The high nybble of the c register specifies how many of the total amount of
|
||||||
|
; digits will be in front of the decimal point.
|
||||||
; Some extra flags can be given in bits 5-7 of b.
|
; Some extra flags can be given in bits 5-7 of b.
|
||||||
; Bit 5: money if set (unless left-aligned without leading zeros)
|
; Bit 5: money if set (unless left-aligned without leading zeros)
|
||||||
; Bit 6: right-aligned if set
|
; Bit 6: right-aligned if set
|
||||||
|
@ -124,14 +124,16 @@ DisplayDexEntry:
|
|||||||
jr z, .skip_height
|
jr z, .skip_height
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
; Print the height with two of the four digits will be in front of the decimal point
|
||||||
ld hl, sp+$0
|
ld hl, sp+$0
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
hlcoord 12, 7
|
hlcoord 12, 7
|
||||||
lb bc, 2, PRINTNUM_MONEY | 4
|
lb bc, 2, (2 << 4) | 4
|
||||||
call PrintNum
|
call PrintNum
|
||||||
|
; Replace the decimal point with a ft symbol
|
||||||
hlcoord 14, 7
|
hlcoord 14, 7
|
||||||
ld [hl], $5e ; ft symbol
|
ld [hl], $5e
|
||||||
pop af
|
pop af
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
@ -148,11 +150,12 @@ DisplayDexEntry:
|
|||||||
or d
|
or d
|
||||||
jr z, .skip_weight
|
jr z, .skip_weight
|
||||||
push de
|
push de
|
||||||
|
; Print the height with four of the five digits will be in front of the decimal point
|
||||||
ld hl, sp+$0
|
ld hl, sp+$0
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
hlcoord 11, 9
|
hlcoord 11, 9
|
||||||
lb bc, 2, PRINTNUM_RIGHTALIGN | 5
|
lb bc, 2, (4 << 4) | 5
|
||||||
call PrintNum
|
call PrintNum
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user