projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e6d133
)
cells: wip debugging cell out of bounds write
author
Lukas Krickl
<lukas@krickl.dev>
Thu, 24 Apr 2025 03:54:19 +0000
(
05:54
+0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Thu, 24 Apr 2025 03:54:19 +0000
(
05:54
+0200)
src/cells.s
patch
|
blob
|
history
src/macros.inc
patch
|
blob
|
history
diff --git
a/src/cells.s
b/src/cells.s
index 2946925b6fc4bcb763e5ca50e87f8fda90cbd2eb..0af0c3a2c932df96c3b56368e36e62422e3ae439 100644
(file)
--- a/
src/cells.s
+++ b/
src/cells.s
@@
-74,6
+74,10
@@
cell_road_init:
push bc
pop hl ; hl = ptr to tile
ld a, BUILDING_ROAD_NORTH_SOUTH
+
+ assert nc, h, 0x80
+ assert c, h, 0xA0
+
call bg_update_queue_push
ld bc, cell_road_update
diff --git
a/src/macros.inc
b/src/macros.inc
index 728eeac2996ec2761750bb8fa6f46c3f85eef6f0..b618c749deedc902d99a58359fec9d71d199968b 100644
(file)
--- a/
src/macros.inc
+++ b/
src/macros.inc
@@
-84,10
+84,15
@@
; $2: register to assert
; $2: value to assert
#macro assert
- cp $2, $3
+.beginscope
+ push af
+ ld a, $2
+ cp a, $3
jr $1, @noassert REL
- ld b, b
+ BREAK
@noassert:
+ pop af
+.endscope
#endmacro