(clock.tal) Draw markers in watchface

This commit is contained in:
Devine Lu Linvega 2021-11-20 12:37:59 -05:00
parent 2f648e1e8e
commit 6c8600d6b3
1 changed files with 17 additions and 8 deletions

View File

@ -56,7 +56,8 @@
&sx $2 &sy $2 &sx $2 &sy $2
&zx $2 &zy $2 &zx $2 &zy $2
@line @line
&x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 &color $1 &x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2
&dx $2 &dy $2 &e1 $2 &e2 $2 &color $1
( program ) ( program )
@ -81,15 +82,23 @@
#0020 -- .time/x STZ2 #0020 -- .time/x STZ2
.Screen/height DEI2 2// .Screen/height DEI2 2//
DUP2 .center/y STZ2 DUP2 .center/y STZ2
DUP2 #0068 -- .date/y STZ2 DUP2 #0078 -- .date/y STZ2
#0060 ++ .time/y STZ2 #0070 ++ .time/y STZ2
( circle ) ( circle )
#3c00 #3c00
&loop &loop
( dots )
DUP TOS 2** ;table ++ LDA2 DUP TOS 2** ;table ++ LDA2
#001c ;circle JSR2 .Screen/x DEO2 .Screen/y DEO2 #0018 ;circle JSR2
DUP #0f MOD #00 EQU INC .Screen/pixel DEO .Screen/x DEO2 .Screen/y DEO2 #01 .Screen/pixel DEO
( markers )
DUP #05 MOD ,&no-marker JCN
DUP TOS 2** ;table ++ LDA2
STH2k #0018 ;circle JSR2 SWP2
STH2r #001c ;circle JSR2 SWP2
#01 ;draw-line JSR2
&no-marker
INC GTHk ;&loop JCN2 INC GTHk ;&loop JCN2
POP2 POP2
@ -107,7 +116,7 @@ BRK
( make time ) ( make time )
.DateTime/hour DEI .time-buf/h ;decimal JSR2 .DateTime/hour DEI .time-buf/h ;decimal JSR2
.DateTime/minute DEI .time-buf/m ;decimal JSR2 .DateTime/minute DEI .time-buf/m ;decimal JSR2
.DateTime/second DEI .time-buf/s ;decimal JSR2 DUP .time-buf/s ;decimal JSR2
( draw label ) ( draw label )
.time/x LDZ2 .Screen/x DEO2 .time/x LDZ2 .Screen/x DEO2
.time/y LDZ2 .Screen/y DEO2 .time/y LDZ2 .Screen/y DEO2
@ -124,7 +133,7 @@ BRK
.DateTime/day DEI .DateTime/day DEI
DUP .last/day LDZ = ,&same-day JCN DUP .last/day LDZ = ,&same-day JCN
( make date ) ( make date )
.DateTime/day DEI .date-buf ;decimal JSR2 DUP .date-buf ;decimal JSR2
( draw label ) ( draw label )
.date/x LDZ2 .Screen/x DEO2 .date/x LDZ2 .Screen/x DEO2
.date/y LDZ2 .Screen/y DEO2 .date/y LDZ2 .Screen/y DEO2
@ -230,7 +239,7 @@ RTN
RTN RTN
@decimal ( value* label* -- ) @decimal ( value* label -- )
STH STH
DUP #0a DIV #30 + STHkr STZ DUP #0a DIV #30 + STHkr STZ