From caab15d89b449969d7caa44e8c09a829549572a6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Dec 2003 03:41:47 +0000 Subject: [PATCH] remove song.h -> Steps.h dependency --- stepmania/src/MusicWheelItem.cpp | 5 +++-- stepmania/src/Song.cpp | 6 +++--- stepmania/src/song.h | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index f4bb0639d0..027edd9090 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -185,6 +185,7 @@ void MusicWheelItem::LoadFromWheelItemData( WheelItemData* pWID ) ASSERT( 0 ); // invalid type } } +Steps::MemCardData::HighScore GetHighScoreForDifficulty( const Song *s, const StyleDef *st, MemoryCard card, Difficulty dc ); void MusicWheelItem::RefreshGrades() { @@ -205,9 +206,9 @@ void MusicWheelItem::RefreshGrades() dc = GAMESTATE->m_PreferredDifficulty[p]; Grade grade; if( PROFILEMAN->IsUsingProfile((PlayerNumber)p) ) - grade = data->m_pSong->GetHighScoreForDifficulty( GAMESTATE->GetCurrentStyleDef(), (MemoryCard)p, dc ).grade; + grade = GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyleDef(), (MemoryCard)p, dc ).grade; else - grade = data->m_pSong->GetHighScoreForDifficulty( GAMESTATE->GetCurrentStyleDef(), MEMORY_CARD_MACHINE, dc ).grade; + grade = GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyleDef(), MEMORY_CARD_MACHINE, dc ).grade; m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade ); } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index eb4de0dd2b..7a2594e6f5 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1230,15 +1230,15 @@ void Song::RemoveAutoGenNotes() } -Steps::MemCardData::HighScore Song::GetHighScoreForDifficulty( const StyleDef *st, MemoryCard card, Difficulty dc ) const +Steps::MemCardData::HighScore GetHighScoreForDifficulty( const Song *s, const StyleDef *st, MemoryCard card, Difficulty dc ) { // return max grade of notes in difficulty class vector aNotes; - this->GetSteps( aNotes, st->m_StepsType ); + s->GetSteps( aNotes, st->m_StepsType ); SortNotesArrayByDifficulty( aNotes ); - Steps* pSteps = GetStepsByDifficulty( st->m_StepsType, dc ); + Steps* pSteps = s->GetStepsByDifficulty( st->m_StepsType, dc ); if( pSteps ) return pSteps->GetTopScore(card); else diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 0d6a953e0f..14cdbdfbab 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -14,7 +14,7 @@ #include "PlayerNumber.h" #include "GameConstantsAndTypes.h" #include "Grade.h" -#include "Steps.h" // TODO: remove this dependency! +class Steps; class StyleDef; class NotesLoader; class LyricsLoader; @@ -254,7 +254,6 @@ public: bool IsNew() const; bool IsEasy( StepsType nt ) const; bool HasEdits( StepsType nt ) const; - Steps::MemCardData::HighScore GetHighScoreForDifficulty( const StyleDef *st, MemoryCard card, Difficulty dc ) const; bool NormallyDisplayed() const; bool RouletteDisplayed() const; int GetNumNotesWithGrade( Grade g ) const;