Browse code

(label.tal) Housekeeping

Devine Lu Linvega authored on 05/07/2022 18:05:00
Showing 1 changed files
... ...
@@ -13,27 +13,31 @@
13 13
 	#a0dc .System/r DEO2
14 14
 	#a0dc .System/g DEO2
15 15
 	#a0dc .System/b DEO2
16
+
16 17
 	( find screen center )
17 18
 	.Screen/width DEI2 #01 SFT2 .center/x STZ2
18 19
 	.Screen/height DEI2 #01 SFT2 .center/y STZ2
19
-	( ver )
20
+
21
+	( dashed line )
20 22
 	#02 .Screen/auto DEO
21 23
 	#0000 .Screen/y DEO2
22 24
 	.center/x LDZ2 .Screen/x DEO2
23 25
 	.Screen/height DEI2 #0000
24 26
 	&ver
25
-		#43 .Screen/pixel DEO
26
-		.Screen/y DEI2k INC2 ROT DEO2
27
+		DUP #01 AND .Screen/pixel DEO
27 28
 		INC2 GTH2k ,&ver JCN
28 29
 	POP2 POP2
30
+
29 31
 	( left )
30 32
 	.center/x LDZ2 .Screen/x DEO2
31 33
 	.center/y LDZ2 #0018 SUB2 .Screen/y DEO2
32 34
 	;left-txt ,draw-uf2 JSR
35
+
33 36
 	( center )
34 37
 	.center/x LDZ2 .Screen/x DEO2
35 38
 	.center/y LDZ2 .Screen/y DEO2
36 39
 	;center-txt ,draw-uf2-center JSR
40
+
37 41
 	( right )
38 42
 	.center/x LDZ2 .Screen/x DEO2
39 43
 	.center/y LDZ2 #0018 ADD2 .Screen/y DEO2
... ...
@@ -41,23 +45,7 @@
41 45
 
42 46
 BRK
43 47
 
44
-@draw-uf2-center ( text* color -- )
45
-
46
-	DUP2 ,get-width JSR #01 SFT2 STH2 
47
-	.Screen/x DEI2k STH2r SUB2 ROT DEO2
48
-	,draw-uf2 JSR
49
-
50
-JMP2r
51
-
52
-@draw-uf2-right ( text* color -- )
53
-
54
-	DUP2 ,get-width JSR STH2 
55
-	.Screen/x DEI2k STH2r SUB2 ROT DEO2
56
-	,draw-uf2 JSR
57
-
58
-JMP2r
59
-
60
-@get-width ( text* -- width* )
48
+@get-uf2-width ( text* -- width* )
61 49
 
62 50
 	LIT2r 0000
63 51
 	&while
... ...
@@ -68,14 +56,25 @@ JMP2r
68 56
 
69 57
 JMP2r
70 58
 
59
+@draw-uf2-center ( text* -- )
60
+
61
+	DUP2 ,get-uf2-width JSR #01 SFT2 STH2
62
+	.Screen/x DEI2k STH2r SUB2 ROT DEO2
63
+	,draw-uf2 JMP
64
+
65
+@draw-uf2-right ( text* -- )
66
+
67
+	DUP2 ,get-uf2-width JSR STH2
68
+	.Screen/x DEI2k STH2r SUB2 ROT DEO2
69
+
71 70
 @draw-uf2 ( text* -- )
72 71
 
73 72
 	#15 .Screen/auto DEO
74 73
 	&while
75 74
 		LDAk #20 SUB #00 SWP
76 75
 			DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
77
-			;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
78
-		#01 .Screen/sprite DEOk DEO
76
+			;font ADD2 LDA STHk #00 SWP .Screen/x DEI2 ADD2
77
+		#01 .Screen/sprite DEOk STHr #08 LTH ,&thin JCN DEOk &thin POP2
79 78
 		.Screen/x DEO2
80 79
 		INC2 LDAk ,&while JCN
81 80
 	POP2