@ -26,6 +26,21 @@
# endif
# endif
# endif
# endif
// to get rid of you_must_not_use_assert___use_nl_assert___read_debug_h_file messages
# include <cassert>
# undef assert
# define assert nlassert
# include <luabind/luabind.hpp>
# if LUABIND_MAX_ARITY == 10
# include <luabind / version.hpp>
# include <luabind / operator.hpp>
# elif LUABIND_MAX_ARITY == 5
# define LUABIND_VERSION 600
# else
# pragma error("luabind version not recognized")
# endif
# include "lua_ihm.h"
# include "lua_ihm.h"
# include "reflect.h"
# include "reflect.h"
# include "action_handler.h"
# include "action_handler.h"
@ -100,24 +115,6 @@ Compilation is VERY SLOW
*/
*/
// ***************************************************************************
// ***************************************************************************
// to get rid of you_must_not_use_assert___use_nl_assert___read_debug_h_file messages
# include <cassert>
# undef assert
# define assert nlassert
# include <luabind/luabind.hpp>
# if LUABIND_MAX_ARITY == 10
# define LUABIND_VERSION 07
# elif LUABIND_MAX_ARITY == 5
# define LUABIND_VERSION 06
# else
# pragma error("luabind version not recognized")
# endif
# if LUABIND_VERSION == 07
# include <luabind / operator.hpp>
# endif
using namespace NLMISC ;
using namespace NLMISC ;
using namespace NLGEORGES ;
using namespace NLGEORGES ;
using namespace R2 ;
using namespace R2 ;
@ -208,7 +205,7 @@ bool CLuaIHM::pop(CLuaState &ls, NLMISC::CRGBA &dest)
try
try
{
{
if ( ls . isNil ( - 1 ) ) return false ;
if ( ls . isNil ( - 1 ) ) return false ;
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
ls . pop ( ) ;
ls . pop ( ) ;
# else
# else
@ -231,7 +228,7 @@ bool CLuaIHM::pop(CLuaState &ls,NLMISC::CVector2f &dest)
try
try
{
{
if ( ls . isNil ( - 1 ) ) return false ;
if ( ls . isNil ( - 1 ) ) return false ;
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
ls . pop ( ) ;
ls . pop ( ) ;
# else
# else
@ -254,7 +251,7 @@ bool CLuaIHM::pop(CLuaState &ls, ucstring &dest)
try
try
{
{
if ( ls . isNil ( - 1 ) ) return false ;
if ( ls . isNil ( - 1 ) ) return false ;
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
ls . pop ( ) ;
ls . pop ( ) ;
# else
# else
@ -293,7 +290,7 @@ void CLuaIHM::push(CLuaState &ls, const ucstring &value)
{
{
//H_AUTO(Lua_CLuaIHM_push)
//H_AUTO(Lua_CLuaIHM_push)
luabind : : object obj ( ls . getStatePointer ( ) , value ) ;
luabind : : object obj ( ls . getStatePointer ( ) , value ) ;
# if LUABIND_VERSION != 07
# if LUABIND_VERSION == 600
obj . pushvalue ( ) ;
obj . pushvalue ( ) ;
# endif
# endif
}
}
@ -651,7 +648,7 @@ void CLuaIHM::luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflect
case CReflectedProperty : : UCString :
case CReflectedProperty : : UCString :
{
{
luabind : : object obj ( ls . getStatePointer ( ) , ( reflectedObject . * ( property . GetMethod . GetUCString ) ) ( ) ) ;
luabind : : object obj ( ls . getStatePointer ( ) , ( reflectedObject . * ( property . GetMethod . GetUCString ) ) ( ) ) ;
# if LUABIND_VERSION != 07
# if LUABIND_VERSION == 600
obj . pushvalue ( ) ;
obj . pushvalue ( ) ;
# endif
# endif
}
}
@ -659,7 +656,7 @@ void CLuaIHM::luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflect
case CReflectedProperty : : RGBA :
case CReflectedProperty : : RGBA :
{
{
luabind : : object obj ( ls . getStatePointer ( ) , ( reflectedObject . * ( property . GetMethod . GetRGBA ) ) ( ) ) ;
luabind : : object obj ( ls . getStatePointer ( ) , ( reflectedObject . * ( property . GetMethod . GetRGBA ) ) ( ) ) ;
# if LUABIND_VERSION != 07
# if LUABIND_VERSION == 600
obj . pushvalue ( ) ;
obj . pushvalue ( ) ;
# endif
# endif
}
}
@ -2672,7 +2669,7 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr)
if ( mustUseUCString )
if ( mustUseUCString )
{
{
luabind : : object obj ( ls . getStatePointer ( ) , ucstr ) ;
luabind : : object obj ( ls . getStatePointer ( ) , ucstr ) ;
# if LUABIND_VERSION != 07
# if LUABIND_VERSION == 600
obj . pushvalue ( ) ;
obj . pushvalue ( ) ;
# endif
# endif
}
}
@ -2685,7 +2682,7 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr)
case CInterfaceExprValue : : RGBA :
case CInterfaceExprValue : : RGBA :
{
{
luabind : : object obj ( ls . getStatePointer ( ) , value . getRGBA ( ) ) ;
luabind : : object obj ( ls . getStatePointer ( ) , value . getRGBA ( ) ) ;
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
obj . push ( ls . getStatePointer ( ) ) ;
obj . push ( ls . getStatePointer ( ) ) ;
# else
# else
obj . pushvalue ( ) ;
obj . pushvalue ( ) ;
@ -3325,7 +3322,7 @@ bool CLuaIHM::popString(CLuaState &ls, std::string & dest)
//H_AUTO(Lua_CLuaIHM_popString)
//H_AUTO(Lua_CLuaIHM_popString)
try
try
{
{
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
ls . pop ( ) ;
ls . pop ( ) ;
# else
# else
@ -3347,7 +3344,7 @@ bool CLuaIHM::popSINT32(CLuaState &ls, sint32 & dest)
//H_AUTO(Lua_CLuaIHM_popSINT32)
//H_AUTO(Lua_CLuaIHM_popSINT32)
try
try
{
{
# if LUABIND_VERSION == 07
# if LUABIND_VERSION > 600
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
luabind : : object obj ( luabind : : from_stack ( ls . getStatePointer ( ) , - 1 ) ) ;
ls . pop ( ) ;
ls . pop ( ) ;
# else
# else