projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e30924
)
rectangle: point test now returns the byte after the rectangle
author
Lukas Krickl
<lukas@krickl.dev>
Thu, 2 Oct 2025 03:27:21 +0000
(
05:27
+0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Thu, 2 Oct 2025 03:27:21 +0000
(
05:27
+0200)
This may help needing to increment the pointers in the test loop.
src/rectangle.s
patch
|
blob
|
history
diff --git
a/src/rectangle.s
b/src/rectangle.s
index 6bedb4edcbf7968aac6c27f7af0708f99144cfe5..058474a6b5beb72f5ec174b7161075e9ae3b3f19 100644
(file)
--- 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