- Add GetLongName() method to FileSystem class.

This commit is contained in:
Mitchell Richters 2021-08-14 23:48:52 +10:00
parent a681aad281
commit 907e0974e9
2 changed files with 7 additions and 0 deletions

View file

@ -899,6 +899,12 @@ LumpShortName& FileSystem::GetShortName(int i)
return FileInfo[i].shortName; return FileInfo[i].shortName;
} }
FString& FileSystem::GetLongName(int i)
{
if ((unsigned)i >= NumEntries) I_Error("GetShortName: Invalid index");
return FileInfo[i].longName;
}
void FileSystem::RenameFile(int num, const char* newfn) void FileSystem::RenameFile(int num, const char* newfn)
{ {
if ((unsigned)num >= NumEntries) I_Error("RenameFile: Invalid index"); if ((unsigned)num >= NumEntries) I_Error("RenameFile: Invalid index");

View file

@ -117,6 +117,7 @@ public:
} }
LumpShortName& GetShortName(int i); // may only be called before the hash chains are set up. LumpShortName& GetShortName(int i); // may only be called before the hash chains are set up.
FString& GetLongName(int i); // may only be called before the hash chains are set up.
void RenameFile(int num, const char* fn); void RenameFile(int num, const char* fn);
bool CreatePathlessCopy(const char* name, int id, int flags); bool CreatePathlessCopy(const char* name, int id, int flags);