commit a3af37b
Devine Lu Linvega
·
2025-01-17 19:38:27 +0000 UTC
parent 5b536a9
(screen.tal) Added toggle for screen size
1 files changed,
+24,
-11
+24,
-11
1@@ -13,17 +13,7 @@
2 #2358 .System/b DEO2
3 ;on-mouse .Mouse/vector DEO2
4 ;on-button .Controller/vector DEO2
5- ( | draw fills )
6- #0080 .Screen/x DEO2
7- #0080 .Screen/y DEO2
8- #82 .Screen/pixel DEO
9- #93 .Screen/pixel DEO
10- #a1 .Screen/pixel DEO
11- ( | guide )
12- <draw-guide>
13- #0028 .Screen/x DEO2
14- #0028 .Screen/y DEO2
15- <draw-portraits>
16+ <redraw>
17 BRK
18
19 @on-button ( -> )
20@@ -42,6 +32,7 @@
21 ,&x LDR2 #0004 SUB2 ,&x STR2 }
22 DUP #80 AND #00 EQU ?{
23 ,&x LDR2 #0004 ADD2 ,&x STR2 }
24+ DUP #01 NEQ ?{ <toggle-size> }
25 POP
26 ( | draw )
27 [ LIT2 &x 0040 ] .Screen/x DEO2
28@@ -64,6 +55,28 @@
29 #43 .Screen/pixel DEO
30 BRK
31
32+(
33+@|drawing )
34+
35+@<toggle-size> ( -- )
36+ .Screen/width DEI2 #0200 EQU2 ?{
37+ #0200 .Screen/width DEO2
38+ #0200 .Screen/height DEO2 !<redraw> }
39+ #0180 .Screen/width DEO2
40+ #0180 .Screen/height DEO2 !<redraw>
41+
42+@<redraw> ( -- )
43+ ( | draw fills )
44+ #0080 .Screen/x DEO2
45+ #0080 .Screen/y DEO2
46+ #82 .Screen/pixel DEO
47+ #93 .Screen/pixel DEO
48+ #a1 .Screen/pixel DEO
49+ ( | guide )
50+ <draw-guide>
51+ #0028 .Screen/x DEO2
52+ #0028 .Screen/y DEO2 !<draw-portraits>
53+
54 @<draw-portraits> ( -- )
55 [ LIT2 36 -Screen/auto ] DEO
56 .Mouse/state DEI .Controller/button DEI #0f AND ORA ?<draw-box>