Fixed extended ASCII support in BitmapText

This commit is contained in:
Chris Danford
2002-09-22 20:34:11 +00:00
parent bce306dcdc
commit e44141c8d3
6 changed files with 11 additions and 36 deletions
+5 -2
View File
@@ -114,6 +114,9 @@ void BitmapText::SetText( CString sText )
strncpy( m_szText, sText, MAX_TEXT_CHARS );
m_szText[MAX_TEXT_CHARS-1] = '\0';
/*
Do NOT stop out all extended ASCII chars. Why was this here? -Chris
int iLength = strlen( m_szText );
//
@@ -124,7 +127,7 @@ void BitmapText::SetText( CString sText )
if( m_szText[i] < 0 || m_szText[i] > MAX_FONT_CHARS-1 )
m_szText[i] = ' ';
}
*/
//
// break the string into lines
//
@@ -224,7 +227,7 @@ void BitmapText::DrawPrimitives()
for( int j=0; j<iLineLength; j++ ) // for each character in the line
{
const char c = szLine[j];
const int iFrameNo = m_pFont->m_iCharToFrameNo[c];
const int iFrameNo = m_pFont->m_iCharToFrameNo[ (unsigned char)c ];
if( iFrameNo == -1 ) // this font doesn't impelemnt this character
throw RageException( "The font '%s' does not implement the character '%c'", m_sFontFilePath, c );
const int iCharWidth = m_pFont->m_iFrameNoToWidth[iFrameNo];