neauoire patch to add a border

This commit is contained in:
~d6 2023-02-02 22:56:58 -05:00
parent f85d87811b
commit fbdec75d87
1 changed files with 19 additions and 15 deletions

View File

@ -115,8 +115,8 @@
#00 .lastkey STZ
( set screen height/width based on rows/cols )
.rows LDZ2 #30 SFT2 .Screen/h DEO2
.cols LDZ2 #30 SFT2 .Screen/w DEO2
.rows LDZ2 #30 SFT2 #0010 ADD2 .Screen/h DEO2
.cols LDZ2 #30 SFT2 #0010 ADD2 .Screen/w DEO2
( set colors )
#07bf .System/r DEO2
@ -124,6 +124,10 @@
#07bf .System/b DEO2
load-theme
#0008
DUP2 .Screen/x DEO2
.Screen/y DEO2
( set starting tint: reverse=0, bg=0, fg=2 )
#02 .attr STZ
update-tint
@ -187,7 +191,7 @@
@clear-screen
#01 .dirty? STZ
;cells STH2 ( [addr*] )
LIT2r =cells ( [addr*] )
#0000 &yloop ( y* [addr*] y* )
#0000 &xloop ( y* x* [addr*] )
#0220 STH2kr STA2 ( y* x* [addr*] )
@ -201,10 +205,10 @@
@redraw
.dirty? LDZ #00 EQU ?&done
;cells STH2 ( [addr*] )
.rows LDZ2 #0000 DUP2 .Screen/y DEO2
LIT2r =cells ( [addr*] )
.rows LDZ2 #0000 DUP2 #0008 ADD2 .Screen/y DEO2
&yloop
.cols LDZ2 #0000 DUP2 .Screen/x DEO2
.cols LDZ2 #0000 DUP2 #0008 ADD2 .Screen/x DEO2
&xloop
STH2kr LDA2 draw-cell
.Screen/x DEI2k #0008 ADD2 ROT DEO2
@ -218,14 +222,14 @@
draw-cursor #00 .dirty? STZ &done BRK
@clear-cursor
.cur-x LDZ2 #30 SFT2 .Screen/x DEO2
.cur-y LDZ2 #30 SFT2 .Screen/y DEO2
.cur-x LDZ2 #30 SFT2 #0008 ADD2 .Screen/x DEO2
.cur-y LDZ2 #30 SFT2 #0008 ADD2 .Screen/y DEO2
cur-addr LDA2
!draw-cell
@draw-cursor
.cur-x LDZ2 #30 SFT2 .Screen/x DEO2
.cur-y LDZ2 #30 SFT2 .Screen/y DEO2
.cur-x LDZ2 #30 SFT2 #0008 ADD2 .Screen/x DEO2
.cur-y LDZ2 #30 SFT2 #0008 ADD2 .Screen/y DEO2
cur-addr LDA2
.tcem LDZ #00 EQU ?&skip
SWP reverse-tint SWP
@ -363,8 +367,7 @@
@debug-arg ( n* -> )
&short SWP debug-arg/byte
&byte DUP #04 SFT debug-arg/char
&char #0f AND DUP #09 GTH #27 MUL ADD #30 ADD scratch-write
JMP2r
&char #0f AND DUP #09 GTH #27 MUL ADD #30 ADD !scratch-write
@debug-args ( -> )
;args/pos LDA2 ;args
@ -377,7 +380,7 @@
@debug-priv ( c^ -> )
.debug LDZ ?&continue POP JMP2r &continue
reset-scratch
;scratch-write STH2
LIT2r =scratch-write
LIT "1 STH2kr JSR2
LIT "b STH2kr JSR2
#20 STH2kr JSR2
@ -419,7 +422,7 @@
@debug-csi ( c^ -> )
.debug LDZ ?&continue POP JMP2r &continue
reset-scratch
;scratch-write STH2
LIT2r =scratch-write
LIT "1 STH2kr JSR2
LIT "b STH2kr JSR2
#20 STH2kr JSR2
@ -582,7 +585,7 @@
@debug-esc ( c^ -> )
.debug LDZ ?&continue POP JMP2r &continue
;scratch STH2
LIT2r =scratch
LIT "1 STH2kr STA INC2r
LIT "b STH2kr STA INC2r
#20 STH2kr STA INC2r
@ -891,3 +894,4 @@
( store tint+char for each screen position )
@cells $1900 ( 80 x 40 x 2 )