- use TArray and FString in resource file management.
This commit is contained in:
parent
4d06c17a44
commit
191f2d9d76
13 changed files with 55 additions and 73 deletions
|
|
@ -102,9 +102,9 @@ FDirectory::FDirectory(const char * directory)
|
|||
#ifdef _WIN32
|
||||
free((void *)directory);
|
||||
#endif
|
||||
dirname.ReplaceChars('\\', '/');
|
||||
FixPathSeperator(dirname);
|
||||
if (dirname[dirname.Len()-1] != '/') dirname += '/';
|
||||
Filename = copystring(dirname);
|
||||
FileName = dirname;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
|
||||
bool FDirectory::Open(bool quiet)
|
||||
{
|
||||
NumLumps = AddDirectory(Filename);
|
||||
NumLumps = AddDirectory(FileName);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
PostProcessArchive(&Lumps[0], sizeof(FDirectoryLump));
|
||||
return true;
|
||||
|
|
@ -268,7 +268,7 @@ void FDirectory::AddEntry(const char *fullpath, int size)
|
|||
lump_p->mFullPath = fullpath;
|
||||
|
||||
// [mxd] Convert name to lowercase
|
||||
FString name = fullpath + strlen(Filename);
|
||||
FString name = fullpath + strlen(FileName);
|
||||
name.ToLower();
|
||||
|
||||
// The lump's name is only the part relative to the main directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue