diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index e7d38584ab..55e1cab88f 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -489,6 +489,11 @@ void Sprite::StopUsingCustomCoords() m_bUsingCustomTexCoords = false; } +void Sprite::SetCroppedSize( float fWidth, float fHeight ) +{ + m_fRememberedClipWidth = fWidth; + m_fRememberedClipHeight = fHeight; +} void Sprite::ScaleToClipped( float fWidth, float fHeight ) { @@ -592,4 +597,3 @@ bool Sprite::IsDiagonalBanner( int iWidth, int iHeight ) /* A diagonal banner is a square. Give a couple pixels of leeway. */ return iWidth >= 100 && abs(iWidth - iHeight) < 2; } - diff --git a/stepmania/src/Sprite.h b/stepmania/src/Sprite.h index 86f00e3143..ad43641bb1 100644 --- a/stepmania/src/Sprite.h +++ b/stepmania/src/Sprite.h @@ -53,6 +53,7 @@ public: void SetTexCoordVelocity(float fVelX, float fVelY) { m_fTexCoordVelocityX = fVelX; m_fTexCoordVelocityY = fVelY; } // Scale the Sprite maintaining the aspect ratio so that it fits // within (fWidth,fHeight) and is clipped to (fWidth,fHeight). + void SetCroppedSize( float fWidth, float fHeight ); void ScaleToClipped( float fWidth, float fHeight ); static bool IsDiagonalBanner( int iWidth, int iHeight );