Example #1
0
static int tolua_Attack_Attack_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Attack",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string name = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  std::string pattern = ((std::string)  tolua_tocppstring(tolua_S,3,0));
  int damage = ((int)  tolua_tonumber(tolua_S,4,0));
  {
   Attack* tolua_ret = (Attack*)  Mtolua_new((Attack)(name,pattern,damage));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Attack");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
static int tolua__IntensityCEGUI_luaSetCurrEditedEntityValue00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string key = ((std::string)  tolua_tocppstring(tolua_S,1,0));
  std::string value = ((std::string)  tolua_tocppstring(tolua_S,2,0));
 {
  IntensityCEGUI::luaSetCurrEditedEntityValue(key,value);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'luaSetCurrEditedEntityValue'.",&tolua_err);
 return 0;
#endif
}
Example #3
0
static int tolua_CCGUI_MCCUtil_download00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"MCCUtil",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"LUA_FUNCTION",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string url = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  std::string saveFile = ((std::string)  tolua_tocppstring(tolua_S,3,0));
  LUA_FUNCTION scriptName = *((LUA_FUNCTION*)  tolua_tousertype(tolua_S,4,0));
  {
   MCCUtil::download(url,saveFile,scriptName);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'download'.",&tolua_err);
 return 0;
#endif
}
Example #4
0
static int tolua_CCGUI_MCCUtil_setData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"MCCUtil",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string key = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  std::string value = ((std::string)  tolua_tocppstring(tolua_S,3,0));
  {
   MCCUtil::setData(key,value);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setData'.",&tolua_err);
 return 0;
#endif
}
static int tolua__IntensityCEGUI_luaLogin00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string username = ((std::string)  tolua_tocppstring(tolua_S,1,0));
  std::string password = ((std::string)  tolua_tocppstring(tolua_S,2,0));
 {
  IntensityCEGUI::luaLogin(username,password);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'luaLogin'.",&tolua_err);
 return 0;
#endif
}
Example #6
0
/** function: cWorld:SetSignLines */
static int tolua_cWorld_SetSignLines(lua_State * tolua_S)
{
	cLuaState LuaState(tolua_S);

	#ifndef TOLUA_RELEASE
	tolua_Error tolua_err;
	if (
		!tolua_isusertype (LuaState, 1, "cWorld", 0, &tolua_err) ||
		!tolua_isnumber   (LuaState, 2, 0, &tolua_err) ||
		!tolua_isnumber   (LuaState, 3, 0, &tolua_err) ||
		!tolua_isnumber   (LuaState, 4, 0, &tolua_err) ||
		!tolua_iscppstring(LuaState, 5, 0, &tolua_err) ||
		!tolua_iscppstring(LuaState, 6, 0, &tolua_err) ||
		!tolua_iscppstring(LuaState, 7, 0, &tolua_err) ||
		!tolua_iscppstring(LuaState, 8, 0, &tolua_err) ||
		!tolua_isusertype (LuaState, 9, "cPlayer", 1, &tolua_err) ||
		!tolua_isnoobj    (LuaState, 10, &tolua_err)
		)
		goto tolua_lerror;
	else
	#endif
	{
		cWorld * self       = (cWorld *) tolua_tousertype (LuaState, 1, nullptr);
		int BlockX          = (int)      tolua_tonumber   (LuaState, 2, 0);
		int BlockY          = (int)      tolua_tonumber   (LuaState, 3, 0);
		int BlockZ          = (int)      tolua_tonumber   (LuaState, 4, 0);
		const AString Line1 =            tolua_tocppstring(LuaState, 5, 0);
		const AString Line2 =            tolua_tocppstring(LuaState, 6, 0);
		const AString Line3 =            tolua_tocppstring(LuaState, 7, 0);
		const AString Line4 =            tolua_tocppstring(LuaState, 8, 0);
		cPlayer * Player    = (cPlayer *)tolua_tousertype (LuaState, 9, nullptr);
		#ifndef TOLUA_RELEASE
		if (self == nullptr)
		{
			tolua_error(LuaState, "invalid 'self' in function 'UpdateSign'", nullptr);
		}
		#endif
		{
			bool res = self->SetSignLines(BlockX, BlockY, BlockZ, Line1, Line2, Line3, Line4, Player);
			tolua_pushboolean(LuaState, res ? 1 : 0);
		}
	}
	LOGWARNING("Warning in function call 'UpdateSign': UpdateSign() is deprecated. Please use SetSignLines()");
	LuaState.LogStackTrace(0);
	return 1;
	
	#ifndef TOLUA_RELEASE
tolua_lerror:
	tolua_error(LuaState, "#ferror in function 'UpdateSign'.", &tolua_err);
	return 0;
	#endif
}
static int tolua__IntensityCEGUI_luaEvaluatePythonScriptString00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string script = ((std::string)  tolua_tocppstring(tolua_S,1,0));
 {
  std::string tolua_ret = (std::string)  IntensityCEGUI::luaEvaluatePythonScriptString(script);
 tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'luaEvaluatePythonScriptString'.",&tolua_err);
 return 0;
#endif
}
static int tolua_PressurePlateTile_PressurePlateTile_setOnDeactivate00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
    tolua_Error tolua_err;
    if (
        !tolua_isusertype(tolua_S,1,"PressurePlateTile",0,&tolua_err) ||
        !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
        !tolua_isnoobj(tolua_S,3,&tolua_err)
    )
        goto tolua_lerror;
    else
#endif
    {
        PressurePlateTile* self = (PressurePlateTile*)  tolua_tousertype(tolua_S,1,0);
        std::string onDeactivate = ((std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
        if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setOnDeactivate'", NULL);
#endif
        {
            self->setOnDeactivate(onDeactivate);
        }
    }
    return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
    tolua_error(tolua_S,"#ferror in function 'setOnDeactivate'.",&tolua_err);
    return 0;
#endif
}
static int tolua__IntensityCEGUI_luaGetSauerVariable00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string variable = ((std::string)  tolua_tocppstring(tolua_S,1,0));
 {
  int tolua_ret = (int)  IntensityCEGUI::luaGetSauerVariable(variable);
 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'luaGetSauerVariable'.",&tolua_err);
 return 0;
#endif
}
Example #10
0
static int tolua_Attack_Attack_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Attack",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::string pattern = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  int damage = ((int)  tolua_tonumber(tolua_S,3,0));
  int damageBonus = ((int)  tolua_tonumber(tolua_S,4,0));
  {
   Attack* tolua_ret = (Attack*)  Mtolua_new((Attack)(pattern,damage,damageBonus));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"Attack");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_Attack_Attack_new00_local(tolua_S);
}
Example #11
0
static int tolua_AppstorePurchase_CAppstorePurchase_setTranscationReceipt00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"CAppstorePurchase",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CAppstorePurchase* self = (CAppstorePurchase*)  tolua_tousertype(tolua_S,1,0);
  std::string str = ((std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setTranscationReceipt'", NULL);
#endif
  {
   self->setTranscationReceipt(str);
   tolua_pushcppstring(tolua_S,(const char*)str);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setTranscationReceipt'.",&tolua_err);
 return 0;
#endif
}
Example #12
0
/* function: StringToMobType */
static int tolua_AllToLua_StringToMobType00(lua_State* tolua_S)
{
	cLuaState LuaState(tolua_S);

	#ifndef TOLUA_RELEASE
	tolua_Error tolua_err;
	if (
		!tolua_iscppstring(tolua_S, 1, 0, &tolua_err) ||
		!tolua_isnoobj(tolua_S, 2, &tolua_err)
		)
		goto tolua_lerror;
	else
	#endif
	{
		const AString a_MobString = tolua_tocppstring(LuaState, 1, 0);
		eMonsterType MobType = cMonster::StringToMobType(a_MobString);
		tolua_pushnumber(LuaState, (lua_Number) MobType);
		tolua_pushcppstring(LuaState, (const char *) a_MobString);
	}

	LOGWARNING("Warning in function call 'StringToMobType': StringToMobType() is deprecated. Please use cMonster:StringToMobType()");
	LuaState.LogStackTrace(0);
	return 2;

	#ifndef TOLUA_RELEASE
tolua_lerror:
	tolua_error(LuaState, "#ferror in function 'StringToMobType'.", &tolua_err);
	return 0;
	#endif
}
Example #13
0
static int tolua_CCGUI_MCCUtil_setArray00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"MCCUtil",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"std::vector<std::string>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string key = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  std::vector<std::string>* arr = ((std::vector<std::string>*)  tolua_tousertype(tolua_S,3,0));
  {
   MCCUtil::setArray(key,*arr);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setArray'.",&tolua_err);
 return 0;
#endif
}
Example #14
0
static int tolua_CCGUI_MCCUtil_getData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"MCCUtil",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string key = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  {
   std::string tolua_ret = (std::string)  MCCUtil::getData(key);
   tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getData'.",&tolua_err);
 return 0;
#endif
}
Example #15
0
static int tolua_CCGUI_MCCUtil_showHub00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"MCCUtil",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::string msg = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  {
   MCCUtil::showHub(msg);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'showHub'.",&tolua_err);
 return 0;
#endif
}
Example #16
0
static int tolua_AppstorePurchase_CAppstorePurchase_registerIsCanMakePayments00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"CAppstorePurchase",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CAppstorePurchase* self = (CAppstorePurchase*)  tolua_tousertype(tolua_S,1,0);
  const std::string strFun = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'registerIsCanMakePayments'", NULL);
#endif
  {
   self->registerIsCanMakePayments(strFun);
   tolua_pushcppstring(tolua_S,(const char*)strFun);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'registerIsCanMakePayments'.",&tolua_err);
 return 0;
#endif
}
Example #17
0
static int tolua_AppstorePurchase_CAppstorePurchase_excCallback00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"CAppstorePurchase",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CAppstorePurchase* self = (CAppstorePurchase*)  tolua_tousertype(tolua_S,1,0);
  const std::string strFun = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
  int value = ((int)  tolua_tonumber(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'excCallback'", NULL);
#endif
  {
   self->excCallback(strFun,value);
   tolua_pushcppstring(tolua_S,(const char*)strFun);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'excCallback'.",&tolua_err);
 return 0;
#endif
}
Example #18
0
static int tolua_Player_Player_getFactionStance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"Player",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  Player* self = (Player*)  tolua_tousertype(tolua_S,1,0);
  std::string faction = ((std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getFactionStance'", NULL);
#endif
  {
   int tolua_ret = (int)  self->getFactionStance(faction);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getFactionStance'.",&tolua_err);
 return 0;
#endif
}
Example #19
0
static int tolua_MoviePlayer_MoviePlayer_load00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"MoviePlayer",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  MoviePlayer* self = (MoviePlayer*)  tolua_tousertype(tolua_S,1,0);
  const std::string path = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'load'", NULL);
#endif
  {
   self->load(path);
   tolua_pushcppstring(tolua_S,(const char*)path);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'load'.",&tolua_err);
 return 0;
#endif
}
Example #20
0
static int tolua_maudio_maudio_AudioManager_play01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"maudio::AudioManager",0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
 !tolua_isusertype(tolua_S,5,"const osg::Vec3",0,&tolua_err) ||
 !tolua_isboolean(tolua_S,6,1,&tolua_err) ||
 !tolua_isnoobj(tolua_S,7,&tolua_err)
 )
 goto tolua_lerror;
 else
 {
  maudio::AudioManager* self = (maudio::AudioManager*)  tolua_tousertype(tolua_S,1,0);
  const std::string filename = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
  const float gain = ((const float)  tolua_tonumber(tolua_S,3,0));
  const float pitch = ((const float)  tolua_tonumber(tolua_S,4,0));
  const osg::Vec3* pos = ((const osg::Vec3*)  tolua_tousertype(tolua_S,5,0));
  const bool relative = ((const bool)  tolua_toboolean(tolua_S,6,true));
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'play'",NULL);
#endif
 {
  maudio::Sound* tolua_ret = (maudio::Sound*)  self->play(filename,gain,pitch,*pos,relative);
 tolua_pushusertype(tolua_S,(void*)tolua_ret,"maudio::Sound");
 tolua_pushcppstring(tolua_S,(const char*)filename);
 }
 }
 return 2;
tolua_lerror:
 return tolua_maudio_maudio_AudioManager_play00(tolua_S);
}
Example #21
0
static int tolua_toluaapi_addPropItem00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const std::string strItemInfo = ((const std::string)  tolua_tocppstring(tolua_S,1,0));
  {
   addPropItem(strItemInfo);
   tolua_pushcppstring(tolua_S,(const char*)strItemInfo);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'addPropItem'.",&tolua_err);
 return 0;
#endif
}
Example #22
0
static int tolua_maudio_maudio_AudioManager_play00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"maudio::AudioManager",0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
 !tolua_isnumber(tolua_S,4,1,&tolua_err) ||
 !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  maudio::AudioManager* self = (maudio::AudioManager*)  tolua_tousertype(tolua_S,1,0);
  const std::string filename = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
  const float gain = ((const float)  tolua_tonumber(tolua_S,3,1.0));
  const float pitch = ((const float)  tolua_tonumber(tolua_S,4,1.0));
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'play'",NULL);
#endif
 {
  maudio::Sound* tolua_ret = (maudio::Sound*)  self->play(filename,gain,pitch);
 tolua_pushusertype(tolua_S,(void*)tolua_ret,"maudio::Sound");
 tolua_pushcppstring(tolua_S,(const char*)filename);
 }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'play'.",&tolua_err);
 return 0;
#endif
}
Example #23
0
static int tolua_maudio_maudio_AudioManager_getSound00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"maudio::AudioManager",0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  maudio::AudioManager* self = (maudio::AudioManager*)  tolua_tousertype(tolua_S,1,0);
  const std::string name = ((const std::string)  tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getSound'",NULL);
#endif
 {
  maudio::Sound* tolua_ret = (maudio::Sound*)  self->getSound(name);
 tolua_pushusertype(tolua_S,(void*)tolua_ret,"maudio::Sound");
 tolua_pushcppstring(tolua_S,(const char*)name);
 }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getSound'.",&tolua_err);
 return 0;
#endif
}
static int tolua_Logger_Interface_Logger_Log00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertable(tolua_S,1,"Logger",0,&tolua_err) ||
 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
 !tolua_isusertype(tolua_S,3,"Messagetype",0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string message = ((std::string)  tolua_tocppstring(tolua_S,2,0));
  Messagetype type = *((Messagetype*)  tolua_tousertype(tolua_S,3,0));
 {
  Logger::Log(message,type);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Log'.",&tolua_err);
 return 0;
#endif
}
bool luaval_to_std_string(lua_State* L, int lo, std::string* outValue, const char* funcName)
{
    if (NULL == L || NULL == outValue)
        return false;

    bool ok = true;

    tolua_Error tolua_err;
    if (!tolua_iscppstring(L,lo,0,&tolua_err))
    {
#if COCOS2D_DEBUG >=1
        luaval_to_native_err(L,"#ferror:",&tolua_err,funcName);
#endif
        ok = false;
    }

    if (ok)
    {
        *outValue = tolua_tocppstring(L,lo,NULL);
    }

    return ok;
}
static int tolua__IntensityCEGUI_luaExecutePythonScript00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string script = ((std::string)  tolua_tocppstring(tolua_S,1,0));
 {
  IntensityCEGUI::luaExecutePythonScript(script);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'luaExecutePythonScript'.",&tolua_err);
 return 0;
#endif
}
static int tolua__IntensityCEGUI_queueEntityCreation00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  std::string _class = ((std::string)  tolua_tocppstring(tolua_S,1,0));
 {
  IntensityCEGUI::queueEntityCreation(_class);
 }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'queueEntityCreation'.",&tolua_err);
 return 0;
#endif
}