(clock.tal) Moved watchface drawing outside of RESET

This commit is contained in:
Devine Lu Linvega 2021-11-20 13:16:24 -05:00
parent 31d1503548
commit 7dfce364a5
1 changed files with 22 additions and 16 deletions

View File

@ -84,23 +84,9 @@
DUP2 #0078 -- .date/y STZ2 DUP2 #0078 -- .date/y STZ2
#006c ++ .time/y STZ2 #006c ++ .time/y STZ2
( circle ) ;draw-watchface JSR2
#3c00
&loop
( dots )
DUP TOS 2** ;table ++ LDA2
#0018 ;circle JSR2
.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
POP2
( time buffer )
LIT ': LIT ':
DUP .buf/s1 STZ DUP .buf/s1 STZ
.buf/s2 STZ .buf/s2 STZ
@ -220,6 +206,26 @@ RTN
RTN RTN
@draw-watchface ( -- )
#3c00
&loop
( dots )
DUP TOS 2** ;table ++ LDA2
#0018 ;circle JSR2
.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
POP2
RTN
@make-needles ( -- ) @make-needles ( -- )
[ #00 .DateTime/second DEI #1e + #3c MOD ] 2** ;table ++ LDA2 [ #00 .DateTime/second DEI #1e + #3c MOD ] 2** ;table ++ LDA2