From c47549c0095b5d3b341ca5365330d3dd1378af91 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Dec 2018 22:34:28 +0100 Subject: [PATCH] - code simplification. --- src/textures/texture.cpp | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 18199ddbb..9ee130ad6 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -1023,19 +1023,9 @@ CCMD (printspans) float FTexCoordInfo::RowOffset(float rowoffset) const { - float tscale = fabs(mTempScale.Y); float scale = fabs(mScale.Y); - - if (tscale == 1.f) - { - if (scale == 1.f || mWorldPanning) return rowoffset; - else return rowoffset / scale; - } - else - { - if (mWorldPanning) return rowoffset; - else return rowoffset / scale; - } + if (scale == 1.f || mWorldPanning) return rowoffset; + else return rowoffset / scale; } //=========================================================================== @@ -1046,18 +1036,9 @@ float FTexCoordInfo::RowOffset(float rowoffset) const float FTexCoordInfo::TextureOffset(float textureoffset) const { - float tscale = fabs(mTempScale.X); float scale = fabs(mScale.X); - if (tscale == 1.f) - { - if (scale == 1.f || mWorldPanning) return textureoffset; - else return textureoffset / scale; - } - else - { - if (mWorldPanning) return textureoffset; - else return textureoffset / scale; - } + if (scale == 1.f || mWorldPanning) return textureoffset; + else return textureoffset / scale; } //===========================================================================