- renamed FTexture's UseType flags and gave them a dedicated type.

This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
This commit is contained in:
Christoph Oelckers 2018-03-25 20:26:16 +02:00
commit e89a598b31
78 changed files with 348 additions and 352 deletions

View file

@ -3873,7 +3873,7 @@ void DLevelScript::ChangeFlat (int tag, int name, bool floorOrCeiling)
if (flatname == NULL)
return;
flat = TexMan.GetTexture (flatname, FTexture::TEX_Flat, FTextureManager::TEXMAN_Overridable);
flat = TexMan.GetTexture (flatname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
FSectorTagIterator it(tag);
while ((secnum = it.Next()) >= 0)
@ -3905,7 +3905,7 @@ void DLevelScript::SetLineTexture (int lineid, int side, int position, int name)
side = !!side;
texture = TexMan.GetTexture (texname, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable);
texture = TexMan.GetTexture (texname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
FLineIdIterator itr(lineid);
while ((linenum = itr.Next()) >= 0)
@ -4700,7 +4700,7 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b
{
return 0;
}
FTexture *tex = TexMan.FindTexture(FBehavior::StaticLookupString(string), FTexture::TEX_Flat,
FTexture *tex = TexMan.FindTexture(FBehavior::StaticLookupString(string), ETextureType::Flat,
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny|FTextureManager::TEXMAN_DontCreate);
if (tex == NULL)
@ -10033,11 +10033,11 @@ scriptwait:
sky2name = FBehavior::StaticLookupString (STACK(1));
if (sky1name[0] != 0)
{
sky1texture = level.skytexture1 = TexMan.GetTexture (sky1name, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
sky1texture = level.skytexture1 = TexMan.GetTexture (sky1name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
}
if (sky2name[0] != 0)
{
sky2texture = level.skytexture2 = TexMan.GetTexture (sky2name, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
sky2texture = level.skytexture2 = TexMan.GetTexture (sky2name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
}
R_InitSkyMap ();
sp -= 2;
@ -10061,7 +10061,7 @@ scriptwait:
if (camera != NULL)
{
FTextureID picnum = TexMan.CheckForTexture (picname, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable);
FTextureID picnum = TexMan.CheckForTexture (picname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
if (!picnum.Exists())
{
Printf ("SetCameraToTexture: %s is not a texture\n", picname);