- moved several members from FTexture to FGameTexture.

This commit is contained in:
Christoph Oelckers 2020-04-17 18:52:48 +02:00
commit 7641da8b7b
7 changed files with 59 additions and 46 deletions

View file

@ -126,7 +126,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
mScaleFlags = scaleflags;
mTextureLayers.ShrinkToFit();
imgtex->Material[scaleflags] = this;
tx->Material[scaleflags] = this;
if (tx->isHardwareCanvas()) tx->SetTranslucent(false);
}
@ -167,10 +167,9 @@ FMaterial * FMaterial::ValidateTexture(FGameTexture * gtex, int scaleflags, bool
{
if (gtex && gtex->isValid())
{
auto tex = gtex->GetTexture();
if (!gtex->ShouldExpandSprite()) scaleflags &= ~CTF_Expand;
FMaterial *hwtex = tex->Material[scaleflags];
FMaterial *hwtex = gtex->Material[scaleflags];
if (hwtex == NULL && create)
{
hwtex = new FMaterial(gtex, scaleflags);