From: Lukas Krickl Date: Thu, 2 Oct 2025 03:27:21 +0000 (+0200) Subject: rectangle: point test now returns the byte after the rectangle X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=2887f8ce43b7e94b95881c8446a770e3c3e9d192;p=gbrg%2F.git rectangle: point test now returns the byte after the rectangle This may help needing to increment the pointers in the test loop. --- diff --git a/src/rectangle.s b/src/rectangle.s index 6bedb4e..058474a 100644 --- a/src/rectangle.s +++ b/src/rectangle.s @@ -158,6 +158,7 @@ rect_br: ; returns: ; a == 1: inside ; a == 0: not inside + ; hl: byte after original rectangle rect_point_test: inc hl ; skip mask @@ -199,7 +200,7 @@ rect_point_test: ; top right ; get top right x - ld a, [hl] + ld a, [hl+] add a, e ; e = x + width capoverflow ld e, a