uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 7dfce364a5e334f41b086987a9cc9ea3728833c2
parent 31d150354811d1f6b407594e3cccb6f3713815f4
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Sat, 20 Nov 2021 13:16:24 -0500

(clock.tal) Moved watchface drawing outside of RESET

Diffstat:
Mprojects/examples/devices/datetime.tal | 38++++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 16 deletions(-)

diff --git a/projects/examples/devices/datetime.tal b/projects/examples/devices/datetime.tal @@ -84,23 +84,9 @@ DUP2 #0078 -- .date/y STZ2 #006c ++ .time/y STZ2 - ( circle ) - #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 + ;draw-watchface JSR2 + ( time buffer ) LIT ': DUP .buf/s1 STZ .buf/s2 STZ @@ -220,6 +206,26 @@ 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 ( -- ) [ #00 .DateTime/second DEI #1e + #3c MOD ] 2** ;table ++ LDA2