fix 728447 "Oni doesn't remember life type choice"

This commit is contained in:
Chris Danford
2003-08-06 06:30:09 +00:00
parent c191620789
commit ef807e8490
3 changed files with 12 additions and 21 deletions
+5
View File
@@ -134,4 +134,9 @@ void ModeChoice::Apply( PlayerNumber pn )
GAMESTATE->m_PreferredDifficulty[pn] = dc; GAMESTATE->m_PreferredDifficulty[pn] = dc;
if( sAnnouncer != "" ) if( sAnnouncer != "" )
ANNOUNCER->SwitchAnnouncer( sAnnouncer ); ANNOUNCER->SwitchAnnouncer( sAnnouncer );
// HACK: Set life type to BATTERY just once here so we don't
// override the user's changes if they back out.
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI )
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
} }
+6 -19
View File
@@ -272,18 +272,6 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
} }
/* Adjust game options. These settings may be overridden again later by the
* SongOptions menu. */
void ScreenSelectCourse::AdjustOptions()
{
if(GAMESTATE->m_pCurCourse->m_iLives != -1)
{
/* oni */
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
GAMESTATE->m_SongOptions.m_iBatteryLives = GAMESTATE->m_pCurCourse->m_iLives;
}
}
void ScreenSelectCourse::HandleScreenMessage( const ScreenMessage SM ) void ScreenSelectCourse::HandleScreenMessage( const ScreenMessage SM )
{ {
Screen::HandleScreenMessage( SM ); Screen::HandleScreenMessage( SM );
@@ -363,12 +351,6 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn )
Course* pCourse = m_MusicWheel.GetSelectedCourse(); Course* pCourse = m_MusicWheel.GetSelectedCourse();
GAMESTATE->m_pCurCourse = pCourse; GAMESTATE->m_pCurCourse = pCourse;
// apply #LIVES
if( pCourse->m_iLives != -1 )
{
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
GAMESTATE->m_SongOptions.m_iBatteryLives = pCourse->m_iLives;
}
// //
// Do NOT apply the first song's modifiers before going to the options screen. // Do NOT apply the first song's modifiers before going to the options screen.
@@ -383,7 +365,12 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn )
// GAMESTATE->m_PlayerOptions[p].FromString( sModifiers ); // GAMESTATE->m_PlayerOptions[p].FromString( sModifiers );
//GAMESTATE->m_SongOptions.FromString( sModifiers ); //GAMESTATE->m_SongOptions.FromString( sModifiers );
AdjustOptions();
// Apply number of lives without turning on LIFE_BATTERY.
// Don't turn on LIFE_BATTERY because it will override
// the user's choice if they Back out of gameplay or are in
// event mode.
GAMESTATE->m_SongOptions.m_iBatteryLives = GAMESTATE->m_pCurCourse->m_iLives;
break; break;
} }
-1
View File
@@ -39,7 +39,6 @@ public:
void MenuBack( PlayerNumber pn ); void MenuBack( PlayerNumber pn );
protected: protected:
void AdjustOptions();
void AfterCourseChange(); void AfterCourseChange();
void UpdateOptionsDisplays(); void UpdateOptionsDisplays();