- more file system refactoring.
* moved the sprite renaming out of the file system entirely into a caller-provided callback. * renamed several functions to closer match the terms of a file system. * moved the VM interface out of the implementation.
This commit is contained in:
parent
6bccde3b51
commit
c1bb7de23a
61 changed files with 927 additions and 765 deletions
|
|
@ -333,11 +333,11 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
|
||||
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 = fileSystem.ReadLump(vp_lump);
|
||||
FileData vp_data = fileSystem.ReadLump(vp_lump);
|
||||
|
||||
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 = fileSystem.ReadLump(fp_lump);
|
||||
FileData fp_data = fileSystem.ReadLump(fp_lump);
|
||||
|
||||
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
{
|
||||
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump);
|
||||
if (pp_lump == -1) I_Error("Unable to load '%s'", proc_prog_lump);
|
||||
FMemLump pp_data = fileSystem.ReadLump(pp_lump);
|
||||
FileData pp_data = fileSystem.ReadLump(pp_lump);
|
||||
|
||||
if (pp_data.GetString().IndexOf("ProcessMaterial") < 0)
|
||||
{
|
||||
|
|
@ -394,7 +394,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
// add ProcessMaterial function that calls the older ProcessTexel function
|
||||
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 = fileSystem.ReadLump(pl_lump);
|
||||
FileData pl_data = fileSystem.ReadLump(pl_lump);
|
||||
fp_comb << "\n" << pl_data.GetString().GetChars();
|
||||
|
||||
if (pp_data.GetString().IndexOf("ProcessTexel") < 0)
|
||||
|
|
@ -420,7 +420,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
{
|
||||
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 = fileSystem.ReadLump(pl_lump);
|
||||
FileData pl_data = fileSystem.ReadLump(pl_lump);
|
||||
fp_comb << "\n" << pl_data.GetString().GetChars();
|
||||
}
|
||||
}
|
||||
|
|
@ -435,7 +435,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
{
|
||||
int pp_lump = fileSystem.CheckNumForFullName(light_fragprog, 0);
|
||||
if (pp_lump == -1) I_Error("Unable to load '%s'", light_fragprog);
|
||||
FMemLump pp_data = fileSystem.ReadLump(pp_lump);
|
||||
FileData pp_data = fileSystem.ReadLump(pp_lump);
|
||||
fp_comb << pp_data.GetString().GetChars() << "\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ static void InitBoomColormaps ()
|
|||
remap[0] = 0;
|
||||
for (j = 1; j < fakecmaps.Size(); j++)
|
||||
{
|
||||
if (fileSystem.LumpLength (fakecmaps[j].lump) >= (NUMCOLORMAPS+1)*256)
|
||||
if (fileSystem.FileLength (fakecmaps[j].lump) >= (NUMCOLORMAPS+1)*256)
|
||||
{
|
||||
int k, r;
|
||||
auto lump = fileSystem.OpenLumpReader (fakecmaps[j].lump);
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ normal:
|
|||
|
||||
FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
||||
{
|
||||
FMemLump rgbNames;
|
||||
FileData rgbNames;
|
||||
char *rgbEnd;
|
||||
char *rgb, *endp;
|
||||
int rgblump;
|
||||
|
|
@ -399,7 +399,7 @@ FString V_GetColorStringByName (const char *name, FScriptPosition *sc)
|
|||
|
||||
rgbNames = fileSystem.ReadLump (rgblump);
|
||||
rgb = (char *)rgbNames.GetMem();
|
||||
rgbEnd = rgb + fileSystem.LumpLength (rgblump);
|
||||
rgbEnd = rgb + fileSystem.FileLength (rgblump);
|
||||
step = 0;
|
||||
namelen = strlen (name);
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ FString VkShaderManager::LoadPublicShaderLump(const char *lumpname)
|
|||
{
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname);
|
||||
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
|
||||
FMemLump data = fileSystem.ReadLump(lump);
|
||||
FileData data = fileSystem.ReadLump(lump);
|
||||
return data.GetString();
|
||||
}
|
||||
|
||||
|
|
@ -355,6 +355,6 @@ FString VkShaderManager::LoadPrivateShaderLump(const char *lumpname)
|
|||
{
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname, 0);
|
||||
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
|
||||
FMemLump data = fileSystem.ReadLump(lump);
|
||||
FileData data = fileSystem.ReadLump(lump);
|
||||
return data.GetString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue