support setting perspective in DefaultModifiers pref

This commit is contained in:
Chris Danford
2003-05-13 05:24:30 +00:00
parent 7b693ad270
commit 99957a0391
4 changed files with 13 additions and 5 deletions
+1 -3
View File
@@ -274,9 +274,7 @@ bool GameState::IsPlayable( const ModeChoice& mc )
bool GameState::IsPlayerEnabled( PlayerNumber pn )
{
// In battle and rave, all players are present. Non-human players are CPU controlled.
if( m_PlayMode == PLAY_MODE_BATTLE )
return true;
// In rave, all players are present. Non-human players are CPU controlled.
if( m_PlayMode == PLAY_MODE_RAVE )
return true;
+9
View File
@@ -228,3 +228,12 @@ void NoteFieldPositioning::GetNamesForCurrentGame(vector<CString> &IDs)
IDs.push_back(Modes[i].m_Name);
}
}
bool NoteFieldPositioning::IsValidModeForAnyStyle(CString mode) const
{
for(unsigned i = 0; i < Modes.size(); ++i)
if(Modes[i].m_Name.CompareNoCase(mode)==0)
return true;
return false;
}
+2 -1
View File
@@ -55,7 +55,8 @@ public:
void Load(PlayerNumber pn);
void GetNamesForCurrentGame(vector<CString> &IDs);
bool IsValidModeForCurrentGame(CString mode) const { return GetID(mode) != -1; }
bool IsValidModeForCurrentStyle(CString mode) const;
bool IsValidModeForAnyStyle(CString mode) const;
private:
CString m_Filename;
+1 -1
View File
@@ -203,7 +203,7 @@ void PlayerOptions::FromString( CString sOptions )
else if( sBit == "timingassist")m_bTimingAssist = true;
else if( sBit == "incoming" ) m_fPerspectiveTilt = -1;
else if( sBit == "space" ) m_fPerspectiveTilt = +1;
else if( GAMESTATE->m_pPosition->IsValidModeForCurrentGame(sBit) )
else if( GAMESTATE->m_pPosition->IsValidModeForAnyStyle(sBit) )
m_sPositioning = sBit;
else if( NOTESKIN->DoesNoteSkinExist(sBit) )
m_sNoteSkin = sBit;