I made something familiar in DBC. It loads all the files in the current directory. But without displaying them. It could save some space for big games.
`************************************************
` Media loader
`************************************************
sync on
LoadMedia()
suspend for key
end
function LoadMedia()
perform checklist for files
obj = 1 : bmp = 1 : avi = 1 : snd = 1 : mus = 1
find first
for x = 1 to checklist quantity()
find next
name$ = get file name$()
l = len( name$ )
ext$ = mid$( name$, l - 2 ) + mid$( name$, l - 1 ) + mid$( name$, l )
if lower$( ext$ ) = "mid" then load music name$,mus : inc mus
if lower$( ext$ ) = "3ds" then load object name$,obj : inc obj
if lower$( ext$ ) = "avi" then load animation name$,ani : inc ani
if lower$( ext$ ) = "wav" then load sound name$,snd : inc snd
if lower$( ext$ ) = mid$(name$, l-2) + ".x" then load object name$,obj : inc obj
if lower$( ext$ ) = "mp3" then load music name$,mus : inc mus
if lower$( ext$ ) = "bmp" then load image name$,bmp : inc bmp
if lower$( ext$ ) = "jpg" then load image name$,bmp : inc bmp
next x
endfunction