take namespace enum out of namespace and added CheckNumForAnyName and CheckNumForFullNameInFile to clarify the meaning of CheckNumForFullName.

This is to take some renaming noise out of the upcoming refactoring.
This commit is contained in:
Christoph Oelckers 2024-11-24 13:18:46 +01:00
commit 634a646c2d
51 changed files with 118 additions and 122 deletions

View file

@ -349,7 +349,7 @@ void R_InitSpriteDefs ()
memset(vhashes.Data(), -1, sizeof(VHasher)*vmax);
for (i = 0; i < vmax; ++i)
{
if (fileSystem.GetFileNamespace(i) == FileSys::ns_voxels)
if (fileSystem.GetFileNamespace(i) == ns_voxels)
{
size_t namelen;
int spin;
@ -715,7 +715,7 @@ void R_InitSkins (void)
int lump = fileSystem.CheckNumForName (sc.String, Skins[i].namespc);
if (lump == -1)
{
lump = fileSystem.CheckNumForFullName (sc.String, true, FileSys::ns_sounds);
lump = fileSystem.CheckNumForAnyName (sc.String, ns_sounds);
}
if (lump != -1)
{
@ -748,7 +748,7 @@ void R_InitSkins (void)
sndlumps[j] = fileSystem.CheckNumForName (sc.String, Skins[i].namespc);
if (sndlumps[j] == -1)
{ // Replacement not found, try finding it in the global namespace
sndlumps[j] = fileSystem.CheckNumForFullName (sc.String, true, FileSys::ns_sounds);
sndlumps[j] = fileSystem.CheckNumForAnyName (sc.String, ns_sounds);
}
}
}
@ -946,7 +946,7 @@ CCMD (skins)
static void R_CreateSkinTranslation (const char *palname)
{
auto lump = fileSystem.ReadFile (palname);
auto lump = fileSystem.ReadFile (fileSystem.GetNumForName(palname));
auto otherPal = lump.bytes();
for (int i = 0; i < 256; ++i)
@ -1016,7 +1016,7 @@ void R_InitSprites ()
Skins[i].range0end = basetype->IntVar(NAME_ColorRangeEnd);
Skins[i].Scale = basetype->Scale;
Skins[i].sprite = basetype->SpawnState->sprite;
Skins[i].namespc = FileSys::ns_global;
Skins[i].namespc = ns_global;
PlayerClasses[i].Skins.Push (i);