From 301ad56516da125ca510ec687b76777541dc2601 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 20 Jul 2003 01:54:17 +0000 Subject: [PATCH] add Course::GetPlayMode --- stepmania/src/Course.cpp | 13 +++++++++++++ stepmania/src/Course.h | 1 + 2 files changed, 14 insertions(+) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 2c723e3b6f..a76def6c59 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -94,6 +94,19 @@ Song *Course::FindSong(CString sGroup, CString sSong) const return NULL; } +PlayMode Course::GetPlayMode() const +{ + if( IsNonstop() ) + return PLAY_MODE_NONSTOP; + if( IsOni() ) + return PLAY_MODE_ONI; + if( IsEndless() ) + return PLAY_MODE_ENDLESS; + + ASSERT(0); + return PLAY_MODE_NONSTOP; +} + void Course::LoadFromCRSFile( CString sPath ) { m_sPath = sPath; // save path diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 4388f8607d..77e02f1dd5 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -83,6 +83,7 @@ public: bool IsNonstop() const { return !m_bRepeat && m_iLives <= 0; } // use bar life meter bool IsOni() const { return !m_bRepeat && m_iLives > 0; } // use battery life meter bool IsEndless() const { return m_bRepeat; } + PlayMode GetPlayMode() const; void LoadFromCRSFile( CString sPath ); void Save();