Skip to content

Commit

Permalink
- code simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 14, 2018
1 parent f373752 commit 013d3e2
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions src/textures/texture.cpp
Expand Up @@ -1566,19 +1566,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;
}

//===========================================================================
Expand All @@ -1589,18 +1579,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;
}

//===========================================================================
Expand Down

0 comments on commit 013d3e2

Please sign in to comment.