renamed things in file system to reduce Doom specific terminology.

This commit is contained in:
Christoph Oelckers 2024-11-24 16:55:09 +01:00
commit d1abc3eb8c
50 changed files with 313 additions and 318 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.CheckNumForFullNameInFile(vert_prog_lump, 0);
int vp_lump = fileSystem.GetFileInContainer(vert_prog_lump, 0);
if (vp_lump == -1) I_Error("Unable to load '%s'", vert_prog_lump);
int fp_lump = fileSystem.CheckNumForFullNameInFile(frag_prog_lump, 0);
int fp_lump = fileSystem.GetFileInContainer(frag_prog_lump, 0);
if (fp_lump == -1) I_Error("Unable to load '%s'", frag_prog_lump);
@ -418,8 +418,8 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
if (*proc_prog_lump != '#')
{
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);
int pp_lump = fileSystem.GetFileInContainer(proc_prog_lump, 0); // if it's a core shader, ignore overrides by user mods.
if (pp_lump == -1) pp_lump = fileSystem.FindFile(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.CheckNumForFullNameInFile("shaders/glsl/func_defaultmat2.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile("shaders/glsl/func_defaultmat.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile("shaders/glsl/func_defaultlight.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile(light_fragprog, 0);
int pp_lump = fileSystem.GetFileInContainer(light_fragprog, 0);
if (pp_lump == -1) I_Error("Unable to load '%s'", light_fragprog);
fp_comb << GetStringFromLump(pp_lump) << "\n";
}

View file

@ -87,7 +87,7 @@ void FShaderProgram::CreateShader(ShaderType type)
void FShaderProgram::Compile(ShaderType type, const char *lumpName, const char *defines, int maxGlslVersion)
{
int lump = fileSystem.CheckNumForFullName(lumpName);
int lump = fileSystem.FindFile(lumpName);
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName);
FString code = GetStringFromLump(lump);

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.CheckNumForFullNameInFile(vert_prog_lump.GetChars(), 0);
int vp_lump = fileSystem.GetFileInContainer(vert_prog_lump.GetChars(), 0);
if (vp_lump == -1) I_Error("Unable to load '%s'", vert_prog_lump.GetChars());
int fp_lump = fileSystem.CheckNumForFullNameInFile(frag_prog_lump.GetChars(), 0);
int fp_lump = fileSystem.GetFileInContainer(frag_prog_lump.GetChars(), 0);
if (fp_lump == -1) I_Error("Unable to load '%s'", frag_prog_lump.GetChars());
@ -418,7 +418,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
if (proc_prog_lump[0] != '#')
{
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump.GetChars());
int pp_lump = fileSystem.FindFile(proc_prog_lump.GetChars());
if (pp_lump == -1) I_Error("Unable to load '%s'", proc_prog_lump.GetChars());
FString pp_data = GetStringFromLump(pp_lump);
@ -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.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultmat2.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultmat.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile("shaders_gles/glsl/func_defaultlight.fp", 0);
int pl_lump = fileSystem.GetFileInContainer("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.CheckNumForFullNameInFile(light_fragprog.GetChars(), 0);
int pp_lump = fileSystem.GetFileInContainer(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

@ -87,7 +87,7 @@ void FShaderProgram::CreateShader(ShaderType type)
void FShaderProgram::Compile(ShaderType type, const char *lumpName, const char *defines, int maxGlslVersion)
{
int lump = fileSystem.CheckNumForFullName(lumpName);
int lump = fileSystem.FindFile(lumpName);
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName);
FString code = GetStringFromLump(lump);
Compile(type, lumpName, code, defines, maxGlslVersion);

View file

@ -67,7 +67,7 @@ void VkPPShader::Reset()
FString VkPPShader::LoadShaderCode(const FString &lumpName, const FString &defines, int version)
{
int lump = fileSystem.CheckNumForFullName(lumpName.GetChars());
int lump = fileSystem.FindFile(lumpName.GetChars());
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName.GetChars());
FString code = GetStringFromLump(lump);

View file

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