From a513f1f683bf30c366b854f23567706ad0f8ab2f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 23 Sep 2003 03:55:18 +0000 Subject: [PATCH] add StyleDef::NumSidesJoinedToPlay --- stepmania/src/StyleDef.cpp | 16 ++++++++++++++++ stepmania/src/StyleDef.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/stepmania/src/StyleDef.cpp b/stepmania/src/StyleDef.cpp index badbff3e8d..5ce9d19192 100644 --- a/stepmania/src/StyleDef.cpp +++ b/stepmania/src/StyleDef.cpp @@ -99,3 +99,19 @@ void StyleDef::GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXO fMaxXOut = max( fMaxXOut, m_ColumnInfo[pn][i].fXOffset ); } } + +int StyleDef::NumSidesJoinedToPlay() const +{ + switch( m_StyleType ) + { + case StyleDef::ONE_PLAYER_ONE_CREDIT: + return 1; + case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case StyleDef::ONE_PLAYER_TWO_CREDITS: + return 2; + default: + ASSERT(0); + return 1; + } +} + diff --git a/stepmania/src/StyleDef.h b/stepmania/src/StyleDef.h index 0e5ca5f3a9..6b1bc14d46 100644 --- a/stepmania/src/StyleDef.h +++ b/stepmania/src/StyleDef.h @@ -78,6 +78,8 @@ public: bool MatchesNotesType( StepsType type ) const; void GetMinAndMaxColX( PlayerNumber pn, float& fMixXOut, float& fMaxXOut ) const; + + int NumSidesJoinedToPlay() const; };