Rename XToString2 to XToString.

This commit is contained in:
Steve Checkoway
2006-10-15 00:09:18 +00:00
parent 04bff6bc1d
commit e87789da7c
38 changed files with 79 additions and 79 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ static const char *HorizAlignNames[] = {
"Center",
"Right"
};
XToString2( HorizAlign );
XToString( HorizAlign );
LuaXType( HorizAlign );
static const char *VertAlignNames[] = {
@@ -45,7 +45,7 @@ static const char *VertAlignNames[] = {
"Middle",
"Bottom"
};
XToString2( VertAlign );
XToString( VertAlign );
LuaXType( VertAlign );
void Actor::SetBGMTime( float fTime, float fBeat )
+1 -1
View File
@@ -606,7 +606,7 @@ static const char *FileTypeNames[] = {
"Lua",
"Model",
};
XToString2( FileType );
XToString( FileType );
LuaXType( FileType );
FileType ActorUtil::GetFileType( const RString &sPath )
+1 -1
View File
@@ -52,7 +52,7 @@ const char *CodeNames[] = {
"CancelAllPlayerOptions",
"BackInEventMode",
};
XToString2( Code );
XToString( Code );
static CodeItem g_CodeItems[NUM_Code];
+1 -1
View File
@@ -15,7 +15,7 @@ static const char *ControllerStateButtonNames[] = {
"Left",
"Right",
};
XToString2( ControllerStateButton );
XToString( ControllerStateButton );
static const DeviceButton ControllerStateButtonToDeviceButton[] = {
JOY_UP,
+2 -2
View File
@@ -25,7 +25,7 @@ static const char *CourseTypeNames[] = {
"Endless",
"Survival",
};
XToString2( CourseType );
XToString( CourseType );
XToLocalizedString( CourseType );
LuaXType( CourseType );
LuaFunction( CourseTypeToLocalizedString, CourseTypeToLocalizedString( Enum::Check<CourseType>( L, 1 ) ) );
@@ -38,7 +38,7 @@ static const char *SongSortNames[] = {
"TopGrades",
"LowestGrades",
};
XToString2( SongSort );
XToString( SongSort );
XToLocalizedString( SongSort );
+1 -1
View File
@@ -194,7 +194,7 @@ static const char *MonthNames[] =
"November",
"December",
};
XToString2( Month );
XToString( Month );
XToLocalizedString( Month );
LuaXType( Month );
+1 -1
View File
@@ -14,7 +14,7 @@ static const char *DifficultyNames[] = {
"Challenge",
"Edit",
};
XToString2( Difficulty );
XToString( Difficulty );
XToLocalizedString( Difficulty );
LuaXType( Difficulty );
+2 -2
View File
@@ -24,7 +24,7 @@ static const char *EditMenuRowNames[] = {
"SourceSteps",
"Action"
};
XToString2( EditMenuRow );
XToString( EditMenuRow );
XToLocalizedString( EditMenuRow );
static const char *EditMenuActionNames[] = {
@@ -33,7 +33,7 @@ static const char *EditMenuActionNames[] = {
"Create",
"Practice",
};
XToString2( EditMenuAction );
XToString( EditMenuAction );
XToLocalizedString( EditMenuAction );
StringToX( EditMenuAction );
+2 -2
View File
@@ -53,7 +53,7 @@ namespace Enum
const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_ptr<RString> *pNameCache ); // XToString helper
#define XToString2(X) \
#define XToString(X) \
COMPILE_ASSERT( NUM_##X == ARRAYLEN(X##Names) ); \
const RString& X##ToString( X x ) \
{ \
@@ -61,7 +61,7 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_
return EnumToString( x, NUM_##X, X##Names, as_##X##Name ); \
} \
namespace StringConversion { template<> RString ToString<X>( const X &value ) { return X##ToString(value); } }
#define XToString(X, CNT) XToString2(X)
#define XToString2(X) XToString(X)
#define XToLocalizedString(X) \
const RString &X##ToLocalizedString( X x ) \
+17 -17
View File
@@ -28,7 +28,7 @@ static const char *RadarCategoryNames[] = {
"Hands",
"Rolls"
};
XToString2( RadarCategory );
XToString( RadarCategory );
XToLocalizedString( RadarCategory );
LuaFunction( RadarCategoryToLocalizedString, RadarCategoryToLocalizedString(Enum::Check<RadarCategory>(L, 1)) );
LuaXType( RadarCategory );
@@ -58,7 +58,7 @@ static const char *PlayModeNames[] = {
"Battle",
"Rave",
};
XToString2( PlayMode );
XToString( PlayMode );
XToLocalizedString( PlayMode );
StringToX( PlayMode );
LuaFunction( PlayModeToLocalizedString, PlayModeToLocalizedString(Enum::Check<PlayMode>(L, 1)) );
@@ -79,7 +79,7 @@ static const char *RankingCategoryNames[] = {
"c",
"d",
};
XToString2( RankingCategory );
XToString( RankingCategory );
StringToX( RankingCategory );
@@ -88,7 +88,7 @@ static const char *PlayerControllerNames[] = {
"Autoplay",
"Cpu",
};
XToString2( PlayerController );
XToString( PlayerController );
StringToX( PlayerController );
XToLocalizedString( PlayerController );
LuaXType( PlayerController );
@@ -99,7 +99,7 @@ static const char *CoinModeNames[] = {
"Pay",
"Free",
};
XToString2( CoinMode );
XToString( CoinMode );
StringToX( CoinMode );
LuaXType( CoinMode );
@@ -109,7 +109,7 @@ static const char *PremiumNames[] = {
"Double",
"Joint",
};
XToString2( Premium );
XToString( Premium );
StringToX( Premium );
LuaXType( Premium );
@@ -134,7 +134,7 @@ static const char *SortOrderNames[] = {
"Endless",
"Roulette",
};
XToString2( SortOrder );
XToString( SortOrder );
StringToX( SortOrder );
LuaXType( SortOrder );
@@ -150,7 +150,7 @@ static const char *TapNoteScoreNames[] = {
"W2",
"W1",
};
XToString2( TapNoteScore );
XToString( TapNoteScore );
LuaXType( TapNoteScore );
TapNoteScore StringToTapNoteScore( const RString &s )
{
@@ -183,7 +183,7 @@ static const char *HoldNoteScoreNames[] = {
"LetGo",
"Held",
};
XToString2( HoldNoteScore );
XToString( HoldNoteScore );
LuaXType( HoldNoteScore );
HoldNoteScore StringToHoldNoteScore( const RString &s )
{
@@ -209,7 +209,7 @@ static const char *MemoryCardStateNames[] = {
"removed",
"none",
};
XToString2( MemoryCardState );
XToString( MemoryCardState );
static const char *PerDifficultyAwardNames[] = {
@@ -224,7 +224,7 @@ static const char *PerDifficultyAwardNames[] = {
"Percent90W3",
"Percent100W3",
};
XToString2( PerDifficultyAward );
XToString( PerDifficultyAward );
XToLocalizedString( PerDifficultyAward );
StringToX( PerDifficultyAward );
LuaFunction( PerDifficultyAwardToLocalizedString, PerDifficultyAwardToLocalizedString(Enum::Check<PerDifficultyAward>(L, 1)) );
@@ -246,7 +246,7 @@ static const char *PeakComboAwardNames[] = {
"Peak9000Combo",
"Peak10000Combo",
};
XToString2( PeakComboAward );
XToString( PeakComboAward );
XToLocalizedString( PeakComboAward );
StringToX( PeakComboAward );
LuaFunction( PeakComboAwardToLocalizedString, PeakComboAwardToLocalizedString(Enum::Check<PeakComboAward>(L, 1)) );
@@ -304,7 +304,7 @@ static const char *StyleTypeNames[] = {
"OnePlayerTwoSides",
"TwoPlayersSharedSides",
};
XToString2( StyleType );
XToString( StyleType );
StringToX( StyleType );
LuaXType( StyleType );
@@ -314,7 +314,7 @@ static const char *GoalTypeNames[] = {
"Time",
"None",
};
XToString2( GoalType );
XToString( GoalType );
StringToX( GoalType );
LuaXType( GoalType );
@@ -324,7 +324,7 @@ static const char *EditModeNames[] = {
"Home",
"Full"
};
XToString2( EditMode );
XToString( EditMode );
StringToX( EditMode );
LuaXType( EditMode );
@@ -344,7 +344,7 @@ static const char *StageNames[] = {
"Event",
"Demo",
};
XToString2( Stage );
XToString( Stage );
LuaXType( Stage );
@@ -354,7 +354,7 @@ static const char *MultiPlayerStatusNames[] = {
"Unplugged",
"MissingMultitap",
};
XToString2( MultiPlayerStatus );
XToString( MultiPlayerStatus );
/*
+1 -1
View File
@@ -10,7 +10,7 @@ static const char *GameControllerNames[] = {
"Controller1",
"Controller2",
};
XToString2( GameController );
XToString( GameController );
StringToX( GameController );
+2 -2
View File
@@ -33,7 +33,7 @@ static const char *CabinetLightNames[] = {
"BassLeft",
"BassRight",
};
XToString2( CabinetLight );
XToString( CabinetLight );
StringToX( CabinetLight );
static const char *LightsModeNames[] = {
@@ -47,7 +47,7 @@ static const char *LightsModeNames[] = {
"TestAutoCycle",
"TestManualCycle",
};
XToString2( LightsMode );
XToString( LightsMode );
static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
{
+1 -1
View File
@@ -16,7 +16,7 @@ static const char *MenuButtonNames[] =
"Coin",
"Operator"
};
XToString2( MenuButton );
XToString( MenuButton );
XToLocalizedString( MenuButton );
+1 -1
View File
@@ -133,7 +133,7 @@ static const char *MessageNames[] = {
"ShowHoldJudgmentMuliPlayerP31",
"ShowHoldJudgmentMuliPlayerP32",
};
XToString2( Message );
XToString( Message );
static RageMutex g_Mutex( "MessageManager" );
+1 -1
View File
@@ -8,7 +8,7 @@ static const char *ModsLevelNames[] = {
"Stage",
"Song",
};
XToString2( ModsLevel );
XToString( ModsLevel );
LuaXType( ModsLevel );
/*
+3 -3
View File
@@ -26,7 +26,7 @@ static const char *NotePartNames[] = {
"HoldBottomCap",
"HoldTail",
};
XToString2( NotePart );
XToString( NotePart );
static const RageVector2 g_emptyVector = RageVector2( 0, 0 );
@@ -234,13 +234,13 @@ static const char *HoldTypeNames[] = {
"hold",
"roll",
};
XToString2( HoldType );
XToString( HoldType );
static const char *ActiveTypeNames[] = {
"active",
"inactive",
};
XToString2( ActiveType );
XToString( ActiveType );
+1 -1
View File
@@ -27,7 +27,7 @@ static const char *NoteTypeNames[] = {
"64th",
"192nd",
};
XToString2( NoteType );
XToString( NoteType );
LuaXType( NoteType )
XToLocalizedString( NoteType );
+2 -2
View File
@@ -33,14 +33,14 @@ static const char *SelectTypeNames[] = {
"SelectMultiple",
"SelectNone",
};
XToString2( SelectType );
XToString( SelectType );
StringToX( SelectType );
static const char *LayoutTypeNames[] = {
"ShowAllInRow",
"ShowOneInRow",
};
XToString2( LayoutType );
XToString( LayoutType );
StringToX( LayoutType );
RString OptionRowHandler::OptionTitle() const
+2 -2
View File
@@ -8,7 +8,7 @@ static const char *PlayerNumberNames[] = {
"P1",
"P2",
};
XToString2( PlayerNumber );
XToString( PlayerNumber );
XToLocalizedString( PlayerNumber );
LuaFunction( PlayerNumberToString, PlayerNumberToString(Enum::Check<PlayerNumber>(L, 1)) );
LuaXType( PlayerNumber );
@@ -47,7 +47,7 @@ static const char *MultiPlayerNames[] = {
"P31",
"P32",
};
XToString2( MultiPlayer );
XToString( MultiPlayer );
XToLocalizedString( MultiPlayer );
LuaFunction( MultiPlayerToString, MultiPlayerToString(Enum::Check<MultiPlayer>(L, 1)) );
LuaFunction( MultiPlayerToLocalizedString, MultiPlayerToLocalizedString(Enum::Check<MultiPlayer>(L, 1)) );
+12 -12
View File
@@ -29,7 +29,7 @@ static const char *TimingWindowNames[] = {
"Hold",
"Roll",
};
XToString2( TimingWindow );
XToString( TimingWindow );
static const char *ScoreEventNames[] = {
@@ -43,7 +43,7 @@ static const char *ScoreEventNames[] = {
"Held",
"LetGo",
};
XToString2( ScoreEvent );
XToString( ScoreEvent );
static const char *MusicWheelUsesSectionsNames[] = {
@@ -51,7 +51,7 @@ static const char *MusicWheelUsesSectionsNames[] = {
"Always",
"ABCOnly",
};
XToString2( MusicWheelUsesSections );
XToString( MusicWheelUsesSections );
StringToX( MusicWheelUsesSections );
LuaXType( MusicWheelUsesSections );
@@ -60,7 +60,7 @@ static const char *AllowW1Names[] = {
"CoursesOnly",
"Everywhere",
};
XToString2( AllowW1 );
XToString( AllowW1 );
StringToX( AllowW1 );
LuaXType( AllowW1 );
@@ -69,7 +69,7 @@ static const char *MaybeNames[] = {
"No",
"Yes",
};
XToString2( Maybe );
XToString( Maybe );
StringToX( Maybe );
LuaXType( Maybe );
@@ -78,7 +78,7 @@ static const char *GetRankingNameNames[] = {
"On",
"List",
};
XToString2( GetRankingName );
XToString( GetRankingName );
StringToX( GetRankingName );
LuaXType( GetRankingName );
@@ -88,7 +88,7 @@ static const char *RandomBackgroundModeNames[] = {
"Animations",
"RandomMovies",
};
XToString2( RandomBackgroundMode );
XToString( RandomBackgroundMode );
StringToX( RandomBackgroundMode );
LuaXType( RandomBackgroundMode );
@@ -97,7 +97,7 @@ static const char *ShowDancingCharactersNames[] = {
"Random",
"Select",
};
XToString2( ShowDancingCharacters );
XToString( ShowDancingCharacters );
StringToX( ShowDancingCharacters );
LuaXType( ShowDancingCharacters );
@@ -107,7 +107,7 @@ static const char *BannerCacheModeNames[] = {
"LowResLoadOnDemand",
"Full"
};
XToString2( BannerCacheMode );
XToString( BannerCacheMode );
StringToX( BannerCacheMode );
LuaXType( BannerCacheMode );
@@ -119,7 +119,7 @@ static const char *AttractSoundFrequencyNames[] = {
"Every4Times",
"Every5Times",
};
XToString2( AttractSoundFrequency );
XToString( AttractSoundFrequency );
StringToX( AttractSoundFrequency );
LuaXType( AttractSoundFrequency );
@@ -130,7 +130,7 @@ static const char *CourseSortOrdersNames[] = {
"MeterSum",
"MeterRank",
};
XToString2( CourseSortOrders );
XToString( CourseSortOrders );
StringToX( CourseSortOrders );
LuaXType( CourseSortOrders );
@@ -138,7 +138,7 @@ static const char *ScoringTypeNames[] = {
"New",
"Old",
};
XToString2( ScoringType );
XToString( ScoringType );
StringToX( ScoringType );
LuaXType( ScoringType );
+1 -1
View File
@@ -66,7 +66,7 @@ static const char *PixelFormatNames[] = {
"BGR8",
"A1BGR5",
};
XToString2( PixelFormat );
XToString( PixelFormat );
/* bNeedReloadTextures is set to true if the device was re-created and we need
* to reload textures. On failure, an error message is returned.
+1 -1
View File
@@ -211,7 +211,7 @@ static const char *InputDeviceNames[] = {
"Pump2",
"Midi",
};
XToString2( InputDevice );
XToString( InputDevice );
StringToX( InputDevice );
/* Return a reversible representation of a DeviceInput. This is not affected by InputDrivers,
+3 -3
View File
@@ -51,7 +51,7 @@ static const char *CullModeNames[] =
"Front",
"None"
};
XToString2( CullMode );
XToString( CullMode );
LuaXType( CullMode );
static const char *BlendModeNames[] =
@@ -62,7 +62,7 @@ static const char *BlendModeNames[] =
"InvertDest",
"NoEffect"
};
XToString2( BlendMode );
XToString( BlendMode );
LuaXType( BlendMode );
@@ -72,7 +72,7 @@ static const char *ZTestModeNames[] =
"WriteOnPass",
"WriteOnFail"
};
XToString2( ZTestMode );
XToString( ZTestMode );
LuaXType( ZTestMode );
int LuaFunc_color( lua_State *L )
+1 -1
View File
@@ -82,7 +82,7 @@ static const char *EditStateNames[] = {
"RecordPaused",
"Playing"
};
XToString2( EditState );
XToString( EditState );
#if defined(XBOX)
void ScreenEdit::InitEditMappings()
+2 -2
View File
@@ -40,14 +40,14 @@ static const char *JudgeLineNames[] =
{
"W1", "W2", "W3", "W4", "W5", "Miss", "Held", "MaxCombo"
};
XToString2( JudgeLine );
XToString( JudgeLine );
#define FOREACH_JudgeLine( rc ) FOREACH_ENUM( JudgeLine, rc )
static const char *StatLineNames[NUM_StatLine] =
{
"Jumps", "Holds", "Mines", "Hands", "Rolls",
};
XToString2( StatLine );
XToString( StatLine );
#define FOREACH_StatLine( rc ) FOREACH_ENUM( StatLine, rc )
#define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName,"CheerDelaySeconds")
+1 -1
View File
@@ -34,7 +34,7 @@ static const char *CourseEntryActionNames[] = {
"Insert Entry",
"Delete",
};
XToString2( CourseEntryAction );
XToString( CourseEntryAction );
#define FOREACH_CourseEntryAction( i ) FOREACH_ENUM( CourseEntryAction, i )
static MenuDef g_TempMenu(
+1 -1
View File
@@ -121,7 +121,7 @@ static const char *CourseActionNames[] = {
"Rename",
"Delete",
};
XToString2( CourseAction );
XToString( CourseAction );
#define FOREACH_CourseAction( i ) FOREACH_ENUM( CourseAction, i )
static MenuDef g_TempMenu(
@@ -36,7 +36,7 @@ static const char *StepsEditActionNames[] = {
"Rename",
"Delete",
};
XToString2( StepsEditAction );
XToString( StepsEditAction );
#define FOREACH_StepsEditAction( i ) FOREACH_ENUM( StepsEditAction, i )
static MenuDef g_TempMenu(
@@ -40,7 +40,7 @@ static const char *ProfileActionNames[] = {
"Delete",
"Clear",
};
XToString2( ProfileAction );
XToString( ProfileAction );
XToLocalizedString( ProfileAction );
#define FOREACH_ProfileAction( i ) FOREACH_ENUM( ProfileAction, i )
@@ -27,7 +27,7 @@ static const char *ManageWorkoutsActionNames[] = {
"Rename",
"Delete",
};
XToString2( ManageWorkoutsAction );
XToString( ManageWorkoutsAction );
#define FOREACH_ManageWorkoutsAction( i ) FOREACH_ENUM( ManageWorkoutsAction, i )
static MenuDef g_TempMenu(
+1 -1
View File
@@ -18,7 +18,7 @@ static const char *PromptAnswerNames[] = {
"No",
"Cancel",
};
XToString2( PromptAnswer );
XToString( PromptAnswer );
/* Settings: */
namespace
+1 -1
View File
@@ -25,7 +25,7 @@ static const char *PageTypeNames[] = {
"SurvivalCourses",
"AllCourses",
};
XToString2( PageType );
XToString( PageType );
StringToX( PageType );
#define TYPE THEME->GetMetric(m_sName,"Type")
+1 -1
View File
@@ -21,7 +21,7 @@ static const char *MenuDirNames[] = {
"Right",
"Auto",
};
XToString2( MenuDir );
XToString( MenuDir );
AutoScreenMessage( SM_PlayPostSwitchPage )
+1 -1
View File
@@ -19,7 +19,7 @@ static const char *SetTimeSelectionNames[] = {
"Minute",
"Second",
};
XToString2( SetTimeSelection );
XToString( SetTimeSelection );
#define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, s )
const float g_X[NUM_SetTimeSelection] =
+1 -1
View File
@@ -36,7 +36,7 @@ static const char *ElementCategoryNames[] = {
"Sounds",
"Other"
};
XToString2( ElementCategory );
XToString( ElementCategory );
StringToX( ElementCategory );
+1 -1
View File
@@ -12,7 +12,7 @@ static const char *TweenTypeNames[] = {
"Spring",
"Bezier"
};
XToString2( TweenType );
XToString( TweenType );
LuaXType( TweenType );
+2 -2
View File
@@ -33,7 +33,7 @@ static const char *UnlockRequirementNames[] =
"Toasties",
"StagesCleared"
};
XToString2( UnlockRequirement );
XToString( UnlockRequirement );
StringToX( UnlockRequirement );
LuaXType( UnlockRequirement );
@@ -44,7 +44,7 @@ static const char *UnlockRewardTypeNames[] =
"Course",
"Modifier",
};
XToString2( UnlockRewardType );
XToString( UnlockRewardType );
XToLocalizedString( UnlockRewardType );
LuaXType( UnlockRewardType );
LuaFunction( UnlockRewardTypeToLocalizedString, UnlockRewardTypeToLocalizedString(Enum::Check<UnlockRewardType>(L, 1)) );
+2 -2
View File
@@ -16,7 +16,7 @@ static const char *WorkoutProgramNames[] = {
"Runner",
"Flat",
};
XToString2( WorkoutProgram );
XToString( WorkoutProgram );
StringToX( WorkoutProgram );
XToLocalizedString( WorkoutProgram );
@@ -25,7 +25,7 @@ static const char *WorkoutStepsTypeNames[] = {
"NormalSteps",
"WorkoutSteps"
};
XToString2( WorkoutStepsType );
XToString( WorkoutStepsType );
StringToX( WorkoutStepsType );
XToLocalizedString( WorkoutStepsType );
LuaXType( WorkoutStepsType );