s/throw RageException/RageException::Throw/

This commit is contained in:
Glenn Maynard
2002-12-21 18:36:10 +00:00
parent 783a9de6b0
commit 33c1fb46f7
8 changed files with 21 additions and 21 deletions
+4 -4
View File
@@ -41,7 +41,7 @@ Font::Font( const CString &sASCIITexturePath )
m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath, RageTexturePrefs() );
ASSERT( m_pTexture != NULL );
if( m_pTexture->GetNumFrames() != 16*16 )
throw RageException( "The font '%s' has only %d frames. All fonts must have 16*16 frames.", m_sTexturePath.GetString() );
RageException::Throw( "The font '%s' has only %d frames. All fonts must have 16*16 frames.", m_sTexturePath.GetString() );
for( i=0; i<256; i++ )
m_iCharToFrameNo[i] = i;
@@ -57,7 +57,7 @@ Font::Font( const CString &sASCIITexturePath )
// load character widths
for( i=0; i<256; i++ )
if( !ini.GetValueI( "Char Widths", ssprintf("%d",i), m_iFrameNoToWidth[i] ) )
throw RageException( "Error reading width value '%d' from '%s'.", i, sIniPath.GetString() );
RageException::Throw( "Error reading width value '%d' from '%s'.", i, sIniPath.GetString() );
m_bCapitalsOnly = false;
ini.GetValueB( "Char Widths", "CapitalsOnly", m_bCapitalsOnly );
@@ -125,7 +125,7 @@ Font::Font( const CString &sTexturePath, const CString& sCharacters )
//
// sanity check
if( sCharacters.GetLength() != m_pTexture->GetNumFrames() )
throw RageException( "The image '%s' doesn't have the correct number of frames. It has %d frames but should have %d frames.",
RageException::Throw( "The image '%s' doesn't have the correct number of frames. It has %d frames but should have %d frames.",
m_sTexturePath.GetString(), m_pTexture->GetNumFrames(), sCharacters.GetLength() );
// set the char to frame number map
@@ -159,7 +159,7 @@ int Font::GetLineWidthInSourcePixels( const char *szLine, int iLength )
const char c = szLine[i];
const int iFrameNo = 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_sTexturePath.GetString(), c );
RageException::Throw( "The font '%s' does not implement the character '%c'", m_sTexturePath.GetString(), c );
iLineWidth += m_iFrameNoToWidth[iFrameNo];
}