FOREACH_ENUM2
This commit is contained in:
@@ -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 ); \
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user