Don't create a loader.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user