use bindings

This commit is contained in:
Glenn Maynard
2006-09-27 06:21:34 +00:00
parent c1194da0d0
commit 2d1a2e6a07
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ class LunaOptionIconRow: public Luna<OptionIconRow>
{
public:
LunaOptionIconRow() { LUA->Register( Register ); }
static int set( T* p, lua_State *L ) { p->SetFromGameState( (PlayerNumber) IArg(1) ); return 0; }
static int set( T* p, lua_State *L ) { p->SetFromGameState( Enum::Check<PlayerNumber>(L, 1) ); return 0; }
static void Register(lua_State *L)
{
+1 -1
View File
@@ -1252,7 +1252,7 @@ class LunaScreenOptions: public Luna<ScreenOptions>
public:
LunaScreenOptions() { LUA->Register( Register ); }
static int GetCurrentRow( T* p, lua_State *L ) { lua_pushnumber( L, p->GetCurrentRow((PlayerNumber) IArg(1)) ); return 1; }
static int GetCurrentRow( T* p, lua_State *L ) { lua_pushnumber( L, p->GetCurrentRow(Enum::Check<PlayerNumber>(L, 1)) ); return 1; }
static void Register( Lua *L )
{
ADD_METHOD( GetCurrentRow );
+1 -1
View File
@@ -409,7 +409,7 @@ public:
static int GetRadarValues( T* p, lua_State *L )
{
PlayerNumber pn = (PlayerNumber) IArg(1);
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
RadarValues &rv = const_cast<RadarValues &>(p->GetRadarValues(pn));
rv.PushSelf(L);
return 1;