faster Select Music loading and new grade graphics (thanks Parasyte!)

This commit is contained in:
Chris Danford
2002-02-09 04:30:27 +00:00
parent 35248690ac
commit 89ae7ed30c
9 changed files with 298 additions and 229 deletions
+8 -4
View File
@@ -190,6 +190,9 @@ float BitmapText::GetLineWidthInSourcePixels( int iLineNo )
{
char c = sLine[i];
int iFrameNo = m_iCharToFrameNo[c];
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
RageError( ssprintf("The font '%s' does not implement the character '%c'", m_sFontFilePath, c) );
fLineWidth += m_fFrameNoToWidth[iFrameNo];
}
@@ -238,7 +241,8 @@ void BitmapText::RebuildVertexBuffer()
{
char c = sLine[j];
int iFrameNo = m_iCharToFrameNo[c];
ASSERT( iFrameNo != -1 ); // this font doesn't impelemnt this character
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
RageError( ssprintf("The font '%s' does not implement the character '%c'", m_sFontFilePath, c) );
float fCharWidth = m_fFrameNoToWidth[iFrameNo];
//if( c == ' ' )
@@ -465,9 +469,9 @@ void BitmapText::SetText( CString sText )
sText = sText.Left( MAX_NUM_VERTICIES );
// strip out foreign chars
for( int i=0; i<sText.GetLength(); i++ )
if( sText[i] > NUM_CHARS-1 )
sText.Delete(i);
for( int i=0; i<sText.GetLength(); i++ ) // for each character
if( sText[i] < 0 || sText[i] > NUM_CHARS-1 )
sText.SetAt( i, ' ' );
m_sTextLines.RemoveAll();