diff --git a/src/RageTexture.cpp b/src/RageTexture.cpp index 39e2766280..1753902fa5 100644 --- a/src/RageTexture.cpp +++ b/src/RageTexture.cpp @@ -28,15 +28,22 @@ void RageTexture::CreateFrameRects() // Fill in the m_FrameRects with the bounds of each frame in the animation. m_TextureCoordRects.clear(); + m_TextureCoordRects.reserve(static_cast(m_iFramesWide * m_iFramesHigh)); + + float frameWidth = (m_iImageWidth / static_cast(m_iTextureWidth)) / m_iFramesWide; + float frameHeight = (m_iImageHeight / static_cast(m_iTextureHeight)) / m_iFramesHigh; for( int j=0; jTrace( "Adding frect%d %f %f %f %f", (i + j*m_iFramesWide), frect.left, frect.top, frect.right, frect.bottom );