- removed the conversion helper code and fixed a few places where FMaterial was only used to access the hardware textures in the FTexture class.

This commit is contained in:
Christoph Oelckers 2020-04-16 00:21:13 +02:00
commit 662fa6e667
18 changed files with 68 additions and 56 deletions

View file

@ -396,7 +396,7 @@ FTextureID FTextureManager::AddGameTexture (FGameTexture *texture)
hash = -1;
}
TextureHash hasher = { reinterpret_cast<FGameTexture*>(texture), hash };
TextureHash hasher = { texture, hash };
int trans = Textures.Push (hasher);
Translation.Push (trans);
if (bucket >= 0) HashFirst[bucket] = trans;
@ -445,7 +445,7 @@ void FTextureManager::ReplaceTexture (FTextureID picnum, FGameTexture *newtextur
newtexture->GetTexture()->Name = oldtexture->GetName();
newtexture->SetUseType(oldtexture->GetUseType());
Textures[index].Texture = reinterpret_cast<FGameTexture*>(newtexture);
Textures[index].Texture = newtexture;
newtexture->GetTexture()->id = oldtexture->GetID();
oldtexture->GetTexture()->Name = "";
AddGameTexture(oldtexture);