Fix slowdown in draw-browser/clear
Make the clear routine only clear lines up to the screen width. This fixes slowdown on wasted clearing of off-screen tiles. TODO: Only clear/draw lines that will be on the screen.
This commit is contained in:
parent
1574e5dcce
commit
a4bed43880
|
@ -5,8 +5,10 @@
|
|||
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
|
||||
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
|
||||
|
||||
%8// { #03 SFT2 }
|
||||
%10** { #40 SFT2 } %10// { #04 SFT2 }
|
||||
|
||||
%MIN2 { LTH2k JMP SWP2 POP2 }
|
||||
%MOD { DIVk MUL SUB }
|
||||
%DEC { #01 - }
|
||||
%RTN { JMP2r }
|
||||
|
@ -61,6 +63,10 @@
|
|||
#0100 .Audio0/length DEO2
|
||||
#dd .Audio0/volume DEO ( TODO: turn ON )
|
||||
|
||||
( determine max visible file length )
|
||||
.Screen/width DEI2 8// #00ff MIN2 NIP
|
||||
;draw-browser/clear-length STA
|
||||
|
||||
( place )
|
||||
#0088 .browser/x STZ2
|
||||
#0010 .browser/y STZ2
|
||||
|
@ -290,7 +296,10 @@ RTN
|
|||
|
||||
&clear ( -- )
|
||||
.Screen/x DEI2k ( Stash the current x pos )
|
||||
#ff00
|
||||
|
||||
( Clear the screen )
|
||||
( Clear length gets set in init )
|
||||
LIT2 &clear-length 00 00
|
||||
&clear-loop
|
||||
#00 .Screen/sprite DEO
|
||||
.Screen/y DEI2k #0008 ++ ROT DEO2
|
||||
|
|
Loading…
Reference in New Issue