(m291) Optimizations

This commit is contained in:
Devine Lu Linvega 2024-08-27 08:44:46 -07:00
parent 589f6b20a6
commit e152dcb462
1 changed files with 21 additions and 33 deletions

View File

@ -43,7 +43,8 @@
[ LIT2 03 -Console/mode ] DEO
[ LIT2 01 -Console/exec ] DEO
[ LIT2 00 -playing ] STZ
;dict/home-path set-path <refresh-dir>
;dict/home-path path/<set>
<refresh-dir>
( | unlock )
;on-mouse .Mouse/vector DEO2
;on-control .Controller/vector DEO2
@ -226,10 +227,10 @@
@<enter> ( folder* -- )
[ LIT2 00 -selection ] STZ
push-path !<refresh-dir>
path/<push> !<refresh-dir>
@<leave> ( -- )
pop-path !<refresh-dir>
path/pop !<refresh-dir>
@<escape> ( -- )
;path/null LDA ?<leave>
@ -272,9 +273,12 @@
@handle-id3 ( buf* char -- )
POP [ LIT ". ] find-next INC2 LDA2k
( | parse lines )
DUP2 [ LIT2 "ti ] NEQ2 ?{ OVR2 <set-title> }
DUP2 [ LIT2 "ar ] NEQ2 ?{ OVR2 <set-artist> }
DUP2 [ LIT2 "al ] NEQ2 ?{ OVR2 <set-album> }
DUP2 [ LIT2 "ti ] NEQ2 ?{
OVR2 [ LIT ": ] find-next INC2 ;id3/title <scpy> }
DUP2 [ LIT2 "ar ] NEQ2 ?{
OVR2 [ LIT ": ] find-next INC2 ;id3/artist <scpy> }
DUP2 [ LIT2 "al ] NEQ2 ?{
OVR2 [ LIT ": ] find-next INC2 ;id3/album <scpy> }
POP2 POP2 !message/<new>
@handle-pause ( buf* char -- )
@ -354,8 +358,7 @@
.lines/folders LDZ .lines/tracks LDZ ADD JMP2r
@has-spacer ( -- f )
[ LIT2 00 -lines/folders ] LDZ NEQ
( ) [ LIT2 00 -lines/tracks ] LDZ NEQ AND JMP2r
[ LIT2 00 -lines/folders ] LDZ NEQ [ LIT2 00 -lines/tracks ] LDZ NEQ AND JMP2r
@is-folder ( line* -- line* f )
DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r
@ -372,39 +375,24 @@
INC2 #01 SFT2 INC2r LITr 01 SFT2r }
[ LIT2r 00e7 ] MUL2r STH2r SWP2 DIV2 JMP2r
(
@|id3 )
@<set-title> ( id3* -- )
;id3/title <sclr>
[ LIT ": ] find-next INC2 ;id3/title !<scpy>
@<set-artist> ( id3* -- )
;id3/artist <sclr>
[ LIT ": ] find-next INC2 ;id3/artist !<scpy>
@<set-album> ( id3* -- )
;id3/album <sclr>
[ LIT ": ] find-next INC2 ;id3/album !<scpy>
(
@|path )
@set-path ( path* -- )
@path/<set> ( path* -- )
;path !<scpy>
@push-path ( subpath* -- )
@path/<push> ( subpath* -- )
;path scap/ !<scpy>
@pop-path ( -- )
@path/pop ( -- )
;path scap/ #0001 SUB2
&w ( -- )
&>w ( -- )
;path/null LDA ?{ POP2 JMP2r }
#0001 SUB2 LDAk [ LIT "/ ] NEQ ?{
LITr 00 STH2
INC2r STAr
JMP2r }
!&w
!&>w
(
@|drawing )