add StoreSelectedOptions and RestoreSelectedOptions

This commit is contained in:
Glenn Maynard
2003-02-24 03:26:00 +00:00
parent 653fd69bea
commit 8e21ba6f8a
2 changed files with 23 additions and 0 deletions
+20
View File
@@ -303,3 +303,23 @@ void GameState::GetFinalEvalStatsAndSongs( StageStats& statsOut, vector<Song*>&
}
}
}
/* XXX: Should we store song options, too? */
/* Store the player's preferred options. This is called at the very beginning
* of gameplay. */
void GameState::StoreSelectedOptions()
{
for( int p=0; p<NUM_PLAYERS; p++ )
GAMESTATE->m_SelectedOptions[p] = GAMESTATE->m_PlayerOptions[p];
}
/* Restore the preferred options. This is called after a song ends, before
* setting new course options, so options from one song don't carry into the
* next and we default back to the preferred options. This is also called
* at the end of gameplay to restore options. */
void GameState::RestoreSelectedOptions()
{
for( int p=0; p<NUM_PLAYERS; p++ )
GAMESTATE->m_PlayerOptions[p] = GAMESTATE->m_SelectedOptions[p];
GAMESTATE->m_SongOptions.Init();
}
+3
View File
@@ -80,6 +80,9 @@ public:
RageColor GetStageColor();
int GetCourseSongIndex();
void StoreSelectedOptions();
void RestoreSelectedOptions();
//
// State Info used during gameplay
//