Starting drawing
This commit is contained in:
parent
a6893f40fb
commit
98323fa693
|
@ -13,35 +13,47 @@
|
||||||
#f07f .System/r DEO2
|
#f07f .System/r DEO2
|
||||||
#f0d6 .System/g DEO2
|
#f0d6 .System/g DEO2
|
||||||
#f0b2 .System/b DEO2
|
#f0b2 .System/b DEO2
|
||||||
|
#0000 DUP2 .Screen/x DEO2
|
||||||
|
.Screen/y DEO2
|
||||||
;on-console .Console/vector DEO2
|
;on-console .Console/vector DEO2
|
||||||
|
#15 .Screen/auto DEO
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@on-console ( -> )
|
@on-console ( -> )
|
||||||
.Console/read DEI
|
.Console/read DEI
|
||||||
( linebreak ) DUP #0a NEQ ?{ POP parse-line BRK }
|
( linebreak ) DUP #0a NEQ ?{ POP parse-line BRK }
|
||||||
( append ) #00 ;buf scap/ STA2
|
( append ) #00 ;buf scap/ STA2
|
||||||
BRK
|
( #010e DEO ) BRK
|
||||||
|
|
||||||
@parse-line ( -- )
|
@parse-line ( -- )
|
||||||
;buf is-pixels ?new-pixels
|
;buf is-pixels ?new-pixels
|
||||||
( >> )
|
( >> )
|
||||||
|
|
||||||
@new-glyph ( -- )
|
@new-glyph ( -- )
|
||||||
|
.id LDZ2 #0001 SUB2 <draw-glyph>
|
||||||
.id LDZ2 <phex>
|
.id LDZ2 <phex>
|
||||||
#2018 DEO
|
#2018 DEO
|
||||||
;buf <pstr>
|
;buf <pstr>
|
||||||
#0a18 DEO
|
#0a18 DEO
|
||||||
( clean ) #0000 ;buf STA2
|
( clean ) #0000 ;buf STA2
|
||||||
.id LDZ2 INC2 .id STZ2
|
.id LDZ2 INC2 .id STZ2
|
||||||
|
#0000 ;new-pixels/row STA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@new-pixels ( -- )
|
@new-pixels ( -- )
|
||||||
|
#ff .id LDZ2 #40 SFT2 ;glyphs ADD2 [ LIT2 &row $2 ] INC2k ,&row STR2
|
||||||
|
ADD2 STA
|
||||||
( clean ) #0000 ;buf STA2
|
( clean ) #0000 ;buf STA2
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@is-pixels ( buf* -- f )
|
@is-pixels ( buf* -- f )
|
||||||
LDA DUP [ LIT "0 ] EQU SWP [ LIT "1 ] EQU ORA JMP2r
|
LDA DUP [ LIT "0 ] EQU SWP [ LIT "1 ] EQU ORA JMP2r
|
||||||
|
|
||||||
|
@<draw-glyph> ( id* -- )
|
||||||
|
#40 SFT2 ;glyphs ADD2 .Screen/addr DEO2
|
||||||
|
#07 .Screen/sprite DEO
|
||||||
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue