new cursor; thanks neauoire!

This commit is contained in:
~d6 2024-08-13 13:54:02 -04:00
parent 5ba423aa9f
commit b79b320102
2 changed files with 26 additions and 12 deletions

View File

@ -159,10 +159,6 @@
( - byte 3: x position )
( - byte 4: y position )
@cursor 80c0 e0f0 f8e0 1000
( @cursox 7f3f 1f0f 071f efff )
@blank 0000 0000 0000 0000
( @rng &x $2 &y $2 )
@rng-x $2
@rng-y $2

View File

@ -694,6 +694,8 @@
@on-move ( -> )
.Mouse/x DEI2 .prev/mouse-x LDZ2 NEQ2 ?draw-mouse
.Mouse/y DEI2 .prev/mouse-y LDZ2 NEQ2 ?draw-mouse
[ LIT &last $1 ] .Mouse/state DEI DUP ,&last STR EQU ?{
draw-mouse }
JMP2r
@draw-mouse ( -> )
@ -735,18 +737,20 @@
&done POP2 POP2r POP2r !set-bg ( )
@clear-prev-mouse ( -> )
#00 .Screen/auto DEO
;blank .Screen/addr DEO2
.prev/mouse-x LDZ2 .Screen/x DEO2
.prev/mouse-y LDZ2 .Screen/y DEO2
#41 .Screen/sprite DEO JMP2r
.prev/mouse-x LDZ2 #0006 SUB2 .Screen/x DEO2
.prev/mouse-y LDZ2 #0006 SUB2 .Screen/y DEO2
[ LIT2 12 -Screen/auto ] DEO
#41 .Screen/sprite DEOk DEO JMP2r
@draw-curr-mouse ( -> )
.Mouse/x DEI2 DUP2 .prev/mouse-x STZ2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .prev/mouse-y STZ2 .Screen/y DEO2
.Mouse/x DEI2 DUP2 .prev/mouse-x STZ2 #0006 SUB2 .Screen/x DEO2
.Mouse/y DEI2 DUP2 .prev/mouse-y STZ2 #0006 SUB2 .Screen/y DEO2
.dragging LDZ ?&skip
;cursor .Screen/addr DEO2
.about LDZ ?{ #43 .Screen/sprite DEO !&skip } #41 .Screen/sprite DEO
( | draw )
[ LIT2 16 -Screen/auto ] DEO
;touch-chr #00 [ LIT2 00 -Mouse/state ] DEI NEQ #60 SFT2 ADD2 .Screen/addr DEO2
#cf .Screen/sprite DEOk DEO
&skip JMP2r
@on-click-down ( -> )
@ -1110,6 +1114,20 @@
@sprites ~sprites.tal
@cursor 80c0 e0f0 f8e0 1000
@blank 0000 0000 0000 0000
@touch-chr [
0000 0000 0814 1417 0000 0000 0008 0808
0000 0000 0000 00c0 0000 0000 0000 0000
1010 2010 1008 0700 0f0f 1f0f 0f07 0000
2010 1010 2020 c000 c0e0 e0e0 c0c0 0000 ]
&down [
0000 0000 0000 0817 0000 0000 0000 0008
0000 0000 0000 00c0 0000 0000 0000 0000
1010 2010 1008 0700 0f0f 1f0f 0f07 0000
2010 1010 2020 c000 c0e0 e0e0 c0c0 0000 ]
@restart-button ( 4x1 tiles )
7f ff ff ff ff ff ff 7f 7f ce d5 cc d5 d6 ff 7f
ff ff ff ff ff ff ff ff ff 62 df 67 fb 47 ff ff