Added moues
This commit is contained in:
parent
e7dc250bf1
commit
aa9c39f513
|
@ -36,6 +36,9 @@
|
||||||
( > ) =keys/none =keys/none =keys/period
|
( > ) =keys/none =keys/none =keys/period
|
||||||
( > ) =keys/none =keys/none =keys/enter
|
( > ) =keys/none =keys/none =keys/enter
|
||||||
|
|
||||||
|
@fill-icn [ ffff ffff ffff ffff ]
|
||||||
|
@pointer-icn [ 80c0 e0f0 f8e0 1000 ]
|
||||||
|
|
||||||
@button-icn
|
@button-icn
|
||||||
&top [
|
&top [
|
||||||
0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f
|
0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|
||||||
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|
||||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||||
|
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1
|
||||||
|
|
||||||
|0100
|
|0100
|
||||||
|
|
||||||
|
@ -12,9 +13,14 @@
|
||||||
#de0f .System/b DEO2
|
#de0f .System/b DEO2
|
||||||
#0120 .Screen/width DEO2
|
#0120 .Screen/width DEO2
|
||||||
#00c0 .Screen/height DEO2
|
#00c0 .Screen/height DEO2
|
||||||
|
;on-mouse .Mouse/vector DEO2
|
||||||
<draw-keyboard>
|
<draw-keyboard>
|
||||||
( #010e DEO ) BRK
|
( #010e DEO ) BRK
|
||||||
|
|
||||||
|
@on-mouse ( -> )
|
||||||
|
[ LIT2 00 -Mouse/state ] DEI NEQ #42 ADD ;pointer-icn <update-pointer>
|
||||||
|
BRK
|
||||||
|
|
||||||
@<set-position> ( id* -- )
|
@<set-position> ( id* -- )
|
||||||
DUP2 #0009 DIV2 #0030 MUL2 .Screen/y DEO2
|
DUP2 #0009 DIV2 #0030 MUL2 .Screen/y DEO2
|
||||||
DUP #1e NEQ ?{ POP2 #0007 }
|
DUP #1e NEQ ?{ POP2 #0007 }
|
||||||
|
@ -73,6 +79,20 @@
|
||||||
.Screen/x DEO2
|
.Screen/x DEO2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
@<update-pointer> ( color addr* -- )
|
||||||
|
[ LIT2 00 -Screen/auto ] DEO
|
||||||
|
;fill-icn .Screen/addr DEO2
|
||||||
|
#40 <draw-pointer>
|
||||||
|
.Mouse/x DEI2 ,<draw-pointer>/x STR2
|
||||||
|
.Mouse/y DEI2 ,<draw-pointer>/y STR2
|
||||||
|
.Screen/addr DEO2
|
||||||
|
|
||||||
|
@<draw-pointer> ( color -- )
|
||||||
|
[ LIT2 &x $2 ] .Screen/x DEO2
|
||||||
|
[ LIT2 &y $2 ] .Screen/y DEO2
|
||||||
|
.Screen/sprite DEO
|
||||||
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue