remove song.h -> Steps.h dependency

This commit is contained in:
Glenn Maynard
2003-12-18 03:41:47 +00:00
parent 4b3dac0f23
commit caab15d89b
3 changed files with 7 additions and 7 deletions
+3 -2
View File
@@ -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 );
}
+3 -3
View File
@@ -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<Steps*> 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
+1 -2
View File
@@ -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;