Browse code

(wireworld.tal) Minor cleanup

neauoire authored on 23/01/2022 00:32:46
Showing 1 changed files
... ...
@@ -64,10 +64,8 @@
64 64
 	( setup )
65 65
 	#01 .timer/play STZ
66 66
 	#01 .color STZ
67
-
68
-	;world-a ;get-addr/current STA2
69
-	LENGTH ;run/future-offset STA2
70
-
67
+	;world ;get-addr/current STA2
68
+	LENGTH ;run/future STA2
71 69
 	;redraw JSR2
72 70
 
73 71
 BRK
... ...
@@ -79,12 +77,9 @@ BRK
79 77
 	.timer/frame LDZk 
80 78
 		#03 AND ,&no-run JCN 
81 79
 			;run JSR2
82
-
83 80
 			( Swap worlds )
84
-			;get-addr/current LDA2k ;run/future-offset LDA2 STH2k ( ;current current* offest* )
85
-			++ SWP2 STA2 ( Set new current page )
86
-			#0000 STH2r -- ;run/future-offset STA2 ( Invert offest )
87
-
81
+			;get-addr/current LDA2k ;run/future LDA2 STH2k
82
+			++ SWP2 STA2 #0000 STH2r -- ;run/future STA2
88 83
 			;redraw JSR2
89 84
 			&no-run
90 85
 		LDZk INC SWP STZ
... ...
@@ -99,7 +94,7 @@ BRK
99 94
 	DUP #04 ! ,&no-select JCN #03 .color STZ &no-select
100 95
 	DUP #08 ! ,&no-start JCN  #00 .color STZ &no-start
101 96
 	DUP #0c ! ,&no-both JCN
102
-		;past-world LENGTH 2** ;mclr JSR2
97
+		;world LENGTH 2** ;mclr JSR2
103 98
 		;redraw JSR2
104 99
 		&no-both
105 100
 	POP
... ...
@@ -158,7 +153,7 @@ RTN
158 153
 		&hor
159 154
 			( x,y ) DUP STHkr 
160 155
 			( cell ) DUP2 ,get-addr JSR STH2k LDA
161
-			( transform ) ,transform JSR STH2r ( future ) LIT2 &future-offset 0000 ++ STA
156
+			( transform ) ,transform JSR STH2r [ LIT2 &future $2 ] ++ STA
162 157
 			INC GTHk ,&hor JCN
163 158
 		POP2
164 159
 		POPr
... ...
@@ -169,7 +164,7 @@ RTN
169 164
 
170 165
 @get-addr ( x y -- addr* )
171 166
 
172
-	TOS [ #00 WIDTH ] ** ROT TOS ++ LIT2 &current 0000 ++
167
+	TOS [ #00 WIDTH ] ** ROT TOS ++ [ LIT2 &current $2 ] ++
173 168
 
174 169
 RTN
175 170
 
... ...
@@ -220,4 +215,4 @@ JMP2r
220 215
 	What do I do? 
221 216
 	How do I find peace? )
222 217
 
223
-@world-a
218
+@world