(m291) Cleanup

This commit is contained in:
Devine Lu Linvega 2024-08-25 18:46:26 -07:00
parent 82f4624614
commit 33ef9d4450
1 changed files with 8 additions and 62 deletions

View File

@ -35,7 +35,7 @@
;on-mouse .Mouse/vector DEO2
;on-control .Controller/vector DEO2
( | play something )
;dict/mpg .Console/addr DEO2
;dict/mpg-cmd .Console/addr DEO2
#03 .Console/mode DEO
#01 .Console/exec DEO
BRK
@ -157,48 +157,21 @@
POP JMP2r
&roms ( id -- )
#00 SWP #40 SFT2 ;mem/roms ADD2 !<send-path>
#00 SWP #40 SFT2 ;mem/roms ADD2 !<send-load>
&misc ( id -- )
#00 SWP #40 SFT2 ;mem/misc ADD2 !<send-file>
#00 SWP #40 SFT2 ;mem/misc ADD2 !<send-load>
&folder ( id -- )
#00 SWP #40 SFT2 ;mem/folders ADD2 !<enter>
@<send-path> ( file* -- )
.selection/mod LDZ ?&special
@<send-load> ( file* -- )
;dict/load-cmd <pstr>
;path <pstr>
<pstr>/
#0a18 DEO
JMP2r
&special ( file* -- )
[ LIT2 01 -Console/type ] DEO
;path <pstr>
<pstr>/
#0a18 DEO
JMP2r
@<send-file> ( file* -- )
[ LIT2 01 -Console/type ] DEO
.selection/mod LDZ ?&special
;path ;mem/filepath STH2k <scpy>
STH2kr scap/ <scpy>
STH2r .File/name DEO2
#0001 .File/length DEO2
&s ( -- )
;&b .File/read DEO2
[ LIT2 &b $1 18 ] DEO
.File/success-lb DEI ?&s
JMP2r
&special ( file* -- )
;path <pstr>
<pstr>/
#0a18 DEO
JMP2r
@<enter> ( folder* -- )
.selection/mod LDZ ?&special
push-path !<refresh-dir>
@ -231,11 +204,6 @@
[ LIT2 00 -lines/misc ] LDZ NEQ ORA }
AND JMP2r
@get-cat ( id -- color )
INC .lines/folders LDZ GTHk ?{ POP2 #02 JMP2r }
SUB .lines/roms LDZ GTH ?{ #02 JMP2r }
#01 JMP2r
@is-folder ( line* -- line* f )
DUP2 lcap/ #0001 SUB2 LDA [ LIT "/ ] EQU JMP2r
@ -312,24 +280,6 @@
.Screen/y DEO2
JMP2r
@<draw-highlight> ( id -- )
( empty ) count-lines ?{ POP JMP2r }
;fill-icn .Screen/addr DEO2
[ LIT2 f2 -Screen/auto ] DEO
#0000 .Screen/x DEO2
STH
( lines ) #00 STHkr #40 SFT2
( | spacer )
has-spacer #00 EQU ?{
#00 STHkr INC .lines/folders LDZ GTH #30 SFT2 ADD2 }
( padding ) #0013 ADD2 .Screen/y DEO2
STHr get-cat .Screen/sprite DEOk DEOk
( | right-side )
.Screen/x DEI2 #0080 ADD2 .Screen/x DEO2
.Screen/y DEI2 #0010 SUB2 .Screen/y DEO2
DEOk DEO
JMP2r
@<draw-list> ( addr* length folder selection -- )
,&sel STR
,&folder STR
@ -420,10 +370,8 @@
POP2 POP2r JMP2r
@<pstr> ( str* -- )
&>w ( -- )
LDAk #18 DEO
INC2 & LDAk ?&>w
LDAk #18 DEO
INC2 & LDAk ?<pstr>
POP2 JMP2r
@<phex> ( short* -: )
@ -431,7 +379,7 @@
&b ( byte -: )
DUP #04 SFT /c
&c ( byte -: )
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO
JMP2r
(
@ -453,13 +401,11 @@
(
@|assets )
@cmd1 "load 20 "always_wrong.mp3 0a $1
@dict
&home-path "./ $1
&mp3-ext "mp3 $1
&empty "(empty) $1
&mpg "mpg123 20 "-R $1
&mpg-cmd "mpg123 20 "-R $1
&load-cmd "load 20 $1
@touch-chr [