From bae39968edc3b3ad764171651447c95eda144a3c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 16 Apr 2004 23:28:20 +0000 Subject: [PATCH] add Steps::GetID; this should be a unique identifier within a song and difficulty (but it's not unique yet) --- stepmania/src/Steps.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stepmania/src/Steps.h b/stepmania/src/Steps.h index d1917ba366..18170e0358 100644 --- a/stepmania/src/Steps.h +++ b/stepmania/src/Steps.h @@ -39,6 +39,16 @@ public: bool WasLoadedFromProfile() const { return m_LoadedFromProfile != PROFILE_SLOT_INVALID; } CString GetDescription() const { return Real()->m_sDescription; } Difficulty GetDifficulty() const { return Real()->m_Difficulty; } + CString GetID() const /* used for Song::GetStepsByID */ + { + Difficulty dc = GetDifficulty(); + ASSERT( dc != DIFFICULTY_INVALID ); + + if( dc == DIFFICULTY_EDIT ) + return GetDescription(); + else + return DifficultyToString(dc); + } int GetMeter() const { return Real()->m_iMeter; } const RadarValues& GetRadarValues() const { return Real()->m_RadarValues; }