From a1ac9e23262ca717b7742022b4a4d17e0204077e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 29 Sep 2003 08:56:33 +0000 Subject: [PATCH] Add ModeChoice::IsZero. --- stepmania/src/ModeChoice.cpp | 14 ++++++++++++++ stepmania/src/ModeChoice.h | 1 + 2 files changed, 15 insertions(+) diff --git a/stepmania/src/ModeChoice.cpp b/stepmania/src/ModeChoice.cpp index 0cb0258576..aea1460207 100644 --- a/stepmania/src/ModeChoice.cpp +++ b/stepmania/src/ModeChoice.cpp @@ -253,3 +253,17 @@ void ModeChoice::Apply( PlayerNumber pn ) const PROFILEMAN->TryLoadProfile( pn ); } } + +bool ModeChoice::IsZero() const +{ + if( m_game != GAME_INVALID || + m_pm != PLAY_MODE_INVALID || + m_style != STYLE_INVALID || + m_dc != DIFFICULTY_INVALID || + m_sAnnouncer != "" || + m_sModifiers != "" ) + return false; + + return true; +} + diff --git a/stepmania/src/ModeChoice.h b/stepmania/src/ModeChoice.h index 0b5d21cf5c..024582e7ef 100644 --- a/stepmania/src/ModeChoice.h +++ b/stepmania/src/ModeChoice.h @@ -27,6 +27,7 @@ struct ModeChoice // used in SelectMode bool DescribesCurrentMode( PlayerNumber pn ) const; bool DescribesCurrentModeForAllPlayers() const; bool IsPlayable( CString *why = NULL ) const; + bool IsZero() const; bool m_bInvalid; int m_iIndex;