From 6696e26acf30a67765168c919df16b8e199ce49f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 3 Jun 2004 20:49:10 +0000 Subject: [PATCH] simplify --- stepmania/src/CourseContentsList.cpp | 6 +++--- stepmania/src/CourseEntryDisplay.cpp | 8 ++++---- stepmania/src/CourseEntryDisplay.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stepmania/src/CourseContentsList.cpp b/stepmania/src/CourseContentsList.cpp index 1e27d33edf..833b5edeb7 100644 --- a/stepmania/src/CourseContentsList.cpp +++ b/stepmania/src/CourseContentsList.cpp @@ -77,10 +77,10 @@ void CourseContentsList::SetFromGameState() { CourseEntryDisplay& display = m_CourseContentDisplays[m_iNumContents]; - TrailEntry* pte[NUM_PLAYERS]; + const TrailEntry* pte[NUM_PLAYERS]; FOREACH_EnabledPlayer(pn) - pte[pn] = &pTrail[0]->m_vEntries[i]; - display.LoadFromTrailEntry( m_iNumContents+1, pCourse, pte ); + pte[pn] = &pTrail[pn]->m_vEntries[i]; + display.LoadFromTrailEntry( m_iNumContents+1, pte ); m_iNumContents++; } diff --git a/stepmania/src/CourseEntryDisplay.cpp b/stepmania/src/CourseEntryDisplay.cpp index d447ada929..a2f5bf4b9d 100644 --- a/stepmania/src/CourseEntryDisplay.cpp +++ b/stepmania/src/CourseEntryDisplay.cpp @@ -87,15 +87,15 @@ void CourseEntryDisplay::SetDifficulty( PlayerNumber pn, const CString &text, Ra m_textFoot[pn].SetDiffuse( c ); } -void CourseEntryDisplay::LoadFromTrailEntry( int iNum, const Course *pCourse, TrailEntry *tes[NUM_PLAYERS] ) +void CourseEntryDisplay::LoadFromTrailEntry( int iNum, const TrailEntry *tes[NUM_PLAYERS] ) { - TrailEntry *te = tes[GAMESTATE->m_MasterPlayerNumber]; + const TrailEntry *te = tes[GAMESTATE->m_MasterPlayerNumber]; bool bMystery = te->bMystery; if( bMystery ) { FOREACH_EnabledPlayer(pn) { - TrailEntry *te = tes[pn]; + const TrailEntry *te = tes[pn]; Difficulty dc = te->dc; if( dc == DIFFICULTY_INVALID ) { @@ -114,7 +114,7 @@ void CourseEntryDisplay::LoadFromTrailEntry( int iNum, const Course *pCourse, Tr { FOREACH_EnabledPlayer(pn) { - TrailEntry *te = tes[pn]; + const TrailEntry *te = tes[pn]; RageColor colorNotes = SONGMAN->GetDifficultyColor( te->pSteps->GetDifficulty() ); SetDifficulty( pn, ssprintf("%d", te->pSteps->GetMeter()), colorNotes ); } diff --git a/stepmania/src/CourseEntryDisplay.h b/stepmania/src/CourseEntryDisplay.h index f9f6ba044d..462c035d26 100644 --- a/stepmania/src/CourseEntryDisplay.h +++ b/stepmania/src/CourseEntryDisplay.h @@ -28,7 +28,7 @@ class CourseEntryDisplay : public ActorFrame public: void Load(); - void LoadFromTrailEntry( int iNum, const Course *pCourse, TrailEntry *te[NUM_PLAYERS] ); + void LoadFromTrailEntry( int iNum, const TrailEntry *te[NUM_PLAYERS] ); private: void SetDifficulty( PlayerNumber pn, const CString &text, RageColor c );