Changed Song and ScreenEdit to not save a .sm file when split timing is used.
This commit is contained in:
+19
-4
@@ -115,6 +115,7 @@ AutoScreenMessage( SM_DoSaveAndExit );
|
||||
AutoScreenMessage( SM_DoExit );
|
||||
AutoScreenMessage( SM_AutoSaveSuccessful );
|
||||
AutoScreenMessage( SM_SaveSuccessful );
|
||||
AutoScreenMessage( SM_SaveSuccessNoSM );
|
||||
AutoScreenMessage( SM_SaveFailed );
|
||||
|
||||
static const char *EditStateNames[] = {
|
||||
@@ -3596,6 +3597,7 @@ void ScreenEdit::HandleMessage( const Message &msg )
|
||||
|
||||
static LocalizedString SAVE_SUCCESSFUL ( "ScreenEdit", "Save successful." );
|
||||
static LocalizedString AUTOSAVE_SUCCESSFUL ( "ScreenEdit", "Autosave successful." );
|
||||
static LocalizedString SAVE_SUCCESS_NO_SM_SPLIT_TIMING("ScreenEdit", "save_success_no_sm_split_timing");
|
||||
|
||||
static LocalizedString ADD_NEW_MOD ("ScreenEdit", "Adding New Mod");
|
||||
static LocalizedString ADD_NEW_ATTACK ("ScreenEdit", "Adding New Attack");
|
||||
@@ -4311,17 +4313,27 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
break; // do nothing
|
||||
}
|
||||
}
|
||||
else if( SM == SM_SaveSuccessful )
|
||||
else if(SM == SM_SaveSuccessful || SM == SM_SaveSuccessNoSM)
|
||||
{
|
||||
LOG->Trace( "Save successful." );
|
||||
CopyToLastSave();
|
||||
SetDirty( false );
|
||||
SONGMAN->Invalidate( GAMESTATE->m_pCurSong );
|
||||
|
||||
LocalizedString const* message= &SAVE_SUCCESSFUL;
|
||||
if(SM == SM_SaveSuccessNoSM)
|
||||
{
|
||||
message= &SAVE_SUCCESS_NO_SM_SPLIT_TIMING;
|
||||
}
|
||||
|
||||
if( m_CurrentAction == save_on_exit )
|
||||
ScreenPrompt::Prompt( SM_DoExit, SAVE_SUCCESSFUL );
|
||||
{
|
||||
ScreenPrompt::Prompt( SM_DoExit, *message );
|
||||
}
|
||||
else
|
||||
SCREENMAN->SystemMessage( SAVE_SUCCESSFUL );
|
||||
{
|
||||
SCREENMAN->SystemMessage( *message );
|
||||
}
|
||||
}
|
||||
else if( SM == SM_AutoSaveSuccessful )
|
||||
{
|
||||
@@ -4425,8 +4437,11 @@ void ScreenEdit::PerformSave(bool autosave)
|
||||
m_pSteps->m_Attacks = GAMESTATE->m_pCurSteps[PLAYER_1]->m_Attacks;
|
||||
m_pSteps->m_sAttackString = GAMESTATE->m_pCurSteps[PLAYER_1]->m_Attacks.ToVectorString();
|
||||
|
||||
// If one of the charts uses split timing, then it cannot be accurately
|
||||
// saved in the .sm format. So saving the .sm is disabled.
|
||||
bool uses_split= m_pSong->AnyChartUsesSplitTiming();
|
||||
const ScreenMessage save_message= autosave ? SM_AutoSaveSuccessful
|
||||
: SM_SaveSuccessful;
|
||||
: (uses_split ? SM_SaveSuccessNoSM : SM_SaveSuccessful);
|
||||
|
||||
switch( EDIT_MODE.GetValue() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user