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

@ -373,10 +373,10 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
i_data += "#define NPOT_EMULATION\nuniform vec2 uNpotEmulation;\n";
#endif
int vp_lump = fileSystem.CheckNumForFullName(vert_prog_lump, 0);
int vp_lump = fileSystem.CheckNumForFullNameInFile(vert_prog_lump, 0);
if (vp_lump == -1) I_Error("Unable to load '%s'", vert_prog_lump);
int fp_lump = fileSystem.CheckNumForFullName(frag_prog_lump, 0);
int fp_lump = fileSystem.CheckNumForFullNameInFile(frag_prog_lump, 0);
if (fp_lump == -1) I_Error("Unable to load '%s'", frag_prog_lump);
@ -418,7 +418,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
if (*proc_prog_lump != '#')
{
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump, 0); // if it's a core shader, ignore overrides by user mods.
int pp_lump = fileSystem.CheckNumForFullNameInFile(proc_prog_lump, 0); // if it's a core shader, ignore overrides by user mods.
if (pp_lump == -1) pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump);
if (pp_lump == -1) I_Error("Unable to load '%s'", proc_prog_lump);
FString pp_data = GetStringFromLump(pp_lump);
@ -429,13 +429,13 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
if (pp_data.IndexOf("GetTexCoord") >= 0)
{
int pl_lump = fileSystem.CheckNumForFullName("shaders/glsl/func_defaultmat2.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders/glsl/func_defaultmat2.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders/glsl/func_defaultmat2.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
}
else
{
int pl_lump = fileSystem.CheckNumForFullName("shaders/glsl/func_defaultmat.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders/glsl/func_defaultmat.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders/glsl/func_defaultmat.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
@ -461,7 +461,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
if (pp_data.IndexOf("ProcessLight") < 0)
{
int pl_lump = fileSystem.CheckNumForFullName("shaders/glsl/func_defaultlight.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders/glsl/func_defaultlight.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders/glsl/func_defaultlight.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
}
@ -483,7 +483,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
if (light_fragprog)
{
int pp_lump = fileSystem.CheckNumForFullName(light_fragprog, 0);
int pp_lump = fileSystem.CheckNumForFullNameInFile(light_fragprog, 0);
if (pp_lump == -1) I_Error("Unable to load '%s'", light_fragprog);
fp_comb << GetStringFromLump(pp_lump) << "\n";
}

View file

@ -381,10 +381,10 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
i_data += "#define NPOT_EMULATION\nuniform vec2 uNpotEmulation;\n";
#endif
int vp_lump = fileSystem.CheckNumForFullName(vert_prog_lump.GetChars(), 0);
int vp_lump = fileSystem.CheckNumForFullNameInFile(vert_prog_lump.GetChars(), 0);
if (vp_lump == -1) I_Error("Unable to load '%s'", vert_prog_lump.GetChars());
int fp_lump = fileSystem.CheckNumForFullName(frag_prog_lump.GetChars(), 0);
int fp_lump = fileSystem.CheckNumForFullNameInFile(frag_prog_lump.GetChars(), 0);
if (fp_lump == -1) I_Error("Unable to load '%s'", frag_prog_lump.GetChars());
@ -428,13 +428,13 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
if (pp_data.IndexOf("GetTexCoord") >= 0)
{
int pl_lump = fileSystem.CheckNumForFullName("shaders_gles/glsl/func_defaultmat2.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultmat2.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders_gles/glsl/func_defaultmat2.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
}
else
{
int pl_lump = fileSystem.CheckNumForFullName("shaders_gles/glsl/func_defaultmat.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultmat.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders_gles/glsl/func_defaultmat.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
@ -460,7 +460,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
if (pp_data.IndexOf("ProcessLight") < 0)
{
int pl_lump = fileSystem.CheckNumForFullName("shaders_gles/glsl/func_defaultlight.fp", 0);
int pl_lump = fileSystem.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultlight.fp", 0);
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders_gles/glsl/func_defaultlight.fp");
fp_comb << "\n" << GetStringFromLump(pl_lump);
}
@ -482,7 +482,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
if (light_fragprog.Len())
{
int pp_lump = fileSystem.CheckNumForFullName(light_fragprog.GetChars(), 0);
int pp_lump = fileSystem.CheckNumForFullNameInFile(light_fragprog.GetChars(), 0);
if (pp_lump == -1) I_Error("Unable to load '%s'", light_fragprog.GetChars());
fp_comb << GetStringFromLump(pp_lump) << "\n";
}

View file

@ -465,7 +465,7 @@ FString VkShaderManager::GetTargetGlslVersion()
FString VkShaderManager::LoadPublicShaderLump(const char *lumpname)
{
int lump = fileSystem.CheckNumForFullName(lumpname, 0);
int lump = fileSystem.CheckNumForFullNameInFile(lumpname, 0);
if (lump == -1) lump = fileSystem.CheckNumForFullName(lumpname);
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
return GetStringFromLump(lump);
@ -473,7 +473,7 @@ FString VkShaderManager::LoadPublicShaderLump(const char *lumpname)
FString VkShaderManager::LoadPrivateShaderLump(const char *lumpname)
{
int lump = fileSystem.CheckNumForFullName(lumpname, 0);
int lump = fileSystem.CheckNumForFullNameInFile(lumpname, 0);
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
return GetStringFromLump(lump);
}