- Roll back filesystem changes. These were causing instabilities in the master branch that were interfering with development.

This commit is contained in:
Rachael Alexanderson 2025-01-03 09:02:12 -05:00
commit f3b0c3ac5e
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
90 changed files with 1349 additions and 1582 deletions

View file

@ -140,9 +140,9 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
// Names with more than 8 characters will only be checked as .wad and .map.
if (strlen(mapname) <= 8) lump_name = fileSystem.CheckNumForName(mapname);
fmt.Format("maps/%s.wad", mapname);
lump_wad = fileSystem.FindFile(fmt.GetChars());
lump_wad = fileSystem.CheckNumForFullName(fmt.GetChars());
fmt.Format("maps/%s.map", mapname);
lump_map = fileSystem.FindFile(fmt.GetChars());
lump_map = fileSystem.CheckNumForFullName(fmt.GetChars());
if (lump_name > lump_wad && lump_name > lump_map && lump_name != -1)
{
@ -167,18 +167,18 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
// This case can only happen if the lump is inside a real WAD file.
// As such any special handling for other types of lumps is skipped.
map->MapLumps[0].Reader = fileSystem.ReopenFileReader(lump_name);
strncpy(map->MapLumps[0].Name, fileSystem.GetFileName(lump_name), 8);
strncpy(map->MapLumps[0].Name, fileSystem.GetFileFullName(lump_name), 8);
map->InWad = true;
int index = 0;
if (stricmp(fileSystem.GetFileName(lump_name + 1), "TEXTMAP") != 0)
if (stricmp(fileSystem.GetFileFullName(lump_name + 1), "TEXTMAP") != 0)
{
for(int i = 1;; i++)
{
// Since levels must be stored in WADs they can't really have full
// names and for any valid level lump this always returns the short name.
const char * lumpname = fileSystem.GetFileName(lump_name + i);
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
try
{
index = GetMapIndex(mapname, index, lumpname, !justcheck);
@ -208,7 +208,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
map->MapLumps[1].Reader = fileSystem.ReopenFileReader(lump_name + 1);
for(int i = 2;; i++)
{
const char * lumpname = fileSystem.GetFileName(lump_name + i);
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
if (lumpname == NULL)
{
@ -264,7 +264,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
}
map->lumpnum = lump_wad;
auto reader = fileSystem.ReopenFileReader(lump_wad);
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetFileName(lump_wad), reader, true);
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetFileFullName(lump_wad), reader, true);
wadReader = map->resource->GetContainerReader();
}
}