- renamed the file system related classes to actually use the term "FileSystem".
This commit is contained in:
parent
83befa7686
commit
6bccde3b51
103 changed files with 647 additions and 647 deletions
|
|
@ -331,13 +331,13 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
i_data += "#define noise4(unused) vec4(0)\n";
|
||||
#endif // __APPLE__
|
||||
|
||||
int vp_lump = Wads.CheckNumForFullName(vert_prog_lump, 0);
|
||||
int vp_lump = fileSystem.CheckNumForFullName(vert_prog_lump, 0);
|
||||
if (vp_lump == -1) I_Error("Unable to load '%s'", vert_prog_lump);
|
||||
FMemLump vp_data = Wads.ReadLump(vp_lump);
|
||||
FMemLump vp_data = fileSystem.ReadLump(vp_lump);
|
||||
|
||||
int fp_lump = Wads.CheckNumForFullName(frag_prog_lump, 0);
|
||||
int fp_lump = fileSystem.CheckNumForFullName(frag_prog_lump, 0);
|
||||
if (fp_lump == -1) I_Error("Unable to load '%s'", frag_prog_lump);
|
||||
FMemLump fp_data = Wads.ReadLump(fp_lump);
|
||||
FMemLump fp_data = fileSystem.ReadLump(fp_lump);
|
||||
|
||||
|
||||
|
||||
|
|
@ -383,18 +383,18 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
|
||||
if (*proc_prog_lump != '#')
|
||||
{
|
||||
int pp_lump = Wads.CheckNumForFullName(proc_prog_lump);
|
||||
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump);
|
||||
if (pp_lump == -1) I_Error("Unable to load '%s'", proc_prog_lump);
|
||||
FMemLump pp_data = Wads.ReadLump(pp_lump);
|
||||
FMemLump pp_data = fileSystem.ReadLump(pp_lump);
|
||||
|
||||
if (pp_data.GetString().IndexOf("ProcessMaterial") < 0)
|
||||
{
|
||||
// this looks like an old custom hardware shader.
|
||||
|
||||
// add ProcessMaterial function that calls the older ProcessTexel function
|
||||
int pl_lump = Wads.CheckNumForFullName("shaders/glsl/func_defaultmat.fp", 0);
|
||||
int pl_lump = fileSystem.CheckNumForFullName("shaders/glsl/func_defaultmat.fp", 0);
|
||||
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders/glsl/func_defaultmat.fp");
|
||||
FMemLump pl_data = Wads.ReadLump(pl_lump);
|
||||
FMemLump pl_data = fileSystem.ReadLump(pl_lump);
|
||||
fp_comb << "\n" << pl_data.GetString().GetChars();
|
||||
|
||||
if (pp_data.GetString().IndexOf("ProcessTexel") < 0)
|
||||
|
|
@ -418,9 +418,9 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
|
||||
if (pp_data.GetString().IndexOf("ProcessLight") < 0)
|
||||
{
|
||||
int pl_lump = Wads.CheckNumForFullName("shaders/glsl/func_defaultlight.fp", 0);
|
||||
int pl_lump = fileSystem.CheckNumForFullName("shaders/glsl/func_defaultlight.fp", 0);
|
||||
if (pl_lump == -1) I_Error("Unable to load '%s'", "shaders/glsl/func_defaultlight.fp");
|
||||
FMemLump pl_data = Wads.ReadLump(pl_lump);
|
||||
FMemLump pl_data = fileSystem.ReadLump(pl_lump);
|
||||
fp_comb << "\n" << pl_data.GetString().GetChars();
|
||||
}
|
||||
}
|
||||
|
|
@ -433,9 +433,9 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
|
||||
if (light_fragprog)
|
||||
{
|
||||
int pp_lump = Wads.CheckNumForFullName(light_fragprog, 0);
|
||||
int pp_lump = fileSystem.CheckNumForFullName(light_fragprog, 0);
|
||||
if (pp_lump == -1) I_Error("Unable to load '%s'", light_fragprog);
|
||||
FMemLump pp_data = Wads.ReadLump(pp_lump);
|
||||
FMemLump pp_data = fileSystem.ReadLump(pp_lump);
|
||||
fp_comb << pp_data.GetString().GetChars() << "\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,9 @@ void FShaderProgram::CreateShader(ShaderType type)
|
|||
|
||||
void FShaderProgram::Compile(ShaderType type, const char *lumpName, const char *defines, int maxGlslVersion)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(lumpName);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpName);
|
||||
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName);
|
||||
FString code = Wads.ReadLump(lump).GetString().GetChars();
|
||||
FString code = fileSystem.ReadLump(lump).GetString().GetChars();
|
||||
Compile(type, lumpName, code, defines, maxGlslVersion);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -347,12 +347,12 @@ void SetDefaultColormap (const char *name)
|
|||
uint8_t unremap[256];
|
||||
uint8_t remap[256];
|
||||
|
||||
lump = Wads.CheckNumForFullName (name, true, ns_colormaps);
|
||||
lump = fileSystem.CheckNumForFullName (name, true, ns_colormaps);
|
||||
if (lump == -1)
|
||||
lump = Wads.CheckNumForName (name, ns_global);
|
||||
lump = fileSystem.CheckNumForName (name, ns_global);
|
||||
|
||||
// [RH] If using BUILD's palette, generate the colormap
|
||||
if (lump == -1 || Wads.CheckNumForFullName("palette.dat") >= 0 || Wads.CheckNumForFullName("blood.pal") >= 0)
|
||||
if (lump == -1 || fileSystem.CheckNumForFullName("palette.dat") >= 0 || fileSystem.CheckNumForFullName("blood.pal") >= 0)
|
||||
{
|
||||
Printf ("Make colormap\n");
|
||||
FDynamicColormap foo;
|
||||
|
|
@ -366,7 +366,7 @@ void SetDefaultColormap (const char *name)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto lumpr = Wads.OpenLumpReader (lump);
|
||||
auto lumpr = fileSystem.OpenLumpReader (lump);
|
||||
|
||||
// [RH] The colormap may not have been designed for the specific
|
||||
// palette we are using, so remap it to match the current palette.
|
||||
|
|
@ -404,7 +404,7 @@ static void InitBoomColormaps ()
|
|||
// This is a really rough hack, but it's better than
|
||||
// not doing anything with them at all (right?)
|
||||
|
||||
uint32_t NumLumps = Wads.GetNumLumps();
|
||||
uint32_t NumLumps = fileSystem.GetNumLumps();
|
||||
|
||||
realcolormaps.Maps = new uint8_t[256*NUMCOLORMAPS*fakecmaps.Size()];
|
||||
SetDefaultColormap ("COLORMAP");
|
||||
|
|
@ -424,10 +424,10 @@ static void InitBoomColormaps ()
|
|||
remap[0] = 0;
|
||||
for (j = 1; j < fakecmaps.Size(); j++)
|
||||
{
|
||||
if (Wads.LumpLength (fakecmaps[j].lump) >= (NUMCOLORMAPS+1)*256)
|
||||
if (fileSystem.LumpLength (fakecmaps[j].lump) >= (NUMCOLORMAPS+1)*256)
|
||||
{
|
||||
int k, r;
|
||||
auto lump = Wads.OpenLumpReader (fakecmaps[j].lump);
|
||||
auto lump = fileSystem.OpenLumpReader (fakecmaps[j].lump);
|
||||
uint8_t *const map = realcolormaps.Maps + NUMCOLORMAPS*256*j;
|
||||
|
||||
for (k = 0; k < NUMCOLORMAPS; ++k)
|
||||
|
|
|
|||
|
|
@ -387,9 +387,9 @@ FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
|||
int c[3], step;
|
||||
size_t namelen;
|
||||
|
||||
if (Wads.GetNumLumps()==0) return FString();
|
||||
if (fileSystem.GetNumLumps()==0) return FString();
|
||||
|
||||
rgblump = Wads.CheckNumForName ("X11R6RGB");
|
||||
rgblump = fileSystem.CheckNumForName ("X11R6RGB");
|
||||
if (rgblump == -1)
|
||||
{
|
||||
if (!sc) Printf ("X11R6RGB lump not found\n");
|
||||
|
|
@ -397,9 +397,9 @@ FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
|||
return FString();
|
||||
}
|
||||
|
||||
rgbNames = Wads.ReadLump (rgblump);
|
||||
rgbNames = fileSystem.ReadLump (rgblump);
|
||||
rgb = (char *)rgbNames.GetMem();
|
||||
rgbEnd = rgb + Wads.LumpLength (rgblump);
|
||||
rgbEnd = rgb + fileSystem.LumpLength (rgblump);
|
||||
step = 0;
|
||||
namelen = strlen (name);
|
||||
|
||||
|
|
|
|||
|
|
@ -451,9 +451,9 @@ VkPPShader::VkPPShader(PPShader *shader)
|
|||
|
||||
FString VkPPShader::LoadShaderCode(const FString &lumpName, const FString &defines, int version)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(lumpName);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpName);
|
||||
if (lump == -1) I_FatalError("Unable to load '%s'", lumpName.GetChars());
|
||||
FString code = Wads.ReadLump(lump).GetString().GetChars();
|
||||
FString code = fileSystem.ReadLump(lump).GetString().GetChars();
|
||||
|
||||
FString patchedCode;
|
||||
patchedCode.AppendFormat("#version %d\n", 450);
|
||||
|
|
|
|||
|
|
@ -345,16 +345,16 @@ FString VkShaderManager::GetTargetGlslVersion()
|
|||
|
||||
FString VkShaderManager::LoadPublicShaderLump(const char *lumpname)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(lumpname);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname);
|
||||
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
|
||||
FMemLump data = Wads.ReadLump(lump);
|
||||
FMemLump data = fileSystem.ReadLump(lump);
|
||||
return data.GetString();
|
||||
}
|
||||
|
||||
FString VkShaderManager::LoadPrivateShaderLump(const char *lumpname)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(lumpname, 0);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname, 0);
|
||||
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
|
||||
FMemLump data = Wads.ReadLump(lump);
|
||||
FMemLump data = fileSystem.ReadLump(lump);
|
||||
return data.GetString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue