diff --git a/stepmania/src/ActiveItemList.cpp b/stepmania/src/ActiveItemList.cpp index c19e395cde..060c78cbbe 100644 --- a/stepmania/src/ActiveItemList.cpp +++ b/stepmania/src/ActiveItemList.cpp @@ -75,7 +75,7 @@ void ActiveItemList::Update( float fDelta ) else { int iDisplaySecondsLeft = (int)(a.fSecsRemaining+1); - m_text[s].SetText( ssprintf("%s %02d:%02d", sDisplayText.GetString(), iDisplaySecondsLeft/60, iDisplaySecondsLeft%60) ); + m_text[s].SetText( ssprintf("%s %02d:%02d", sDisplayText.c_str(), iDisplaySecondsLeft/60, iDisplaySecondsLeft%60) ); } } } diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 100edf43f3..821fd29bcf 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -480,11 +480,11 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer ) } else if( sFile == "" ) { - RageException::Throw( "In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.GetString(), sLayer.GetString() ); + RageException::Throw( "In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.c_str(), sLayer.c_str() ); } if( !DoesFileExist(sPath) ) - RageException::Throw( "In the ini file for BGAnimation '%s', the specified File '%s' does not exist.", sAniDir.GetString(), sFile.GetString() ); + RageException::Throw( "In the ini file for BGAnimation '%s', the specified File '%s' does not exist.", sAniDir.c_str(), sFile.c_str() ); ini.GetValueI( sLayer, "Type", (int&)m_Type ); ini.GetValue ( sLayer, "Command", m_sCommand ); diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index 934f22333c..db175ff3aa 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() != 5 && GetNumStates() != 10 ) - RageException::Throw( "The difficulty icon graphic '%s' must have 5 or 10 frames.", sPath.GetString() ); + RageException::Throw( "The difficulty icon graphic '%s' must have 5 or 10 frames.", sPath.c_str() ); StopAnimating(); return true; } diff --git a/stepmania/src/FontCharAliases.cpp b/stepmania/src/FontCharAliases.cpp index 4b7ccf2e3a..a6b8874de7 100644 --- a/stepmania/src/FontCharAliases.cpp +++ b/stepmania/src/FontCharAliases.cpp @@ -283,7 +283,7 @@ static void InitCharAliases() for(aliasmap::const_iterator i = CharAliases.begin(); i != CharAliases.end(); ++i) { - CString from = ssprintf("&%s;", i->first.GetString()); + CString from = ssprintf("&%s;", i->first.c_str()); CString to = WcharToUTF8(i->second); from.MakeUpper(); CharAliasRepl[from] = to; diff --git a/stepmania/src/GradeDisplay.cpp b/stepmania/src/GradeDisplay.cpp index c12ce78f70..3fcea98bea 100644 --- a/stepmania/src/GradeDisplay.cpp +++ b/stepmania/src/GradeDisplay.cpp @@ -39,7 +39,7 @@ bool GradeDisplay::Load( RageTextureID ID ) Sprite::StopAnimating(); if( Sprite::GetNumStates() != 8 && Sprite::GetNumStates() != 16 ) - RageException::Throw( "The grade graphic '%s' must have either 8 or 16 frames.", ID.filename.GetString() ); + RageException::Throw( "The grade graphic '%s' must have either 8 or 16 frames.", ID.filename.c_str() ); return true; } diff --git a/stepmania/src/GrayArrowRow.cpp b/stepmania/src/GrayArrowRow.cpp index f7e75e6531..7c709167e6 100644 --- a/stepmania/src/GrayArrowRow.cpp +++ b/stepmania/src/GrayArrowRow.cpp @@ -45,7 +45,7 @@ void GrayArrowRow::Load( PlayerNumber pn ) // XXX if( m_GrayArrow[c].GetNumStates() != 2 && m_GrayArrow[c].GetNumStates() != 3 ) - RageException::Throw( "'%s' must have 2 or 3 frames", sPath.GetString() ); + RageException::Throw( "'%s' must have 2 or 3 frames", sPath.c_str() ); m_GrayArrow[c].SetX( pStyleDef->m_ColumnInfo[pn][c].fXOffset ); } } diff --git a/stepmania/src/IniFile.cpp b/stepmania/src/IniFile.cpp index d95bfa4883..9465bc0a82 100644 --- a/stepmania/src/IniFile.cpp +++ b/stepmania/src/IniFile.cpp @@ -102,10 +102,10 @@ void IniFile::WriteFile() if (k->second.empty()) continue; - fprintf( fp, "[%s]\n", k->first.GetString() ); + fprintf( fp, "[%s]\n", k->first.c_str() ); for (key::const_iterator i = k->second.begin(); i != k->second.end(); ++i) - fprintf( fp, "%s=%s\n", i->first.GetString(), i->second.GetString() ); + fprintf( fp, "%s=%s\n", i->first.c_str(), i->second.c_str() ); fprintf( fp, "\n" ); } diff --git a/stepmania/src/LyricsLoader.cpp b/stepmania/src/LyricsLoader.cpp index 85904b8a50..382818b87f 100644 --- a/stepmania/src/LyricsLoader.cpp +++ b/stepmania/src/LyricsLoader.cpp @@ -19,12 +19,12 @@ static int CompareLyricSegments(const LyricSegment &seg1, const LyricSegment &se bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out ) { - LOG->Trace( "LyricsLoader::LoadFromLRCFile(%s)", sPath.GetString() ); + LOG->Trace( "LyricsLoader::LoadFromLRCFile(%s)", sPath.c_str() ); ifstream input(sPath); if(input.bad()) { - LOG->Warn( "Error opening file '%s' for reading.", sPath.GetString() ); + LOG->Warn( "Error opening file '%s' for reading.", sPath.c_str() ); return false; } @@ -55,11 +55,11 @@ bool LyricsLoader::LoadFromLRCFile( CString sPath, Song &out ) { // set color var here for this segment int r, g, b; - int result = sscanf( sValueData.GetString(), "0x%2x%2x%2x", &r, &g, &b ); + int result = sscanf( sValueData.c_str(), "0x%2x%2x%2x", &r, &g, &b ); if(result != 3) { LOG->Trace( "The color value '%s' in '%s' is invalid.", - sValueData.GetString(), sPath.GetString() ); + sValueData.c_str(), sPath.c_str() ); continue; } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 7b430e8b28..49372f17dc 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -64,7 +64,7 @@ MusicWheel::MusicWheel() { LOG->Trace( "MusicWheel::MusicWheel()" ); if (GAMESTATE->m_pCurSong != NULL) - LOG->Trace( "Current Song: %s", GAMESTATE->m_pCurSong->GetSongDir().GetString() ); + LOG->Trace( "Current Song: %s", GAMESTATE->m_pCurSong->GetSongDir().c_str() ); else LOG->Trace( "Current Song: NULL" ); diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 3a19d99de0..98a4ac7eff 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -322,7 +322,7 @@ void NoteField::DrawPrimitives() { const BackgroundChange& change = aBackgroundChanges[i]; CString sChangeText = ssprintf("%s\n%.0f%%%s%s%s", - change.m_sBGName.GetString(), + change.m_sBGName.c_str(), change.m_fRate*100, change.m_bFadeLast ? " Fade" : "", change.m_bRewindMovie ? " Rewind" : "", diff --git a/stepmania/src/OptionIconRow.cpp b/stepmania/src/OptionIconRow.cpp index a38a239403..f84bcfab70 100644 --- a/stepmania/src/OptionIconRow.cpp +++ b/stepmania/src/OptionIconRow.cpp @@ -82,7 +82,7 @@ int OptionToPreferredColumn( CString sOptionText ) if( g_OptionColumnEntries[i].szString == sOptionText ) return g_OptionColumnEntries[i].iSlotIndex; - LOG->Warn("Unknown option: '%s'", sOptionText.GetString() ); + LOG->Warn("Unknown option: '%s'", sOptionText.c_str() ); return 0; } diff --git a/stepmania/src/RandomSample.cpp b/stepmania/src/RandomSample.cpp index 54b6c43e26..9d9bec6a1d 100644 --- a/stepmania/src/RandomSample.cpp +++ b/stepmania/src/RandomSample.cpp @@ -78,7 +78,7 @@ bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad ) bool RandomSample::LoadSound( CString sSoundFilePath ) { - LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath.GetString() ); + LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath.c_str() ); RageSound *pSS = new RageSound; pSS->Load( sSoundFilePath ); diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index d0417ea527..c4858a8304 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -364,5 +364,5 @@ Screen* Screen::Create( CString sClassName ) IF_RETURN( ScreenSelectCharacter ); IF_RETURN( ScreenRaveOptions ); - RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() ); + RageException::Throw( "Invalid Screen class name '%s'", sClassName.c_str() ); } \ No newline at end of file diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index c88107d304..9b07c5808e 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -97,7 +97,7 @@ ScreenSelect::ScreenSelect( CString sClassName ) : Screen(sClassName) continue; } - LOG->Warn( "The choice token '%s' is not recognized as a Game, Style, PlayMode, or Difficulty. The choice containing this token will be ignored.", sBit.GetString() ); + LOG->Warn( "The choice token '%s' is not recognized as a Game, Style, PlayMode, or Difficulty. The choice containing this token will be ignored.", sBit.c_str() ); bChoiceIsInvalid |= true; } @@ -122,7 +122,7 @@ ScreenSelect::ScreenSelect( CString sClassName ) : Screen(sClassName) m_aModeChoices.push_back( mc ); - CString sBGAnimationDir = THEME->GetPathTo(BGAnimations, ssprintf("%s %s",m_sName.GetString(),mc.name), true); // true="optional" + CString sBGAnimationDir = THEME->GetPathTo(BGAnimations, ssprintf("%s %s",m_sName.c_str(),mc.name), true); // true="optional" if( sBGAnimationDir == "" ) sBGAnimationDir = THEME->GetPathToB(m_sName+" background"); m_BGAnimations[c].LoadFromAniDir( sBGAnimationDir ); diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index ce3a365bd1..442d291470 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -291,7 +291,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.GetString() ); + LOG->Warn( "Couldn't find any SM, DWI, BMS, or KSF files in '%s'. This is not a valid song directory.", sDir.c_str() ); return false; } @@ -310,7 +310,7 @@ bool Song::LoadWithoutCache( CString sDir ) bool Song::LoadFromSongDir( CString sDir ) { -// LOG->Trace( "Song::LoadFromSongDir(%s)", sDir.GetString() ); +// LOG->Trace( "Song::LoadFromSongDir(%s)", sDir.c_str() ); sDir.Replace("\\", "/"); // make sure there is a trailing slash at the end of sDir @@ -332,7 +332,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.GetString(), GetCacheFilePath().GetString() ); +// LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir.c_str(), GetCacheFilePath().c_str() ); SMLoader ld; ld.LoadFromSMFile( GetCacheFilePath(), *this, true ); } @@ -406,7 +406,7 @@ void Song::TidyUpData() m_sMusicFile = arrayPossibleMusic[0]; // Don't throw on missing music. -Chris // else -// RageException::Throw( "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() ); +// RageException::Throw( "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.c_str() ); } /* This must be done before radar calculation. */ @@ -423,9 +423,9 @@ void Song::TidyUpData() * so just set the file to 0 seconds. */ m_fMusicLengthSeconds = 0; } else if(m_fMusicLengthSeconds == 0) { - LOG->Warn("File %s is empty?", GetMusicPath().GetString()); + LOG->Warn("File %s is empty?", GetMusicPath().c_str()); } else if(m_fMusicLengthSeconds == -1) { - LOG->Warn("File %s: error getting length", GetMusicPath().GetString()); + LOG->Warn("File %s: error getting length", GetMusicPath().c_str()); } } else // ! HasMusic() @@ -436,7 +436,7 @@ void Song::TidyUpData() if(m_fMusicLengthSeconds < 0) { - LOG->Warn("File %i has negative length? (%i)", GetMusicPath().GetString(), m_fMusicLengthSeconds); + LOG->Warn("File %i has negative length? (%i)", GetMusicPath().c_str(), m_fMusicLengthSeconds); m_fMusicLengthSeconds = 0; } @@ -465,7 +465,7 @@ void Song::TidyUpData() /* XXX: Once we have a way to display warnings that the user actually * cares about (unlike most warnings), this should be one of them. */ LOG->Warn( "No BPM segments specified in '%s%s', default provided.", - m_sSongDir.GetString(), m_sSongFileName.GetString() ); + m_sSongDir.c_str(), m_sSongFileName.c_str() ); AddBPMSegment( BPMSegment(0, 60) ); } @@ -617,7 +617,7 @@ void Song::TidyUpData() if( !img ) { LOG->Trace("Couldn't load %s%s: %s", - m_sSongDir.GetString(), arrayImages[i].GetString(), SDL_GetError()); + m_sSongDir.c_str(), arrayImages[i].c_str(), SDL_GetError()); continue; } @@ -872,7 +872,7 @@ void Song::Save() void Song::SaveToSMFile( CString sPath, bool bSavingCache ) { - LOG->Trace( "Song::SaveToSMFile('%s')", sPath.GetString() ); + LOG->Trace( "Song::SaveToSMFile('%s')", sPath.c_str() ); NotesWriterSM wr; wr.Write(sPath, *this, bSavingCache); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 25a0b2c80c..193524e06c 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -80,7 +80,7 @@ static void ChangeToDirOfExecutable(const char *argv0) unsigned n = dir.find_last_of("/\\"); if (n != dir.npos) dir.erase(n); - chdir( dir.GetString() ); + chdir( dir.c_str() ); } } diff --git a/stepmania/src/TimingAssist.cpp b/stepmania/src/TimingAssist.cpp index c87145b2a3..df4fdf273a 100644 --- a/stepmania/src/TimingAssist.cpp +++ b/stepmania/src/TimingAssist.cpp @@ -23,7 +23,7 @@ TimingAssist::TimingAssist() case TNS_GREAT: name = "great"; break; case TNS_PERFECT: name = "perfect"; break; } - CString path = ssprintf("gameplay assist %s %s", direction.GetString(), name.GetString()); + CString path = ssprintf("gameplay assist %s %s", direction.c_str(), name.c_str()); Timing[j][i].Load(ANNOUNCER->GetPathTo(path)); } } diff --git a/stepmania/src/global.h b/stepmania/src/global.h index a03336cdcf..0b649997d6 100644 --- a/stepmania/src/global.h +++ b/stepmania/src/global.h @@ -74,9 +74,9 @@ using namespace std; #endif #ifdef DEBUG -#define DEBUG_ASSERT ASSERT +#define DEBUG_ASSERT(x) ASSERT(x) #else -#define DEBUG_ASSERT (void*)(0) +#define DEBUG_ASSERT(x) #endif