From b311f9aa2c6565960fc78b3ecdb5263dfbab076d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 11 Jan 2003 21:20:35 +0000 Subject: [PATCH] fix problems with stretched textures (and stretch all fonts; 99% are power-of-2 anyway, so this just simplifies things) --- stepmania/src/Font.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index c42e0671c7..35cb22a4a7 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -36,6 +36,9 @@ void FontPage::Load( const FontPageSettings &cfg ) // load texture m_sTexturePath.MakeLower(); + RageTextureID ID(m_sTexturePath); + ID.bStretch = true; + m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); ASSERT( m_pTexture != NULL ); @@ -138,7 +141,7 @@ void FontPage::SetTextureCoords(const vector &widths) iPixelsToChopOff--; g.width++; } - float fTexCoordsToChopOff = float(iPixelsToChopOff) / m_pTexture->GetTextureWidth(); + float fTexCoordsToChopOff = float(iPixelsToChopOff) / m_pTexture->GetSourceWidth(); g.rect.left += fTexCoordsToChopOff/2; g.rect.right -= fTexCoordsToChopOff/2;