这篇教程C++ tolua_toboolean函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中tolua_toboolean函数的典型用法代码示例。如果您正苦于以下问题:C++ tolua_toboolean函数的具体用法?C++ tolua_toboolean怎么用?C++ tolua_toboolean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了tolua_toboolean函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: tolua_MoviePlayer_MoviePlayer_setLoop00static int tolua_MoviePlayer_MoviePlayer_setLoop00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"MoviePlayer",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isboolean(tolua_S,3,0,&tolua_err) || !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else#endif { MoviePlayer* self = (MoviePlayer*) tolua_tousertype(tolua_S,1,0); bool loop = ((bool) tolua_toboolean(tolua_S,2,0)); bool pingpong = ((bool) tolua_toboolean(tolua_S,3,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setLoop'", NULL);#endif { self->setLoop(loop,pingpong); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'setLoop'.",&tolua_err); return 0;#endif}
开发者ID:frozenbears,项目名称:pxlfkr,代码行数:31,
示例2: Lockbool cPlugin_NewLua::OnExecuteCommand(cPlayer * a_Player, const AStringVector & a_Split){ cCSLock Lock(m_CriticalSection); const char * FnName = GetHookFnName(cPluginManager::HOOK_EXECUTE_COMMAND); ASSERT(FnName != NULL); if (!PushFunction(FnName)) { return false; } tolua_pushusertype(m_LuaState, a_Player, "cPlayer"); // Push the split: lua_createtable(m_LuaState, a_Split.size(), 0); int newTable = lua_gettop(m_LuaState); int index = 1; std::vector<std::string>::const_iterator iter = a_Split.begin(), end = a_Split.end(); while(iter != end) { tolua_pushstring(m_LuaState, (*iter).c_str()); lua_rawseti(m_LuaState, newTable, index); ++iter; ++index; } if (!CallFunction(2, 1, FnName)) { return false; } bool bRetVal = (tolua_toboolean(m_LuaState, -1, 0) > 0); lua_pop(m_LuaState, 1); return bRetVal;}
开发者ID:l0ud,项目名称:MCServer,代码行数:34,
示例3: tolua_maudio_maudio_AudioManager_play01static 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);}
开发者ID:minsulander,项目名称:moon,代码行数:34,
示例4: tolua_PressurePlateTile_PressurePlateTile_setState00static int tolua_PressurePlateTile_PressurePlateTile_setState00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"PressurePlateTile",0,&tolua_err) || !tolua_isboolean(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); bool activated = ((bool) tolua_toboolean(tolua_S,2,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setState'", NULL);#endif { self->setState(activated); } } return 0;#ifndef TOLUA_RELEASEtolua_lerror: tolua_error(tolua_S,"#ferror in function 'setState'.",&tolua_err); return 0;#endif}
开发者ID:jefrsilva,项目名称:AssembleeKQJ,代码行数:29,
示例5: tolua_XGameStateManger_XGameStateManger_SetJoyStickStates00static int tolua_XGameStateManger_XGameStateManger_SetJoyStickStates00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"XGameStateManger",0,&tolua_err) || !tolua_isnumber(tolua_S,2,0,&tolua_err) || !tolua_isboolean(tolua_S,3,0,&tolua_err) || !tolua_isnoobj(tolua_S,4,&tolua_err) ) goto tolua_lerror; else#endif { unsigned char byType = ((unsigned char) tolua_tonumber(tolua_S,2,0)); bool bActive = ((bool) tolua_toboolean(tolua_S,3,0)); { XGameStateManger::SetJoyStickStates(byType,bActive); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'SetJoyStickStates'.",&tolua_err); return 0;#endif}
开发者ID:SLS-ACT,项目名称:TeamTest,代码行数:27,
示例6: lua_cocos2dx_addSearchPathstatic int lua_cocos2dx_addSearchPath(lua_State* L){ if (nullptr == L) return 0; int argc = lua_gettop(L); #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err;#endif if (2 == argc) {#if COCOS2D_DEBUG >= 1 if (!tolua_isstring(L, 1, 0, &tolua_err) || !tolua_isboolean(L, 2, 0, &tolua_err)) goto tolua_lerror;#endif std::string pathToSave = tolua_tostring(L, 1, ""); bool before = tolua_toboolean(L, 2, 0); FileUtils::getInstance()->addSearchPath(pathToSave, before); return 0; } CCLOG("'addSearchPath' function wrong number of arguments: %d, was expecting %d/n", argc, 2); return 0;#if COCOS2D_DEBUG >= 1tolua_lerror: tolua_error(L,"#ferror in function 'addSearchPath'.",&tolua_err); return 0;#endif}
开发者ID:kakyoism,项目名称:cocos2dx-IntegrationDemo,代码行数:33,
示例7: tolua_maudio_maudio_Sound_setLooping00static int tolua_maudio_maudio_Sound_setLooping00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"maudio::Sound",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else#endif { maudio::Sound* self = (maudio::Sound*) tolua_tousertype(tolua_S,1,0); const bool value = ((const bool) tolua_toboolean(tolua_S,2,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setLooping'",NULL);#endif { self->setLooping(value); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'setLooping'.",&tolua_err); return 0;#endif}
开发者ID:minsulander,项目名称:moon,代码行数:29,
示例8: tolua_toexport_myClass_set00/* method: set of class myClass */static int tolua_toexport_myClass_set00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"myClass",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else#endif { myClass* self = (myClass*) tolua_tousertype(tolua_S,1,0); bool value = ((bool) tolua_toboolean(tolua_S,2,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set'",NULL);#endif { self->set(value); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'set'.",&tolua_err); return 0;#endif}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:30,
示例9: tolua_CCGUI_CCUtil_setNodePri00static int tolua_CCGUI_CCUtil_setNodePri00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"CCUtil",0,&tolua_err) || !tolua_isusertype(tolua_S,2,"CCNode",0,&tolua_err) || !tolua_isnumber(tolua_S,3,0,&tolua_err) || !tolua_isboolean(tolua_S,4,0,&tolua_err) || !tolua_isnoobj(tolua_S,5,&tolua_err) ) goto tolua_lerror; else#endif { CCNode* node = ((CCNode*) tolua_tousertype(tolua_S,2,0)); int pri = ((int) tolua_tonumber(tolua_S,3,0)); bool isSwallow = ((bool) tolua_toboolean(tolua_S,4,0)); { CCUtil::setNodePri(node,pri,isSwallow); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'setNodePri'.",&tolua_err); return 0;#endif}
开发者ID:JoeHu,项目名称:ccgui,代码行数:29,
示例10: tolua_highlight_regionstatic int tolua_highlight_region(lua_State * L){ region *r = (region *)tolua_tousertype(L, 1, 0); int select = tolua_toboolean(L, 2, 0); highlight_region(r, select); return 0;}
开发者ID:CTD1,项目名称:eressea-server-bugfixing,代码行数:7,
示例11: tolua_lua_cocos2dx_userext_LuaValueList_pushBoolean00static int tolua_lua_cocos2dx_userext_LuaValueList_pushBoolean00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"LuaValueList",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else#endif { LuaValueList* self = (LuaValueList*) tolua_tousertype(tolua_S,1,0); bool val = ((bool) tolua_toboolean(tolua_S,2,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'pushBoolean'", NULL);#endif { self->pushBoolean(val); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'pushBoolean'.",&tolua_err); return 0;#endif}
开发者ID:RayRiver,项目名称:misc,代码行数:29,
示例12: tolua_Cocos2d_Node_setTouchEnabledstatic int tolua_Cocos2d_Node_setTouchEnabled(lua_State* tolua_S){#if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else#endif { Node* node = static_cast<cocos2d::Node*>(tolua_tousertype(tolua_S,1,0)); bool value = ((bool) tolua_toboolean(tolua_S,2,0));#if COCOS2D_DEBUG >= 1 if (!node) tolua_error(tolua_S,"invalid 'self' in function 'setTouchEnabled'", nullptr);#endif { auto mng = LuaNodeManager::getInstance(); auto lnode = mng->getLuaNodeByNode(node, value); if (!lnode) { return 0; } lnode->setLuaTouchEnabled(value); } } return 0;#if COCOS2D_DEBUG >= 1tolua_lerror: tolua_error(tolua_S,"#ferror in function 'setTouchEnabled'.",&tolua_err); return 0;#endif}
开发者ID:JackTongy,项目名称:shared,代码行数:34,
示例13: tolua_MessageHandler_setReadystatic int tolua_MessageHandler_setReady(lua_State *tolua_S){#ifndef TOLUA_TXGUI_RELEASE tolua_Error tolua_err; if( !tolua_isusertype(tolua_S,1,"MessageHandler",0,&tolua_err) || !tolua_isboolean(tolua_S, 2, 0, &tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) { tolua_error(tolua_S,"#ferror in function 'MessageHandler::setReady'",&tolua_err); return 0; }#endif MessageHandler* self = (MessageHandler*)tolua_tousertype(tolua_S,1,0); if (self) { bool bReady = tolua_toboolean(tolua_S, 2, 0) != 0; /// send get room list request PPVEMessage::Get()->setReady(bReady); } return 1;}
开发者ID:JamShan,项目名称:xcode_jifengyongzhezhuan,代码行数:26,
示例14: tolua_CCGUI_CCValue_putBool00static int tolua_CCGUI_CCValue_putBool00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"CCValue",0,&tolua_err) || !tolua_isboolean(tolua_S,2,0,&tolua_err) || !tolua_isnoobj(tolua_S,3,&tolua_err) ) goto tolua_lerror; else#endif { CCValue* self = (CCValue*) tolua_tousertype(tolua_S,1,0); bool b = ((bool) tolua_toboolean(tolua_S,2,0));#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'putBool'", NULL);#endif { self->putBool(b); } } return 0;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'putBool'.",&tolua_err); return 0;#endif}
开发者ID:JoeHu,项目名称:ccgui,代码行数:29,
示例15: tolua_cocos2d_CCBProxy_readCCBFromFilestatic int tolua_cocos2d_CCBProxy_readCCBFromFile(lua_State* tolua_S){ if (NULL == tolua_S) return 0; int argc = 0; CCBProxy* self = nullptr; const char* ccbFilePath = nullptr; CCBReader* ccbReader = nullptr; bool setOwner = false; Node* tolua_ret = nullptr; int ID = 0; int* luaID = nullptr; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; if (!tolua_isusertype(tolua_S,1,"cc.CCBProxy",0,&tolua_err)) goto tolua_lerror;#endif self = static_cast<CCBProxy*>(tolua_tousertype(tolua_S,1,0)); #if COCOS2D_DEBUG >= 1 if (nullptr == self) { tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_CCBProxy_readCCBFromFile'/n", NULL); return 0; }#endif argc = lua_gettop(tolua_S) - 1; if (2 == argc || 3 == argc) {#if COCOS2D_DEBUG >= 1 if (!tolua_isstring(tolua_S, 2, 0, &tolua_err)|| !tolua_isusertype(tolua_S,3,"cc.CCBReader",0,&tolua_err)|| !tolua_isboolean(tolua_S,4,1,&tolua_err ) ) goto tolua_lerror;#endif ccbFilePath = ((const char*) tolua_tostring(tolua_S,2,0)); ccbReader = ((CCBReader*) tolua_tousertype(tolua_S,3,0)); setOwner = (bool) tolua_toboolean(tolua_S,4,-1); tolua_ret = (Node*) self->readCCBFromFile(ccbFilePath, ccbReader, setOwner); ID = (tolua_ret) ? (int)tolua_ret->_ID : -1; luaID = (tolua_ret) ? &tolua_ret->_luaID : NULL; toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)tolua_ret,"cc.Node"); return 1; } CCLOG("%s function of CCBProxy has wrong number of arguments: %d, was expecting %d/n", "cc.CCBReader:readCCBFromFile", argc, 2); return 0; #if COCOS2D_DEBUG >= 1tolua_lerror: tolua_error(tolua_S,"#ferror in function 'tolua_cocos2d_CCBProxy_readCCBFromFile'.",&tolua_err); return 0;#endif}
开发者ID:AnySDK,项目名称:Sample_Lua,代码行数:59,
示例16: tolua_region_set_blockedstatic int tolua_region_set_blocked(lua_State * L){ region *self = (region *)tolua_tousertype(L, 1, 0); bool flag = !!tolua_toboolean(L, 2, 1); if (flag) self->flags |= BLD_WORKING; else self->flags &= ~BLD_WORKING; return 0;}
开发者ID:stm2,项目名称:server,代码行数:8,
示例17: tolua_select_regionstatic int tolua_select_region(lua_State * L){ region *r = tolua_tousertype(L, 1, 0); int select = tolua_toboolean(L, 2, 0); if (current_state && r) { select_coordinate(current_state->selected, r->x, r->y, select); } return 0;}
开发者ID:eressea,项目名称:server,代码行数:9,
示例18: tolua_select_coordinatestatic int tolua_select_coordinate(lua_State * L){ int nx = (int)tolua_tonumber(L, 1, 0); int ny = (int)tolua_tonumber(L, 2, 0); int select = tolua_toboolean(L, 3, 0); if (current_state) { select_coordinate(current_state->selected, nx, ny, select); } return 0;}
开发者ID:CTD1,项目名称:eressea-server-bugfixing,代码行数:10,
示例19: tolua_set_FADEUTILITYPARAMS_bClearOverridestatic int tolua_set_FADEUTILITYPARAMS_bClearOverride (lua_State* tolua_S) { FADEUTILITYPARAMS*self = (FADEUTILITYPARAMS*) tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bClearOverride'",NULL);#endif#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (!tolua_isboolean(tolua_S,2,0,&tolua_err)) tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);#endif self->bClearOverride=(( bool) tolua_toboolean(tolua_S,2,0)); return 0;}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:11,
示例20: tolua_ShowWaitingLayerstatic int tolua_ShowWaitingLayer(lua_State *tolua_S){#ifndef TOLUA_TXGUI_RELEASE bool bHasBooleanParam = false; bool bHasFloatParam = false; bool bShowRightNow = true; float fHideTimer = 0; tolua_Error tolua_err; if (tolua_isboolean(tolua_S, 1, 0, &tolua_err)) { bHasBooleanParam = true; bShowRightNow = tolua_toboolean(tolua_S, 1, 0); if (tolua_isnumber(tolua_S, 2, 0, &tolua_err)) { bHasFloatParam = true; fHideTimer = tolua_tonumber(tolua_S, 2, 0); } } int lastIndex = 1; if (bHasBooleanParam) { lastIndex ++; if (bHasFloatParam) { lastIndex++; } } if(!tolua_isnoobj(tolua_S, lastIndex, &tolua_err)) { tolua_error(tolua_S,"#ferror in function 'ShowWaitingLayer'",&tolua_err); return 0; }#endif if (false == bHasBooleanParam) { ShowWaitingLayer(); } else { if (false == bHasFloatParam) { ShowWaitingLayer(bShowRightNow); } else { ShowWaitingLayer(bShowRightNow,fHideTimer); } } return 0;}
开发者ID:niuzb,项目名称:hellopetclient,代码行数:54,
示例21: tolua_region_set_flagstatic int tolua_region_set_flag(lua_State * L){ region *self = (region *)tolua_tousertype(L, 1, 0); int bit = (int)tolua_tonumber(L, 2, 0); int set = tolua_toboolean(L, 3, 1); if (set) self->flags |= (1 << bit); else self->flags &= ~(1 << bit); return 0;}
开发者ID:stm2,项目名称:server,代码行数:12,
示例22: tolua_toQVariant// QVariantQVariant tolua_toQVariant(lua_State* L, int lo, void* def) { if (lua_gettop(L) < abs(lo)) { return QVariant(); }; int type = lua_type(L, lo); switch (type) { case LUA_TNIL: return QVariant(); case LUA_TSTRING: return QVariant(tolua_tostring(L, lo, 0)); case LUA_TBOOLEAN: return QVariant(tolua_toboolean(L, lo, 0)==0?false:true); case LUA_TNUMBER: return QVariant(tolua_tonumber(L, lo, 0)); case LUA_TUSERDATA: tolua_Error err; if (tolua_isusertype(L, lo, "QVariant", (int)def, &err)) { return (QVariant)*(QVariant*)tolua_tousertype(L, -1, def); }; lua_pushstring(L, ".QVariant"); lua_gettable(L, lo); if (lua_isfunction(L, -1)) { lua_pushvalue(L, lo); lua_call(L, 1, 1); if (tolua_isusertype(L, lua_gettop(L), "QVariant", 0, &err)) { QVariant ret(*((QVariant*)tolua_tousertype(L, -1, def))); lua_pop(L, 1); return ret; }; }; /* fallthrough */ default: ; // wtf? }; return QVariant();};
开发者ID:BackupTheBerlios,项目名称:luaqt-svn,代码行数:53,
示例23: ASSERTbool cPlugin_NewLua::HandleConsoleCommand(const AStringVector & a_Split, cCommandOutputCallback & a_Output){ ASSERT(!a_Split.empty()); CommandMap::iterator cmd = m_ConsoleCommands.find(a_Split[0]); if (cmd == m_ConsoleCommands.end()) { LOGWARNING("Console command handler is registered in cPluginManager but not in cPlugin, wtf? Console command /"%s/", plugin /"%s/".", a_Split[0].c_str(), GetName().c_str() ); return false; } cCSLock Lock(m_CriticalSection); // Push the function to be called: lua_rawgeti(m_LuaState, LUA_REGISTRYINDEX, cmd->second); // same as lua_getref() // Push the split: lua_createtable(m_LuaState, a_Split.size(), 0); int newTable = lua_gettop(m_LuaState); int index = 1; std::vector<std::string>::const_iterator iter = a_Split.begin(), end = a_Split.end(); while(iter != end) { tolua_pushstring(m_LuaState, (*iter).c_str()); lua_rawseti(m_LuaState, newTable, index); ++iter; ++index; } // Call function: int s = lua_pcall(m_LuaState, 1, 2, 0); if (report_errors(m_LuaState, s)) { LOGERROR("Lua error. Stack size: %i", lua_gettop(m_LuaState)); return false; } // Handle return values: if (lua_isstring(m_LuaState, -1)) { AString str = tolua_tocppstring(m_LuaState, -1, ""); a_Output.Out(str); } bool RetVal = (tolua_toboolean(m_LuaState, -2, 0) > 0); lua_pop(m_LuaState, 2); // Pop return values return RetVal;}
开发者ID:l0ud,项目名称:MCServer,代码行数:49,
注:本文中的tolua_toboolean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ tolua_tonumber函数代码示例 C++ tolua_pushusertype函数代码示例 |