- moved the file name management out of the single resource lumps.
This is now being managed by the main file system class. The single lumps should only concern themselves with the actual data they manage, not with how the file system presents them to the outside. The IWAD detection code was also switched to use a file system wrapper instead of looking at the single files directly.
This commit is contained in:
parent
89fb479c19
commit
a38633aa22
11 changed files with 210 additions and 218 deletions
|
|
@ -1802,11 +1802,12 @@ void G_ReadSnapshots(FResourceFile *resf)
|
|||
FResourceLump * resl = resf->GetLump(j);
|
||||
if (resl != nullptr)
|
||||
{
|
||||
auto ptr = strstr(resl->FullName, ".map.json");
|
||||
auto name = resl->getName();
|
||||
auto ptr = strstr(name, ".map.json");
|
||||
if (ptr != nullptr)
|
||||
{
|
||||
ptrdiff_t maplen = ptr - resl->FullName.GetChars();
|
||||
FString mapname(resl->FullName.GetChars(), (size_t)maplen);
|
||||
ptrdiff_t maplen = ptr - name;
|
||||
FString mapname(name, (size_t)maplen);
|
||||
i = FindLevelInfo(mapname);
|
||||
if (i != nullptr)
|
||||
{
|
||||
|
|
@ -1815,11 +1816,11 @@ void G_ReadSnapshots(FResourceFile *resf)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto ptr = strstr(resl->FullName, ".mapd.json");
|
||||
auto ptr = strstr(name, ".mapd.json");
|
||||
if (ptr != nullptr)
|
||||
{
|
||||
ptrdiff_t maplen = ptr - resl->FullName.GetChars();
|
||||
FString mapname(resl->FullName.GetChars(), (size_t)maplen);
|
||||
ptrdiff_t maplen = ptr - name;
|
||||
FString mapname(name, (size_t)maplen);
|
||||
TheDefaultLevelInfo.Snapshot = resl->GetRawData();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue