commit 8cd011b6024dff2f598a6bbfd307018ba385acd9
parent 69fa3e008f4f89f5997a353a66483697810b90ab
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Mon, 9 Jan 2023 19:14:31 -0800
(screen.tal) Housekeeping
Diffstat:
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/projects/examples/devices/screen.tal b/projects/examples/devices/screen.tal
@@ -18,8 +18,8 @@
#f0c0 .System/b DEO2
( gba screen size 00f0 x 00a0 )
( nds screen size 0100 x 00c0 )
- #00f0 .Screen/width DEO2
- #00a0 .Screen/height DEO2
+ #0100 .Screen/width DEO2
+ #00b0 .Screen/height DEO2
( find screen center )
.Screen/width DEI2 #01 SFT2 .center/x STZ2
.Screen/height DEI2 #01 SFT2 .center/y STZ2
@@ -28,8 +28,7 @@
;draw-sprites JSR2
;draw-1bpp JSR2
;draw-2bpp JSR2
- #00 .Screen/auto DEO
-
+
BRK
(
@@ -39,7 +38,8 @@ BRK
.center/x LDZ2 #0070 SUB2 .Screen/x DEO2
.center/y LDZ2 #0048 SUB2 .Screen/y DEO2
- ;anim-chr #00 [ LIT &f $1 ] INCk ,&f STR #07 AND #40 SFT ADD2 .Screen/addr DEO2
+ ;anim-chr #00 [ LIT &f $1 ] INCk ,&f STR
+ #02 SFT #07 AND #40 SFT ADD2 .Screen/addr DEO2
#81 .Screen/sprite DEO
BRK
@@ -52,28 +52,27 @@ BRK
( horizontal )
.center/x LDZ2 #0060 SUB2 .Screen/x DEO2
.center/y LDZ2 #0048 SUB2 .Screen/y DEO2
- ;font-hex .Screen/addr DEO2
+ ;font-icn .Screen/addr DEO2
#f6 .Screen/auto DEO
#01 .Screen/sprite DEO
( vertical )
.center/x LDZ2 #0070 SUB2 .Screen/x DEO2
.center/y LDZ2 #0038 SUB2 .Screen/y DEO2
- ;font-hex .Screen/addr DEO2
+ ;font-icn .Screen/addr DEO2
#f5 .Screen/auto DEO
#01 .Screen/sprite DEO
-
- #00 .Screen/auto DEO
( table )
- ;preview_icn .Screen/addr DEO2
- #0000
+ #00 .Screen/auto DEO
+ ;preview-chr .Screen/addr DEO2
+ #00
&loop
- ( move ) #00 OVR #0f AND [ #40 SFT #01 SFT ]
+ ( move ) #00 OVR #0f AND #30 SFT
.center/x LDZ2 #0060 SUB2 ADD2 .Screen/x DEO2
( move ) #00 OVR #f0 AND #01 SFT
.center/y LDZ2 #0038 SUB2 ADD2 .Screen/y DEO2
( draw ) DUP .Screen/sprite DEO
- INC NEQk ,&loop JCN
- POP2
+ INC DUP ,&loop JCN
+ POP
JMP2r
@@ -110,7 +109,7 @@ JMP2r
@draw-circle ( x* y* color depth -- )
ADD STH
- ;preview_icn .Screen/addr DEO2
+ ;preview-chr .Screen/addr DEO2
.Screen/y DEO2
.Screen/x DEO2
#01 .Screen/auto DEO
@@ -144,7 +143,7 @@ JMP2r
NIP
&emit
DUP [ LIT &z $1 ] EQU ,&skip JCN
- #ff ,&z STR #00 OVR #30 SFT ;font-hex ADD2 .Screen/addr DEO2
+ #ff ,&z STR #00 OVR #30 SFT ;font-icn ADD2 .Screen/addr DEO2
#01 .Screen/sprite DEO
&skip
POP
@@ -157,9 +156,9 @@ JMP2r
@x-icn
0000 0018 1800 0000
-@preview_icn
+@preview-chr
0f38 675f dfbf bfbf 0007 1820 2344 4848
-@font-hex
+@font-icn ( 0-f )
007c 8282 8282 827c 0030 1010 1010 1010
007c 8202 7c80 80fe 007c 8202 1c02 827c
000c 1424 4484 fe04 00fe 8080 7c02 827c
@@ -168,7 +167,6 @@ JMP2r
007c 8202 7e82 827e 00fc 8282 fc82 82fc
007c 8280 8080 827c 00fc 8282 8282 82fc
007c 8280 f080 827c 007c 8280 f080 8080
-
@anim-chr
0000 0018 1800 0000 c381 0000 0000 81c3 0000 183c 3c18 0000 0000 0000 0000 0000
0018 3c7e 7e3c 1800 0000 0000 0000 0000 3c7e ffe7 e7ff 7e3c 0000 0018 1800 0000