Browse code

(clock.tal) Draw markers in watchface

Devine Lu Linvega authored on 20/11/2021 17:37:59
Showing 1 changed files
... ...
@@ -56,7 +56,8 @@
56 56
 	&sx $2 &sy $2
57 57
 	&zx $2 &zy $2
58 58
 @line
59
-	&x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 &color $1
59
+	&x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 
60
+	&dx $2 &dy $2 &e1 $2 &e2 $2 &color $1
60 61
 
61 62
 ( program )
62 63
 
... ...
@@ -81,15 +82,23 @@
81 82
 		#0020 -- .time/x STZ2
82 83
 	.Screen/height DEI2 2// 
83 84
 		DUP2 .center/y STZ2
84
-		DUP2 #0068 -- .date/y STZ2
85
-		#0060 ++ .time/y STZ2
85
+		DUP2 #0078 -- .date/y STZ2
86
+		#0070 ++ .time/y STZ2
86 87
 
87 88
 	( circle )
88 89
 	#3c00 
89 90
 	&loop
91
+		( dots )
90 92
 		DUP TOS 2** ;table ++ LDA2 
91
-			#001c ;circle JSR2 .Screen/x DEO2 .Screen/y DEO2
92
-		DUP #0f MOD #00 EQU INC .Screen/pixel DEO
93
+			#0018 ;circle JSR2
94
+			.Screen/x DEO2 .Screen/y DEO2 #01 .Screen/pixel DEO
95
+		( markers )
96
+		DUP #05 MOD ,&no-marker JCN
97
+			DUP TOS 2** ;table ++ LDA2 
98
+			STH2k #0018 ;circle JSR2 SWP2
99
+			STH2r #001c ;circle JSR2 SWP2
100
+				#01 ;draw-line JSR2
101
+			&no-marker
93 102
 		INC GTHk ;&loop JCN2
94 103
 	POP2
95 104
 
... ...
@@ -107,7 +116,7 @@ BRK
107 116
 		( make time )
108 117
 		.DateTime/hour DEI .time-buf/h ;decimal JSR2
109 118
 		.DateTime/minute DEI .time-buf/m ;decimal JSR2
110
-		.DateTime/second DEI .time-buf/s ;decimal JSR2
119
+		DUP .time-buf/s ;decimal JSR2
111 120
 		( draw label )
112 121
 		.time/x LDZ2 .Screen/x DEO2
113 122
 		.time/y LDZ2 .Screen/y DEO2
... ...
@@ -124,7 +133,7 @@ BRK
124 133
 	.DateTime/day DEI 
125 134
 	DUP .last/day LDZ = ,&same-day JCN
126 135
 		( make date )
127
-		.DateTime/day DEI .date-buf ;decimal JSR2
136
+		DUP .date-buf ;decimal JSR2
128 137
 		( draw label )
129 138
 		.date/x LDZ2 .Screen/x DEO2
130 139
 		.date/y LDZ2 .Screen/y DEO2
... ...
@@ -230,7 +239,7 @@ RTN
230 239
 
231 240
 RTN
232 241
 
233
-@decimal ( value* label* -- )
242
+@decimal ( value* label -- )
234 243
 
235 244
 	STH
236 245
 	DUP #0a DIV #30 + STHkr STZ