From ca26030e800318d48aec501e6f470eea8d4299c0 Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 6 Feb 2025 17:46:09 +0900 Subject: Add energy points to the gui --- utils.gbasm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'utils.gbasm') diff --git a/utils.gbasm b/utils.gbasm index 8291ac2..4f7e7f7 100644 --- a/utils.gbasm +++ b/utils.gbasm @@ -145,6 +145,25 @@ Print_8bit: ; Number in A, Memory Tilemap position in HL POP AF RET +Print_8bit_Thin: ; Number in A, Memory Tilemap position in HL + PUSH AF + PUSH BC + + LD C, A + SWAP A ; We start by the highest nibble + AND $0f + OR $b0 + LD (HL+), A + + LD A, C + AND $0f ; Then the lowest + OR $b0 + LD (HL+), A + + POP BC + POP AF + RET + Print_str: ; Memory Tilemap position in HL, Text address in BC, FF ended PUSH AF PUSH BC -- cgit v1.2.3-70-g09d2