Draw layer
This commit is contained in:
parent
9920d169bd
commit
b15cf14dfc
|
@ -61,14 +61,33 @@
|
||||||
.hover LDZ2 ;btn-chr <draw-key-id>
|
.hover LDZ2 ;btn-chr <draw-key-id>
|
||||||
DUP2 ;btn-press-chr <draw-key-id>
|
DUP2 ;btn-press-chr <draw-key-id>
|
||||||
( | event )
|
( | event )
|
||||||
( key ) #0006 MUL2 ;layout ADD2 LDA2
|
( key ) #0006 MUL2 ;layout ADD2
|
||||||
|
( layer ) get-layer #10 SFT2 ADD2 LDA2
|
||||||
( length ) #0010 ADD2 LDA2k SWP2 INC2 INC2
|
( length ) #0010 ADD2 LDA2k SWP2 INC2 INC2
|
||||||
&l ( -- )
|
&l ( -- )
|
||||||
LDAk <phex>/b
|
LDAk #18 DEO
|
||||||
#0a18 DEO
|
|
||||||
INC2 GTH2k ?&l
|
INC2 GTH2k ?&l
|
||||||
POP2 POP2 JMP2r
|
POP2 POP2 JMP2r
|
||||||
|
|
||||||
|
@get-layer ( -- layer* )
|
||||||
|
.Mouse/state DEI
|
||||||
|
( ) DUP #02 AND ?&top
|
||||||
|
( ) #04 AND ?&bottom
|
||||||
|
[ LIT2 00 -layer ] LDZ JMP2r
|
||||||
|
&top POP #0001 JMP2r
|
||||||
|
&bottom #0002 JMP2r
|
||||||
|
|
||||||
|
@<detect-layer> ( state -- )
|
||||||
|
DUP #02 AND ?&top
|
||||||
|
DUP #04 AND ?&bottom
|
||||||
|
POP JMP2r
|
||||||
|
&top ( state -- )
|
||||||
|
POP #01 .layer STZ
|
||||||
|
JMP2r
|
||||||
|
&bottom ( state -- )
|
||||||
|
POP #02 .layer STZ
|
||||||
|
JMP2r
|
||||||
|
|
||||||
@<toggle-layer> ( -- )
|
@<toggle-layer> ( -- )
|
||||||
.layer LDZ INC #03 DIVk MUL SUB .layer STZ
|
.layer LDZ INC #03 DIVk MUL SUB .layer STZ
|
||||||
!<draw-keyboard>
|
!<draw-keyboard>
|
||||||
|
@ -122,11 +141,11 @@
|
||||||
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
||||||
.Screen/y DEI2k #0024 STHr SUB STHr SUB SUB2 ROT DEO2
|
.Screen/y DEI2k #0024 STHr SUB STHr SUB SUB2 ROT DEO2
|
||||||
( | a )
|
( | a )
|
||||||
#0a00 [ LIT2 01 -layer ] LDZ EQU [ JMP SWP POP ] <draw-glyph>
|
#0a00 [ LIT2 00 -layer ] LDZ EQU [ JMP SWP POP ] <draw-glyph>
|
||||||
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
||||||
.Screen/y DEI2k #000c ADD2 ROT DEO2
|
.Screen/y DEI2k #000c ADD2 ROT DEO2
|
||||||
( | b )
|
( | b )
|
||||||
#0a00 [ LIT2 00 -layer ] LDZ EQU [ JMP SWP POP ] <draw-glyph>
|
#0a00 [ LIT2 01 -layer ] LDZ EQU [ JMP SWP POP ] <draw-glyph>
|
||||||
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
.Screen/x DEI2k #0002 SUB2 ROT DEO2
|
||||||
.Screen/y DEI2k #000c ADD2 ROT DEO2
|
.Screen/y DEI2k #000c ADD2 ROT DEO2
|
||||||
( | c )
|
( | c )
|
||||||
|
|
Loading…
Reference in New Issue