commit 4699a1f
Devie Lu Linvega
·
2025-12-13 18:39:35 +0000 UTC
parent cf803f4
Improved device test
1 files changed,
+31,
-4
+31,
-4
1@@ -22,6 +22,7 @@
2 controller/<draw>
3 mouse/<draw>
4 ;on-button .Controller/vector DEO2
5+ ;on-mouse .Mouse/vector DEO2
6 BRK
7
8 @on-button ( -> )
9@@ -30,6 +31,10 @@
10 [ LIT2 08 -Controller/button ] DEI NEQ ?{ #010e DEO }
11 BRK
12
13+@on-mouse ( -> )
14+ mouse/<draw>
15+ BRK
16+
17 (
18 @|Controller )
19
20@@ -56,12 +61,12 @@
21 ( | C button )
22 OVR #04 AND #00 EQU ?{
23 .center/x LDZ2 #0008 SUB2 .Screen/x DEO2
24- .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
25+ .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
26 #01ff ;small/icn #16 <draw-times> }
27 ( | S button )
28 OVR #08 AND #00 EQU ?{
29 .center/x LDZ2 #0018 SUB2 .Screen/x DEO2
30- .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
31+ .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
32 #01ff ;small/icn #16 <draw-times> }
33 ( | Up arrow )
34 OVR #10 AND #00 EQU ?{
35@@ -71,7 +76,7 @@
36 ( | Down arrow )
37 OVR #20 AND #00 EQU ?{
38 .center/x LDZ2 #0030 SUB2 .Screen/x DEO2
39- .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
40+ .center/y LDZ2 #0018 SUB2 .Screen/y DEO2
41 #05ff ;arrow/icn #00 <draw-times> }
42 ( | Left arrow )
43 OVR #40 AND #00 EQU ?{
44@@ -89,7 +94,27 @@
45 .center/x LDZ2 #0040 SUB2 .Screen/x DEO2
46 .center/y LDZ2 #0020 ADD2 .Screen/y DEO2
47 #01fc ;&icns #f6 <draw-times>
48- JMP2r
49+ ( | output )
50+ .Screen/x DEI2 #0010 ADD2 .Screen/x DEO2
51+ .Screen/y DEI2 #0030 SUB2 .Screen/y DEO2
52+ [ LIT2 01 -Screen/auto ] DEO
53+ .Mouse/state DEI DUP hex/<draw-byte>
54+ ( | mouse 1 )
55+ DUP #01 AND #00 EQU ?{
56+ .center/x LDZ2 #0040 SUB2 .Screen/x DEO2
57+ .center/y LDZ2 #0022 ADD2 .Screen/y DEO2
58+ #05ff ;&tip-icn #16 <draw-times> }
59+ ( | mouse 2 )
60+ DUP #02 AND #00 EQU ?{
61+ .center/x LDZ2 #0028 SUB2 .Screen/x DEO2
62+ .center/y LDZ2 #0022 ADD2 .Screen/y DEO2
63+ #05ff ;small/icn #16 <draw-times> }
64+ ( | mouse 3 )
65+ DUP #04 AND #00 EQU ?{
66+ .center/x LDZ2 #0018 SUB2 .Screen/x DEO2
67+ .center/y LDZ2 #0022 ADD2 .Screen/y DEO2
68+ #05ff ;small/icn #16 <draw-times> }
69+ POP JMP2r
70
71 @<draw-times> ( color times addr* auto -- )
72 .Screen/auto DEO
73@@ -187,6 +212,8 @@
74 0000 0000 0000 00ff 0000 0000 0000 00ff
75 0000 0000 0000 00ff 0101 0101 0202 0cf0 ]
76
77+@mouse/tip-icn [ 0000 0000 187c 1800 $8 ]
78+
79 @mouse/icns [
80 0000 0001 0618 6482 0718 6080 0000 0000
81 e01f 0000 0000 0000 00c0 3f00 001f 2020