mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- code simplification.
This commit is contained in:
parent
4cdfd7ff33
commit
c47549c009
1 changed files with 4 additions and 23 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue