From a2b2e2ec87d2d9ccc5e515d8ae6bb84541626534 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 May 2023 13:18:41 +0200 Subject: [PATCH] - got rid of tileHeight and tileWidth. --- source/core/textures/buildtiles.h | 17 ----------------- source/games/exhumed/src/exhumed.cpp | 2 +- source/games/exhumed/src/sequence.cpp | 4 ++-- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/source/core/textures/buildtiles.h b/source/core/textures/buildtiles.h index 3229a2263..d24a42560 100644 --- a/source/core/textures/buildtiles.h +++ b/source/core/textures/buildtiles.h @@ -24,23 +24,6 @@ inline void spritetypebase::setspritetexture(FTextureID tex) picnum = legacyTileNum(tex); } -//[[deprecated]] -inline int tileWidth(int num) -{ - auto texid = tileGetTextureID(num); - if (!texid.isValid()) return 1; - else return (int)TexMan.GetGameTexture(texid)->GetDisplayWidth(); -} - -//[[deprecated]] -inline int tileHeight(int num) -{ - auto texid = tileGetTextureID(num); - if (!texid.isValid()) return 1; - else return (int)TexMan.GetGameTexture(texid)->GetDisplayHeight(); -} - - //[[deprecated]] inline FGameTexture* tileGetTexture(int tile, bool animate = false) { diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index 21fc2ca43..70cc7e106 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -239,7 +239,7 @@ void DrawClock() int v2 = nVal & 0xF; auto texid = tileGetTextureID(v2 + kClockSymbol1); auto tex = TexMan.GetGameTexture(texid); - int yPos = 32 - tileHeight(v2 + kClockSymbol1) / 2; + int yPos = 32 - tex->GetTexelHeight() / 2; CopyTileToBitmap(texid, tileGetTextureID(kTile3603), ebp - tex->GetTexelWidth() / 2, yPos); diff --git a/source/games/exhumed/src/sequence.cpp b/source/games/exhumed/src/sequence.cpp index 4d06502e2..b826f529f 100644 --- a/source/games/exhumed/src/sequence.cpp +++ b/source/games/exhumed/src/sequence.cpp @@ -373,7 +373,7 @@ void seq_DrawPilotLightSeq(double xPos, double yPos, double nAngle) const double x = xPos + frameChunk.xpos; const double y = yPos + frameChunk.ypos; - hud_drawsprite(x, y, 65536, nAngle, legacyTileNum(frameChunk.tex), 0, 0, 1); + hud_drawsprite(x, y, 1, nAngle, frameChunk.tex, 0, 0, 1); } } @@ -395,7 +395,7 @@ void seq_DrawGunSequence(const SeqFrame& seqFrame, double xPos, double yPos, int const double y = yPos + frameChunk.ypos; const int frameStat = nStat | (RS_XFLIPHUD * !!(frameChunk.flags & 1)) | (RS_YFLIPHUD * !!(frameChunk.flags & 2)); - hud_drawsprite(x, y, 65536, nAngle.Degrees(), legacyTileNum(frameChunk.tex), nShade, nPal, frameStat, nAlpha); + hud_drawsprite(x, y, 1, nAngle.Degrees(), frameChunk.tex, nShade, nPal, frameStat, nAlpha); } }