From 9879aa90a637f9296e98e2441a98bf2a0a12b708 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 5 Dec 2022 22:27:54 +0100 Subject: [PATCH] - more texture handling cleanup. Most of the renderer now bypasses the tile manager and goes directly to the low level texture manager. The gotpic array was removed and replaced by a new texture flag. Since there are only 3 places in the entire code that check this, this is a lot easier to handle. --- source/core/rendering/scene/hw_sky.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/core/rendering/scene/hw_sky.cpp b/source/core/rendering/scene/hw_sky.cpp index b66619a41..b3ce6f5eb 100644 --- a/source/core/rendering/scene/hw_sky.cpp +++ b/source/core/rendering/scene/hw_sky.cpp @@ -44,10 +44,11 @@ FGameTexture* SkyboxReplacement(FTextureID picnum, int palnum); void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane) { int picnum = plane == plane_ceiling ? sector->ceilingpicnum : sector->floorpicnum; + auto tex = tileGetTexture(picnum); tileUpdatePicnum(&picnum); int palette = plane == plane_ceiling ? sector->ceilingpal : sector->floorpal; - FGameTexture* skytex = SkyboxReplacement(tileGetTexture(picnum)->GetID(), palette); + FGameTexture* skytex = SkyboxReplacement(tex->GetID(), palette); int realskybits = 0; // todo: check for skybox replacement. SkyDefinition skydef;