Optimizations

This commit is contained in:
Devine Lu Linvega 2024-02-11 11:40:12 -08:00
parent 25bd28617f
commit 0cc2e70c1b
1 changed files with 23 additions and 12 deletions

View File

@ -105,7 +105,7 @@
DUP2 #0009 DIV2 #0030 MUL2 #0008 ADD2 .Screen/y DEO2
DUP #1e NEQ ?{ POP2 #0007 }
DUP #1f NEQ ?{ POP2 #0008 }
#0009 DIV2k MUL2 SUB2 #0020 MUL2 #0008 ADD2 .Screen/x DEO2
#0009 DIV2k MUL2 SUB2 #50 SFT2 #0008 ADD2 .Screen/x DEO2
JMP2r
(
@ -185,22 +185,33 @@
,&y STR2
DUP2 .Screen/x DEO2
,&x STR2
#01 .Screen/auto DEO
#81 .Screen/sprite DEO
,&next JSR [ LIT &w $1 ] ,&repeat JSR #02 .Screen/auto DEO
,&next JSR #81 .Screen/sprite DEO
,&next JSR [ LIT &h $1 ] ,&repeat JSR
[ LIT2 01 -Screen/auto ] DEO
[ LIT2 81 -Screen/sprite ] DEO
<draw-frame>/next
[ LIT &w $1 ] <draw-frame>/repeat
[ LIT2 02 -Screen/auto ] DEO
<draw-frame>/next
[ LIT2 81 -Screen/sprite ] DEO
<draw-frame>/next
[ LIT &h $1 ] <draw-frame>/repeat
( left ) [ LIT2 &y $2 ] #0008 ADD2 .Screen/y DEO2
[ LIT2 &x $2 ] .Screen/x DEO2
,&next JSR ,&h LDR ,&repeat JSR #01 .Screen/auto DEO
,&next JSR #81 .Screen/sprite DEO
,&next JSR ,&w LDR ,&repeat JSR ,&next JSR #81 .Screen/sprite DEO
( fill ) ,&next JSR ,&x LDR2 #0008 ADD2 .Screen/x DEO2
<draw-frame>/next
,&h LDR <draw-frame>/repeat
[ LIT2 01 -Screen/auto ] DEO
<draw-frame>/next
[ LIT2 81 -Screen/sprite ] DEO
<draw-frame>/next
,&w LDR <draw-frame>/repeat
<draw-frame>/next
[ LIT2 81 -Screen/sprite ] DEO
( fill ) <draw-frame>/next
,&x LDR2 #0008 ADD2 .Screen/x DEO2
,&y LDR2 #0008 ADD2 .Screen/y DEO2
JMP2r
&next .Screen/addr DEI2k #0010 ADD2 ROT DEO2
JMP2r
&repeat #00 &repeat-loop #81 .Screen/sprite DEO
&repeat #00 &repeat-loop [ LIT2 81 -Screen/sprite ] DEO
INC GTHk ?&repeat-loop
POP2 JMP2r