- renamed more stuff and also moved the Strife teaser voice handling out of the file system.

This commit is contained in:
Christoph Oelckers 2020-04-11 13:27:19 +02:00
commit 80c6d5b276
91 changed files with 538 additions and 499 deletions

View file

@ -145,8 +145,8 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
if (lump_name > lump_wad && lump_name > lump_map && lump_name != -1)
{
int lumpfile = fileSystem.GetLumpFile(lump_name);
int nextfile = fileSystem.GetLumpFile(lump_name+1);
int lumpfile = fileSystem.GetFileContainer(lump_name);
int nextfile = fileSystem.GetFileContainer(lump_name+1);
map->lumpnum = lump_name;
@ -154,7 +154,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
{
// The following lump is from a different file so whatever this is,
// it is not a multi-lump Doom level so let's assume it is a Build map.
map->MapLumps[0].Reader = fileSystem.ReopenLumpReader(lump_name);
map->MapLumps[0].Reader = fileSystem.ReopenFileReader(lump_name);
if (!P_IsBuildMap(map))
{
delete map;
@ -165,19 +165,19 @@ 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.ReopenLumpReader(lump_name);
strncpy(map->MapLumps[0].Name, fileSystem.GetLumpFullName(lump_name), 8);
map->MapLumps[0].Reader = fileSystem.ReopenFileReader(lump_name);
strncpy(map->MapLumps[0].Name, fileSystem.GetFileFullName(lump_name), 8);
map->InWad = true;
int index = 0;
if (stricmp(fileSystem.GetLumpFullName(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.GetLumpFullName(lump_name + i);
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
try
{
index = GetMapIndex(mapname, index, lumpname, !justcheck);
@ -197,17 +197,17 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
// The next lump is not part of this map anymore
if (index < 0) break;
map->MapLumps[index].Reader = fileSystem.ReopenLumpReader(lump_name + i);
map->MapLumps[index].Reader = fileSystem.ReopenFileReader(lump_name + i);
strncpy(map->MapLumps[index].Name, lumpname, 8);
}
}
else
{
map->isText = true;
map->MapLumps[1].Reader = fileSystem.ReopenLumpReader(lump_name + 1);
map->MapLumps[1].Reader = fileSystem.ReopenFileReader(lump_name + 1);
for(int i = 2;; i++)
{
const char * lumpname = fileSystem.GetLumpFullName(lump_name + i);
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
if (lumpname == NULL)
{
@ -240,7 +240,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
break;
}
else continue;
map->MapLumps[index].Reader = fileSystem.ReopenLumpReader(lump_name + i);
map->MapLumps[index].Reader = fileSystem.ReopenFileReader(lump_name + i);
strncpy(map->MapLumps[index].Name, lumpname, 8);
}
}
@ -258,8 +258,8 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
return NULL;
}
map->lumpnum = lump_wad;
auto reader = fileSystem.ReopenLumpReader(lump_wad);
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetLumpFullName(lump_wad), reader, true);
auto reader = fileSystem.ReopenFileReader(lump_wad);
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetFileFullName(lump_wad), reader, true);
wadReader = map->resource->GetReader();
}
}