Loop long title around

This commit is contained in:
Devine Lu Linvega 2024-08-29 20:05:49 -07:00
parent c535dbf3d4
commit fe35aadb66
1 changed files with 13 additions and 2 deletions

View File

@ -589,9 +589,9 @@
DUP #0f AND ?{
#0020 .Screen/y DEO2
<clear-line>
#0008 .Screen/x DEO2
#0001 .Screen/x DEO2
#0020 .Screen/y DEO2
#04 SFT2 ;id3/title llen DIV2k MUL2 SUB2 ;id3/title ADD2 #01 !<draw-uf2> }
#04 SFT2 ;id3/title !<draw-uf2-scroll> }
POP2 }
JMP2r
@ -795,6 +795,17 @@
ADD2r next-glyph LDAk ?&>while
POP2 STH2r JMP2r
@<draw-uf2-scroll> ( offset* text* -- )
[ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 ,&bound STR2
STH2k llen DIV2k MUL2 SUB2 STH2kr ADD2
&>w ( -- )
.Screen/x DEI2 [ LIT2 &bound $2 ] LTH2 ?{ POP2 POP2r JMP2r }
LDAk DUP ?{
POP2 POP STH2kr #20 <draw-glyph> !&>w }
<draw-glyph>
next-glyph !&>w
@<draw-uf2-center> ( text* color -- )
STH
.Screen/x DEI2 OVR2 get-uf2-width #01 SFT2 SUB2 .Screen/x DEO2