(m291) Added folder markers

This commit is contained in:
Devine Lu Linvega 2024-08-25 18:22:50 -07:00
parent 4b7d66fe7e
commit 0018692a2b
1 changed files with 33 additions and 31 deletions

View File

@ -1,23 +1,26 @@
|00 ( .. )
@System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 |00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller &vector $2 &button $1 &key $1 |80 @Controller &vector $2 &button $1 &key $1
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1 |90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1 &pad $4 &scrolly &scrolly-hb $1 &scrolly-lb $1
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|0000 @misc $1
@selection $1 &mod $1 |000
@path $2 &null $80 @misc $1
@selection $1 &mod $1
@path $2 &null $80
@lines &folders $1 &roms $1 &misc $1
@lines &folders $1 &roms $1 &misc $1 |100
|0100 @on-reset ( -> )
@on-reset ( -> )
;meta #06 DEO2 ;meta #06 DEO2
#e1ff .System/r DEO2 #d2d2 DUP2 .System/r DEO2
#e1ff .System/g DEO2 DUP2 .System/g DEO2
#e1f4 .System/b DEO2 .System/b DEO2
<load-theme> <load-theme>
#0100 .Screen/width DEO2 #0100 .Screen/width DEO2
;dict/home-path set-path <refresh-dir> ;dict/home-path set-path <refresh-dir>
@ -26,10 +29,10 @@
BRK BRK
@meta $1 @meta $1
( name ) "Menu(Porporo) 0a ( name ) "m291 0a
( desc ) "File 20 "Browser 0a ( desc ) "Audio 20 "Player 0a
( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a ( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
( date ) "9 20 "Dec 20 "2023 $1 ( date ) "25 20 "Aug 20 "2024 $1
( exts ) 00 ( exts ) 00
@on-mouse ( -> ) @on-mouse ( -> )
@ -107,7 +110,7 @@
@<parse-line> ( line* -- ) @<parse-line> ( line* -- )
#0005 ADD2 LDAk [ LIT ". ] EQU ?&hidden #0005 ADD2 LDAk [ LIT ". ] EQU ?&hidden
is-folder ?&folder is-folder ?&folder
is-rom ?&rom is-mp3 ?&mp3
;mem/misc [ LIT2 00 -lines/misc ] LDZ #40 SFT2 ADD2 <lcpy> ;mem/misc [ LIT2 00 -lines/misc ] LDZ #40 SFT2 ADD2 <lcpy>
.lines/misc LDZ INC .lines/misc STZ .lines/misc LDZ INC .lines/misc STZ
JMP2r JMP2r
@ -117,7 +120,7 @@
.lines/folders LDZ INC .lines/folders STZ .lines/folders LDZ INC .lines/folders STZ
JMP2r JMP2r
&rom ( line* -- ) &mp3 ( line* -- )
;mem/roms [ LIT2 00 -lines/roms ] LDZ #40 SFT2 ADD2 <lcpy> ;mem/roms [ LIT2 00 -lines/roms ] LDZ #40 SFT2 ADD2 <lcpy>
.lines/roms LDZ INC .lines/roms STZ .lines/roms LDZ INC .lines/roms STZ
JMP2r JMP2r
@ -228,7 +231,7 @@
@is-folder ( line* -- line* f ) @is-folder ( line* -- line* f )
DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r
@is-rom ( line* -- line*f ) @is-mp3 ( line* -- line*f )
DUP2 lcap/ #0003 SUB2 ;dict/mp3-ext !scmp3 DUP2 lcap/ #0003 SUB2 ;dict/mp3-ext !scmp3
( (
@ -274,7 +277,7 @@
( | folders ) ( | folders )
;mem/folders .lines/folders LDZ #01 .selection LDZ <draw-list> ;mem/folders .lines/folders LDZ #01 .selection LDZ <draw-list>
[ LIT2 00 -lines/folders ] LDZ EQU ?{ ;dash-icn <draw-spacer> } [ LIT2 00 -lines/folders ] LDZ EQU ?{ ;dash-icn <draw-spacer> }
;mem/roms .lines/roms LDZ #00 .selection LDZ <draw-list> ;mem/roms .lines/roms LDZ #00 .selection LDZ .lines/folders LDZ SUB <draw-list>
[ LIT2 00 -misc ] LDZ EQU ?{ [ LIT2 00 -misc ] LDZ EQU ?{
;mem/misc .lines/misc LDZ #00 .selection LDZ <draw-list> } ;mem/misc .lines/misc LDZ #00 .selection LDZ <draw-list> }
JMP2r JMP2r
@ -293,7 +296,7 @@
.Screen/y DEI2 .Screen/y DEI2
( ) ;fill-icn .Screen/addr DEO2 ( ) ;fill-icn .Screen/addr DEO2
[ LIT2 f2 -Screen/auto ] DEO [ LIT2 f2 -Screen/auto ] DEO
#02 .Screen/sprite DEOk DEOk [ LIT2 01 -Screen/sprite ] DEOk DEOk
( | .. ) ( | .. )
.Screen/x DEI2 #0080 ADD2 .Screen/x DEO2 .Screen/x DEI2 #0080 ADD2 .Screen/x DEO2
.Screen/y DEI2 #0010 SUB2 .Screen/y DEO2 .Screen/y DEI2 #0010 SUB2 .Screen/y DEO2
@ -326,24 +329,23 @@
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
#00 SWP2 ,&t STR2 #00 SWP2 ,&t STR2
&>l ( -- ) &>l ( -- )
[ LITr 05 ]
( | selected ) ( | selected )
DUP [ LIT &sel $1 ] NEQ ?{ <draw-background> } DUP [ LIT &sel $1 ] NEQ ?{
POPr [ LITr 06 ] <draw-background> }
( | folder )
[ LIT2 00 &folder $1 ] EQU ?{
.Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO
.Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
[ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2
STHkr .Screen/sprite DEOk DEO
.Screen/y DEO2 }
( | normal ) ( | normal )
#0008 .Screen/x DEO2 #0008 .Screen/x DEO2
#00 OVR #40 SFT2 [ LIT2 &t $2 ] ADD2 #05 <draw-uf2> #00 OVR #40 SFT2 [ LIT2 &t $2 ] ADD2 STHr <draw-uf2>
.Screen/y DEI2k #0010 ADD2 ROT DEO2 .Screen/y DEI2k #0010 ADD2 ROT DEO2
INC GTHk ?&>l INC GTHk ?&>l
POP2 POP2 JMP2r
( | draw cursor marker )
[ LIT &folder $1 ] ?{ JMP2r }
JMP2r
[ LIT2 15 -Screen/auto ] DEO
;fill-icn .Screen/addr DEO2
.Screen/width DEI2 #0010 SUB2 .Screen/x DEO2
.Screen/y DEI2k #0020 SUB2 ROT DEO2
#05 .Screen/sprite DEO
.Screen/y DEI2k #0010 ADD2 ROT DEO2
JMP2r
@<draw-uf2> ( addr* color -- ) @<draw-uf2> ( addr* color -- )
,&color STR ,&color STR