mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 13:51:52 +00:00
- fixed: The raw texture caching in the texture manager did not work.
This erroneously checked for FrontSkyLayer. Also including some change here that allows explicit setting of the RawTexture (not used yet.)
This commit is contained in:
parent
28f8d4570d
commit
4103b282bb
2 changed files with 12 additions and 3 deletions
|
@ -1300,11 +1300,12 @@ void FTextureManager::InitPalettedVersions()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FTextureID FTextureManager::GetRawTexture(FTextureID texid)
|
||||
FTextureID FTextureManager::GetRawTexture(FTextureID texid, bool dontlookup)
|
||||
{
|
||||
int texidx = texid.GetIndex();
|
||||
if ((unsigned)texidx >= Textures.Size()) return texid;
|
||||
if (Textures[texidx].FrontSkyLayer != -1) return FSetTextureID(Textures[texidx].FrontSkyLayer);
|
||||
if (Textures[texidx].RawTexture != -1) return FSetTextureID(Textures[texidx].RawTexture);
|
||||
if (dontlookup) return texid;
|
||||
|
||||
// Reject anything that cannot have been a front layer for the sky in original Hexen, i.e. it needs to be an unscaled wall texture only using Doom patches.
|
||||
auto tex = Textures[texidx].Texture;
|
||||
|
|
|
@ -77,7 +77,15 @@ public:
|
|||
|
||||
void FlushAll();
|
||||
FTextureID GetFrontSkyLayer(FTextureID);
|
||||
FTextureID GetRawTexture(FTextureID);
|
||||
FTextureID GetRawTexture(FTextureID tex, bool dontlookup = false);
|
||||
void SetRawTexture(FTextureID texid)
|
||||
{
|
||||
int texidx = texid.GetIndex();
|
||||
if ((unsigned)texidx < Textures.Size())
|
||||
{
|
||||
Textures[texidx].RawTexture = texidx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
|
|
Loading…
Reference in a new issue