mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
Revert "- fixed music lookup for user maps."
This reverts commit 9558e7d518c1d5f7a898fcb2564078bd9ec956ac.
This commit is contained in:
parent
4843cf98d8
commit
87a32d9095
2 changed files with 6 additions and 18 deletions
|
@ -1668,20 +1668,3 @@ FResourceLump* FileSystem::GetFileAt(int no)
|
|||
return FileInfo[no].lump;
|
||||
}
|
||||
|
||||
#include "c_dispatch.h"
|
||||
|
||||
CCMD(fs_dir)
|
||||
{
|
||||
int numfiles = fileSystem.GetNumEntries();
|
||||
|
||||
for (int i = 0; i < numfiles; i++)
|
||||
{
|
||||
auto container = fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(i));
|
||||
auto fn1 = fileSystem.GetFileFullName(i);
|
||||
auto fns = fileSystem.GetFileShortName(i);
|
||||
auto fnid = fileSystem.GetResourceId(i);
|
||||
auto length = fileSystem.FileLength(i);
|
||||
bool hidden = fileSystem.FindFile(fn1) != i;
|
||||
Printf(PRINT_NONOTIFY, "%s%-64s %-15s (%5d) %10d %s %s\n", hidden? TEXTCOLOR_RED : TEXTCOLOR_UNTRANSLATED, fn1, fns, fnid, length, container, hidden ? "(h)" : "");
|
||||
}
|
||||
}
|
|
@ -75,10 +75,15 @@ FString G_SetupFilenameBasedMusic(const char* fn, const char* defmusic)
|
|||
FString name = StripExtension(fn);
|
||||
FString test;
|
||||
|
||||
// Test if a real file with this name exists with all known extensions for music.
|
||||
for (auto& ext : knownMusicExts)
|
||||
{
|
||||
test.Format("%s.%s", name.GetChars(), ext);
|
||||
if (fileSystem.FileExists(test)) return test;
|
||||
if (FileExists(test)) return test;
|
||||
#ifdef __unix__
|
||||
test.Format("%s.%s", name.GetChars(), FString(ext).MakeLower().GetChars());
|
||||
if (FileExists(test)) return test;
|
||||
#endif
|
||||
}
|
||||
return defmusic;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue