mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
Renamed FTextureManager::GetTexture to GetTextureID
It doesn't return a texture after all and I want to repurpose the name for something else.
This commit is contained in:
parent
3491182ac3
commit
9fedecbe60
13 changed files with 31 additions and 25 deletions
|
@ -1052,7 +1052,7 @@ CCMD(changesky)
|
|||
sky1name = argv[1];
|
||||
if (sky1name[0] != 0)
|
||||
{
|
||||
FTextureID newsky = TexMan.GetTexture(sky1name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
FTextureID newsky = TexMan.GetTextureID(sky1name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
if (newsky.Exists())
|
||||
{
|
||||
sky1texture = level.skytexture1 = newsky;
|
||||
|
|
|
@ -555,7 +555,7 @@ void C_InitConback()
|
|||
|
||||
if (!conback.isValid())
|
||||
{
|
||||
conback = TexMan.GetTexture (gameinfo.TitlePage, ETextureType::MiscPatch);
|
||||
conback = TexMan.GetTextureID (gameinfo.TitlePage, ETextureType::MiscPatch);
|
||||
conshade = MAKEARGB(175,0,0,0);
|
||||
conline = true;
|
||||
}
|
||||
|
|
|
@ -1892,7 +1892,7 @@ void FParser::SF_FloorTexture(void)
|
|||
if(t_argc > 1)
|
||||
{
|
||||
int i = -1;
|
||||
FTextureID picnum = TexMan.GetTexture(t_argv[1].string, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
FTextureID picnum = TexMan.GetTextureID(t_argv[1].string, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
// set all sectors with tag
|
||||
FSSectorTagIterator itr(tagnum);
|
||||
|
@ -1982,7 +1982,7 @@ void FParser::SF_CeilingTexture(void)
|
|||
if(t_argc > 1)
|
||||
{
|
||||
int i = -1;
|
||||
FTextureID picnum = TexMan.GetTexture(t_argv[1].string, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
FTextureID picnum = TexMan.GetTextureID(t_argv[1].string, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
// set all sectors with tag
|
||||
FSSectorTagIterator itr(tagnum);
|
||||
|
@ -2235,7 +2235,7 @@ void FParser::SF_SetLineTexture(void)
|
|||
position=3-position;
|
||||
|
||||
texture = stringvalue(t_argv[3]);
|
||||
texturenum = TexMan.GetTexture(texture, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
texturenum = TexMan.GetTextureID(texture, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
FLineIdIterator itr(tag);
|
||||
while ((i = itr.Next()) >= 0)
|
||||
|
@ -2252,7 +2252,7 @@ void FParser::SF_SetLineTexture(void)
|
|||
}
|
||||
else // and an improved legacy version
|
||||
{
|
||||
FTextureID picnum = TexMan.GetTexture(t_argv[1].string, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
FTextureID picnum = TexMan.GetTextureID(t_argv[1].string, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
side = !!intvalue(t_argv[2]);
|
||||
int sections = intvalue(t_argv[3]);
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ void FScriptLoader::ParseInfoCmd(char *line, FString &scriptsrc)
|
|||
sc.MustGetStringName("=");
|
||||
sc.MustGetString();
|
||||
|
||||
sky2texture = sky1texture = level.skytexture1 = level.skytexture2 = TexMan.GetTexture (sc.String, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
sky2texture = sky1texture = level.skytexture1 = level.skytexture2 = TexMan.GetTextureID (sc.String, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
R_InitSkyMap ();
|
||||
}
|
||||
else if (sc.Compare("interpic"))
|
||||
|
|
|
@ -968,7 +968,7 @@ void G_DoLoadLevel (int position, bool autosave, bool newGame)
|
|||
// a flat. The data is in the WAD only because
|
||||
// we look for an actual index, instead of simply
|
||||
// setting one.
|
||||
skyflatnum = TexMan.GetTexture (gameinfo.SkyFlatName, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
skyflatnum = TexMan.GetTextureID (gameinfo.SkyFlatName, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
// DOOM determines the sky texture to be used
|
||||
// depending on the current episode and the game version.
|
||||
|
@ -1455,8 +1455,8 @@ void G_InitLevelLocals ()
|
|||
level.info = info;
|
||||
level.skyspeed1 = info->skyspeed1;
|
||||
level.skyspeed2 = info->skyspeed2;
|
||||
level.skytexture1 = TexMan.GetTexture(info->SkyPic1, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
level.skytexture2 = TexMan.GetTexture(info->SkyPic2, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
level.skytexture1 = TexMan.GetTextureID(info->SkyPic1, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
level.skytexture2 = TexMan.GetTextureID(info->SkyPic2, ETextureType::Wall, FTextureManager::TEXMAN_Overridable | FTextureManager::TEXMAN_ReturnFirst);
|
||||
level.fadeto = info->fadeto;
|
||||
level.cdtrack = info->cdtrack;
|
||||
level.cdid = info->cdid;
|
||||
|
|
|
@ -3747,7 +3747,7 @@ void DLevelScript::ChangeFlat (int tag, int name, bool floorOrCeiling)
|
|||
if (flatname == NULL)
|
||||
return;
|
||||
|
||||
flat = TexMan.GetTexture (flatname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
flat = TexMan.GetTextureID(flatname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
FSectorTagIterator it(tag);
|
||||
while ((secnum = it.Next()) >= 0)
|
||||
|
@ -3779,7 +3779,7 @@ void DLevelScript::SetLineTexture (int lineid, int side, int position, int name)
|
|||
|
||||
side = !!side;
|
||||
|
||||
texture = TexMan.GetTexture (texname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
texture = TexMan.GetTextureID(texname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
FLineIdIterator itr(lineid);
|
||||
while ((linenum = itr.Next()) >= 0)
|
||||
|
@ -9865,11 +9865,11 @@ scriptwait:
|
|||
sky2name = FBehavior::StaticLookupString (STACK(1));
|
||||
if (sky1name[0] != 0)
|
||||
{
|
||||
sky1texture = level.skytexture1 = TexMan.GetTexture (sky1name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
sky1texture = level.skytexture1 = TexMan.GetTextureID(sky1name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
}
|
||||
if (sky2name[0] != 0)
|
||||
{
|
||||
sky2texture = level.skytexture2 = TexMan.GetTexture (sky2name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
sky2texture = level.skytexture2 = TexMan.GetTextureID(sky2name, ETextureType::Wall, FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_ReturnFirst);
|
||||
}
|
||||
R_InitSkyMap ();
|
||||
sp -= 2;
|
||||
|
|
|
@ -1397,8 +1397,8 @@ void P_ReplaceTextures(const char *fromname, const char *toname, int flags)
|
|||
|
||||
if ((flags ^ (NOT_BOTTOM | NOT_MIDDLE | NOT_TOP)) != 0)
|
||||
{
|
||||
picnum1 = TexMan.GetTexture(fromname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
picnum2 = TexMan.GetTexture(toname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
picnum1 = TexMan.GetTextureID(fromname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
picnum2 = TexMan.GetTextureID(toname, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
for (auto &side : level.sides)
|
||||
{
|
||||
|
@ -1414,8 +1414,8 @@ void P_ReplaceTextures(const char *fromname, const char *toname, int flags)
|
|||
}
|
||||
if ((flags ^ (NOT_FLOOR | NOT_CEILING)) != 0)
|
||||
{
|
||||
picnum1 = TexMan.GetTexture(fromname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
picnum2 = TexMan.GetTexture(toname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
picnum1 = TexMan.GetTextureID(fromname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
picnum2 = TexMan.GetTextureID(toname, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
|
||||
|
||||
for (auto &sec : level.sectors)
|
||||
{
|
||||
|
|
|
@ -977,7 +977,7 @@ class GLDefsParser
|
|||
sc.MustGetString();
|
||||
if (facecount<6)
|
||||
{
|
||||
sb->faces[facecount] = TexMan[TexMan.GetTexture(sc.String, ETextureType::Wall, FTextureManager::TEXMAN_TryAny|FTextureManager::TEXMAN_Overridable)];
|
||||
sb->faces[facecount] = TexMan[TexMan.GetTextureID(sc.String, ETextureType::Wall, FTextureManager::TEXMAN_TryAny|FTextureManager::TEXMAN_Overridable)];
|
||||
}
|
||||
facecount++;
|
||||
}
|
||||
|
|
|
@ -1545,7 +1545,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTe
|
|||
assert(nameval.IsString() && typeval.IsInt());
|
||||
if (nameval.IsString() && typeval.IsInt())
|
||||
{
|
||||
value = TexMan.GetTexture(UnicodeToString(nameval.GetString()), static_cast<ETextureType>(typeval.GetInt()));
|
||||
value = TexMan.GetTextureID(UnicodeToString(nameval.GetString()), static_cast<ETextureType>(typeval.GetInt()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1211,3 +1211,4 @@ void FTexCoordInfo::GetFromTexture(FTexture *tex, float x, float y)
|
|||
mWorldPanning = tex->bWorldPanning;
|
||||
mWidth = tex->GetWidth();
|
||||
}
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list, b
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FTextureID FTextureManager::GetTexture (const char *name, ETextureType usetype, BITFIELD flags)
|
||||
FTextureID FTextureManager::GetTextureID (const char *name, ETextureType usetype, BITFIELD flags)
|
||||
{
|
||||
FTextureID i;
|
||||
|
||||
|
|
|
@ -298,6 +298,11 @@ public:
|
|||
bool isFullbright() const { return bFullbright; }
|
||||
void CreateDefaultBrightmap();
|
||||
bool FindHoles(const unsigned char * buffer, int w, int h);
|
||||
uint64_t CacheID()
|
||||
{
|
||||
// Just a temporary placeholder. This needs to be done differently as things progress.
|
||||
return (uint64_t)(intptr_t)GetRedirect();
|
||||
}
|
||||
|
||||
public:
|
||||
static void FlipSquareBlock (uint8_t *block, int x, int y);
|
||||
|
@ -562,7 +567,7 @@ public:
|
|||
}
|
||||
FTexture *operator[] (const char *texname)
|
||||
{
|
||||
FTextureID texnum = GetTexture (texname, ETextureType::MiscPatch);
|
||||
FTextureID texnum = GetTextureID (texname, ETextureType::MiscPatch);
|
||||
if (!texnum.Exists()) return NULL;
|
||||
return Textures[texnum.GetIndex()].Texture;
|
||||
}
|
||||
|
@ -586,7 +591,7 @@ public:
|
|||
}
|
||||
FTexture *operator() (const char *texname)
|
||||
{
|
||||
FTextureID texnum = GetTexture (texname, ETextureType::MiscPatch);
|
||||
FTextureID texnum = GetTextureID (texname, ETextureType::MiscPatch);
|
||||
if (texnum.texnum == -1) return NULL;
|
||||
return Textures[Translation[texnum.texnum]].Texture;
|
||||
}
|
||||
|
@ -621,7 +626,7 @@ public:
|
|||
};
|
||||
|
||||
FTextureID CheckForTexture (const char *name, ETextureType usetype, BITFIELD flags=TEXMAN_TryAny);
|
||||
FTextureID GetTexture (const char *name, ETextureType usetype, BITFIELD flags=0);
|
||||
FTextureID GetTextureID (const char *name, ETextureType usetype, BITFIELD flags=0);
|
||||
int ListTextures (const char *name, TArray<FTextureID> &list, bool listall = false);
|
||||
|
||||
void AddTexturesLump (const void *lumpdata, int lumpsize, int deflumpnum, int patcheslump, int firstdup=0, bool texture1=false);
|
||||
|
|
|
@ -516,7 +516,7 @@ bool DInterBackground::LoadBackground(bool isenterpic)
|
|||
else
|
||||
{
|
||||
Printf("Intermission script %s not found!\n", lumpname + 1);
|
||||
texture = TexMan.GetTexture("INTERPIC", ETextureType::MiscPatch);
|
||||
texture = TexMan.GetTextureID("INTERPIC", ETextureType::MiscPatch);
|
||||
}
|
||||
}
|
||||
background = TexMan[texture];
|
||||
|
|
Loading…
Reference in a new issue