Remove unneeded code.

This commit is contained in:
Glenn Maynard
2003-09-15 05:54:14 +00:00
parent 9ffa8b5c41
commit 610c07c0e7
3 changed files with 2 additions and 45 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
#include "GhostArrow.h"
#include "NoteSkinManager.h"
#include "GameState.h"
GhostArrow::GhostArrow()
@@ -28,7 +29,7 @@ void GhostArrow::Init( PlayerNumber pn )
{
CString sJudge = TapNoteScoreToString( (TapNoteScore)i );
CString sCommand = Capitalize(sJudge)+"Command";
m_sScoreCommand[i] = NOTESKIN->GetMetric(m_PlayerNumber,m_sName,sCommand);
m_sScoreCommand[i] = NOTESKIN->GetMetric(GAMESTATE->m_PlayerOptions[pn].m_sNoteSkin,m_sName,sCommand);
}
}
-38
View File
@@ -160,44 +160,6 @@ CString NoteSkinManager::GetMetric( CString sNoteSkinName, CString sButtonName,
return sReturn;
}
CString NoteSkinManager::GetMetric( PlayerNumber pn, CString sButtonName, CString sValue ) // looks in GAMESTATE for the current Style
{
CString sNoteSkinName = GAMESTATE->m_PlayerOptions[pn].m_sNoteSkin;
sNoteSkinName.MakeLower();
return GetMetric( sNoteSkinName, sButtonName, sValue );
}
int NoteSkinManager::GetMetricI( PlayerNumber pn, CString sButtonName, CString sValueName )
{
return atoi( GetMetric(pn,sButtonName,sValueName) );
}
float NoteSkinManager::GetMetricF( PlayerNumber pn, CString sButtonName, CString sValueName )
{
return (float)atof( GetMetric(pn,sButtonName,sValueName) );
}
bool NoteSkinManager::GetMetricB( PlayerNumber pn, CString sButtonName, CString sValueName )
{
return atoi( GetMetric(pn,sButtonName,sValueName) ) != 0;
}
RageColor NoteSkinManager::GetMetricC( PlayerNumber pn, CString sButtonName, CString sValueName )
{
float r=1,b=1,g=1,a=1; // initialize in case sscanf fails
CString sValue = GetMetric(pn,sButtonName,sValueName);
char szValue[40];
strncpy( szValue, sValue, 39 );
int result = sscanf( szValue, "%f,%f,%f,%f", &r, &g, &b, &a );
if( result != 4 )
{
LOG->Warn( "The color value '%s' for theme metric '%s : %s' is invalid.", szValue, sButtonName.c_str(), sValueName.c_str() );
ASSERT(0);
}
return RageColor(r,g,b,a);
}
int NoteSkinManager::GetMetricI( CString sNoteSkinName, CString sButtonName, CString sValueName )
{
return atoi( GetMetric(sNoteSkinName,sButtonName,sValueName) );
-6
View File
@@ -35,12 +35,6 @@ public:
CString GetPathTo( PlayerNumber pn, CString sButtonName, CString sElement );
CString GetPathTo( CString sDir, CString sFileName );
CString GetMetric( PlayerNumber pn, CString sButtonName, CString sValueName );
int GetMetricI( PlayerNumber pn, CString sButtonName, CString sValueName );
float GetMetricF( PlayerNumber pn, CString sButtonName, CString sValueName );
bool GetMetricB( PlayerNumber pn, CString sButtonName, CString sValueName );
RageColor GetMetricC( PlayerNumber pn, CString sButtonName, CString sValueName );
CString GetMetric( CString sNoteSkinName, CString sButtonName, CString sValue );
int GetMetricI( CString sNoteSkinName, CString sButtonName, CString sValueName );
float GetMetricF( CString sNoteSkinName, CString sButtonName, CString sValueName );