Drawing space

This commit is contained in:
Devine Lu Linvega 2024-02-10 20:37:27 -08:00
parent aa9c39f513
commit efaa0a927e
3 changed files with 39 additions and 9 deletions

View File

@ -56,6 +56,23 @@
ffff ffff ffff 0000 ffff ffff 0000 ff00
fcfc fcfc fcf8 0000 fefe fefa 0204 f800 ]
@button-wide-icn
&left [
0000 1f3f 3f3f 3f3f 001f 3f7f 7f7f 7f7f
3f3f 3f3f 3f3f 3f3f 7f7f 7f7f 7f7f 7f7f
3f3f 3f3f 3f3f 3f3f 7f7f 7f7f 7f7f 7f7f
3f3f 3f3f 3f1f 0000 7f7f 7f5f 4020 1f00 ]
&center [
0000 ffff ffff ffff 00ff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff ffff ffff ffff ffff ffff
ffff ffff ffff 0000 ffff ffff 0000 ff00 ]
&right [
0000 f8fc fcfc fcfc 00f8 fcfe fefe fefe
fcfc fcfc fcfc fcfc fefe fefe fefe fefe
fcfc fcfc fcfc fcfc fefe fefe fefe fefe
fcfc fcfc fcf8 0000 fefe fefa 0204 f800 ]
@keys
&peep 0000 0060 1008 0808 0808 0808 0000 0000 ={ f090 9190 }
&tot 0000 0008 1868 0808 0808 0808 0000 0000 ={ f090 9190 }

View File

@ -11,8 +11,8 @@
#9c0f .System/r DEO2
#7c0f .System/g DEO2
#de0f .System/b DEO2
#0120 .Screen/width DEO2
#00c0 .Screen/height DEO2
#0130 .Screen/width DEO2
#00d0 .Screen/height DEO2
;on-mouse .Mouse/vector DEO2
<draw-keyboard>
( #010e DEO ) BRK
@ -22,21 +22,23 @@
BRK
@<set-position> ( id* -- )
DUP2 #0009 DIV2 #0030 MUL2 .Screen/y DEO2
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 .Screen/x DEO2
#0009 DIV2k MUL2 SUB2 #0020 MUL2 #0008 ADD2 .Screen/x DEO2
JMP2r
@<draw-keyboard> ( -- )
#0020 #0000
&l ( -- )
DUP2 <set-position>
DUP2 #0006 MUL2 ;layout ADD2
( ) STH2k #0004 ADD2 LDA2
( ) STH2kr #0002 ADD2 LDA2
( ) STH2r LDA2 <draw-key>
( ) INC2 GTH2k ?&l
DUP #1d NEQ ?{ <draw-key-space>
INC2 !&l }
DUP2 #0006 MUL2 ;layout ADD2
( ) STH2k #0004 ADD2 LDA2
( ) STH2kr #0002 ADD2 LDA2
( ) STH2r LDA2 <draw-key>
( ) INC2 GTH2k ?&l
POP2 POP2 JMP2r
@<draw-glyph> ( addr* -- )
@ -63,6 +65,17 @@
.Screen/y DEI2k #001c SUB2 ROT DEO2
JMP2r
@<draw-key-space> ( -- )
[ LIT2 35 -Screen/auto ] DEO
;button-wide-icn/left .Screen/addr DEO2
[ LIT2 81 -Screen/sprite ] DEOk DEOk #ef
&l ( -- )
;button-wide-icn/center .Screen/addr DEO2
[ LIT2 81 -Screen/sprite ] DEO
INC DUP ?&l
POP DEO
JMP2r
@<draw-button> ( -- )
.Screen/x DEI2 .Screen/y DEI2
( | draw )

Binary file not shown.