- transitioned the 2D drawer to FGameTexture.

This commit is contained in:
Christoph Oelckers 2020-04-14 01:23:37 +02:00
commit 9e7094848c
21 changed files with 135 additions and 153 deletions

View file

@ -2724,28 +2724,12 @@ static void CheckForHacks(BuildInfo& buildinfo)
}
}
CUSTOM_CVAR(Bool, vid_nopalsubstitutions, false, CVAR_ARCHIVE | CVAR_NOINITCALL)
{
// This is in case the sky texture has been substituted.
R_InitSkyMap();
}
//==========================================================================
//
// FTextureManager :: PalCheck taken out of the texture manager because it ties it to other subsystems
// todo: move elsewhere
//
//
//==========================================================================
int PalCheck(int tex)
{
// In any true color mode this shouldn't do anything.
if (vid_nopalsubstitutions || V_IsTrueColor()) return tex;
FTexture *ftex = TexMan.ByIndex(tex);
if (ftex != nullptr && ftex->GetPalVersion() != nullptr) return ftex->GetPalVersion()->GetID().GetIndex();
return tex;
}
static void Doom_CastSpriteIDToString(FString* a, unsigned int b)
{
*a = (b >= sprites.Size()) ? "TNT1" : sprites[b].name;