(m291) Faster time drawings

This commit is contained in:
Devine Lu Linvega 2024-08-26 10:01:25 -07:00
parent b2ba0b0d9d
commit ea26b7b37d
1 changed files with 17 additions and 9 deletions

View File

@ -402,19 +402,27 @@
POP2 POP2 JMP2r POP2 POP2 JMP2r
@<draw-secfrom> ( time* -- ) @<draw-secfrom> ( time* -- )
DUP2 [ LIT2 &last $2 ] NEQ2 ?{ POP2 JMP2r }
DUP2 ,&last STR2
( | changed )
[ LIT2 15 -Screen/auto ] DEO
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
#0070 .Screen/y DEO2 !<draw-time> #0070 .Screen/y DEO2
#01 ;<draw-glyph>/color STA !<draw-time>
@<draw-secto> ( time* -- ) @<draw-secto> ( time* -- )
.Screen/width DEI2 #0008 SUB2 .Screen/x DEO2 DUP2 [ LIT2 &last $2 ] NEQ2 ?{ POP2 JMP2r }
DUP2 ,&last STR2
( | changed )
[ LIT2 15 -Screen/auto ] DEO
#8000 .Screen/x DEO2
#0070 .Screen/y DEO2 #0070 .Screen/y DEO2
;placeholder/time-b #01 <draw-uf2-right> .Screen/width DEI2 OVR2 <draw-time>
<phex> .Screen/x DEI2 #7ff8 SUB2 SUB2 .Screen/x DEO2
#0a19 DEO #01 ;<draw-glyph>/color STA
JMP2r ( >> )
@<draw-time> ( time* -- ) @<draw-time> ( time* -- )
[ LIT2 15 -Screen/auto ] DEO
( x0:00:00 ) DUP2 #8ca0 DIV2 NIP <draw-dec> ( x0:00:00 ) DUP2 #8ca0 DIV2 NIP <draw-dec>
( 0x:00:00 ) DUP2 #0e10 DIV2 NIP <draw-dec> ( 0x:00:00 ) DUP2 #0e10 DIV2 NIP <draw-dec>
[ LIT ": ] <draw-glyph> [ LIT ": ] <draw-glyph>
@ -422,8 +430,8 @@
( 00:0x:00 ) DUP2 #003c DIV2 NIP <draw-dec> ( 00:0x:00 ) DUP2 #003c DIV2 NIP <draw-dec>
[ LIT ": ] <draw-glyph> [ LIT ": ] <draw-glyph>
( 00:00:x0 ) DUP2 #000a DIV2 NIP <draw-dec> ( 00:00:x0 ) DUP2 #000a DIV2 NIP <draw-dec>
( 00:00:0x ) NIP <draw-dec> ( 00:00:0x ) NIP
JMP2r ( >> )
@<draw-dec> ( value -- ) @<draw-dec> ( value -- )
#0a DIVk MUL SUB [ LIT "0 ] ADD !<draw-glyph> #0a DIVk MUL SUB [ LIT "0 ] ADD !<draw-glyph>