- optimization of texture scaling checks.

The texture dimension checks can be performed up front when the texture is inserted into the texture manager.
This commit is contained in:
Christoph Oelckers 2020-04-17 00:37:05 +02:00
commit 70ec20c137
33 changed files with 167 additions and 169 deletions

View file

@ -157,10 +157,9 @@ void AddTiles(const FString& pathprefix, const void* tiles, FRemapTable *remap)
if (width <= 0 || height <= 0) continue;
FStringf name("%sBTIL%04d", pathprefix.GetChars(), i);
auto tex = MakeGameTexture(new FImageTexture(new FBuildTexture(pathprefix, i, tiledata, remap, width, height, xoffs, yoffs), name));
auto tex = MakeGameTexture(new FImageTexture(new FBuildTexture(pathprefix, i, tiledata, remap, width, height, xoffs, yoffs), name), ETextureType::Override);
texnum = TexMan.AddGameTexture(tex);
tiledata += size;
tex->SetUseType(ETextureType::Override);
// reactivate only if the texture counter works here.