code clean up

This commit is contained in:
~d6 2023-02-15 20:07:28 -05:00
parent 45fc35c420
commit 020a0d2c4f
1 changed files with 14 additions and 14 deletions

View File

@ -255,6 +255,15 @@
LTH2 ?&yloop ( y+1* [addr*] ) LTH2 ?&yloop ( y+1* [addr*] )
POP2 POP2r JMP2r ( ) POP2 POP2r JMP2r ( )
( uses the existing .Screen/x and .Screen/y )
( returns them to their starting values when finished )
@erase-fg-cell ( -> )
#40 .Screen/sprite DEO ( ; s/s<-40 )
.Screen/y DEI2k STH2k ( zp^ y* [y*] )
#0004 ADD2 ROT DEO2 ( [y*] ; s/y<-y+4 )
#40 .Screen/sprite DEO STH2r ( y* ; s/s<-40 )
.Screen/y DEO2 JMP2r ( ; s/y<-y )
@redraw ( -> BRK ) @redraw ( -> BRK )
.pointer-ttl LDZ #00 EQU ?&pointer-ok ( ) .pointer-ttl LDZ #00 EQU ?&pointer-ok ( )
.pointer-ttl LDZk INC DUP ROT STZ ?&pointer-ok .pointer-ttl LDZk INC DUP ROT STZ ?&pointer-ok
@ -266,20 +275,12 @@
&yloop &yloop
.cols LDZ2 #0000 DUP2 #0008 ( border ) ADD2 .Screen/x DEO2 .cols LDZ2 #0000 DUP2 #0008 ( border ) ADD2 .Screen/x DEO2
&xloop &xloop
STH2kr LDA2 ( DUP2 erase-cell ) draw-cell STH2kr LDA2 draw-cell erase-fg-cell
#40 .Screen/sprite DEO .Screen/x DEI2k #0008 ( width ) ADD2 ROT DEO2
( FIXME start ) INC2 INC2r INC2r GTH2k ?&xloop
.Screen/y DEI2k #0004 ADD2 ROT DEO2
#40 .Screen/sprite DEO
.Screen/y DEI2k #0004 SUB2 ROT DEO2
( FIXME end )
.Screen/x DEI2k #0008 ( width/2 ) ADD2 ROT DEO2
INC2 INC2r INC2r
GTH2k ?&xloop
POP2 POP2 POP2 POP2
.Screen/y DEI2k #000c ( height ) ADD2 ROT DEO2 .Screen/y DEI2k #000c ( height ) ADD2 ROT DEO2
INC2 INC2 GTH2k ?&yloop
GTH2k ?&yloop
POP2 POP2 POP2r POP2 POP2 POP2r
.is-lit LDZ #00 EQU ?&flashing redraw-selection !&finally .is-lit LDZ #00 EQU ?&flashing redraw-selection !&finally
&flashing .flash LDZ #00 EQU ?&pointer flash-bell draw-cursor BRK &flashing .flash LDZ #00 EQU ?&pointer flash-bell draw-cursor BRK
@ -1223,5 +1224,4 @@
@paste-pos $2 @paste-pos $2
( store tint+char for each screen position ) ( store tint+char for each screen position )
@cells @cells ( width x height x 2 bytes )