From ec202633e98e27721086061b17eaa803ccd00f80 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 29 Oct 2002 07:58:44 +0000 Subject: [PATCH] Added .GetString() to all CStrings passed in vargs --- stepmania/src/AnnouncerManager.cpp | 4 +-- stepmania/src/BitmapText.cpp | 6 ++-- stepmania/src/CodeDetector.cpp | 4 +-- stepmania/src/Course.cpp | 7 ++-- stepmania/src/CourseContentsFrame.cpp | 2 +- stepmania/src/DifficultyIcon.cpp | 2 +- stepmania/src/Font.cpp | 12 +++---- stepmania/src/FontManager.cpp | 16 ++++----- stepmania/src/GameManager.cpp | 24 ++++++------- stepmania/src/GameState.cpp | 2 +- stepmania/src/GrayArrowRow.cpp | 2 +- stepmania/src/InputMapper.cpp | 4 +-- stepmania/src/NoteDisplay.cpp | 6 ++-- stepmania/src/Notes.cpp | 12 +++---- stepmania/src/NotesLoaderBMS.cpp | 24 ++++++------- stepmania/src/NotesLoaderDWI.cpp | 8 ++--- stepmania/src/NotesLoaderKSF.cpp | 14 ++++---- stepmania/src/NotesLoaderSM.cpp | 12 +++---- stepmania/src/NotesWriterDWI.cpp | 6 ++-- stepmania/src/OptionIconRow.cpp | 2 +- stepmania/src/RageBitmapTexture.cpp | 12 +++---- stepmania/src/RageLog.cpp | 8 ++--- stepmania/src/RageTextureManager.cpp | 16 ++++----- stepmania/src/RandomSample.cpp | 2 +- stepmania/src/ScreenEdit.cpp | 10 +++--- stepmania/src/ScreenEz2SelectStyle.cpp | 4 +-- stepmania/src/ScreenGameplay.cpp | 2 +- stepmania/src/ScreenManager.cpp | 4 +-- stepmania/src/ScreenSelectMode.cpp | 4 +-- stepmania/src/Song.cpp | 38 ++++++++++---------- stepmania/src/SongManager.cpp | 48 +++++++++++++------------- stepmania/src/Sprite.cpp | 12 +++---- stepmania/src/StepMania.cpp | 11 +++--- stepmania/src/ThemeManager.cpp | 26 +++++++------- 34 files changed, 184 insertions(+), 182 deletions(-) diff --git a/stepmania/src/AnnouncerManager.cpp b/stepmania/src/AnnouncerManager.cpp index f9eeef2766..2387979226 100644 --- a/stepmania/src/AnnouncerManager.cpp +++ b/stepmania/src/AnnouncerManager.cpp @@ -74,13 +74,13 @@ CString AnnouncerManager::GetPathTo( CString sFolderName ) #ifdef _DEBUG if( m_sCurAnnouncerName!="" && !DoesFileExist(sPathToFolderCurrent) ) { - LOG->Trace( "The current announcer is missing the folder '%s'.", sFolderName ); + LOG->Trace( "The current announcer is missing the folder '%s'.", sFolderName.GetString() ); // MessageBeep( MB_OK ); CreateDirectories( sPathToFolderCurrent ); } if( !DoesFileExist(sPathToFolderEmpty) ) { - LOG->Trace( "The empty announcer is missing the folder '%s'.", sFolderName ); + LOG->Trace( "The empty announcer is missing the folder '%s'.", sFolderName.GetString() ); // MessageBeep( MB_OK ); CreateDirectories( sPathToFolderEmpty ); CreateDirectories( sPathToFolderEmpty ); diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index ce8df8b8b6..339db904a0 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -75,7 +75,7 @@ BitmapText::~BitmapText() bool BitmapText::LoadFromFont( CString sFontFilePath ) { - LOG->Trace( "BitmapText::LoadFromFontName(%s)", sFontFilePath ); + LOG->Trace( "BitmapText::LoadFromFontName(%s)", sFontFilePath.GetString() ); if( m_pFont ) { FONT->UnloadFont( m_pFont->m_sTexturePath ); @@ -91,7 +91,7 @@ bool BitmapText::LoadFromFont( CString sFontFilePath ) bool BitmapText::LoadFromTextureAndChars( CString sTexturePath, CString sChars ) { - LOG->Trace( "BitmapText::LoadFromTextureAndChars(%s)", sTexturePath ); + LOG->Trace( "BitmapText::LoadFromTextureAndChars(%s)", sTexturePath.GetString() ); if( m_pFont ) { FONT->UnloadFont( m_pFont->m_sTexturePath ); @@ -239,7 +239,7 @@ void BitmapText::DrawPrimitives() const char c = szLine[j]; 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 ); + throw RageException( "The font '%s' does not implement the character '%c'", m_sFontFilePath.GetString(), c ); const int iCharWidth = m_pFont->m_iFrameNoToWidth[iFrameNo]; // The right side of any italic letter is being cropped. So, we're going to draw a little bit diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index 23cee5245d..a04fc62f4d 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -96,7 +96,7 @@ void RefreshCacheItem( int iIndex ) if( asButtonNames.GetSize() < 2 ) { - LOG->Trace( "The code '%s' is less than 2 buttons, so it will be ignored.", sCodeName ); + LOG->Trace( "The code '%s' is less than 2 buttons, so it will be ignored.", sCodeName.GetString() ); item.iNumButtons = 0; return; } @@ -119,7 +119,7 @@ void RefreshCacheItem( int iIndex ) } if( gb == -1 ) // didn't find it { - LOG->Trace( "The code '%s' contains an unrecognized button '%s'.", sCodeName, sButtonName ); + LOG->Trace( "The code '%s' contains an unrecognized button '%s'.", sCodeName.GetString(), sButtonName.GetString() ); item.iNumButtons = 0; return; } diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index aa1d23814e..5322044f18 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -27,7 +27,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray &apSongs ) { MsdFile msd; if( !msd.ReadFile(sPath) ) - throw RageException( "Error opening CRS file '%s'.", sPath ); + throw RageException( "Error opening CRS file '%s'.", sPath.GetString() ); CString sDir, sFName, sExt; splitrelpath( sPath, sDir, sFName, sExt ); @@ -74,8 +74,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray &apSongs ) if(!sSongDir.GetLength()) { /* Err. */ - LOG->Trace( "Course file \"%s\" has an empty #SONG. Ignored.", - (const char *) sPath, (const char *) sSongDir); + LOG->Trace( "Course file '%s' has an empty #SONG. Ignored.", sPath.GetString(), sSongDir.GetString() ); continue; } @@ -132,7 +131,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray &apSongs ) } else - LOG->Trace( "Unexpected value named '%s'", sValueName ); + LOG->Trace( "Unexpected value named '%s'", sValueName.GetString() ); } } diff --git a/stepmania/src/CourseContentsFrame.cpp b/stepmania/src/CourseContentsFrame.cpp index 785b2d8cea..1e6727b4ae 100644 --- a/stepmania/src/CourseContentsFrame.cpp +++ b/stepmania/src/CourseContentsFrame.cpp @@ -106,7 +106,7 @@ void CourseContentsFrame::SetFromCourse( Course* pCourse ) if( pNotes == NULL ) continue; // skip - printf( "Adding song '%s'\n", pSong->m_sMainTitle ); + printf( "Adding song '%s'\n", pSong->m_sMainTitle.GetString() ); m_CourseContentDisplays[m_iNumContents].Load( m_iNumContents+1, pSong, pNotes ); m_CourseContentDisplays[m_iNumContents].SetXY( 0, -((MAX_VISIBLE_CONTENTS-1)/2) * CONTENTS_BAR_HEIGHT ); m_CourseContentDisplays[m_iNumContents].StopTweening(); diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index 370dacc6cf..7f1300100a 100644 --- a/stepmania/src/DifficultyIcon.cpp +++ b/stepmania/src/DifficultyIcon.cpp @@ -23,7 +23,7 @@ bool DifficultyIcon::Load( CString sPath ) { Sprite::Load( sPath ); if( GetNumStates() != 6 && GetNumStates() != 12 ) - throw RageException( "The difficulty icon graphic '%s' must have 6 or 12 states.", sPath ); + throw RageException( "The difficulty icon graphic '%s' must have 6 or 12 states.", sPath.GetString() ); StopAnimating(); return true; } diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index 28191f84ab..5a635651e0 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -23,7 +23,7 @@ Font::Font( const CString &sASCIITexturePath ) { - //LOG->Trace( "Font::LoadFromFontName(%s)", sASCIITexturePath ); + //LOG->Trace( "Font::LoadFromFontName(%s)", sASCIITexturePath.GetString() ); int i; @@ -41,7 +41,7 @@ Font::Font( const CString &sASCIITexturePath ) m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); 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 ); + throw RageException( "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 ); + throw RageException( "Error reading width value '%d' from '%s'.", i, sIniPath.GetString() ); m_bCapitalsOnly = false; ini.GetValueB( "Char Widths", "CapitalsOnly", m_bCapitalsOnly ); @@ -94,7 +94,7 @@ Font::Font( const CString &sASCIITexturePath ) Font::Font( const CString &sTexturePath, const CString& sCharacters ) { - //LOG->Trace( "Font::LoadFromFontName(%s)", sFontFilePath ); + //LOG->Trace( "Font::LoadFromFontName(%s)", sFontFilePath.GetString() ); int i; for( i=0; iGetNumFrames() ) throw RageException( "The image '%s' doesn't have the correct number of frames. It has %d frames but should have %d frames.", - m_sTexturePath, m_pTexture->GetNumFrames(), sCharacters.GetLength() ); + m_sTexturePath.GetString(), m_pTexture->GetNumFrames(), sCharacters.GetLength() ); // set the char to frame number map for( i=0; isecond; - LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", i->first, pFont->m_iRefCount ); + LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", i->first.GetString(), pFont->m_iRefCount ); SAFE_DELETE( pFont ); } } @@ -49,7 +49,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars ) { sFontOrTextureFilePath.MakeLower(); -// LOG->Trace( "FontManager::LoadFont(%s).", sFontFilePath ); +// LOG->Trace( "FontManager::LoadFont(%s).", sFontFilePath.GetString() ); // Convert the path to lowercase so that we don't load duplicates. @@ -61,7 +61,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars ) std::map::iterator p = m_mapPathToFont.find(sFontOrTextureFilePath); if(p != m_mapPathToFont.end()) { -// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) ); +// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount) ); pFont=p->second; pFont->m_iRefCount++; } @@ -75,7 +75,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars ) else pFont = (Font*) new Font( sFontOrTextureFilePath, sChars ); -// LOG->Trace( "FontManager: Loading '%s' from disk.", sFontFilePath); +// LOG->Trace( "FontManager: Loading '%s' from disk.", sFontFilePath.GetString()); m_mapPathToFont[sFontOrTextureFilePath] = pFont; } @@ -95,7 +95,7 @@ void FontManager::UnloadFont( CString sFontFilePath ) { sFontFilePath.MakeLower(); -// LOG->Trace( "FontManager::UnloadTexture(%s).", sFontFilePath ); +// LOG->Trace( "FontManager::UnloadTexture(%s).", sFontFilePath.GetString() ); if( sFontFilePath == "" ) { @@ -106,18 +106,18 @@ void FontManager::UnloadFont( CString sFontFilePath ) Font* pFont; std::map::iterator p = m_mapPathToFont.find(sFontFilePath); if(p == m_mapPathToFont.end()) - throw RageException( ssprintf("Tried to Unload a font that wasn't loaded. '%s'", sFontFilePath) ); + throw RageException( "Tried to Unload a font that wasn't loaded. '%s'", sFontFilePath.GetString() ); pFont=p->second; pFont->m_iRefCount--; if( pFont->m_iRefCount != 0 ) { -// LOG->Trace( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) ); +// LOG->Trace( "FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount ); return; } // There are no more references to this texture. -// LOG->Trace( "FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount ); +// LOG->Trace( "FontManager: '%s' will be deleted. It has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount ); SAFE_DELETE( pFont ); // free the texture m_mapPathToFont.erase( p ); // and remove the key in the map } diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 5134d252bf..d2c5f426f5 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -1247,7 +1247,7 @@ void GameManager::SwitchNoteSkin( CString sNewNoteSkin ) CString sPath = GetCurNoteSkinDir() + "metrics.ini"; m_pIniFile->SetPath(sPath); if( !m_pIniFile->ReadFile() ) - throw RageException( "Could not read NoteSkin metrics file '%s'", sPath ); + throw RageException( "Could not read NoteSkin metrics file '%s'", sPath.GetString() ); } } @@ -1255,14 +1255,14 @@ CString GameManager::GetCurNoteSkinDir() { const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef(); - return NOTESKIN_DIR + ssprintf("%s\\%s\\", pGameDef->m_szName, m_sCurNoteSkin); + return NOTESKIN_DIR + ssprintf("%s\\%s\\", pGameDef->m_szName, m_sCurNoteSkin.GetString()); } CString GameManager::GetMetric( CString sClassName, CString sValue ) // looks in GAMESTATE for the current Style { CString sReturn; if( !m_pIniFile->GetValue( sClassName, sValue, sReturn ) ) - throw RageException( "Could not read metric '%s - %s' from '%s'", sClassName, sValue, GetCurNoteSkinDir() + "metrics.ini" ); + throw RageException( "Could not read metric '%s - %s' from '%smetrics.ini'", sClassName.GetString(), sValue.GetString(), GetCurNoteSkinDir().GetString() ); return sReturn; } @@ -1290,7 +1290,7 @@ RageColor GameManager::GetMetricC( CString sClassName, CString sValueName ) int result = sscanf( szValue, "%f,%f,%f,%f", &r, &g, &b, &a ); if( result != 4 ) { - LOG->Warn( "The color value '%s' for theme metric '%s : %s' is invalid.", szValue, sClassName, sValueName ); + LOG->Warn( "The color value '%s' for theme metric '%s : %s' is invalid.", szValue, sClassName.GetString(), sValueName.GetString() ); ASSERT(0); } @@ -1311,17 +1311,17 @@ CString GameManager::GetPathTo( const int col, CString sElementName ) // looks i CStringArray arrayPossibleFileNames; // fill this with the possible files - GetDirListing( ssprintf("%s%s %s*.sprite", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); - GetDirListing( ssprintf("%s%s %s*.png", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); - GetDirListing( ssprintf("%s%s %s*.jpg", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); - GetDirListing( ssprintf("%s%s %s*.bmp", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); - GetDirListing( ssprintf("%s%s %s*.gif", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); - GetDirListing( ssprintf("%s%s %s*", sDir, sButtonName, sElementName), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*.sprite", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*.png", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*.jpg", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*.bmp", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*.gif", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); + GetDirListing( ssprintf("%s%s %s*", sDir.GetString(), sButtonName.GetString(), sElementName.GetString()), arrayPossibleFileNames, false, true ); if( arrayPossibleFileNames.GetSize() > 0 ) return arrayPossibleFileNames[0]; - throw RageException( "The NoteSkin element '%s %s' is missing from '%s'.", sButtonName, sElementName, sDir ); + throw RageException( "The NoteSkin element '%s %s' is missing from '%s'.", sButtonName.GetString(), sElementName.GetString(), sDir.GetString() ); } void GameManager::GetEnabledGames( CArray& aGamesOut ) @@ -1383,7 +1383,7 @@ NotesType GameManager::StringToNotesType( CString sNotesType ) return NotesType(i); // invalid NotesType - LOG->Warn( "Invalid NotesType string '%s' encountered. Assuming this is 'dance-single'.", sNotesType ); + LOG->Warn( "Invalid NotesType string '%s' encountered. Assuming this is 'dance-single'.", sNotesType.GetString() ); return NOTES_TYPE_DANCE_SINGLE; } diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index ed2155a9bb..afe948ed64 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -248,7 +248,7 @@ CString GameState::GetStageText() default:sNumberSuffix = "th"; break; } } - return ssprintf( "%d%s", iStageNo, sNumberSuffix ); + return ssprintf( "%d%s", iStageNo, sNumberSuffix.GetString() ); } RageColor GameState::GetStageColor() diff --git a/stepmania/src/GrayArrowRow.cpp b/stepmania/src/GrayArrowRow.cpp index 23d631d2a6..6ff96c1e25 100644 --- a/stepmania/src/GrayArrowRow.cpp +++ b/stepmania/src/GrayArrowRow.cpp @@ -38,7 +38,7 @@ void GrayArrowRow::Load( PlayerNumber pn ) CString sPath = GAMEMAN->GetPathTo(c, "receptor"); m_GrayArrow[c].Load( sPath ); if( m_GrayArrow[c].GetNumStates() != 2 ) - throw RageException( "'%s' must have two frames", sPath ); + throw RageException( "'%s' must have two frames", sPath.GetString() ); m_GrayArrow[c].SetX( pStyleDef->m_ColumnInfo[pn][c].fXOffset ); } } diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 52ba39da82..bbbc96aee2 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -72,7 +72,7 @@ void InputMapper::ReadMappingsFromDisk() IniFile ini; ini.SetPath( sPath ); if( !ini.ReadFile() ) - LOG->Warn( "could not input mapping file '%s'.", sPath ); + LOG->Warn( "could not input mapping file '%s'.", sPath.GetString() ); IniFile::const_iterator Key = ini.GetKey( "Input" ); @@ -121,7 +121,7 @@ void InputMapper::SaveMappingsToDisk() GameInput GameI( (GameController)i, (GameButton)j ); sNameString = GameI.toString(); sValueString = ssprintf( "%s,%s,%s", - m_GItoDI[i][j][0].toString(), m_GItoDI[i][j][1].toString(), m_GItoDI[i][j][2].toString() ); + m_GItoDI[i][j][0].toString().GetString(), m_GItoDI[i][j][1].toString().GetString(), m_GItoDI[i][j][2].toString().GetString() ); ini.SetValue( "Input", sNameString, sValueString ); } diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index ddc4e221d2..ec0e929ee0 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -44,14 +44,14 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn ) CString sTapPartsPath = GAMEMAN->GetPathTo(iColNum, "tap parts"); m_sprTapParts.Load( sTapPartsPath ); if( m_sprTapParts.GetNumStates() % 2 != 0 ) - throw RageException( "Tap Parts '%s' must have an even number of frames.", sTapPartsPath ); + throw RageException( "Tap Parts '%s' must have an even number of frames.", sTapPartsPath.GetString() ); m_sprTapParts.StopAnimating(); m_sprTapParts.TurnShadowOff(); CString sHoldPartsPath = GAMEMAN->GetPathTo(iColNum, "hold parts"); m_sprHoldParts.Load( sHoldPartsPath ); if( m_sprHoldParts.GetTexture()->GetFramesWide() != 4 || m_sprHoldParts.GetTexture()->GetFramesHigh() != 2 ) - throw RageException( "Hold Parts '%s' must have 4x2 frames.", sHoldPartsPath ); + throw RageException( "Hold Parts '%s' must have 4x2 frames.", sHoldPartsPath.GetString() ); m_sprHoldParts.StopAnimating(); m_sprHoldParts.TurnShadowOff(); @@ -60,7 +60,7 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn ) const CString sColorsFilePath = GAMEMAN->GetPathTo( iColNum, "Tap.colors" ); FILE* fp = fopen( sColorsFilePath, "r" ); if( fp == NULL ) - throw RageException( "Couldn't open .colors file '%s'", sColorsFilePath ); + throw RageException( "Couldn't open .colors file '%s'", sColorsFilePath.GetString() ); bool bSuccess; do diff --git a/stepmania/src/Notes.cpp b/stepmania/src/Notes.cpp index 7897c6766e..7d279904f6 100644 --- a/stepmania/src/Notes.cpp +++ b/stepmania/src/Notes.cpp @@ -57,19 +57,19 @@ Notes::~Notes() void Notes::WriteSMNotesTag( FILE* fp ) { fprintf( fp, "\n//---------------%s - %s----------------\n", - GameManager::NotesTypeToString(m_NotesType), m_sDescription ); + GameManager::NotesTypeToString(m_NotesType).GetString(), m_sDescription.GetString() ); fprintf( fp, "#NOTES:\n" ); - fprintf( fp, " %s:\n", GameManager::NotesTypeToString(m_NotesType) ); - fprintf( fp, " %s:\n", m_sDescription ); - fprintf( fp, " %s:\n", DifficultyToString(m_Difficulty) ); + fprintf( fp, " %s:\n", GameManager::NotesTypeToString(m_NotesType).GetString() ); + fprintf( fp, " %s:\n", m_sDescription.GetString() ); + fprintf( fp, " %s:\n", DifficultyToString(m_Difficulty).GetString() ); fprintf( fp, " %d:\n", m_iMeter ); CStringArray asRadarValues; for( int r=0; rTrace( "Notes::LoadFromBMSFile( '%s' )", sPath ); + LOG->Trace( "Notes::LoadFromBMSFile( '%s' )", sPath.GetString() ); out.m_NotesType = NOTES_TYPE_INVALID; @@ -69,7 +69,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out ) CStdioFile file; if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) ) - throw RageException( "Failed to open %s for reading.", sPath ); + throw RageException( "Failed to open %s for reading.", sPath.GetString() ); CString line; while( file.ReadString(line) ) // foreach line @@ -134,7 +134,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out ) if( iPosOpenBracket != -1 && iPosCloseBracket != -1 ) out.m_sDescription = out.m_sDescription.Mid( iPosOpenBracket+1, iPosCloseBracket-iPosOpenBracket-1 ); out.m_sDescription.MakeLower(); - LOG->Trace( "Notes description found to be '%s'", out.m_sDescription ); + LOG->Trace( "Notes description found to be '%s'", out.m_sDescription.GetString() ); // if there's a 6 in the description, it's probably part of "6panel" or "6-panel" if( out.m_sDescription.Find("6") != -1 ) @@ -163,7 +163,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out ) const int iNumNotesInThisMeasure = arrayNotes.GetSize(); //LOG->Trace( "%s:%s: iMeasureNo = %d, iNoteNum = %d, iNumNotesInThisMeasure = %d", - // valuename, sNoteData, iMeasureNo, iNoteNum, iNumNotesInThisMeasure ); + // valuename.GetString(), sNoteData.GetString(), iMeasureNo, iNoteNum, iNumNotesInThisMeasure ); for( int j=0; jTrace( "Song::LoadFromBMSDir(%s)", sDir ); + LOG->Trace( "Song::LoadFromBMSDir(%s)", sDir.GetString() ); CStringArray arrayBMSFileNames; GetApplicableFiles( sDir, arrayBMSFileNames ); if( arrayBMSFileNames.GetSize() == 0 ) - throw RageException( "Couldn't find any BMS files in '%s'", sDir ); + throw RageException( "Couldn't find any BMS files in '%s'", sDir.GetString() ); // load the Notes from the rest of the BMS files for( int i=0; iTrace( "%s:%s: iMeasureNo = %d, iBMSTrackNo = %d, iNumNotesInThisMeasure = %d", - // valuename, sNoteData, iMeasureNo, iBMSTrackNo, iNumNotesInThisMeasure ); + // valuename.GetString(), sNoteData.GetString(), iMeasureNo, iBMSTrackNo, iNumNotesInThisMeasure ); for( int j=0; jTrace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor, sPath ); + LOG->Trace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor.GetString(), sPath.GetString() ); } else { @@ -477,7 +477,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out ) // open the song file again and and look for this tag's value CStdioFile file; if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) ) - throw RageException( "Failed to open %s for reading.", sPath ); + throw RageException( "Failed to open %s for reading.", sPath.GetString() ); CString line; while( file.ReadString(line) ) // foreach line @@ -531,7 +531,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out ) if( fFreezeSecs == -1 ) // we didn't find the line we were looking for { - LOG->Trace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor, sPath ); + LOG->Trace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor.GetString(), sPath.GetString() ); } else { diff --git a/stepmania/src/NotesLoaderDWI.cpp b/stepmania/src/NotesLoaderDWI.cpp index f6e3868bf5..5f95ffc903 100644 --- a/stepmania/src/NotesLoaderDWI.cpp +++ b/stepmania/src/NotesLoaderDWI.cpp @@ -244,13 +244,13 @@ bool DWILoader::LoadFromDWITokens( bool DWILoader::LoadFromDWIFile( CString sPath, Song &out ) { - LOG->Trace( "Song::LoadFromDWIFile(%s)", sPath ); + LOG->Trace( "Song::LoadFromDWIFile(%s)", sPath.GetString() ); MsdFile msd; bool bResult = msd.ReadFile( sPath ); if( !bResult ) - throw RageException( "Error opening file '%s' for reading.", sPath ); + throw RageException( "Error opening file '%s' for reading.", sPath.GetString() ); for( int i=0; iWarn( "Invalid CHANGEBPM: '%s'", arrayBPMChangeExpressions[b].GetString()); continue; } float fIndex = (float)atof( arrayBPMChangeValues[0] ) * ROWS_PER_BEAT / 4.0f; @@ -378,7 +378,7 @@ bool DWILoader::LoadFromDir( CString sPath, Song &out ) GetApplicableFiles( sPath, aFileNames ); if( aFileNames.GetSize() > 1 ) - throw RageException( "There is more than one DWI file in '%s'. There should be only one!", sPath ); + throw RageException( "There is more than one DWI file in '%s'. There should be only one!", sPath.GetString() ); /* We should have exactly one; if we had none, we shouldn't have been * called to begin with. */ diff --git a/stepmania/src/NotesLoaderKSF.cpp b/stepmania/src/NotesLoaderKSF.cpp index 88ea57716c..dfd61b88c9 100644 --- a/stepmania/src/NotesLoaderKSF.cpp +++ b/stepmania/src/NotesLoaderKSF.cpp @@ -11,12 +11,12 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out ) { - LOG->Trace( "Notes::LoadFromKSFFile( '%s' )", sPath ); + LOG->Trace( "Notes::LoadFromKSFFile( '%s' )", sPath.GetString() ); MsdFile msd; bool bResult = msd.ReadFile( sPath ); if( !bResult ) - throw RageException( "Error opening file '%s'.", sPath ); + throw RageException( "Error opening file '%s'.", sPath.GetString() ); int iTickCount = -1; // this is the value we read for TICKCOUNT CString iStep; // this is the value we read for STEP @@ -39,7 +39,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out ) if( iTickCount == -1 ) { iTickCount = 2; - LOG->Warn( "%s:\nTICKCOUNT not found; defaulting to %i", sPath, iTickCount ); + LOG->Warn( "%s:\nTICKCOUNT not found; defaulting to %i", sPath.GetString(), iTickCount ); } NoteData notedata; // read it into here @@ -146,13 +146,13 @@ void KSFLoader::GetApplicableFiles( CString sPath, CStringArray &out ) bool KSFLoader::LoadFromDir( CString sDir, Song &out ) { - LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir ); + LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir.GetString() ); CStringArray arrayKSFFileNames; GetDirListing( sDir + CString("*.ksf"), arrayKSFFileNames ); if( arrayKSFFileNames.GetSize() == 0 ) - throw RageException( "Couldn't find any KSF files in '%s'", sDir ); + throw RageException( "Couldn't find any KSF files in '%s'", sDir.GetString() ); // load the Notes from the rest of the KSF files for( int i=0; iTrace( "Unexpected value named '%s'", sValueName ); + LOG->Trace( "Unexpected value named '%s'", sValueName.GetString() ); } // search for music with song in the file name diff --git a/stepmania/src/NotesLoaderSM.cpp b/stepmania/src/NotesLoaderSM.cpp index 04ad61b8e9..8cb571d06e 100644 --- a/stepmania/src/NotesLoaderSM.cpp +++ b/stepmania/src/NotesLoaderSM.cpp @@ -49,7 +49,7 @@ void SMLoader::GetApplicableFiles( CString sPath, CStringArray &out ) bool SMLoader::LoadFromSMFile( CString sPath, Song &out ) { - LOG->Trace( "Song::LoadFromSMDir(%s)", sPath ); + LOG->Trace( "Song::LoadFromSMDir(%s)", sPath.GetString() ); out.m_BPMSegments.clear(); out.m_StopSegments.clear(); @@ -59,7 +59,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out ) MsdFile msd; bool bResult = msd.ReadFile( sPath ); if( !bResult ) - throw RageException( "Error opening file '%s'.", sPath ); + throw RageException( "Error opening file '%s'.", sPath.GetString() ); for( i=0; iWarn( "The song file '%s' has an unknown #SELECTABLE value, \"%s\"; ignored.", sPath, sParams[1]); + LOG->Warn( "The song file '%s' has an unknown #SELECTABLE value, '%s'; ignored.", sPath.GetString(), sParams[1].GetString()); } else if( 0==stricmp(sValueName,"STOPS") || 0==stricmp(sValueName,"FREEZES") ) @@ -201,7 +201,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out ) if( iNumParams != 7 ) { - LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have %d.", sPath, iNumParams, 7 ); + LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have %d.", sPath.GetString(), iNumParams, 7 ); } else { @@ -217,7 +217,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out ) } else - LOG->Trace( "Unexpected value named '%s'", sValueName ); + LOG->Trace( "Unexpected value named '%s'", sValueName.GetString() ); } return true; @@ -230,7 +230,7 @@ bool SMLoader::LoadFromDir( CString sPath, Song &out ) GetApplicableFiles( sPath, aFileNames ); if( aFileNames.GetSize() > 1 ) - throw RageException( "There is more than one SM file in '%s'. There should be only one!", sPath ); + throw RageException( "There is more than one SM file in '%s'. There should be only one!", sPath.GetString() ); /* We should have exactly one; if we had none, we shouldn't have been * called to begin with. */ diff --git a/stepmania/src/NotesWriterDWI.cpp b/stepmania/src/NotesWriterDWI.cpp index a8c8906420..6b790deffc 100644 --- a/stepmania/src/NotesWriterDWI.cpp +++ b/stepmania/src/NotesWriterDWI.cpp @@ -216,12 +216,12 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out ) { FILE* fp = fopen( sPath, "w" ); if( fp == NULL ) - throw RageException( "Error opening song file '%s' for writing.", sPath ); + throw RageException( "Error opening song file '%s' for writing.", sPath.GetString() ); if(out.GetFullTitle().GetLength() != 0) - fprintf( fp, "#TITLE:%s;\n", out.GetFullTitle() ); + fprintf( fp, "#TITLE:%s;\n", out.GetFullTitle().GetString() ); if(out.m_sArtist.GetLength() != 0) - fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist ); + fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist.GetString() ); ASSERT( out.m_BPMSegments[0].m_fStartBeat == 0 ); fprintf( fp, "#BPM:%.3f;\n", out.m_BPMSegments[0].m_fBPM ); fprintf( fp, "#GAP:%d;\n", int(-roundf( out.m_fBeat0OffsetInSeconds*1000 )) ); diff --git a/stepmania/src/OptionIconRow.cpp b/stepmania/src/OptionIconRow.cpp index f0b8b0c20e..dd0968f840 100644 --- a/stepmania/src/OptionIconRow.cpp +++ b/stepmania/src/OptionIconRow.cpp @@ -79,7 +79,7 @@ int OptionToPreferredColumn( CString sOptionText ) if( g_OptionColumnEntries[i].szString == sOptionText ) return g_OptionColumnEntries[i].iSlotIndex; - LOG->Warn("Unknown option: \"%s\"", sOptionText ); + LOG->Warn("Unknown option: '%s'", sOptionText.GetString() ); return -1; } diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 6d1b4602cb..d7bc2723c5 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -222,7 +222,7 @@ void RageBitmapTexture::Create( D3DPOOL_MANAGED, // which memory pool &m_pd3dTexture) )) { - throw RageException( hr, "CreateTexture() failed for file '%s'.", m_sFilePath ); + throw RageException( hr, "CreateTexture() failed for file '%s'.", m_sFilePath.GetString() ); } { @@ -297,7 +297,7 @@ void RageBitmapTexture::Create( { D3DLOCKED_RECT d3dlr; if( FAILED( hr=m_pd3dTexture->LockRect(0, &d3dlr, 0, 0) ) ) - throw RageException( hr, "LockRect failed for file '%s'.", m_sFilePath ); + throw RageException( hr, "LockRect failed for file '%s'.", m_sFilePath.GetString() ); memcpy( (byte *)(d3dlr.pBits), img->pixels, img->h*img->pitch ); ASSERT( !FAILED( m_pd3dTexture->UnlockRect(0) ) ) ; @@ -305,7 +305,7 @@ void RageBitmapTexture::Create( SDL_FreeSurface(img); LOG->Trace( "RageBitmapTexture: Loaded '%s' (%ux%u) from disk. bStretch = %d, source %d,%d; image %d,%d.", - m_sFilePath, GetTextureWidth(), GetTextureHeight(), + m_sFilePath.GetString(), GetTextureWidth(), GetTextureHeight(), bStretch, m_iSourceWidth, m_iSourceHeight, m_iImageWidth, m_iImageHeight); } @@ -347,7 +347,7 @@ void RageBitmapTexture::Create( D3DXIMAGE_INFO ddii; if( FAILED( hr = D3DXGetImageInfoFromFile(m_sFilePath,&ddii) ) ) { - throw RageException( hr, "D3DXGetImageInfoFromFile() failed for file '%s'.", m_sFilePath ); + throw RageException( hr, "D3DXGetImageInfoFromFile() failed for file '%s'.", m_sFilePath.GetString() ); } @@ -402,7 +402,7 @@ void RageBitmapTexture::Create( ::Sleep( 10 ); continue; } - throw RageException( hr, "D3DXCreateTextureFromFileEx() failed for file '%s'.", m_sFilePath ); + throw RageException( hr, "D3DXCreateTextureFromFileEx() failed for file '%s'.", m_sFilePath.GetString() ); } else break; @@ -435,7 +435,7 @@ void RageBitmapTexture::Create( } LOG->Trace( "RageBitmapTexture: Loaded '%s' (%ux%u) from disk. bStretch = %d, source %d,%d; image %d,%d.", - m_sFilePath, + m_sFilePath.GetString(), GetTextureWidth(), GetTextureHeight(), bStretch, diff --git a/stepmania/src/RageLog.cpp b/stepmania/src/RageLog.cpp index 6fb698cd35..b082dbaa28 100644 --- a/stepmania/src/RageLog.cpp +++ b/stepmania/src/RageLog.cpp @@ -71,8 +71,8 @@ void RageLog::Trace( const char *fmt, ...) CString sBuff = vssprintf( fmt, va ); va_end(va); - fprintf( m_fileLog, "%s\n", sBuff ); - printf( "%s\n", sBuff ); + fprintf( m_fileLog, "%s\n", sBuff.GetString() ); + printf( "%s\n", sBuff.GetString() ); CrashLog(sBuff); #ifdef DEBUG @@ -88,7 +88,7 @@ void RageLog::Trace( HRESULT hr, const char *fmt, ...) va_end(va); s += ssprintf( "(%s)", DXGetErrorString8(hr) ); - this->Trace( "%s", s ); + this->Trace( "%s", s.GetString() ); } void RageLog::Warn( const char *fmt, ...) @@ -101,7 +101,7 @@ void RageLog::Warn( const char *fmt, ...) Trace( "/////////////////////////////////////////\n" "WARNING: %s\n" "/////////////////////////////////////////", - sBuff ); + sBuff.GetString() ); } void RageLog::Flush() diff --git a/stepmania/src/RageTextureManager.cpp b/stepmania/src/RageTextureManager.cpp index 13481eddc6..d6c293773b 100644 --- a/stepmania/src/RageTextureManager.cpp +++ b/stepmania/src/RageTextureManager.cpp @@ -42,7 +42,7 @@ RageTextureManager::~RageTextureManager() { RageTexture* pTexture = i->second; if( pTexture->m_iRefCount ) - LOG->Trace( "TEXTUREMAN LEAK: '%s', RefCount = %d.", i->first, pTexture->m_iRefCount ); + LOG->Trace( "TEXTUREMAN LEAK: '%s', RefCount = %d.", i->first.GetString(), pTexture->m_iRefCount ); SAFE_DELETE( pTexture ); } } @@ -55,7 +55,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, bool bForceR { sTexturePath.MakeLower(); -// LOG->Trace( "RageTextureManager::LoadTexture(%s).", sTexturePath ); +// LOG->Trace( "RageTextureManager::LoadTexture(%s).", sTexturePath.GetString() ); // holder for the new texture RageTexture* pTexture; @@ -73,7 +73,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, bool bForceR if( bForceReload ) pTexture->Reload( m_iMaxTextureSize, m_iTextureColorDepth, iMipMaps, iAlphaBits, bDither, bStretch ); -// LOG->Trace( "RageTextureManager: '%s' now has %d references.", sTexturePath, pTexture->m_iRefCount ); +// LOG->Trace( "RageTextureManager: '%s' now has %d references.", sTexturePath.GetString(), pTexture->m_iRefCount ); } else // the texture is not already loaded { @@ -85,7 +85,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, bool bForceR else pTexture = new RageBitmapTexture( m_pScreen, sTexturePath, m_iMaxTextureSize, m_iTextureColorDepth, iMipMaps, iAlphaBits, bDither, bStretch ); - LOG->Trace( "RageTextureManager: Finished loading '%s'.", sTexturePath ); + LOG->Trace( "RageTextureManager: Finished loading '%s'.", sTexturePath.GetString() ); m_mapPathToTexture[sTexturePath] = pTexture; } @@ -140,7 +140,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath ) { sTexturePath.MakeLower(); -// LOG->Trace( "RageTextureManager::UnloadTexture(%s).", sTexturePath ); +// LOG->Trace( "RageTextureManager::UnloadTexture(%s).", sTexturePath.GetString() ); if( sTexturePath == "" ) { @@ -150,7 +150,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath ) std::map::iterator p = m_mapPathToTexture.find(sTexturePath); if(p == m_mapPathToTexture.end()) - throw RageException( "Tried to Unload texture '%s' that wasn't loaded.", sTexturePath ); + throw RageException( "Tried to Unload texture '%s' that wasn't loaded.", sTexturePath.GetString() ); RageTexture* pTexture = p->second; pTexture->m_iRefCount--; @@ -168,14 +168,14 @@ void RageTextureManager::UnloadTexture( CString sTexturePath ) if( pTexture->m_iRefCount == 0 && (pTexture->IsAMovie() || !m_iSecondsBeforeUnload )) { - // LOG->Trace( "RageTextureManager: '%s' will be deleted. It has %d references.", sTexturePath, pTexture->m_iRefCount ); + // LOG->Trace( "RageTextureManager: '%s' will be deleted. It has %d references.", sTexturePath.GetString(), pTexture->m_iRefCount ); SAFE_DELETE( pTexture ); // free the texture m_mapPathToTexture.erase(p); // and remove the key in the map } GCTextures(); - //LOG->Trace( "RageTextureManager: '%s' will not be deleted. It still has %d references.", sTexturePath, pTexture->m_iRefCount ); + //LOG->Trace( "RageTextureManager: '%s' will not be deleted. It still has %d references.", sTexturePath.GetString(), pTexture->m_iRefCount ); } void RageTextureManager::ReloadAll() diff --git a/stepmania/src/RandomSample.cpp b/stepmania/src/RandomSample.cpp index 6a17c39e3f..25aeb5e2c3 100644 --- a/stepmania/src/RandomSample.cpp +++ b/stepmania/src/RandomSample.cpp @@ -51,7 +51,7 @@ bool RandomSample::LoadSoundDir( CString sDir ) bool RandomSample::LoadSound( CString sSoundFilePath ) { - LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath ); + LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath.GetString() ); RageSoundSample* pSS = new RageSoundSample; pSS->Load( sSoundFilePath ); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 539a9be7f0..5f135a9a5b 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -516,14 +516,14 @@ void ScreenEdit::Update( float fDeltaTime ) "Assist tick is %s\n" "MusicOffsetSeconds: %.2f\n" "Preview start: %.2f, length = %.2f\n", - sNoteType, + sNoteType.GetString(), GAMESTATE->m_fSongBeat, m_NoteFieldEdit.m_fBeginMarker, m_NoteFieldEdit.m_fEndMarker, GAMESTATE->m_SongOptions.m_fMusicRate, - DifficultyToString( m_pNotes->m_Difficulty ), - GAMESTATE->m_pCurNotes[PLAYER_1] ? GAMESTATE->m_pCurNotes[PLAYER_1]->m_sDescription : "no description", - m_pSong->m_sMainTitle, - m_pSong->m_sSubTitle, + DifficultyToString( m_pNotes->m_Difficulty ).GetString(), + GAMESTATE->m_pCurNotes[PLAYER_1] ? GAMESTATE->m_pCurNotes[PLAYER_1]->m_sDescription.GetString() : "no description", + m_pSong->m_sMainTitle.GetString(), + m_pSong->m_sSubTitle.GetString(), iNumTapNotes, iNumHoldNotes, GAMESTATE->m_SongOptions.m_AssistType==SongOptions::ASSIST_TICK ? "ON" : "OFF", m_pSong->m_fBeat0OffsetInSeconds, diff --git a/stepmania/src/ScreenEz2SelectStyle.cpp b/stepmania/src/ScreenEz2SelectStyle.cpp index 9eec79518b..dd3c03b68c 100644 --- a/stepmania/src/ScreenEz2SelectStyle.cpp +++ b/stepmania/src/ScreenEz2SelectStyle.cpp @@ -197,7 +197,7 @@ void ScreenEz2SelectStyle::RefreshModeChoices() const ModeChoice& choice = m_aPossibleModeChoices[i]; if( choice.numSidesJoinedToPlay == iNumSidesJoined ) - asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode %s %s", sGameName, choice.name) ) ); + asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode %s %s", sGameName.GetString(), choice.name) ) ); } m_ScrollingList.Load( asGraphicPaths ); @@ -221,7 +221,7 @@ void ScreenEz2SelectStyle::AfterChange() CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ]; if( CHANGE_BG_ANIMATIONS ) - m_Menu.m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("select mode %s %s", sGameName, choice.name)) ); + m_Menu.m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("select mode %s %s", sGameName.GetString(), choice.name)) ); } void ScreenEz2SelectStyle::MenuLeft( PlayerNumber pn ) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 5658d4e327..3b4ed5c416 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1032,7 +1032,7 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone ) "Would you like to save these changes back\n" "to the song file?\n" "Choosing NO will discard your changes.", - GAMESTATE->m_pCurSong->GetFullTitle() ); + GAMESTATE->m_pCurSong->GetFullTitle().GetString() ); break; case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 6dbe8a6e37..17435ac58b 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -223,7 +223,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName ) // else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) return new ScreenEz2SelectMusic; else if( 0==stricmp(sClassName, "ScreenNetworkGame") ) return new ScreenNetworkGame; else - throw RageException( "Invalid Screen class name '%s'", sClassName ); + throw RageException( "Invalid Screen class name '%s'", sClassName.GetString() ); } void ScreenManager::PrepNewScreen( CString sClassName ) @@ -264,7 +264,7 @@ void ScreenManager::SetNewScreen( CString sClassName ) // deletes it later on. This also convention will reduce includes because screens won't // have to include each other's headers of other screens. Screen* pNewScreen = MakeNewScreen(sClassName); - LOG->Trace( "Loaded %s in %f", sClassName, t.GetDeltaTime()); + LOG->Trace( "Loaded %s in %f", sClassName.GetString(), t.GetDeltaTime()); SetNewScreen( pNewScreen ); } diff --git a/stepmania/src/ScreenSelectMode.cpp b/stepmania/src/ScreenSelectMode.cpp index 195b100ae4..2efc1202a6 100644 --- a/stepmania/src/ScreenSelectMode.cpp +++ b/stepmania/src/ScreenSelectMode.cpp @@ -240,7 +240,7 @@ void ScreenSelectMode::RefreshModeChoices() for( i=0; iGetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName, choice.name) ) ); + asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName.GetString(), choice.name) ) ); } m_ScrollingList.Load( asGraphicPaths ); @@ -253,7 +253,7 @@ void ScreenSelectMode::RefreshModeChoices() for( int i=0; iGetPathTo("BGAnimations",ssprintf("select mode %s %s", sGameName, sChoiceName)) ); + m_BGAnimations[i].LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("select mode %s %s", sGameName.GetString(), sChoiceName.GetString())) ); } } } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 36c85fc63c..c9da672763 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -267,7 +267,7 @@ bool Song::LoadWithoutCache( CString sDir ) NotesLoader *ld = MakeLoader( sDir ); if(!ld) { - LOG->Warn( "Couldn't find any SM, DWI, BMS, or KSF files in '%s'. This is not a valid song directory.", sDir ); + LOG->Warn( "Couldn't find any SM, DWI, BMS, or KSF files in '%s'. This is not a valid song directory.", sDir.GetString() ); return false; } @@ -288,7 +288,7 @@ bool Song::LoadWithoutCache( CString sDir ) bool Song::LoadFromSongDir( CString sDir ) { - LOG->Trace( "Song::LoadFromSongDir(%s)", sDir ); + LOG->Trace( "Song::LoadFromSongDir(%s)", sDir.GetString() ); // make sure there is a trailing '\\' at the end of sDir if( sDir.Right(1) != "\\" ) @@ -309,7 +309,7 @@ bool Song::LoadFromSongDir( CString sDir ) if( GetHashForDirectory(m_sSongDir) == uDirHash && // this cache is up to date DoesFileExist(GetCacheFilePath())) { - LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir, GetCacheFilePath() ); + LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir.GetString(), GetCacheFilePath().GetString() ); SMLoader ld; ld.LoadFromSMFile( GetCacheFilePath(), *this ); } @@ -371,7 +371,7 @@ void Song::TidyUpData() m_sSubTitle.TrimRight(); if( m_sArtist == "" ) m_sArtist = "Unknown artist"; if( m_BPMSegments.GetSize() == 0 ) - throw RageException( "No #BPM specified in '%s.'", m_sSongDir+m_sSongFileName ); + throw RageException( "No #BPM specified in '%s%s.'", m_sSongDir.GetString(), m_sSongFileName.GetString() ); if( !HasMusic() ) { @@ -384,7 +384,7 @@ void Song::TidyUpData() m_sMusicFile = arrayPossibleMusic[0]; // Don't throw on missing music. -Chris // else -// throw RageException( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir ); +// throw RageException( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir.GetString() ); } if( HasMusic() ) @@ -641,25 +641,25 @@ void Song::Save() void Song::SaveToSMFile( CString sPath, bool bSavingCache ) { - LOG->Trace( "Song::SaveToSMDir('%s')", sPath ); + LOG->Trace( "Song::SaveToSMDir('%s')", sPath.GetString() ); int i; FILE* fp = fopen( sPath, "w" ); if( fp == NULL ) - throw RageException( "Error opening song file '%s' for writing.", sPath ); + throw RageException( "Error opening song file '%s' for writing.", sPath.GetString() ); - fprintf( fp, "#TITLE:%s;\n", m_sMainTitle ); - fprintf( fp, "#SUBTITLE:%s;\n", m_sSubTitle ); - fprintf( fp, "#ARTIST:%s;\n", m_sArtist ); - fprintf( fp, "#TITLETRANSLIT:%s;\n", m_sMainTitleTranslit ); - fprintf( fp, "#SUBTITLETRANSLIT:%s;\n", m_sSubTitleTranslit ); - fprintf( fp, "#ARTISTTRANSLIT:%s;\n", m_sArtistTranslit ); - fprintf( fp, "#CREDIT:%s;\n", m_sCredit ); - fprintf( fp, "#BANNER:%s;\n", m_sBannerFile ); - fprintf( fp, "#BACKGROUND:%s;\n", m_sBackgroundFile ); - fprintf( fp, "#CDTITLE:%s;\n", m_sCDTitleFile ); - fprintf( fp, "#MUSIC:%s;\n", m_sMusicFile ); + fprintf( fp, "#TITLE:%s;\n", m_sMainTitle.GetString() ); + fprintf( fp, "#SUBTITLE:%s;\n", m_sSubTitle.GetString() ); + fprintf( fp, "#ARTIST:%s;\n", m_sArtist.GetString() ); + fprintf( fp, "#TITLETRANSLIT:%s;\n", m_sMainTitleTranslit.GetString() ); + fprintf( fp, "#SUBTITLETRANSLIT:%s;\n", m_sSubTitleTranslit.GetString() ); + fprintf( fp, "#ARTISTTRANSLIT:%s;\n", m_sArtistTranslit.GetString() ); + fprintf( fp, "#CREDIT:%s;\n", m_sCredit.GetString() ); + fprintf( fp, "#BANNER:%s;\n", m_sBannerFile.GetString() ); + fprintf( fp, "#BACKGROUND:%s;\n", m_sBackgroundFile.GetString() ); + fprintf( fp, "#CDTITLE:%s;\n", m_sCDTitleFile.GetString() ); + fprintf( fp, "#MUSIC:%s;\n", m_sMusicFile.GetString() ); fprintf( fp, "#MUSICBYTES:%u;\n", m_iMusicBytes ); fprintf( fp, "#MUSICLENGTH:%.3f;\n", m_fMusicLengthSeconds ); if(bSavingCache) { @@ -708,7 +708,7 @@ void Song::SaveToSMFile( CString sPath, bool bSavingCache ) { BackgroundChange &seg = m_BackgroundChanges[i]; - fprintf( fp, "%.3f=%s", seg.m_fStartBeat, seg.m_sBGName ); + fprintf( fp, "%.3f=%s", seg.m_fStartBeat, seg.m_sBGName.GetString() ); if( i != m_BackgroundChanges.GetSize()-1 ) fprintf( fp, "," ); } diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 5aa35979e3..b534e24c20 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -69,16 +69,16 @@ void SongManager::SanityCheckGroupDir( CString sDir ) const { // Check to see if they put a song directly inside the group folder. CStringArray arrayFiles; - GetDirListing( ssprintf("%s\\*.mp3", sDir), arrayFiles ); - GetDirListing( ssprintf("%s\\*.ogg", sDir), arrayFiles ); - GetDirListing( ssprintf("%s\\*.wav", sDir), arrayFiles ); + GetDirListing( sDir + "\\*.mp3", arrayFiles ); + GetDirListing( sDir + "\\*.ogg", arrayFiles ); + GetDirListing( sDir + "\\*.wav", arrayFiles ); if( arrayFiles.GetSize() > 0 ) throw RageException( - ssprintf( "The folder '%s' contains music files.\n\n" - "This probably means that you have a song outside of a group folder.\n" - "All song folders must reside in a group folder. For example, 'Songs\\DDR 4th Mix\\B4U'.\n" - "See the StepMania readme for more info.", - ssprintf("%s\\%s", sDir ) ) + "The folder '%s' contains music files.\n\n" + "This means that you have a music outside of a song folder.\n" + "All song folders must reside in a group folder. For example, 'Songs\\DDR 4th Mix\\B4U'.\n" + "See the StepMania readme for more info.", + sDir.GetString() ); } @@ -94,16 +94,16 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName ) // Look for a group banner in this group folder CStringArray arrayGroupBanners; - GetDirListing( ssprintf("%s\\%s\\*.png", sDir, sGroupDirName), arrayGroupBanners ); - GetDirListing( ssprintf("%s\\%s\\*.jpg", sDir, sGroupDirName), arrayGroupBanners ); - GetDirListing( ssprintf("%s\\%s\\*.gif", sDir, sGroupDirName), arrayGroupBanners ); - GetDirListing( ssprintf("%s\\%s\\*.bmp", sDir, sGroupDirName), arrayGroupBanners ); + GetDirListing( ssprintf("%s\\%s\\*.png", sDir.GetString(), sGroupDirName.GetString()), arrayGroupBanners ); + GetDirListing( ssprintf("%s\\%s\\*.jpg", sDir.GetString(), sGroupDirName.GetString()), arrayGroupBanners ); + GetDirListing( ssprintf("%s\\%s\\*.gif", sDir.GetString(), sGroupDirName.GetString()), arrayGroupBanners ); + GetDirListing( ssprintf("%s\\%s\\*.bmp", sDir.GetString(), sGroupDirName.GetString()), arrayGroupBanners ); CString sBannerPath; if( arrayGroupBanners.GetSize() > 0 ) { - sBannerPath = ssprintf("%s\\%s\\%s", sDir, sGroupDirName, arrayGroupBanners[0] ); - LOG->Trace( ssprintf("Group banner for '%s' is '%s'.", sGroupDirName, sBannerPath) ); + sBannerPath = ssprintf("%s\\%s\\%s", sDir.GetString(), sGroupDirName.GetString(), arrayGroupBanners[0].GetString() ); + LOG->Trace( "Group banner for '%s' is '%s'.", sGroupDirName.GetString(), sBannerPath.GetString() ); } m_arrayGroupNames.Add( sGroupDirName ); @@ -131,7 +131,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() ) // Find all Song folders in this group directory CStringArray arraySongDirs; - GetDirListing( ssprintf("%s\\%s\\*.*", sDir, sGroupDirName), arraySongDirs, true ); + GetDirListing( ssprintf("%s\\%s\\*.*", sDir.GetString(), sGroupDirName.GetString()), arraySongDirs, true ); SortCStringArray( arraySongDirs ); int j; @@ -145,11 +145,11 @@ void SongManager::LoadStepManiaSongDir( CString sDir, void(*callback)() ) continue; // ignore it // this is a song directory. Load a new song! - GAMESTATE->m_sLoadingMessage = ssprintf("Loading songs...\n%s\n%s", sGroupDirName, sSongDirName); + GAMESTATE->m_sLoadingMessage = ssprintf("Loading songs...\n%s\n%s", sGroupDirName.GetString(), sSongDirName.GetString()); if( callback ) callback(); Song* pNewSong = new Song; - if( !pNewSong->LoadFromSongDir( ssprintf("%s\\%s\\%s", sDir, sGroupDirName, sSongDirName) ) ) { + if( !pNewSong->LoadFromSongDir( ssprintf("%s\\%s\\%s", sDir.GetString(), sGroupDirName.GetString(), sSongDirName.GetString()) ) ) { /* The song failed to load. */ delete pNewSong; continue; @@ -189,7 +189,7 @@ void SongManager::LoadDWISongDir( CString DWIHome ) // now we've got the listing of the mix directories // and we need to use THOSE directories to find our // dwis - GetDirListing( ssprintf("%s\\Songs\\*.*", DWIHome ), MixDirs, true ); + GetDirListing( ssprintf("%s\\Songs\\*.*", DWIHome ), MixDirs.GetString(), true ); SortCStringArray( MixDirs ); for( int i=0; i< MixDirs.GetSize(); i++ ) // for each dir in /Songs/ @@ -200,14 +200,14 @@ void SongManager::LoadDWISongDir( CString DWIHome ) sDirName.MakeLower(); if( sDirName == "cvs" ) // ignore the directory called "CVS" continue; - GetDirListing( ssprintf("%s\\Songs\\%s\\*.*", DWIHome, MixDirs[i]), arrayDirs, true); + GetDirListing( ssprintf("%s\\Songs\\%s\\*.*", DWIHome.GetString(), MixDirs[i].GetString()), arrayDirs, true); SortCStringArray(arrayDirs, true); for( int b = 0; b < arrayDirs.GetSize(); b++) { // Find all DWIs in this directory CStringArray arrayDWIFiles; - GetDirListing( ssprintf("%s\\Songs\\%s\\%s\\*.dwi", DWIHome, MixDirs[i], arrayDirs[b]), arrayDWIFiles, false); + GetDirListing( ssprintf("%s\\Songs\\%s\\%s\\*.dwi", DWIHome.GetString(), MixDirs[i].GetString(), arrayDirs[b].GetString()), arrayDWIFiles, false); SortCStringArray( arrayDWIFiles ); for( int j=0; j< arrayDWIFiles.GetSize(); j++ ) // for each DWI file @@ -219,7 +219,7 @@ void SongManager::LoadDWISongDir( CString DWIHome ) DWILoader ld; Song* pNewSong = new Song; ld.LoadFromDWIFile( - ssprintf("%s\\Songs\\%s\\%s\\%s", DWIHome, MixDirs[i], arrayDirs[b], sDWIFileName), + ssprintf("%s\\Songs\\%s\\%s\\%s", DWIHome.GetString(), MixDirs[i].GetString(), arrayDirs[b].GetString(), sDWIFileName.GetString()), *pNewSong); m_pSongs.Add( pNewSong ); } @@ -252,7 +252,7 @@ void SongManager::ReadStatisticsFromDisk() IniFile ini; ini.SetPath( g_sStatisticsFileName ); if( !ini.ReadFile() ) { - LOG->Trace( "WARNING: Could not read config file '%s'.", g_sStatisticsFileName ); + LOG->Trace( "WARNING: Could not read config file '%s'.", g_sStatisticsFileName.GetString() ); return; // load nothing } @@ -348,11 +348,11 @@ void SongManager::SaveStatisticsToDisk() // Each value has the format "SongName::NotesName=TimesPlayed::TopGrade::TopScore::MaxCombo". - CString sName = ssprintf( "%s::%s::%s", pSong->m_sSongDir, GameManager::NotesTypeToString(pNotes->m_NotesType), pNotes->m_sDescription ); + CString sName = ssprintf( "%s::%s::%s", pSong->m_sSongDir.GetString(), GameManager::NotesTypeToString(pNotes->m_NotesType).GetString(), pNotes->m_sDescription.GetString() ); CString sValue = ssprintf( "%d::%s::%d::%d", pNotes->m_iNumTimesPlayed, - GradeToString( pNotes->m_TopGrade ), + GradeToString( pNotes->m_TopGrade ).GetString(), pNotes->m_iTopScore, pNotes->m_iMaxCombo ); diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index f36229851d..5b84cadd34 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -42,7 +42,7 @@ Sprite::~Sprite() bool Sprite::LoadFromTexture( CString sTexturePath, bool bForceReload, int iMipMaps, int iAlphaBits, bool bDither, bool bStretch ) { - LOG->Trace( ssprintf("Sprite::LoadFromTexture(%s)", sTexturePath) ); + LOG->Trace( ssprintf("Sprite::LoadFromTexture(%s)", sTexturePath.GetString()) ); //Init(); return LoadTexture( sTexturePath, bForceReload, iMipMaps, iAlphaBits, bDither, bStretch ); @@ -58,7 +58,7 @@ bool Sprite::LoadFromTexture( CString sTexturePath, bool bForceReload, int iMipM // Delay0000=2.0 bool Sprite::LoadFromSpriteFile( CString sSpritePath, bool bForceReload, int iMipMaps, int iAlphaBits, bool bDither, bool bStretch ) { - LOG->Trace( ssprintf("Sprite::LoadFromSpriteFile(%s)", sSpritePath) ); + LOG->Trace( ssprintf("Sprite::LoadFromSpriteFile(%s)", sSpritePath.GetString()) ); //Init(); @@ -77,17 +77,17 @@ bool Sprite::LoadFromSpriteFile( CString sSpritePath, bool bForceReload, int iMi IniFile ini; ini.SetPath( m_sSpritePath ); if( !ini.ReadFile() ) - throw RageException( "Error opening Sprite file '%s'.", m_sSpritePath ); + throw RageException( "Error opening Sprite file '%s'.", m_sSpritePath.GetString() ); CString sTextureFile; ini.GetValue( "Sprite", "Texture", sTextureFile ); if( sTextureFile == "" ) - throw RageException( "Error reading value 'Texture' from %s.", m_sSpritePath ); + throw RageException( "Error reading value 'Texture' from %s.", m_sSpritePath.GetString() ); CString sTexturePath = sFontDir + sTextureFile; // save the path of the new texture if( !DoesFileExist(sTexturePath) ) - throw RageException( "The sprite file '%s' points to a texture '%s' which doesn't exist.", m_sSpritePath, sTexturePath ); + throw RageException( "The sprite file '%s' points to a texture '%s' which doesn't exist.", m_sSpritePath.GetString(), sTexturePath.GetString() ); @@ -108,7 +108,7 @@ bool Sprite::LoadFromSpriteFile( CString sSpritePath, bool bForceReload, int iMi break; if( m_iStateToFrame[i] >= m_pTexture->GetNumFrames() ) throw RageException( "In '%s', %s is %d, but the texture %s only has %d frames.", - m_sSpritePath, sFrameKey, m_iStateToFrame[i], sTexturePath, m_pTexture->GetNumFrames() ); + m_sSpritePath.GetString(), sFrameKey.GetString(), m_iStateToFrame[i], sTexturePath, m_pTexture->GetNumFrames() ); m_fDelay[i] = 0.2f; if( !ini.GetValueF( "Sprite", sDelayKey, m_fDelay[i] ) ) break; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index ee1874c31c..8664ac48a5 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -220,6 +220,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR CmdLine, int nCmdShow SetCurrentDirectory( szFullAppPath ); } + /* + This was a stupid idea... -Chris + // // Check for packages in the AutoInstall folder // @@ -227,7 +230,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR CmdLine, int nCmdShow GetDirListing( "AutoInstall\\*.smzip", asPackagePaths, false, true ); for( i=0; iWarn( "Theme element '%s/%s' could not be found in '%s' or '%s'.", - sAssetCategory, - sFileName, + sAssetCategory.GetString(), + sFileName.GetString(), GetThemeDirFromName(m_sCurThemeName), GetThemeDirFromName(BASE_THEME_NAME) ); return GetPathTo( sAssetCategory, "_missing" ); @@ -207,10 +207,10 @@ try_element_again: if( sNewFileName == "" || !DoesFileExist(sNewFilePath) ) { #ifdef _DEBUG - if( IDRETRY == AfxMessageBox( ssprintf("The redirect '%s' points to the file '%s', which does not exist. Verify that this redirect is correct.", sRedirFilePath, sNewFilePath), MB_RETRYCANCEL ) ) + if( IDRETRY == AfxMessageBox( ssprintf("The redirect '%s' points to the file '%s', which does not exist. Verify that this redirect is correct.", sRedirFilePath.GetString(), sNewFilePath.GetString()), MB_RETRYCANCEL ) ) goto try_element_again; #endif - throw RageException( "The redirect '%s' points to the file '%s', which does not exist. Verify that this redirect is correct.", sRedirFilePath, sNewFilePath ); + throw RageException( "The redirect '%s' points to the file '%s', which does not exist. Verify that this redirect is correct.", sRedirFilePath.GetString(), sNewFilePath.GetString() ); } else return sNewFilePath; @@ -253,15 +253,15 @@ try_metric_again: } #ifdef _DEBUG - if( IDRETRY == AfxMessageBox( ssprintf("The theme metric %s-%s is missing. Correct this and click Retry, or Cancel to break.",sClassName,sValueName), MB_RETRYCANCEL ) ) + if( IDRETRY == AfxMessageBox( ssprintf("The theme metric %s-%s is missing. Correct this and click Retry, or Cancel to break.",sClassName.GetString(),sValueName.GetString()), MB_RETRYCANCEL ) ) goto try_metric_again; #endif throw RageException( "Theme metric '%s : %s' could not be found in '%s' or '%s'.", - sClassName, - sValueName, - sCurMetricPath, - sDefaultMetricPath + sClassName.GetString(), + sValueName.GetString(), + sCurMetricPath.GetString(), + sDefaultMetricPath.GetString() ); } @@ -289,7 +289,7 @@ RageColor ThemeManager::GetMetricC( CString sClassName, CString sValueName ) int result = sscanf( szValue, "%f,%f,%f,%f", &r, &g, &b, &a ); if( result != 4 ) { - LOG->Warn( "The color value '%s' for NoteSkin metric '%s : %s' is invalid.", szValue, sClassName, sValueName ); + LOG->Warn( "The color value '%s' for NoteSkin metric '%s : %s' is invalid.", szValue, sClassName.GetString(), sValueName.GetString() ); ASSERT(0); }