From 227343c9c3c111bc255712761b584c400604716c Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 21 Apr 2003 04:10:52 +0000 Subject: [PATCH] use default modifiers for demonstration --- stepmania/src/GameState.cpp | 5 +++++ stepmania/src/ScreenDemonstration.cpp | 2 +- stepmania/src/ScreenJukebox.cpp | 10 ++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 166d79f495..cfeeefe077 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -84,6 +84,11 @@ void GameState::Reset() m_StoredPlayerOptions[p].Init(); } m_SongOptions.Init(); + for( p=0; pm_sDefaultModifiers ); + } + m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers ); for( p=0; pSwitchNoteSkin( PlayerNumber(p), PREFSMAN->m_sDefaultNoteSkin ); diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 6afbc63f86..68a63755c4 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -20,6 +20,7 @@ #include "ScreenManager.h" +#define SHOW_RANDOM_MODIFIERS THEME->GetMetricF("ScreenDemonstration","SecondsToShow") #define SECONDS_TO_SHOW THEME->GetMetricF("ScreenDemonstration","SecondsToShow") #define NEXT_SCREEN THEME->GetMetric("ScreenDemonstration","NextScreen") @@ -42,7 +43,6 @@ bool PrepareForDemonstration() // always return true. GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; - return true; } diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 6e2a864c90..a693a6c7c0 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -110,15 +110,17 @@ bool ScreenJukebox::PrepareForJukebox() // always return true. if( !GAMESTATE->IsPlayerEnabled(p) ) continue; - GAMESTATE->m_PlayerOptions[p] = PlayerOptions(); - if( GAMESTATE->m_bJukeboxUsesModifiers ) + { + GAMESTATE->m_PlayerOptions[p].Init(); + GAMESTATE->m_PlayerOptions[p].FromString( PREFSMAN->m_sDefaultModifiers ); GAMESTATE->m_PlayerOptions[p].ChooseRandomMofifiers(); + } } - GAMESTATE->m_SongOptions = SongOptions(); + GAMESTATE->m_SongOptions.Init(); + GAMESTATE->m_SongOptions.FromString( PREFSMAN->m_sDefaultModifiers ); - GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; GAMESTATE->m_bDemonstrationOrJukebox = true;