[ScreenGameplaySyncMachine] Allow themes to use either .ssc or .sm files.
This commit is contained in:
@@ -18,6 +18,7 @@ sm-ssc v1.2.3 | 201102??
|
|||||||
* [ScreenEdit] Display the Player Number for Routine mode. [Wolfman2000]
|
* [ScreenEdit] Display the Player Number for Routine mode. [Wolfman2000]
|
||||||
* [ScreenEdit] Add format string metrics for the right hand side of the editor.
|
* [ScreenEdit] Add format string metrics for the right hand side of the editor.
|
||||||
[Wolfman2000]
|
[Wolfman2000]
|
||||||
|
* [ScreenGameplaySyncMachine] Allow themes to use either .ssc or .sm files [AJ]
|
||||||
|
|
||||||
20110221
|
20110221
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "ScreenGameplaySyncMachine.h"
|
#include "ScreenGameplaySyncMachine.h"
|
||||||
#include "NotesLoaderSSC.h"
|
#include "NotesLoaderSSC.h"
|
||||||
|
#include "NotesLoaderSM.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
@@ -19,7 +20,11 @@ void ScreenGameplaySyncMachine::Init()
|
|||||||
AdjustSync::ResetOriginalSyncData();
|
AdjustSync::ResetOriginalSyncData();
|
||||||
|
|
||||||
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music");
|
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music");
|
||||||
SSCLoader::LoadFromSSCFile( sFile, m_Song );
|
// Allow themers to use .ssc and .sm files. -aj
|
||||||
|
bool bLoadedSSCFile = SSCLoader::LoadFromSSCFile( sFile, m_Song );
|
||||||
|
if( !bLoadedSSCFile )
|
||||||
|
SMLoader::LoadFromSMFile( sFile, m_Song );
|
||||||
|
|
||||||
m_Song.SetSongDir( Dirname(sFile) );
|
m_Song.SetSongDir( Dirname(sFile) );
|
||||||
m_Song.TidyUpData();
|
m_Song.TidyUpData();
|
||||||
|
|
||||||
@@ -27,7 +32,7 @@ void ScreenGameplaySyncMachine::Init()
|
|||||||
// needs proper StepsType - freem
|
// needs proper StepsType - freem
|
||||||
vector<Steps*> vpSteps;
|
vector<Steps*> vpSteps;
|
||||||
SongUtil::GetPlayableSteps( &m_Song, vpSteps );
|
SongUtil::GetPlayableSteps( &m_Song, vpSteps );
|
||||||
ASSERT(vpSteps.size() > 0);
|
ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine");
|
||||||
Steps *pSteps = vpSteps[0];
|
Steps *pSteps = vpSteps[0];
|
||||||
GAMESTATE->m_pCurSteps[0].Set( pSteps );
|
GAMESTATE->m_pCurSteps[0].Set( pSteps );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user