From d22545d1cb8882b8479dba330ff18615cce9e34a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 8 Sep 2002 22:02:39 +0000 Subject: [PATCH] move some code out of the header --- stepmania/src/Notes.cpp | 14 ++++++++++++++ stepmania/src/Notes.h | 18 +----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/stepmania/src/Notes.cpp b/stepmania/src/Notes.cpp index 81728d7f7e..c071d1d7ad 100644 --- a/stepmania/src/Notes.cpp +++ b/stepmania/src/Notes.cpp @@ -250,6 +250,20 @@ void Notes::GetNoteData( NoteData* pNoteDataOut ) const pNoteDataOut->LoadFromSMNoteDataString( m_sSMNoteData ); } +// Color is a function of DifficultyClass and Intended Style +D3DXCOLOR Notes::GetColor() const +{ + CString sDescription = m_sDescription; + sDescription.MakeLower(); + + if( -1 != sDescription.Find("battle") ) + return D3DXCOLOR(1,0.5f,0,1); // orange + else if( -1 != m_sDescription.Find("couple") ) + return D3DXCOLOR(0,0,1,1); // blue + else + return DifficultyClassToColor( m_DifficultyClass ); +} + void Notes::TidyUpData() { if( m_DifficultyClass == CLASS_INVALID ) diff --git a/stepmania/src/Notes.h b/stepmania/src/Notes.h index 5bfd36fada..a67d38a095 100644 --- a/stepmania/src/Notes.h +++ b/stepmania/src/Notes.h @@ -38,22 +38,7 @@ public: CString m_sSMNoteData; void GetNoteData( NoteData* pNoteDataOut ) const; void SetNoteData( NoteData* pNewNoteData ); - - - // Color is a function of DifficultyClass and Intended Style - D3DXCOLOR GetColor() - { - CString sDescription = m_sDescription; - sDescription.MakeLower(); - - if( -1 != sDescription.Find("battle") ) - return D3DXCOLOR(1,0.5f,0,1); // orange - else if( -1 != m_sDescription.Find("couple") ) - return D3DXCOLOR(0,0,1,1); // blue - else - return DifficultyClassToColor( m_DifficultyClass ); - } - + D3DXCOLOR GetColor() const; // Statistics Grade m_TopGrade; @@ -69,6 +54,5 @@ protected: }; - int CompareNotesPointersByDifficulty(Notes* pNotes1, Notes* pNotes2); void SortNotesArrayByDifficulty( CArray &arrayNotess );