... | ... |
@@ -7,6 +7,7 @@ |
7 | 7 |
|
8 | 8 |
%2* { #10 SFT } |
9 | 9 |
%4* { #20 SFT } %4/ { #02 SFT } |
10 |
+%8/ { #03 SFT } |
|
10 | 11 |
%2** { #10 SFT2 } %2// { #01 SFT2 } |
11 | 12 |
%4** { #20 SFT2 } |
12 | 13 |
%8** { #30 SFT2 } %8// { #03 SFT2 } |
... | ... |
@@ -52,6 +53,8 @@ |
52 | 53 |
&x $2 &y $2 &x2 $2 &y2 $2 |
53 | 54 |
@modpad-frame |
54 | 55 |
&x $2 &y $2 &x2 $2 &y2 $2 |
56 |
+@bitpad-frame |
|
57 |
+ &x $2 &y $2 &x2 $2 &y2 $2 |
|
55 | 58 |
@input-frame |
56 | 59 |
&x $2 &y $2 &x2 $2 &y2 $2 |
57 | 60 |
|
... | ... |
@@ -89,16 +92,23 @@ |
89 | 92 |
DUP2 .keypad-frame/y STZ2 |
90 | 93 |
#0040 ++ .keypad-frame/y2 STZ2 |
91 | 94 |
|
92 |
- .keypad-frame/x LDZ2 #0040 ++ |
|
95 |
+ .keypad-frame/x LDZ2 |
|
93 | 96 |
DUP2 .modpad-frame/x STZ2 |
94 |
- #0010 ++ .modpad-frame/x2 STZ2 |
|
95 |
- .keypad-frame/y LDZ2 |
|
97 |
+ #0040 ++ .modpad-frame/x2 STZ2 |
|
98 |
+ .keypad-frame/y LDZ2 #0040 ++ |
|
96 | 99 |
DUP2 .modpad-frame/y STZ2 |
97 |
- #0040 ++ .modpad-frame/y2 STZ2 |
|
100 |
+ #0010 ++ .modpad-frame/y2 STZ2 |
|
101 |
+ |
|
102 |
+ .keypad-frame/x LDZ2 |
|
103 |
+ DUP2 .bitpad-frame/x STZ2 |
|
104 |
+ #0040 ++ .bitpad-frame/x2 STZ2 |
|
105 |
+ .keypad-frame/y LDZ2 #0058 ++ |
|
106 |
+ DUP2 .bitpad-frame/y STZ2 |
|
107 |
+ #0010 ++ .bitpad-frame/y2 STZ2 |
|
98 | 108 |
|
99 | 109 |
.center/x LDZ2 #0028 -- |
100 | 110 |
DUP2 .input-frame/x STZ2 |
101 |
- #0050 ++ .input-frame/x2 STZ2 |
|
111 |
+ #0040 ++ .input-frame/x2 STZ2 |
|
102 | 112 |
.center/y LDZ2 #0030 -- |
103 | 113 |
DUP2 .input-frame/y STZ2 |
104 | 114 |
#0010 ++ .input-frame/y2 STZ2 |
... | ... |
@@ -165,6 +175,8 @@ BRK |
165 | 175 |
;within-rect JSR2 ;click-input JCN2 |
166 | 176 |
OVR2 OVR2 .modpad-frame |
167 | 177 |
;within-rect JSR2 ;click-modpad JCN2 |
178 |
+ OVR2 OVR2 .bitpad-frame |
|
179 |
+ ;within-rect JSR2 ;click-bitpad JCN2 |
|
168 | 180 |
POP2 POP2 |
169 | 181 |
|
170 | 182 |
BRK |
... | ... |
@@ -182,9 +194,9 @@ BRK |
182 | 194 |
|
183 | 195 |
@click-modpad ( x* y* -> ) |
184 | 196 |
|
185 |
- NIP2 |
|
197 |
+ POP2 |
|
186 | 198 |
( get key ) |
187 |
- .modpad-frame/y LDZ2 -- 10// NIP |
|
199 |
+ .modpad-frame/x LDZ2 -- 10// NIP |
|
188 | 200 |
DUP #00 ! ,&no-add JCN ;do-add JSR2 &no-add |
189 | 201 |
DUP #01 ! ,&no-sub JCN ;do-sub JSR2 &no-sub |
190 | 202 |
DUP #02 ! ,&no-mul JCN ;do-mul JSR2 &no-mul |
... | ... |
@@ -195,16 +207,22 @@ BRK |
195 | 207 |
|
196 | 208 |
BRK |
197 | 209 |
|
210 |
+@click-bitpad ( x* y* -> ) |
|
211 |
+ |
|
212 |
+ DEBUG2 DEBUG2 |
|
213 |
+ |
|
214 |
+BRK |
|
215 |
+ |
|
198 | 216 |
@click-input ( x* y* -> ) |
199 | 217 |
|
200 | 218 |
POP2 |
201 |
- .input-frame/x LDZ2 #0008 ++ -- 10// NIP |
|
202 |
- DUP #03 ! ,&no-push JCN |
|
219 |
+ .input-frame/x LDZ2 -- 8// NIP |
|
220 |
+ DUP #06 ! ,&no-push JCN |
|
203 | 221 |
.input/value LDZ2 #0001 << ,&no-push-empty JCN |
204 | 222 |
;do-push JSR2 |
205 | 223 |
&no-push-empty |
206 | 224 |
&no-push |
207 |
- DUP #04 ! ,&no-pop JCN |
|
225 |
+ DUP #07 ! ,&no-pop JCN |
|
208 | 226 |
;do-pop JSR2 |
209 | 227 |
&no-pop |
210 | 228 |
POP |
... | ... |
@@ -341,6 +359,7 @@ RTN |
341 | 359 |
#ff ;draw-keypad JSR2 |
342 | 360 |
#ff ;draw-modpad JSR2 |
343 | 361 |
#ff ;draw-input JSR2 |
362 |
+ ;draw-bitpad JSR2 |
|
344 | 363 |
;draw-stack JSR2 |
345 | 364 |
|
346 | 365 |
RTN |
... | ... |
@@ -387,8 +406,7 @@ RTN |
387 | 406 |
@draw-input ( key -- ) |
388 | 407 |
|
389 | 408 |
STH |
390 |
- |
|
391 |
- .input-frame/y LDZ2 #0002 ++ .Screen/y DEO2 |
|
409 |
+ .input-frame/y LDZ2 #0003 ++ .Screen/y DEO2 |
|
392 | 410 |
#04 #00 |
393 | 411 |
&loop |
394 | 412 |
( x ) DUP TOS 8** .input-frame/x LDZ2 #0018 ++ SWP2 -- .Screen/x DEO2 |
... | ... |
@@ -402,13 +420,13 @@ RTN |
402 | 420 |
( controls ) |
403 | 421 |
.input-frame/x LDZ2 #0030 ++ |
404 | 422 |
.input-frame/y LDZ2 |
405 |
- ;stack-icns/push [ STHkr #00 = ] #01 |
|
406 |
- ;draw-key JSR2 |
|
423 |
+ ;stack-icns/push [ STHkr #00 = ] #02 |
|
424 |
+ ;draw-key-thin JSR2 |
|
407 | 425 |
|
408 |
- .input-frame/x LDZ2 #0040 ++ |
|
426 |
+ .input-frame/x LDZ2 #0038 ++ |
|
409 | 427 |
.input-frame/y LDZ2 |
410 |
- ;stack-icns/pop [ STHkr #01 = ] #02 |
|
411 |
- ;draw-key JSR2 |
|
428 |
+ ;stack-icns/pop [ STHkr #01 = ] #03 |
|
429 |
+ ;draw-key-thin JSR2 |
|
412 | 430 |
|
413 | 431 |
( line ) |
414 | 432 |
.input-frame/x LDZ2 |
... | ... |
@@ -445,20 +463,40 @@ RTN |
445 | 463 |
STH |
446 | 464 |
#04 #00 |
447 | 465 |
&loop |
448 |
- ( color ) #03 STH |
|
449 |
- ( state ) DUP OVRr STHr = STH |
|
450 |
- ( layout ) DUP TOS 8** ;mod-icns ++ STH2 |
|
451 |
- ( x ) #0000 STH2 |
|
452 |
- ( y ) DUP TOS 10** |
|
453 |
- ( origin-x ) STH2r .modpad-frame/x LDZ2 ++ SWP2 |
|
454 |
- ( origin-y ) .modpad-frame/y LDZ2 ++ |
|
455 |
- STH2r STHr STHr ;draw-key JSR2 |
|
466 |
+ ( state ) DUP STHkr = STH |
|
467 |
+ ( glyph ) DUP TOS 8** ;mod-icns ++ STH2 |
|
468 |
+ ( y ) .modpad-frame/y LDZ2 STH2 |
|
469 |
+ ( x ) DUP TOS 10** .modpad-frame/x LDZ2 ++ STH2 |
|
470 |
+ STH2r STH2r STH2r STHr #03 ;draw-key JSR2 |
|
456 | 471 |
INC GTHk ,&loop JCN |
457 | 472 |
POP2 |
458 | 473 |
POPr |
459 | 474 |
|
460 | 475 |
RTN |
461 | 476 |
|
477 |
+@draw-bitpad ( -- ) |
|
478 |
+ |
|
479 |
+ #10 #00 |
|
480 |
+ &loop |
|
481 |
+ ( state ) #00 STH |
|
482 |
+ ( y ) .bitpad-frame/y LDZ2 STH2 |
|
483 |
+ ( x ) DUP TOS 4** .bitpad-frame/x LDZ2 ++ |
|
484 |
+ STH2r STHr #01 ;draw-bit JSR2 |
|
485 |
+ INC GTHk ,&loop JCN |
|
486 |
+ POP2 |
|
487 |
+ |
|
488 |
+RTN |
|
489 |
+ |
|
490 |
+@draw-bit ( x* y* state color -- ) |
|
491 |
+ |
|
492 |
+ STH |
|
493 |
+ ( addr ) POP ;bit-icns .Screen/addr DEO2 |
|
494 |
+ ( y ) .Screen/y DEO2 |
|
495 |
+ ( x ) .Screen/x DEO2 |
|
496 |
+ STHr .Screen/sprite DEO |
|
497 |
+ |
|
498 |
+RTN |
|
499 |
+ |
|
462 | 500 |
@draw-key ( x* y* glyph* state color -- ) |
463 | 501 |
|
464 | 502 |
( auto x addr ) #05 .Screen/auto DEO |
... | ... |
@@ -466,8 +504,8 @@ RTN |
466 | 504 |
( state ) ,&state STR |
467 | 505 |
( glyph ) ,&glyph STR2 |
468 | 506 |
( state ) ;button-icns [ #00 ,&state LDR 20** ++ ] .Screen/addr DEO2 |
469 |
- ( y* ) .Screen/y DEO2 |
|
470 |
- ( x* ) .Screen/x DEO2 |
|
507 |
+ ( y ) .Screen/y DEO2 |
|
508 |
+ ( x ) .Screen/x DEO2 |
|
471 | 509 |
( draw background ) |
472 | 510 |
,&color LDR .Screen/sprite DEO |
473 | 511 |
,&color LDR .Screen/sprite DEO |
... | ... |
@@ -485,6 +523,27 @@ RTN |
485 | 523 |
RTN |
486 | 524 |
&color $1 &state $1 &glyph $2 |
487 | 525 |
|
526 |
+@draw-key-thin ( x* y* glyph* state color -- ) |
|
527 |
+ |
|
528 |
+ ( auto y addr ) #06 .Screen/auto DEO |
|
529 |
+ ( color ) ,&color STR |
|
530 |
+ ( state ) ,&state STR |
|
531 |
+ ( glyph ) ,&glyph STR2 |
|
532 |
+ ( state ) ;button-thin-icns [ #00 ,&state LDR 10** ++ ] .Screen/addr DEO2 |
|
533 |
+ ( y ) .Screen/y DEO2 |
|
534 |
+ ( x ) .Screen/x DEO2 |
|
535 |
+ ( draw background ) |
|
536 |
+ ,&color LDR .Screen/sprite DEO |
|
537 |
+ ,&color LDR .Screen/sprite DEO |
|
538 |
+ ( glyph ) |
|
539 |
+ ,&glyph LDR2 .Screen/addr DEO2 |
|
540 |
+ .Screen/y DEI2 #000c -- .Screen/y DEO2 |
|
541 |
+ #05 .Screen/sprite DEO |
|
542 |
+ ( auto none ) #00 .Screen/auto DEO |
|
543 |
+ |
|
544 |
+RTN |
|
545 |
+ &color $1 &state $1 &glyph $2 |
|
546 |
+ |
|
488 | 547 |
( theme ) |
489 | 548 |
|
490 | 549 |
@theme-txt ".theme $1 |
... | ... |
@@ -613,11 +672,22 @@ RTN |
613 | 672 |
ffff ffff ff7f 3f00 |
614 | 673 |
fefe fefe fefc f800 |
615 | 674 |
|
675 |
+@button-thin-icns |
|
676 |
+ &outline |
|
677 |
+ 3844 8282 8282 8282 |
|
678 |
+ 8282 8282 8244 3800 |
|
679 |
+ &full |
|
680 |
+ 387c fefe fefe fefe |
|
681 |
+ fefe fefe fe7c 3800 |
|
682 |
+ |
|
683 |
+@bit-icns |
|
684 |
+ e0e0 e0e0 e0e0 e000 |
|
685 |
+ |
|
616 | 686 |
@stack-icns |
617 | 687 |
&push |
618 |
- 0000 0010 2844 0000 |
|
688 |
+ 0000 1028 1000 0000 |
|
619 | 689 |
&pop |
620 |
- 0000 1038 7c38 1000 |
|
690 |
+ 0000 2810 2800 0000 |
|
621 | 691 |
|
622 | 692 |
@pointer-icn |
623 | 693 |
80c0 e0f0 f8e0 1000 |