FOREACH_ENUM2

This commit is contained in:
Glenn Maynard
2006-09-27 05:25:22 +00:00
parent 2eca7b670c
commit be7cf3d347
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ static void Lua##X(lua_State* L) \
{ \
/* Create the EnumToString table: { "UnlockEntry_ArcadePoints", "UnlockEntry_DancePoints" } */ \
lua_newtable( L ); \
FOREACH_ENUM( X, NUM_##X, i ) \
FOREACH_ENUM2( X, i ) \
{ \
RString s = X##Names[i]; \
lua_pushstring( L, (#X "_")+s ); \
@@ -137,7 +137,7 @@ static void Lua##X(lua_State* L) \
lua_setglobal( L, #X ); \
/* Create the StringToEnum table: { "UnlockEntry_ArcadePoints" = 0, "UnlockEntry_DancePoints" = 1 } */ \
lua_newtable( L ); \
FOREACH_ENUM( X, NUM_##X, i ) \
FOREACH_ENUM2( X, i ) \
{ \
RString s = X##Names[i]; \
lua_pushstring( L, (#X "_")+s ); \
+1 -1
View File
@@ -53,7 +53,7 @@ enum NSScoreBoardColumn
NUM_NSScoreBoardColumn,
NSScoreBoardColumn_Invalid
};
#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM( NSScoreBoardColumn, NUM_NSScoreBoardColumn, sc )
#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM2( NSScoreBoardColumn, sc )
struct NetServerInfo
{
+1 -1
View File
@@ -49,7 +49,7 @@ enum InputDevice
NUM_InputDevice, // leave this at the end
InputDevice_Invalid // means this is NULL
};
#define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, NUM_InputDevice, i )
#define FOREACH_InputDevice( i ) FOREACH_ENUM2( InputDevice, i )
const RString& InputDeviceToString( InputDevice i );
InputDevice StringToInputDevice( const RString& s );
inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; }