use modifiers only in playback/record, not in edit
This commit is contained in:
@@ -1032,6 +1032,17 @@ void GameState::RestoreSelectedOptions()
|
|||||||
m_SongOptions = m_StoredSongOptions;
|
m_SongOptions = m_StoredSongOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameState::ResetCurrentOptions()
|
||||||
|
{
|
||||||
|
FOREACH_PlayerNumber( p )
|
||||||
|
{
|
||||||
|
m_pPlayerState[p]->m_PlayerOptions.Init();
|
||||||
|
m_pPlayerState[p]->m_PlayerOptions.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||||
|
}
|
||||||
|
m_SongOptions.Init();
|
||||||
|
m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||||
|
}
|
||||||
|
|
||||||
bool GameState::IsDisqualified( PlayerNumber pn )
|
bool GameState::IsDisqualified( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( !PREFSMAN->m_bDisqualification )
|
if( !PREFSMAN->m_bDisqualification )
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ public:
|
|||||||
void ApplyModifiers( PlayerNumber pn, CString sModifiers );
|
void ApplyModifiers( PlayerNumber pn, CString sModifiers );
|
||||||
void StoreSelectedOptions();
|
void StoreSelectedOptions();
|
||||||
void RestoreSelectedOptions();
|
void RestoreSelectedOptions();
|
||||||
|
void ResetCurrentOptions();
|
||||||
|
|
||||||
bool IsDisqualified( PlayerNumber pn );
|
bool IsDisqualified( PlayerNumber pn );
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ AutoScreenMessage( SM_BackFromEditOptions )
|
|||||||
AutoScreenMessage( SM_BackFromSongInformation )
|
AutoScreenMessage( SM_BackFromSongInformation )
|
||||||
AutoScreenMessage( SM_BackFromBGChange )
|
AutoScreenMessage( SM_BackFromBGChange )
|
||||||
AutoScreenMessage( SM_BackFromInsertAttack )
|
AutoScreenMessage( SM_BackFromInsertAttack )
|
||||||
AutoScreenMessage( SM_BackFromInsertAttackModifiers )
|
AutoScreenMessage( SM_BackFromInsertAttackPlayerOptions )
|
||||||
AutoScreenMessage( SM_BackFromPrefs )
|
AutoScreenMessage( SM_BackFromPrefs )
|
||||||
AutoScreenMessage( SM_BackFromCourseModeMenu )
|
AutoScreenMessage( SM_BackFromCourseModeMenu )
|
||||||
AutoScreenMessage( SM_DoRevertToLastSave )
|
AutoScreenMessage( SM_DoRevertToLastSave )
|
||||||
@@ -920,7 +920,6 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
{
|
{
|
||||||
fScrollSpeed = fNewScrollSpeed;
|
fScrollSpeed = fNewScrollSpeed;
|
||||||
m_soundMarker.Play();
|
m_soundMarker.Play();
|
||||||
GAMESTATE->StoreSelectedOptions();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1462,10 +1461,14 @@ void ScreenEdit::TransitionEditMode( EditMode em )
|
|||||||
|
|
||||||
CheckNumberOfNotesAndUndo();
|
CheckNumberOfNotesAndUndo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GAMESTATE->ResetCurrentOptions();
|
||||||
break;
|
break;
|
||||||
case MODE_RECORDING:
|
case MODE_RECORDING:
|
||||||
|
GAMESTATE->RestoreSelectedOptions();
|
||||||
break;
|
break;
|
||||||
case MODE_PLAYING:
|
case MODE_PLAYING:
|
||||||
|
GAMESTATE->RestoreSelectedOptions();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
@@ -1561,8 +1564,8 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SM == SM_BackFromPlayerOptions ||
|
SM == SM_BackFromPlayerOptions ||
|
||||||
SM == SM_BackFromSongOptions )
|
SM == SM_BackFromSongOptions )
|
||||||
{
|
{
|
||||||
// coming back from PlayerOptions or SongOptions
|
|
||||||
GAMESTATE->StoreSelectedOptions();
|
GAMESTATE->StoreSelectedOptions();
|
||||||
|
GAMESTATE->ResetCurrentOptions();
|
||||||
|
|
||||||
// stop any music that screen may have been playing
|
// stop any music that screen may have been playing
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
@@ -1572,11 +1575,12 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
int iDurationChoice = ScreenMiniMenu::s_viLastAnswers[0];
|
int iDurationChoice = ScreenMiniMenu::s_viLastAnswers[0];
|
||||||
g_fLastInsertAttackDurationSeconds = strtof( g_InsertAttack.rows[0].choices[iDurationChoice], NULL );
|
g_fLastInsertAttackDurationSeconds = strtof( g_InsertAttack.rows[0].choices[iDurationChoice], NULL );
|
||||||
GAMESTATE->StoreSelectedOptions(); // save so that we don't lose the options chosen for edit and playback
|
GAMESTATE->StoreSelectedOptions(); // save so that we don't lose the options chosen for edit and playback
|
||||||
|
GAMESTATE->ResetCurrentOptions();
|
||||||
|
|
||||||
// XXX: Fix me
|
// XXX: Fix me
|
||||||
//SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromInsertAttackModifiers );
|
//SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromInsertAttackPlayerOptions );
|
||||||
}
|
}
|
||||||
else if( SM == SM_BackFromInsertAttackModifiers )
|
else if( SM == SM_BackFromInsertAttackPlayerOptions )
|
||||||
{
|
{
|
||||||
PlayerOptions poChosen = GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions;
|
PlayerOptions poChosen = GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions;
|
||||||
CString sMods = poChosen.GetString();
|
CString sMods = poChosen.GetString();
|
||||||
|
|||||||
Reference in New Issue
Block a user