Added separate icon for smaniac

This commit is contained in:
Chris Danford
2002-10-06 16:56:58 +00:00
parent 393cff9310
commit 107a1521e6
22 changed files with 196 additions and 128 deletions
+36 -9
View File
@@ -22,8 +22,15 @@
#include "RageException.h"
#include "MsdFile.h"
#include "GameManager.h"
#include "ThemeManager.h"
#define COLOR_EASY THEME->GetMetricC("Notes","ColorEasy")
#define COLOR_MEDIUM THEME->GetMetricC("Notes","ColorMedium")
#define COLOR_HARD THEME->GetMetricC("Notes","ColorHard")
#define COLOR_S_HARD THEME->GetMetricC("Notes","ColorSHard")
#define COLOR_CHALLENGE THEME->GetMetricC("Notes","ColorChallenge")
#define COLOR_BATTLE THEME->GetMetricC("Notes","ColorBattle")
Notes::Notes()
@@ -78,17 +85,37 @@ void Notes::GetNoteData( NoteData* pNoteDataOut ) const
}
// Color is a function of Difficulty and Intended Style
D3DXCOLOR Notes::GetColor() const
NotesDisplayType Notes::GetNotesDisplayType() 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 DifficultyToColor( m_Difficulty );
if( -1 != sDescription.Find("battle") ) return NOTES_DISPLAY_BATTLE;
else if( -1 != sDescription.Find("couple") ) return NOTES_DISPLAY_BATTLE;
else if( -1 != sDescription.Find("smaniac") ) return NOTES_DISPLAY_S_HARD;
else if( -1 != sDescription.Find("challenge") ) return NOTES_DISPLAY_CHALLENGE;
switch( m_Difficulty )
{
case DIFFICULTY_EASY: return NOTES_DISPLAY_EASY;
case DIFFICULTY_MEDIUM: return NOTES_DISPLAY_MEDIUM;
case DIFFICULTY_HARD: return NOTES_DISPLAY_HARD;
default: ASSERT(0); return NOTES_DISPLAY_EASY;
}
}
D3DXCOLOR Notes::GetColor() const
{
switch( GetNotesDisplayType() )
{
case NOTES_DISPLAY_EASY: return COLOR_EASY;
case NOTES_DISPLAY_MEDIUM: return COLOR_MEDIUM;
case NOTES_DISPLAY_HARD: return COLOR_HARD;
case NOTES_DISPLAY_S_HARD: return COLOR_S_HARD;
case NOTES_DISPLAY_CHALLENGE: return COLOR_CHALLENGE;
case NOTES_DISPLAY_BATTLE: return COLOR_BATTLE;
default: return COLOR_EASY;
}
}
void Notes::TidyUpData()
@@ -118,7 +145,7 @@ Difficulty Notes::DifficultyFromDescriptionAndMeter( CString sDescription, int i
"easy",
"basic",
"light",
"GARBAGE", // but don't worry - this will never match because the compare string is all lowercase
"GARBAGE", // don't worry - this will never match because the compare string is all lowercase
},
{
"medium",
@@ -137,7 +164,7 @@ Difficulty Notes::DifficultyFromDescriptionAndMeter( CString sDescription, int i
for( int i=0; i<NUM_DIFFICULTIES; i++ )
for( int j=0; j<DESCRIPTIONS_PER_CLASS; j++ )
if( sDescription.Find(sDescriptionParts[i][j]) != -1 )
return Difficulty(i);
return (Difficulty)i;
// guess difficulty class from meter
if( iMeter <= 3 ) return DIFFICULTY_EASY;