clean up ScreenTestLights

This commit is contained in:
Chris Danford
2004-03-29 09:44:00 +00:00
parent 60a89b8cf4
commit 936f2066e1
10 changed files with 66 additions and 49 deletions
+1 -29
View File
@@ -14,35 +14,7 @@
#include "GameState.h"
#include "RageUtil.h"
#include "ThemeManager.h"
static const CString EMPTY_STRING;
#define XToString(X) \
const CString& X##ToString( X x ) \
{ \
if( x == ARRAYSIZE(X##Names)+1 ) \
return EMPTY_STRING; \
ASSERT(unsigned(x) < ARRAYSIZE(X##Names)); \
return X##Names[x]; \
}
#define XToThemedString(X) \
CString X##ToThemedString( X x ) \
{ \
return THEME->GetMetric( #X, X##ToString(x) ); \
}
#define StringToX(X) \
X StringTo##X( const CString& s ) \
{ \
CString s2 = s; \
s2.MakeLower(); \
unsigned i; \
for( i = 0; i < ARRAYSIZE(X##Names); ++i ) \
if( !s2.CompareNoCase(X##Names[i]) ) \
return (X)i; \
return (X)(i+1); /*invalid*/ \
}
#include "EnumHelper.h"
static const CString RadarCategoryNames[NUM_RADAR_CATEGORIES] = {