.db 0x0, 0x0, 0x0, 0x3, 0x4, 0x0, 0x0, 0x0
.db 0x0, 0x0, 0x0, 0x3, 0x4, 0x0, 0x0, 0x0
.db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1
-.db 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
+.db 0x5, 0x0, 0x0, 0x0, 0x0, 0x5, 0x5, 0x0
.db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
.db 0x0, 0x0, 0x0, 0x3, 0x2, 0x0, 0x0, 0x0
.db 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
+
+#define DEBUG_COLLISION_MARKER 0x9E
+
+ ; draws a point in debug mode
+ ; inputs:
+ ; $1: point ptr name
+ ; hl: oam ptr
+ ; returns:
+ ; hl: next oam
+#macro debug_draw_point
+ ; y pos
+ ld a, [scroll_y]
+ ld b, a
+ ld a, [$1] ; y
+
+ add a, OBJ_OFF_Y
+ sub a, b
+ ld [hl+], a
+
+ ; x pos
+ ld a, [scroll_x]
+ ld b, a
+ ld a, [$1+1] ; x
+
+ add a, OBJ_OFF_X
+ sub a, b
+ ld [hl+], a
+
+ ; tile
+ ld a, DEBUG_COLLISION_MARKER
+ ld [hl+], a
+
+ ; flags
+ xor a, a
+ ld [hl+], a
+#endmacro
+
+ ; draws col_point_nn
+ ; using the debug sprite
+ ; if enabled
+debug_draw_collision:
+ ld a, 5
+ call oamalloc
+
+ ; draw each point
+ debug_draw_point col_point_tl
+ debug_draw_point col_point_bl
+ debug_draw_point col_point_tr
+ debug_draw_point col_point_br
+ debug_draw_point col_point_ct
+
+ ret