projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cfdc43
)
strings: fixed puts printing the 0 character
author
Lukas Krickl
<lukas@krickl.dev>
Tue, 1 Oct 2024 15:09:00 +0000
(17:09 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Tue, 1 Oct 2024 15:09:00 +0000
(17:09 +0200)
src/strings.s
patch
|
blob
|
history
src/video.s
patch
|
blob
|
history
diff --git
a/src/strings.s
b/src/strings.s
index 5fd229cdf14d5e0d93879647bcee59d887c8a3c8..e2691bd03f1ba6b95bd118fb79471c781d8ad982 100644
(file)
--- a/
src/strings.s
+++ b/
src/strings.s
@@
-3,8
+3,10
@@
.rep i, 26, 1, .scc i + 'a' = i + 10
.rep i, 26, 1, .scc i + 'A' = i + 10
+#define EMPTY_TILE 0x30
+
; map space to empty tile
-.scc 0x20 =
0x30
+.scc 0x20 =
EMPTY_TILE
STR_TITLE:
.str "game"
@@
-18,9
+20,10
@@
STR_TITLE:
puts:
@loop:
ld a, [hl+]
+ cp a, 0
+ jr z, @done REL
ld [de], a
inc de
- cp a, 0
- jp nz, @loop
-
+ jr @loop REL
+@done:
ret
diff --git
a/src/video.s
b/src/video.s
index 7b2144ccda44e3949db419325769cf302f03ee20..d7b97dd20c92ba0e5d4704a37842b714c60e392e 100644
(file)
--- a/
src/video.s
+++ b/
src/video.s
@@
-28,7
+28,6
@@
lcd_off:
lcd_on:
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_OBJON
ld [RLCD], a
- call vblank_wait
ret
@@
-37,7
+36,7
@@
video_init:
ld hl, SCRN0
ld bc, 1024
- ld d,
0
+ ld d,
EMPTY_TILE
call memset
; set up bgp