From 6e9c18e74fb895159704efc58e60260f30fcb8ee Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 31 Aug 2005 01:42:22 +0000 Subject: [PATCH] cleanup --- stepmania/src/CourseEntryDisplay.cpp | 8 ++++---- stepmania/src/CourseEntryDisplay.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/stepmania/src/CourseEntryDisplay.cpp b/stepmania/src/CourseEntryDisplay.cpp index a219ca3fe5..0dc04b3f0a 100644 --- a/stepmania/src/CourseEntryDisplay.cpp +++ b/stepmania/src/CourseEntryDisplay.cpp @@ -74,13 +74,14 @@ void CourseEntryDisplay::LoadFromNode( const CString& sDir, const XNode* pNode ) Load(); } -void CourseEntryDisplay::SetDifficulty( PlayerNumber pn, const CString &text, RageColor c ) +void CourseEntryDisplay::SetDifficulty( PlayerNumber pn, const CString &text, Difficulty dc ) { if( !GAMESTATE->IsHumanPlayer(pn) ) return; // skip if( !SEPARATE_COURSE_METERS && pn != GAMESTATE->m_MasterPlayerNumber ) return; + RageColor c = SONGMAN->GetDifficultyColor( dc ); m_textDifficultyNumber[pn].SetText( text ); m_textDifficultyNumber[pn].SetDiffuse( c ); @@ -140,7 +141,7 @@ void CourseEntryDisplay::SetFromGameState( int iCourseEntryIndex ) if( dc == DIFFICULTY_INVALID ) dc = DIFFICULTY_EDIT; - SetDifficulty( pn, s, SONGMAN->GetDifficultyColor(dc) ); + SetDifficulty( pn, s, dc ); } m_TextBanner.LoadFromString( "??????????", "??????????", "", "", "", "" ); @@ -153,8 +154,7 @@ void CourseEntryDisplay::SetFromGameState( int iCourseEntryIndex ) const TrailEntry *te = tes[pn]; if( te == NULL ) continue; - RageColor colorNotes = SONGMAN->GetDifficultyColor( te->pSteps->GetDifficulty() ); - SetDifficulty( pn, ssprintf("%d", te->pSteps->GetMeter()), colorNotes ); + SetDifficulty( pn, ssprintf("%d", te->pSteps->GetMeter()), te->pSteps->GetDifficulty() ); } m_TextBanner.LoadFromSong( te->pSong ); diff --git a/stepmania/src/CourseEntryDisplay.h b/stepmania/src/CourseEntryDisplay.h index 056b18b9b5..20b496d705 100644 --- a/stepmania/src/CourseEntryDisplay.h +++ b/stepmania/src/CourseEntryDisplay.h @@ -10,6 +10,7 @@ #include "PlayerNumber.h" struct TrailEntry; #include "ThemeMetric.h" +#include "Difficulty.h" class CourseEntryDisplay : public ActorFrame { @@ -26,7 +27,7 @@ public: void PushSelf( lua_State *L ); private: - void SetDifficulty( PlayerNumber pn, const CString &text, RageColor c ); + void SetDifficulty( PlayerNumber pn, const CString &text, Difficulty dc ); Sprite m_sprFrame; BitmapText m_textNumber;