- narrowing down the public interface of the texture class

Cannot refactor if the entire class is this wide open to everything.
Not complete yet, doesn't fully compile!
This commit is contained in:
Christoph Oelckers 2018-12-06 01:11:04 +01:00
commit 6eab4a882c
74 changed files with 608 additions and 518 deletions

View file

@ -73,9 +73,7 @@ static void ParseVavoomSkybox()
int facecount=0;
int maplump = -1;
bool error = false;
FSkyBox * sb = new FSkyBox;
sb->Name = sc.String;
sb->Name.ToUpper();
FSkyBox * sb = new FSkyBox(sc.String);
sb->fliptop = true;
sc.MustGetStringName("{");
while (!sc.CheckString("}"))
@ -91,7 +89,7 @@ static void ParseVavoomSkybox()
FTexture *tex = TexMan.FindTexture(sc.String, ETextureType::Wall, FTextureManager::TEXMAN_TryAny);
if (tex == NULL)
{
sc.ScriptMessage("Texture '%s' not found in Vavoom skybox '%s'\n", sc.String, sb->Name.GetChars());
sc.ScriptMessage("Texture '%s' not found in Vavoom skybox '%s'\n", sc.String, sb->GetName().GetChars());
error = true;
}
sb->faces[facecount] = tex;
@ -101,7 +99,7 @@ static void ParseVavoomSkybox()
}
if (facecount != 6)
{
sc.ScriptError("%s: Skybox definition requires 6 faces", sb->Name.GetChars());
sc.ScriptError("%s: Skybox definition requires 6 faces", sb->GetName().GetChars());
}
sb->SetSize();
if (!error) TexMan.AddTexture(sb);
@ -1140,14 +1138,6 @@ class GLDefsParser
if (bmtex != NULL)
{
/* I do not think this is needed any longer
if (tex->bWarped != 0)
{
Printf("Cannot combine warping with brightmap on texture '%s'\n", tex->Name.GetChars());
return;
}
*/
bmtex->bMasked = false;
tex->Brightmap = bmtex;
}
@ -1367,7 +1357,7 @@ class GLDefsParser
usershader.defines.AppendFormat("#define %s texture%d\n", texNameList[i].GetChars(), texNameIndex[i] + firstUserTexture);
}
if (tex->bWarped != 0)
if (tex->isWarped() != 0)
{
Printf("Cannot combine warping with hardware shader on texture '%s'\n", tex->Name.GetChars());
return;
@ -1608,7 +1598,7 @@ class GLDefsParser
if (desc.shader.IsNotEmpty())
{
if (tex->bWarped != 0)
if (tex->isWarped() != 0)
{
Printf("Cannot combine warping with hardware shader on texture '%s'\n", tex->Name.GetChars());
return;