From 9bf028b7f0f3b1d112fddf2e750d02fdfc64332a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 May 2023 18:27:12 +0200 Subject: [PATCH] - eliminated use of one more tile index in Exhumed. --- source/games/exhumed/src/2d.cpp | 6 +++--- source/games/exhumed/src/texidsdef.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/games/exhumed/src/2d.cpp b/source/games/exhumed/src/2d.cpp index 5bfdb8ceb..a2f1bea32 100644 --- a/source/games/exhumed/src/2d.cpp +++ b/source/games/exhumed/src/2d.cpp @@ -419,7 +419,7 @@ static int DoStatic(int a, int b) const int bottom = y + a; const int right = left + b; - const auto pixels = GetWritablePixels(tileGetTextureID(kTileLoboLaptop), true); + const auto pixels = GetWritablePixels(aTexIds[kTexTileLoboLaptop], true); auto pTile = (pixels + (200 * y)) + left; for(;y < bottom; y++) @@ -432,12 +432,12 @@ static int DoStatic(int a, int b) *pixel++ = RandomBit() * 16; } } - return tileGetTexture(kTileLoboLaptop)->GetID().GetIndex(); + return aTexIds[kTexTileLoboLaptop].GetIndex(); } static int UndoStatic() { - const auto texid = tileGetTextureID(kTileLoboLaptop); + const auto texid = aTexIds[kTexTileLoboLaptop]; GetWritablePixels(texid, true); return texid.GetIndex(); } diff --git a/source/games/exhumed/src/texidsdef.h b/source/games/exhumed/src/texidsdef.h index 9ffd131d6..5eca22cbb 100644 --- a/source/games/exhumed/src/texidsdef.h +++ b/source/games/exhumed/src/texidsdef.h @@ -35,3 +35,4 @@ x(Urn3) x(Urn4) x(SkullHead) x(SkullJaw) +x(TileLoboLaptop)