commit 7158050

Devine Lu Linvega  ·  2026-03-25 16:41:11 +0000 UTC
parent 8c33174
Improved perifs
1 files changed,  +22, -27
+22, -27
  1@@ -17,9 +17,9 @@
  2 @on-reset ( -> )
  3 	;meta #06 DEO2
  4 	( | theme )
  5-	#0fff .System/r DEO2
  6-	#0f0f .System/g DEO2
  7-	#0f0f .System/b DEO2
  8+	#080f .System/r DEO2
  9+	#080f .System/g DEO2
 10+	#080f .System/b DEO2
 11 	( | find center )
 12 	.Screen/width DEI2 #01 SFT2 .center/x STZ2
 13 	.Screen/height DEI2 #01 SFT2 .center/y STZ2
 14@@ -48,7 +48,7 @@
 15 	( | background )
 16 	.center/x LDZ2 #0040 SUB2 .Screen/x DEO2
 17 	.center/y LDZ2 #0040 SUB2 .Screen/y DEO2
 18-	#01f9 ;&icns #f6 <draw-times>
 19+	#03f9 ;&icns #f6 <draw-times>
 20 	( | output )
 21 	.Screen/x DEI2 #0010 ADD2 .Screen/x DEO2
 22 	.Screen/y DEI2 #0050 SUB2 .Screen/y DEO2
 23@@ -57,42 +57,42 @@
 24 	OVR #01 AND #00 EQU ?{
 25 		.center/x LDZ2 #0028 ADD2 .Screen/x DEO2
 26 		.center/y LDZ2 #0020 SUB2 .Screen/y DEO2
 27-		#01fe ;large/icns #16 <draw-times> }
 28+		#03fe ;large/icns #16 <draw-times> }
 29 	( | B button )
 30 	OVR #02 AND #00 EQU ?{
 31 		.center/x LDZ2 #0010 ADD2 .Screen/x DEO2
 32 		.center/y LDZ2 #0020 SUB2 .Screen/y DEO2
 33-		#01fe ;large/icns #16 <draw-times> }
 34+		#03fe ;large/icns #16 <draw-times> }
 35 	( | C button )
 36 	OVR #04 AND #00 EQU ?{
 37 		.center/x LDZ2 #0008 SUB2 .Screen/x DEO2
 38 		.center/y LDZ2 #0018 SUB2 .Screen/y DEO2
 39-		#01ff ;small/icn #16 <draw-times> }
 40+		#03ff ;small/icn #16 <draw-times> }
 41 	( | S button )
 42 	OVR #08 AND #00 EQU ?{
 43 		.center/x LDZ2 #0018 SUB2 .Screen/x DEO2
 44 		.center/y LDZ2 #0018 SUB2 .Screen/y DEO2
 45-		#01ff ;small/icn #16 <draw-times> }
 46+		#03ff ;small/icn #16 <draw-times> }
 47 	( | Up arrow )
 48 	OVR #10 AND #00 EQU ?{
 49 		.center/x LDZ2 #0030 SUB2 .Screen/x DEO2
 50 		.center/y LDZ2 #0028 SUB2 .Screen/y DEO2
 51-		#05ff ;arrow/icn #00 <draw-times> }
 52+		#0fff ;arrow/icn #00 <draw-times> }
 53 	( | Down arrow )
 54 	OVR #20 AND #00 EQU ?{
 55 		.center/x LDZ2 #0030 SUB2 .Screen/x DEO2
 56 		.center/y LDZ2 #0018 SUB2 .Screen/y DEO2
 57-		#05ff ;arrow/icn #00 <draw-times> }
 58+		#0fff ;arrow/icn #00 <draw-times> }
 59 	( | Left arrow )
 60 	OVR #40 AND #00 EQU ?{
 61 		.center/x LDZ2 #0038 SUB2 .Screen/x DEO2
 62 		.center/y LDZ2 #0020 SUB2 .Screen/y DEO2
 63-		#05ff ;arrow/icn #00 <draw-times> }
 64+		#0fff ;arrow/icn #00 <draw-times> }
 65 	( | Right arrow )
 66 	OVR #80 AND #00 EQU ?{
 67 		.center/x LDZ2 #0028 SUB2 .Screen/x DEO2
 68 		.center/y LDZ2 #0020 SUB2 .Screen/y DEO2
 69-		#05ff ;arrow/icn #00 <draw-times> }
 70+		#0fff ;arrow/icn #00 <draw-times> }
 71 	POP2 JMP2r
 72 
 73 (
 74@@ -113,13 +113,13 @@
 75 	.Screen/x DEO2
 76 	.Mouse/y DEI2 #0003 SUB2 DUP2 ,&last-y STR2
 77 	.Screen/y DEO2
 78-	[ LIT2 41 -Screen/sprite ] DEO
 79+	[ LIT2 43 -Screen/sprite ] DEO
 80 	JMP2r
 81 
 82 @mouse/<draw> ( -- )
 83 	.center/x LDZ2 #0040 SUB2 .Screen/x DEO2
 84 	.center/y LDZ2 #0020 ADD2 .Screen/y DEO2
 85-	#01fc ;&icns #f6 <draw-times>
 86+	#03fc ;&icns #f6 <draw-times>
 87 	( | output )
 88 	.Screen/x DEI2 #0010 ADD2 .Screen/x DEO2
 89 	.Screen/y DEI2 #0030 SUB2 .Screen/y DEO2
 90@@ -135,41 +135,36 @@
 91 	DUP #01 AND #00 EQU ?{
 92 		.center/x LDZ2 #0040 SUB2 .Screen/x DEO2
 93 		.center/y LDZ2 #0022 ADD2 .Screen/y DEO2
 94-		#05ff ;&tip-icn #16 <draw-times> }
 95+		#0fff ;&tip-icn #16 <draw-times> }
 96 	( | mouse 2 )
 97 	DUP #02 AND #00 EQU ?{
 98 		.center/x LDZ2 #0028 SUB2 .Screen/x DEO2
 99 		.center/y LDZ2 #0022 ADD2 .Screen/y DEO2
100-		#05ff ;small/icn #16 <draw-times> }
101+		#0fff ;small/icn #16 <draw-times> }
102 	( | mouse 3 )
103 	DUP #04 AND #00 EQU ?{
104 		.center/x LDZ2 #0018 SUB2 .Screen/x DEO2
105 		.center/y LDZ2 #0022 ADD2 .Screen/y DEO2
106-		#05ff ;small/icn #16 <draw-times> }
107+		#0fff ;small/icn #16 <draw-times> }
108 	POP !wheel/<redraw>
109 
110 @wheel/<redraw> ( -- )
111 	.center/x LDZ2 #0047 ADD2 .Screen/x DEO2
112 	.center/y LDZ2 #0010 ADD2 .Screen/y DEO2
113+	[ LIT2 01 -Screen/auto ] DEO
114 	.&y-lo LDZ hex/<draw-byte>
115 	( | wheel )
116 	.center/x LDZ2 #0048 ADD2 .Screen/x DEO2
117 	.center/y LDZ2 #0020 ADD2 .Screen/y DEO2
118-	#05ff ;&icns #16 <draw-times>
119-	#05ff ;&icns #0010 ADD2 #16 <draw-times>
120-	#00 /<draw-points>
121+	#03ff ;&icns #16 <draw-times>
122+	#03ff ;&icns #0010 ADD2 #16 <draw-times>
123 	.&y LDZ2k .Mouse/scrolly DEI2 ADD2 ROT STZ2
124-	#01
125-	( >> )
126-
127-@wheel/<draw-points> ( color -- )
128-	,&px STR
129 	.&y LDZ2 DUP2 #0010 ADD2 /offset
130 	( >> )
131 	&offset ( wheelpos* -- )
132 	DUP2 #001f AND2 .center/x LDZ2 #0048 ADD2 /load .Screen/x DEO2
133 	#0018 ADD2 #001f AND2 .center/y LDZ2 #0020 ADD2 /load .Screen/y DEO2
134-	[ LIT &px $1 ] .Screen/pixel DEO
135+	[ LIT2 03 -Screen/pixel ] DEO
136 	JMP2r
137 
138 	&load ( offset* base* -- coord* )
139@@ -199,7 +194,7 @@
140 
141 @hex/<draw-char> ( char -- )
142 	#00 SWP #0f AND #30 SFT2 ;&icns ADD2 .Screen/addr DEO2
143-	[ LIT2 01 -Screen/sprite ] DEO
144+	[ LIT2 03 -Screen/sprite ] DEO
145 	JMP2r
146 
147 (