aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-11-01 14:08:39 -0400
committerB. Watson <urchlay@slackware.uk>2022-11-01 14:08:39 -0400
commit138136c72bfae906ff68af2c3e912e58ea86d1f2 (patch)
tree93f26bda10599cc80dc30df6908dcf969a3064ca
parent1cf1a42b0eaf807e69608979772d09dbfe00b9fe (diff)
downloaddla-asm-138136c72bfae906ff68af2c3e912e58ea86d1f2.tar.gz
Save a few cycles in drunkwalk.
-rw-r--r--dla.s24
1 files changed, 10 insertions, 14 deletions
diff --git a/dla.s b/dla.s
index 3c61064..d379c42 100644
--- a/dla.s
+++ b/dla.s
@@ -568,27 +568,23 @@ dontplot:
slow_x:
; (-1,0)
ldx cursor_x
- dex
- ldy xoffsets,x
- lda xmasks,x
+ ldy xoffsets-1,x
+ lda xmasks-1,x
and (pixptr),y
bne stick
; (1,0)
- inx
- inx
- ldy xoffsets,x
- lda xmasks,x
+ ldy xoffsets+1,x
+ lda xmasks+1,x
and (pixptr),y
bne stick
check_y:
; (0,-1)
- ldx cursor_y ;3
- dex ;2
- lda lineaddrs_l,x ;5
- sta pixptr ;3
- lda lineaddrs_h,x ;5
- sta pixptr+1 ;3
- ;=21
+ ldx cursor_y ;3
+ lda lineaddrs_l-1,x ;5
+ sta pixptr ;3
+ lda lineaddrs_h-1,x ;5
+ sta pixptr+1 ;3
+ ;=19
ldx cursor_x
ldy xoffsets,x
lda xmasks,x