(screen.tal) Housekeeping

This commit is contained in:
Devine Lu Linvega 2023-01-09 19:14:31 -08:00
parent 69fa3e008f
commit 8cd011b602
1 changed files with 17 additions and 19 deletions

View File

@ -18,8 +18,8 @@
#f0c0 .System/b DEO2 #f0c0 .System/b DEO2
( gba screen size 00f0 x 00a0 ) ( gba screen size 00f0 x 00a0 )
( nds screen size 0100 x 00c0 ) ( nds screen size 0100 x 00c0 )
#00f0 .Screen/width DEO2 #0100 .Screen/width DEO2
#00a0 .Screen/height DEO2 #00b0 .Screen/height DEO2
( find screen center ) ( find screen center )
.Screen/width DEI2 #01 SFT2 .center/x STZ2 .Screen/width DEI2 #01 SFT2 .center/x STZ2
.Screen/height DEI2 #01 SFT2 .center/y STZ2 .Screen/height DEI2 #01 SFT2 .center/y STZ2
@ -28,8 +28,7 @@
;draw-sprites JSR2 ;draw-sprites JSR2
;draw-1bpp JSR2 ;draw-1bpp JSR2
;draw-2bpp JSR2 ;draw-2bpp JSR2
#00 .Screen/auto DEO
BRK BRK
( (
@ -39,7 +38,8 @@ BRK
.center/x LDZ2 #0070 SUB2 .Screen/x DEO2 .center/x LDZ2 #0070 SUB2 .Screen/x DEO2
.center/y LDZ2 #0048 SUB2 .Screen/y 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 #81 .Screen/sprite DEO
BRK BRK
@ -52,28 +52,27 @@ BRK
( horizontal ) ( horizontal )
.center/x LDZ2 #0060 SUB2 .Screen/x DEO2 .center/x LDZ2 #0060 SUB2 .Screen/x DEO2
.center/y LDZ2 #0048 SUB2 .Screen/y DEO2 .center/y LDZ2 #0048 SUB2 .Screen/y DEO2
;font-hex .Screen/addr DEO2 ;font-icn .Screen/addr DEO2
#f6 .Screen/auto DEO #f6 .Screen/auto DEO
#01 .Screen/sprite DEO #01 .Screen/sprite DEO
( vertical ) ( vertical )
.center/x LDZ2 #0070 SUB2 .Screen/x DEO2 .center/x LDZ2 #0070 SUB2 .Screen/x DEO2
.center/y LDZ2 #0038 SUB2 .Screen/y DEO2 .center/y LDZ2 #0038 SUB2 .Screen/y DEO2
;font-hex .Screen/addr DEO2 ;font-icn .Screen/addr DEO2
#f5 .Screen/auto DEO #f5 .Screen/auto DEO
#01 .Screen/sprite DEO #01 .Screen/sprite DEO
#00 .Screen/auto DEO
( table ) ( table )
;preview_icn .Screen/addr DEO2 #00 .Screen/auto DEO
#0000 ;preview-chr .Screen/addr DEO2
#00
&loop &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 .center/x LDZ2 #0060 SUB2 ADD2 .Screen/x DEO2
( move ) #00 OVR #f0 AND #01 SFT ( move ) #00 OVR #f0 AND #01 SFT
.center/y LDZ2 #0038 SUB2 ADD2 .Screen/y DEO2 .center/y LDZ2 #0038 SUB2 ADD2 .Screen/y DEO2
( draw ) DUP .Screen/sprite DEO ( draw ) DUP .Screen/sprite DEO
INC NEQk ,&loop JCN INC DUP ,&loop JCN
POP2 POP
JMP2r JMP2r
@ -110,7 +109,7 @@ JMP2r
@draw-circle ( x* y* color depth -- ) @draw-circle ( x* y* color depth -- )
ADD STH ADD STH
;preview_icn .Screen/addr DEO2 ;preview-chr .Screen/addr DEO2
.Screen/y DEO2 .Screen/y DEO2
.Screen/x DEO2 .Screen/x DEO2
#01 .Screen/auto DEO #01 .Screen/auto DEO
@ -144,7 +143,7 @@ JMP2r
NIP NIP
&emit &emit
DUP [ LIT &z $1 ] EQU ,&skip JCN 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 #01 .Screen/sprite DEO
&skip &skip
POP POP
@ -157,9 +156,9 @@ JMP2r
@x-icn @x-icn
0000 0018 1800 0000 0000 0018 1800 0000
@preview_icn @preview-chr
0f38 675f dfbf bfbf 0007 1820 2344 4848 0f38 675f dfbf bfbf 0007 1820 2344 4848
@font-hex @font-icn ( 0-f )
007c 8282 8282 827c 0030 1010 1010 1010 007c 8282 8282 827c 0030 1010 1010 1010
007c 8202 7c80 80fe 007c 8202 1c02 827c 007c 8202 7c80 80fe 007c 8202 1c02 827c
000c 1424 4484 fe04 00fe 8080 7c02 827c 000c 1424 4484 fe04 00fe 8080 7c02 827c
@ -168,7 +167,6 @@ JMP2r
007c 8202 7e82 827e 00fc 8282 fc82 82fc 007c 8202 7e82 827e 00fc 8282 fc82 82fc
007c 8280 8080 827c 00fc 8282 8282 82fc 007c 8280 8080 827c 00fc 8282 8282 82fc
007c 8280 f080 827c 007c 8280 f080 8080 007c 8280 f080 827c 007c 8280 f080 8080
@anim-chr @anim-chr
0000 0018 1800 0000 c381 0000 0000 81c3 0000 183c 3c18 0000 0000 0000 0000 0000 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 0018 3c7e 7e3c 1800 0000 0000 0000 0000 3c7e ffe7 e7ff 7e3c 0000 0018 1800 0000