From 1d90730b0ad640baf2f5153a62830a0982cb7bfd Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 11 May 2023 19:56:36 +0200 Subject: [PATCH] Correct use of local instead of global lightTableIndex It looks like this was mistakenly using LightTableIndex instead of lightTableIndex. Found by @qndel --- Source/engine/render/dun_render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/engine/render/dun_render.cpp b/Source/engine/render/dun_render.cpp index 9845039d1..d93120b5b 100644 --- a/Source/engine/render/dun_render.cpp +++ b/Source/engine/render/dun_render.cpp @@ -1143,7 +1143,7 @@ void RenderTile(const Surface &out, Point position, if (clip.width <= 0 || clip.height <= 0) return; - const uint8_t *tbl = LightTables[LightTableIndex].data(); + const uint8_t *tbl = LightTables[lightTableIndex].data(); const auto *pFrameTable = reinterpret_cast(pDungeonCels.get()); const auto *src = reinterpret_cast(&pDungeonCels[SDL_SwapLE32(pFrameTable[levelCelBlock.frame()])]); uint8_t *dst = out.at(static_cast(position.x + clip.left), static_cast(position.y - clip.bottom));