debug: Fixed x positons for right points in debug rectangle
authorLukas Krickl <lukas@krickl.dev>
Sun, 21 Sep 2025 15:59:53 +0000 (17:59 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sun, 21 Sep 2025 15:59:53 +0000 (17:59 +0200)
src/debug.s

index d4e0882477c7da9a3896045cdeab2968b2ec998c..66f26bc85a3a9fc4d832a3f654324046a19b1e87 100644 (file)
@@ -152,8 +152,7 @@ dbg_rect_draw:
 
        ; write bottomt right x
        ld a, [de]
-       sub a, c
-       add a, OBJ_OFF_X + 8 
+       add a, c ; width + x
        ld [hl+], a
 
        ; write tile 
@@ -180,8 +179,7 @@ dbg_rect_draw:
        ; write top left x
        inc de ; de = width
        ld a, [de]
-       sub a, c
-       add a, OBJ_OFF_X + 8 
+       add a, c ; width + x 
        ld [hl+], a
 
        ; write tile