aboutsummaryrefslogtreecommitdiff
path: root/utils.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-04-08 13:13:21 +0200
committerAstatin <[email protected]>2025-04-08 13:13:21 +0200
commit85c478d0c2368c0a38fa3e6aa4d4e9070ea63fc3 (patch)
treebebf24df46c6520f27f70c2fc932bc132d252e63 /utils.gbasm
parentfb8e853fd0c6660696e762f67877b4d24a9f4c22 (diff)
Add loading screen with the floor count on dungeon generation
Diffstat (limited to 'utils.gbasm')
-rw-r--r--utils.gbasm15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils.gbasm b/utils.gbasm
index fe03152..ba808bd 100644
--- a/utils.gbasm
+++ b/utils.gbasm
@@ -217,6 +217,21 @@ Print_str: ; Memory Tilemap position in HL, Text address in BC, FF ended
POP AF
RET
+strlen: ; Text address in HL, FF ended. Result in A
+ PUSH HL
+ PUSH BC
+ .loop:
+ LD A, (HL+)
+ CP $FF
+ JR Z, =.end
+ INC B
+ JR =.loop
+ .end:
+ LD A, B
+ POP BC
+ POP HL
+ RET
+
MUL: ; B x C => EA
XOR A
LD E, $00