(m291) Starting time drawing
This commit is contained in:
parent
ccc8c12f4d
commit
b2ba0b0d9d
|
@ -147,11 +147,11 @@
|
|||
( skip curr-frame ) #20 find-next INC2
|
||||
( skip next-frame ) #20 find-next INC2
|
||||
( | <curr-secs> )
|
||||
parse-dec STH2
|
||||
parse-dec STH2k <draw-secfrom>
|
||||
INC2 LDAk [ LIT "5 ] LTH ?{ INC2r }
|
||||
#20 find-next INC2
|
||||
( | <remaining-secs> )
|
||||
parse-dec STH2
|
||||
parse-dec STH2k <draw-secto>
|
||||
INC2 LDAk [ LIT "5 ] LTH ?{ INC2r }
|
||||
POP2 STH2r STH2r SWP2 OVR2 ADD2 SWP2
|
||||
( | print )
|
||||
|
@ -401,6 +401,33 @@
|
|||
INC2 GTH2k ?&>l
|
||||
POP2 POP2 JMP2r
|
||||
|
||||
@<draw-secfrom> ( time* -- )
|
||||
#0008 .Screen/x DEO2
|
||||
#0070 .Screen/y DEO2 !<draw-time>
|
||||
|
||||
@<draw-secto> ( time* -- )
|
||||
.Screen/width DEI2 #0008 SUB2 .Screen/x DEO2
|
||||
#0070 .Screen/y DEO2
|
||||
;placeholder/time-b #01 <draw-uf2-right>
|
||||
<phex>
|
||||
#0a19 DEO
|
||||
JMP2r
|
||||
|
||||
@<draw-time> ( time* -- )
|
||||
[ LIT2 15 -Screen/auto ] DEO
|
||||
( x0:00:00 ) DUP2 #8ca0 DIV2 NIP <draw-dec>
|
||||
( 0x:00:00 ) DUP2 #0e10 DIV2 NIP <draw-dec>
|
||||
[ LIT ": ] <draw-glyph>
|
||||
( 00:x0:00 ) DUP2 #0258 DIV2 NIP <draw-dec>
|
||||
( 00:0x:00 ) DUP2 #003c DIV2 NIP <draw-dec>
|
||||
[ LIT ": ] <draw-glyph>
|
||||
( 00:00:x0 ) DUP2 #000a DIV2 NIP <draw-dec>
|
||||
( 00:00:0x ) NIP <draw-dec>
|
||||
JMP2r
|
||||
|
||||
@<draw-dec> ( value -- )
|
||||
#0a DIVk MUL SUB [ LIT "0 ] ADD !<draw-glyph>
|
||||
|
||||
@<draw-spacer> ( addr* -- )
|
||||
#0000 .Screen/x DEO2
|
||||
.Screen/addr DEO2
|
||||
|
@ -468,17 +495,21 @@
|
|||
( >> )
|
||||
|
||||
@<draw-uf2> ( text* color -- )
|
||||
,&color STR
|
||||
,<draw-glyph>/color STR
|
||||
[ LIT2 15 -Screen/auto ] DEO
|
||||
&>w ( -- )
|
||||
LDAk #1f GTH ?{ POP2 JMP2r }
|
||||
LDAk #20 SUB #00 SWP
|
||||
( ) DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
||||
( ) ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
|
||||
( ) [ LIT &color 05 ] .Screen/sprite DEOk DEO
|
||||
.Screen/x DEO2
|
||||
LDAk <draw-glyph>
|
||||
INC2 !&>w
|
||||
|
||||
@<draw-glyph> ( char -- )
|
||||
#20 SUB #00 SWP
|
||||
( ) DUP2 #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
|
||||
( ) ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
|
||||
( ) [ LIT &color 05 ] .Screen/sprite DEOk DEO
|
||||
.Screen/x DEO2
|
||||
JMP2r
|
||||
|
||||
@<update-cursor> ( color addr* -- )
|
||||
;fill-icn .Screen/addr DEO2
|
||||
#40 <draw-cursor>
|
||||
|
|
Loading…
Reference in New Issue