2021-04-02 04:53:41 +00:00
|
|
|
( Dev/Screen )
|
2021-02-27 00:38:20 +00:00
|
|
|
|
2021-03-23 18:44:36 +00:00
|
|
|
%RTN { JMP2r }
|
2021-08-26 22:27:18 +00:00
|
|
|
%++ { INC2 }
|
2021-05-24 21:36:15 +00:00
|
|
|
%2// { #01 SFT2 }
|
|
|
|
%4// { #02 SFT2 }
|
2021-05-24 21:52:11 +00:00
|
|
|
%4** { #20 SFT2 }
|
|
|
|
%8** { #30 SFT2 }
|
2021-03-23 18:44:36 +00:00
|
|
|
%8+ { #0008 ADD2 }
|
2021-05-23 15:27:15 +00:00
|
|
|
%STEP8 { #33 SFT2 }
|
2021-02-27 00:38:20 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
( devices )
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
2021-07-31 20:58:33 +00:00
|
|
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|
2021-05-31 22:08:34 +00:00
|
|
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|
2021-04-23 14:34:03 +00:00
|
|
|
|
|
|
|
( variables )
|
|
|
|
|
|
|
|
|0000
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@color $1
|
|
|
|
@selection $1
|
|
|
|
|
|
|
|
@center [ &x $2 &y $2 ]
|
|
|
|
@pointer [ &x $2 &y $2 ]
|
|
|
|
@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
|
|
|
|
@window [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &w $2 &h $2 ]
|
|
|
|
@slider [ &x1 $2 &y $2 &x2 $2 &pos $2 ]
|
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
@theme [
|
|
|
|
&r1 $1 &r2 $1 &r3 $1 &r4 $1
|
|
|
|
&g1 $1 &g2 $1 &g3 $1 &g4 $1
|
|
|
|
&b1 $1 &b2 $1 &b3 $1 &b4 $1
|
|
|
|
]
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-05 20:00:55 +00:00
|
|
|
( program )
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
|0100 ( -> )
|
|
|
|
|
|
|
|
( theme )
|
|
|
|
#027f .System/r DEO2
|
|
|
|
#04e7 .System/g DEO2
|
|
|
|
#06c4 .System/b DEO2
|
2021-03-28 18:20:36 +00:00
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
( vectors )
|
|
|
|
;on-mouse .Mouse/vector DEO2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
( size window )
|
2021-05-11 18:14:52 +00:00
|
|
|
#00b0 .window/w STZ2
|
|
|
|
#0050 .window/h STZ2
|
2021-03-21 21:16:19 +00:00
|
|
|
|
2021-03-23 18:44:36 +00:00
|
|
|
( center window )
|
2021-05-24 21:36:15 +00:00
|
|
|
.Screen/width DEI2 2// .window/w LDZ2 2// SUB2 .window/x1 STZ2
|
|
|
|
.Screen/height DEI2 2// .window/h LDZ2 2// SUB2 .window/y1 STZ2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
#01 .theme/r1 STZ #02 .theme/g1 STZ #03 .theme/b1 STZ
|
|
|
|
#04 .theme/r2 STZ #06 .theme/g2 STZ #07 .theme/b2 STZ
|
|
|
|
#0a .theme/r3 STZ #09 .theme/g3 STZ #08 .theme/b3 STZ
|
|
|
|
#0c .theme/r4 STZ #0b .theme/g4 STZ #0d .theme/b4 STZ
|
2021-02-27 00:38:20 +00:00
|
|
|
|
|
|
|
( find screen center )
|
2021-05-24 21:36:15 +00:00
|
|
|
.Screen/width DEI2 2// .center/x STZ2
|
|
|
|
.Screen/height DEI2 2// .center/y STZ2
|
2021-02-27 00:38:20 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
;update-theme JSR2
|
|
|
|
;draw-background JSR2
|
|
|
|
;draw-window JSR2
|
2021-04-06 17:45:53 +00:00
|
|
|
|
|
|
|
BRK
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@on-mouse ( -> )
|
2021-04-06 17:45:53 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
;draw-cursor JSR2
|
|
|
|
|
2021-05-13 06:31:42 +00:00
|
|
|
.Mouse/state DEI #01 JCN [ BRK ]
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.Mouse/y DEI2 .window/y1 LDZ2 SUB2 STEP8
|
2021-05-11 18:12:07 +00:00
|
|
|
DUP2 #0010 NEQ2 ,&no-touch-red JCN
|
2021-05-11 18:14:52 +00:00
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #0060 ADD2 LTH2 ,&no-touch-red JCN
|
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #009c ADD2 GTH2 ,&no-touch-red JCN
|
2021-08-15 20:25:58 +00:00
|
|
|
( get new value ) .Mouse/x DEI2 .window/x1 LDZ2 SUB2 #0060 SUB2 4// NIP ;theme/r1 #00 .selection LDZ ADD2 STA
|
2021-04-23 14:34:03 +00:00
|
|
|
&no-touch-red
|
2021-05-11 18:12:07 +00:00
|
|
|
DUP2 #0020 NEQ2 ,&no-touch-green JCN
|
2021-05-11 18:14:52 +00:00
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #0060 ADD2 LTH2 ,&no-touch-green JCN
|
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #009c ADD2 GTH2 ,&no-touch-green JCN
|
2021-08-15 20:25:58 +00:00
|
|
|
( get new value ) .Mouse/x DEI2 .window/x1 LDZ2 SUB2 #0060 SUB2 4// NIP ;theme/g1 #00 .selection LDZ ADD2 STA
|
2021-04-23 14:34:03 +00:00
|
|
|
&no-touch-green
|
2021-05-11 18:12:07 +00:00
|
|
|
DUP2 #0030 NEQ2 ,&no-touch-blue JCN
|
2021-05-11 18:14:52 +00:00
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #0060 ADD2 LTH2 ,&no-touch-blue JCN
|
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #009c ADD2 GTH2 ,&no-touch-blue JCN
|
2021-08-15 20:25:58 +00:00
|
|
|
( get new value ) .Mouse/x DEI2 .window/x1 LDZ2 SUB2 #0060 SUB2 4// NIP ;theme/b1 #00 .selection LDZ ADD2 STA
|
2021-04-23 14:34:03 +00:00
|
|
|
&no-touch-blue
|
2021-05-11 18:12:07 +00:00
|
|
|
DUP2 #0040 NEQ2 ,&no-touch-radio JCN
|
2021-05-11 18:14:52 +00:00
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #0050 ADD2 LTH2 ,&no-touch-radio JCN
|
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 #008c ADD2 GTH2 ,&no-touch-radio JCN
|
2021-08-15 20:25:58 +00:00
|
|
|
.Mouse/x DEI2 .window/x1 LDZ2 SUB2 #0050 SUB2 STEP8 2// #0008 DIV2 NIP .selection STZ
|
2021-04-23 14:34:03 +00:00
|
|
|
&no-touch-radio
|
2021-04-06 17:45:53 +00:00
|
|
|
POP2
|
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
;update-theme JSR2
|
2021-05-24 21:25:02 +00:00
|
|
|
;draw-cursor JSR2
|
|
|
|
;draw-background JSR2
|
2021-04-23 14:34:03 +00:00
|
|
|
;draw-window JSR2
|
2021-04-06 17:45:53 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
BRK
|
2021-04-06 17:45:53 +00:00
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@update-theme ( -- )
|
2021-04-06 17:45:53 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
#08 DEI #0f AND .theme/r1 LDZ #40 SFT ADD #08 DEO
|
|
|
|
#0a DEI #0f AND .theme/g1 LDZ #40 SFT ADD #0a DEO
|
|
|
|
#0c DEI #0f AND .theme/b1 LDZ #40 SFT ADD #0c DEO
|
|
|
|
#08 DEI #f0 AND .theme/r2 LDZ ADD #08 DEO
|
|
|
|
#0a DEI #f0 AND .theme/g2 LDZ ADD #0a DEO
|
|
|
|
#0c DEI #f0 AND .theme/b2 LDZ ADD #0c DEO
|
|
|
|
#09 DEI #0f AND .theme/r3 LDZ #40 SFT ADD #09 DEO
|
|
|
|
#0b DEI #0f AND .theme/g3 LDZ #40 SFT ADD #0b DEO
|
|
|
|
#0d DEI #0f AND .theme/b3 LDZ #40 SFT ADD #0d DEO
|
|
|
|
#09 DEI #f0 AND .theme/r4 LDZ ADD #09 DEO
|
|
|
|
#0b DEI #f0 AND .theme/g4 LDZ ADD #0b DEO
|
|
|
|
#0d DEI #f0 AND .theme/b4 LDZ ADD #0d DEO
|
2021-04-06 17:45:53 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@draw-background ( -- )
|
2021-04-06 17:45:53 +00:00
|
|
|
|
2021-02-27 00:38:20 +00:00
|
|
|
( draw hor line )
|
2021-05-11 18:14:52 +00:00
|
|
|
#0000 .Screen/x DEO2 .center/y LDZ2 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
.Screen/width DEI2 #0000 ( to/from )
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-hor
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #01 .Screen/pixel DEO
|
2021-08-26 23:11:33 +00:00
|
|
|
( incr ) #0002 ADD2 DUP2 .Screen/x DEO2
|
|
|
|
GTH2k ,&draw-hor JCN
|
2021-03-14 22:17:00 +00:00
|
|
|
POP2 POP2
|
2021-02-27 00:38:20 +00:00
|
|
|
|
|
|
|
( draw ver line )
|
2021-05-11 18:14:52 +00:00
|
|
|
.center/x LDZ2 .Screen/x DEO2 #0000 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
.Screen/height DEI2 #0000 ( to/from )
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-ver
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #02 .Screen/pixel DEO
|
2021-08-26 23:11:33 +00:00
|
|
|
( incr ) #0002 ADD2 DUP2 .Screen/y DEO2
|
|
|
|
GTH2k ,&draw-ver JCN
|
2021-03-14 22:17:00 +00:00
|
|
|
POP2 POP2
|
2021-02-27 00:38:20 +00:00
|
|
|
|
2021-02-27 16:18:57 +00:00
|
|
|
( draw blending modes )
|
2021-04-23 14:34:03 +00:00
|
|
|
;preview_icn .Screen/addr DEO2
|
|
|
|
#0010 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-pixel1
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP .Screen/pixel DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-pixel1 JCN
|
|
|
|
POP2
|
2021-04-23 14:34:03 +00:00
|
|
|
#0018 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-pixel2
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP #08 ADD .Screen/pixel DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-pixel2 JCN
|
|
|
|
POP2
|
2021-04-23 14:34:03 +00:00
|
|
|
#0020 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-icn1
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP .Screen/sprite DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-icn1 JCN
|
|
|
|
POP2
|
2021-04-23 14:34:03 +00:00
|
|
|
#0028 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-icn2
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP #08 ADD .Screen/sprite DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-icn2 JCN
|
|
|
|
POP2
|
2021-04-23 14:34:03 +00:00
|
|
|
#0030 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-chr1
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP #80 ADD .Screen/sprite DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-chr1 JCN
|
|
|
|
POP2
|
2021-04-23 14:34:03 +00:00
|
|
|
#0038 .Screen/y DEO2
|
2021-08-26 23:11:33 +00:00
|
|
|
#0800
|
2021-04-23 14:34:03 +00:00
|
|
|
&draw-chr2
|
2021-08-26 23:11:33 +00:00
|
|
|
( move ) #00 OVR #30 SFT #0010 ADD2 .Screen/x DEO2
|
|
|
|
( draw ) DUP #88 ADD .Screen/sprite DEO
|
|
|
|
( incr ) INC
|
|
|
|
GTHk ,&draw-chr2 JCN
|
|
|
|
POP2
|
2021-02-27 00:38:20 +00:00
|
|
|
|
2021-03-23 18:44:36 +00:00
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@draw-window ( -- )
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 .window/w LDZ2 ADD2 .window/x2 STZ2
|
|
|
|
.window/y1 LDZ2 .window/h LDZ2 ADD2 .window/y2 STZ2
|
|
|
|
.window/x1 LDZ2 .window/y1 LDZ2 .window/x2 LDZ2 .window/y2 LDZ2 #02 ;fill-rect JSR2
|
|
|
|
.window/x1 LDZ2 .window/y1 LDZ2 .window/x2 LDZ2 .window/y2 LDZ2 #01 ;line-rect JSR2
|
|
|
|
.window/x1 LDZ2 #0002 SUB2 .window/y1 LDZ2 #0002 SUB2 .window/x2 LDZ2 #0002 ADD2 .window/y2 LDZ2 #0002 ADD2 #01 ;line-rect JSR2
|
|
|
|
|
2021-07-31 20:58:33 +00:00
|
|
|
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0010 ADD2 ;red_txt #05 ;draw-label JSR2
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
.System/r DEI2 #08 ;draw-short JSR2
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-07-31 20:58:33 +00:00
|
|
|
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0020 ADD2 ;green_txt #05 ;draw-label JSR2
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
.System/g DEI2 #08 ;draw-short JSR2
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-07-31 20:58:33 +00:00
|
|
|
.window/x1 LDZ2 #0008 ADD2 .window/y1 LDZ2 #0030 ADD2 ;blue_txt #05 ;draw-label JSR2
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0038 ADD2 .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
.System/b DEI2 #08 ;draw-short JSR2
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-24 21:52:11 +00:00
|
|
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0010 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/r1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
|
|
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0020 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/g1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
|
|
|
.window/x1 LDZ2 #0060 ADD2 .window/y1 LDZ2 #0030 ADD2 .window/x1 LDZ2 #0090 ADD2 #00 ;theme/b1 .selection LDZ ADD LDA 4** #01 ;draw-slider JSR2
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0050 ADD2 .Screen/x DEO2
|
|
|
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
2021-05-24 21:52:11 +00:00
|
|
|
;radio_icns #00 .selection LDZ #00 EQU 8** ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
#05 .Screen/sprite DEO
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0060 ADD2 .Screen/x DEO2
|
|
|
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
2021-05-24 21:52:11 +00:00
|
|
|
;radio_icns #00 .selection LDZ #01 EQU 8** ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
#05 .Screen/sprite DEO
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0070 ADD2 .Screen/x DEO2
|
|
|
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
2021-05-24 21:52:11 +00:00
|
|
|
;radio_icns #00 .selection LDZ #02 EQU 8** ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
#05 .Screen/sprite DEO
|
2021-04-23 14:34:03 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.window/x1 LDZ2 #0080 ADD2 .Screen/x DEO2
|
|
|
|
.window/y1 LDZ2 #0040 ADD2 .Screen/y DEO2
|
2021-05-24 21:52:11 +00:00
|
|
|
;radio_icns #00 .selection LDZ #03 EQU 8** ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
#05 .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-09 19:15:38 +00:00
|
|
|
@draw-cursor ( -- )
|
2021-04-29 04:00:39 +00:00
|
|
|
|
2021-03-23 18:44:36 +00:00
|
|
|
( clear last cursor )
|
2021-05-06 17:38:38 +00:00
|
|
|
;pointer_icn .Screen/addr DEO2
|
2021-05-11 18:14:52 +00:00
|
|
|
.pointer/x LDZ2 .Screen/x DEO2
|
|
|
|
.pointer/y LDZ2 .Screen/y DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
#40 .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
( record pointer positions )
|
2021-07-09 18:38:45 +00:00
|
|
|
.Mouse/x DEI2 DUP2 .pointer/x STZ2 .Screen/x DEO2
|
|
|
|
.Mouse/y DEI2 DUP2 .pointer/y STZ2 .Screen/y DEO2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-08-17 19:16:39 +00:00
|
|
|
#43 .Mouse/state DEI #00 NEQ DUP ADD SUB .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@draw-slider ( x1* y* x2* pos* color -- )
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
( load ) .color STZ .slider/pos STZ2 .slider/x2 STZ2 .slider/y STZ2 .slider/x1 STZ2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.slider/x1 LDZ2 .Screen/x DEO2
|
|
|
|
.slider/y LDZ2 .Screen/y DEO2
|
2021-04-23 14:34:03 +00:00
|
|
|
;halftone_icn .Screen/addr DEO2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
;slidera_icn .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #05 .Screen/sprite DEO
|
2021-04-23 14:34:03 +00:00
|
|
|
;sliderb_icn .Screen/addr DEO2
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
&loop
|
|
|
|
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #05 .Screen/sprite DEO
|
2021-05-11 18:14:52 +00:00
|
|
|
.Screen/x DEI2 .slider/x2 LDZ2 #0008 ADD2 LTH2 ,&loop JCN
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-23 14:34:03 +00:00
|
|
|
( incr ) .Screen/x DEI2 #0004 ADD2 .Screen/x DEO2
|
|
|
|
;sliderc_icn .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #05 .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.slider/x1 LDZ2 .slider/pos LDZ2 ADD2 .Screen/x DEO2
|
2021-04-23 14:34:03 +00:00
|
|
|
;sliderd_icn .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) #0a .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@fill-rect ( x1* y1* x2* y2* color -- )
|
2021-04-14 05:50:01 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
.color STZ
|
2021-08-26 23:11:33 +00:00
|
|
|
STH2 ROT2 ROT2 STH2 ( x2 x1 / y2 y1 )
|
2021-04-23 14:34:03 +00:00
|
|
|
&ver
|
2021-08-26 23:11:33 +00:00
|
|
|
( save ) STH2kr .Screen/y DEO2
|
|
|
|
OVR2 OVR2
|
2021-04-23 14:34:03 +00:00
|
|
|
&hor
|
2021-08-26 23:11:33 +00:00
|
|
|
( save ) DUP2 .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) .color LDZ .Screen/pixel DEO
|
2021-08-26 23:11:33 +00:00
|
|
|
( incr ) INC2
|
|
|
|
GTH2k ,&hor JCN
|
|
|
|
POP2 POP2
|
|
|
|
( incr ) INC2r
|
|
|
|
GTH2kr STHr ,&ver JCN
|
|
|
|
POP2 POP2 POP2r POP2r
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@line-rect ( x1* y1* x2* y2* color -- )
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-05-11 18:14:52 +00:00
|
|
|
( load ) .color STZ .rect/y2 STZ2 .rect/x2 STZ2 DUP2 .Screen/y DEO2 .rect/y1 STZ2 DUP2 .Screen/x DEO2 .rect/x1 STZ2
|
2021-04-23 14:34:03 +00:00
|
|
|
&hor
|
|
|
|
( incr ) .Screen/x DEI2 ++ .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
|
|
|
|
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .color LDZ .Screen/pixel DEO
|
2021-05-11 18:14:52 +00:00
|
|
|
.Screen/x DEI2 .rect/x2 LDZ2 LTH2 ,&hor JCN
|
|
|
|
.rect/y1 LDZ2 .Screen/y DEO2
|
2021-04-23 14:34:03 +00:00
|
|
|
&ver
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
|
|
|
|
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .color LDZ .Screen/pixel DEO
|
2021-04-23 14:34:03 +00:00
|
|
|
( incr ) .Screen/y DEI2 ++ .Screen/y DEO2
|
2021-05-11 18:14:52 +00:00
|
|
|
.Screen/y DEI2 .rect/y2 LDZ2 ++ LTH2 ,&ver JCN
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@draw-label ( x* y* addr* color -- )
|
2021-03-23 18:44:36 +00:00
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
STH STH2
|
|
|
|
.Screen/y DEO2
|
|
|
|
.Screen/x DEO2
|
|
|
|
STH2r
|
2021-04-23 14:34:03 +00:00
|
|
|
&loop
|
2021-08-18 02:17:47 +00:00
|
|
|
LDAk #00 SWP 8**
|
2021-04-29 04:00:39 +00:00
|
|
|
;font ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) STHkr .Screen/sprite DEO
|
2021-03-23 18:44:36 +00:00
|
|
|
( incr ) ++
|
2021-04-23 14:34:03 +00:00
|
|
|
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
|
2021-08-18 02:17:47 +00:00
|
|
|
LDAk ,&loop JCN
|
2021-04-29 04:00:39 +00:00
|
|
|
POP2 POPr
|
2021-03-23 18:44:36 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@draw-short ( short* color -- )
|
2021-04-09 19:15:38 +00:00
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
STH SWP
|
2021-05-24 21:52:11 +00:00
|
|
|
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) STHkr .Screen/sprite DEO
|
2021-05-24 21:52:11 +00:00
|
|
|
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
2021-04-23 14:34:03 +00:00
|
|
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) STHkr .Screen/sprite DEO
|
2021-05-24 21:52:11 +00:00
|
|
|
DUP #04 SFT #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
2021-04-29 04:00:39 +00:00
|
|
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) STHkr .Screen/sprite DEO
|
2021-05-24 21:52:11 +00:00
|
|
|
#0f AND #00 SWP 8** ;font-hex ADD2 .Screen/addr DEO2
|
2021-04-29 04:00:39 +00:00
|
|
|
.Screen/x DEI2 8+ .Screen/x DEO2
|
2021-07-31 20:58:33 +00:00
|
|
|
( draw ) STHr .Screen/sprite DEO
|
2021-04-09 19:15:38 +00:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-04-29 04:00:39 +00:00
|
|
|
@red_txt [ "Red 00 ]
|
|
|
|
@green_txt [ "Green 00 ]
|
|
|
|
@blue_txt [ "Blue 00 ]
|
|
|
|
|
2021-03-23 18:44:36 +00:00
|
|
|
@pointer_icn [ 80c0 e0f0 f8e0 1000 ]
|
|
|
|
@halftone_icn [ aa55 aa55 aa55 aa55 ]
|
|
|
|
@slidera_icn [ 3f7f ffff ffff 7f3f ]
|
|
|
|
@sliderb_icn [ ffff ffff ffff ffff ]
|
|
|
|
@sliderc_icn [ fcfe ffff ffff fefc ]
|
|
|
|
@sliderd_icn [ 003c 7e7e 7e7e 3c00 ]
|
2021-04-29 04:00:39 +00:00
|
|
|
|
2021-05-13 01:28:45 +00:00
|
|
|
@preview_icn
|
2021-04-29 04:00:39 +00:00
|
|
|
183c 66db db66 3c18
|
2021-05-13 01:28:45 +00:00
|
|
|
0000 183c 3c18 0000
|
2021-04-23 14:34:03 +00:00
|
|
|
@radio_icns
|
2021-05-13 01:28:45 +00:00
|
|
|
3c42 8181 8181 423c
|
|
|
|
3c42 99bd bd99 423c
|
|
|
|
|
|
|
|
@font-hex
|
2021-04-09 19:15:38 +00:00
|
|
|
003c 464a 5262 3c00 0018 0808 0808 1c00
|
|
|
|
003c 4202 3c40 7e00 003c 421c 0242 3c00
|
|
|
|
000c 1424 447e 0400 007e 407c 0242 3c00
|
|
|
|
003c 407c 4242 3c00 007e 0204 0810 1000
|
|
|
|
003c 423c 4242 3c00 003c 4242 3e02 3c00
|
2021-04-23 14:34:03 +00:00
|
|
|
003c 4242 7e42 4200 007c 427c 4242 7c00
|
|
|
|
003c 4240 4042 3c00 007c 4242 4242 7c00
|
2021-05-13 01:28:45 +00:00
|
|
|
007e 4078 4040 7e00 007e 4078 4040 4000
|
2021-04-09 19:15:38 +00:00
|
|
|
|
2021-05-13 01:28:45 +00:00
|
|
|
@font ( spectrum-zx font )
|
2021-03-23 18:44:36 +00:00
|
|
|
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
|
|
|
|
0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
|
|
|
|
007e 4242 4242 7e00 0000 1824 2418 0000 0018 2442 4224 1800 001e 063a 4a48 3000
|
|
|
|
0038 446c 107c 1000 000c 0808 0838 3800 003e 2222 2266 6600 0000 0822 0022 0800
|
|
|
|
0000 1018 1c18 1000 0000 0818 3818 0800 0008 1c00 001c 0800 0028 2828 2800 2800
|
|
|
|
003e 4a4a 3a0a 0a00 000c 3046 620c 3000 0000 0000 0000 ffff 0010 3800 3810 0038
|
|
|
|
0008 1c2a 0808 0800 0008 0808 2a1c 0800 0000 0804 7e04 0800 0000 1020 7e20 1000
|
|
|
|
0000 4040 7e00 0000 0000 0024 6624 0000 0000 1038 7c00 0000 0000 007c 3810 0000
|
|
|
|
0000 0000 0000 0000 0008 0808 0800 0800 0014 1400 0000 0000 0024 7e24 247e 2400
|
|
|
|
0008 1e28 1c0a 3c08 0042 0408 1020 4200 0030 4832 4c44 3a00 0008 1000 0000 0000
|
|
|
|
0004 0808 0808 0400 0010 0808 0808 1000 0000 1408 3e08 1400 0000 0808 3e08 0800
|
|
|
|
0000 0000 0008 0810 0000 0000 3c00 0000 0000 0000 0000 0800 0000 0204 0810 2000
|
|
|
|
003c 464a 5262 3c00 0018 2808 0808 3e00 003c 4202 3c40 7e00 003c 421c 0242 3c00
|
|
|
|
0008 1828 487e 0800 007e 407c 0242 3c00 003c 407c 4242 3c00 007e 0204 0810 1000
|
|
|
|
003c 423c 4242 3c00 003c 4242 3e02 3c00 0000 0008 0000 0800 0000 0800 0008 0810
|
|
|
|
0000 0810 2010 0800 0000 003e 003e 0000 0000 1008 0408 1000 003c 4202 0c00 0800
|
|
|
|
003c 425a 5442 3c00 0018 2442 7e42 4200 007c 427c 4242 7c00 003c 4240 4042 3c00
|
|
|
|
0078 4442 4244 7800 007e 407c 4040 7e00 003e 4040 7c40 4000 003c 4240 4e42 3c00
|
|
|
|
0042 427e 4242 4200 003e 0808 0808 3e00 0002 0202 4242 3c00 0044 4870 4844 4200
|
|
|
|
0040 4040 4040 7e00 0042 665a 4242 4200 0042 6252 4a46 4200 003c 4242 4242 3c00
|
|
|
|
007c 4242 7c40 4000 003c 4242 524a 3c00 007c 4242 7c44 4200 003c 403c 0242 3c00
|
|
|
|
00fe 1010 1010 1000 0042 4242 4242 3c00 0042 4242 4224 1800 0042 4242 5a66 4200
|
|
|
|
0042 2418 1824 4200 0082 4428 1010 1000 007e 0408 1020 7e00 000c 0808 0808 0c00
|
|
|
|
0040 2010 0804 0200 0018 0808 0808 1800 0008 1422 0000 0000 0000 0000 0000 7e00
|
|
|
|
0008 0400 0000 0000 0000 1c02 1e22 1e00 0020 203c 2222 3c00 0000 1e20 2020 1e00
|
|
|
|
0002 021e 2222 1e00 0000 1c22 3c20 1e00 000c 101c 1010 1000 0000 1c22 221e 021c
|
|
|
|
0020 202c 3222 2200 0008 0018 0808 0400 0008 0008 0808 4830 0020 2428 3028 2400
|
|
|
|
0010 1010 1010 0c00 0000 6854 5454 5400 0000 5864 4444 4400 0000 3844 4444 3800
|
|
|
|
0000 7844 4478 4040 0000 3c44 443c 0406 0000 2c30 2020 2000 0000 3840 3804 7800
|
|
|
|
0010 103c 1010 0c00 0000 4444 4444 3800 0000 4444 2828 1000 0000 4454 5454 2800
|
|
|
|
0000 4428 1028 4400 0000 4444 443c 0438 0000 7c08 1020 7c00 000c 0810 1008 0c00
|
2021-05-13 01:28:45 +00:00
|
|
|
0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c
|