… | |
… | |
414 | aio_load "$dir/$file", $data; |
414 | aio_load "$dir/$file", $data; |
415 | |
415 | |
416 | my $meta = load_cached "$dir/meta", sub { JSON::XS::from_json shift }; |
416 | my $meta = load_cached "$dir/meta", sub { JSON::XS::from_json shift }; |
417 | |
417 | |
418 | $file =~ s/\.res$//; |
418 | $file =~ s/\.res$//; |
419 | $file =~ /\.(ogg|wav|jpg|png)$/; |
419 | $file =~ s/\.(ogg|wav|jpg|png)$//; |
420 | |
420 | |
421 | substr $dir, 0, 1 + length $PATH, ""; |
421 | substr $dir, 0, 1 + length $PATH, ""; |
422 | |
422 | |
423 | $meta = { |
423 | $meta = { |
424 | %{ $meta->{"" } || {} }, |
424 | %{ $meta->{"" } || {} }, |
… | |
… | |
451 | for my $file (@$nondirs) { |
451 | for my $file (@$nondirs) { |
452 | if ($dir =~ /^music(?:\/|$)/) { |
452 | if ($dir =~ /^music(?:\/|$)/) { |
453 | push @res, [$path, $file, 3] # FT_MUSIC |
453 | push @res, [$path, $file, 3] # FT_MUSIC |
454 | if $file =~ /\.(ogg)$/; |
454 | if $file =~ /\.(ogg)$/; |
455 | |
455 | |
456 | } elsif ($dir =~ /^sounds(?:\/|$)/) { |
456 | } elsif ($dir =~ /^sound(?:\/|$)/) { |
457 | push @res, [$path, $file, 5] # FT_SOUND |
457 | push @res, [$path, $file, 5] # FT_SOUND |
458 | if $file =~ /\.(wav|ogg)$/; |
458 | if $file =~ /\.(wav|ogg)$/; |
459 | |
459 | |
460 | } elsif ($dir =~ /^res(?:\/|$)/) { |
460 | } elsif ($dir =~ /^res(?:\/|$)/) { |
461 | push @res, [$path, $file, 0] # FT_FACE |
461 | push @res, [$path, $file, 0] # FT_FACE |