Don't create a loader.

This commit is contained in:
Steve Checkoway
2007-02-14 10:09:05 +00:00
parent 6c8ddaec73
commit 1b2c9da350
5 changed files with 7 additions and 11 deletions
+1 -2
View File
@@ -135,8 +135,7 @@ static void StartMusic( MusicToPlay &ToPlay )
{
LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() );
Song song;
SMLoader sml;
if( sml.LoadFromSMFile( ToPlay.m_sTimingFile, song ) )
if( SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song) )
{
ToPlay.HasTiming = true;
ToPlay.m_TimingData = song.m_Timing;
+1 -2
View File
@@ -18,9 +18,8 @@ void ScreenGameplaySyncMachine::Init()
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
AdjustSync::ResetOriginalSyncData();
SMLoader ld;
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music.sm");
ld.LoadFromSMFile( sFile, m_Song );
SMLoader::LoadFromSMFile( sFile, m_Song );
m_Song.SetSongDir( Dirname(sFile) );
m_Song.TidyUpData();
+1 -2
View File
@@ -132,8 +132,7 @@ void ScreenHowToPlay::Init()
if( USEPLAYER )
{
SMLoader smfile;
smfile.LoadFromSMFile( THEME->GetPathO(m_sName, "steps"), m_Song, false );
SMLoader::LoadFromSMFile( THEME->GetPathO(m_sName, "steps"), m_Song, false );
m_Song.AddAutoGenNotes();
const Style* pStyle = GAMESTATE->GetCurrentStyle();
+3 -3
View File
@@ -207,9 +207,9 @@ bool Song::LoadFromSongDir( RString sDir )
if( bUseCache )
{
// LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir.c_str(), GetCacheFilePath().c_str() );
SMLoader ld;
ld.LoadFromSMFile( GetCacheFilePath(), *this, true );
ld.TidyUpData( *this, true );
SMLoader::LoadFromSMFile( GetCacheFilePath(), *this, true );
// XXX: This shouldn't really be a non-static member function.
SMLoader().TidyUpData( *this, true );
}
else
{
+1 -2
View File
@@ -230,8 +230,7 @@ void Steps::Decompress() const
{
/* We have data on disk and not in memory. Load it. */
Song s;
SMLoader ld;
if( !ld.LoadFromSMFile( m_sFilename, s, true ) )
if( !SMLoader::LoadFromSMFile(m_sFilename, s, true) )
{
LOG->Warn( "Couldn't load \"%s\"", m_sFilename.c_str() );
return;