int lua_cocos2dx_NetScoket_NetUtil_connect(lua_State* tolua_S) { int argc = 0; NetUtil* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"NetUtil",0,&tolua_err)) goto tolua_lerror; #endif cobj = (NetUtil*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_NetScoket_NetUtil_connect'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 2) { std::string arg0; unsigned int arg1; ok &= luaval_to_std_string(tolua_S, 2,&arg0); ok &= luaval_to_uint32(tolua_S, 3,&arg1); if(!ok) return 0; bool ret = cobj->connect(arg0, arg1); tolua_pushboolean(tolua_S,(bool)ret); return 1; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "connect",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_NetScoket_NetUtil_connect'.",&tolua_err); #endif return 0; }
int lua_cocos2dx_cocosdenshion_SimpleAudioEngine_stopEffect(lua_State* tolua_S) { int argc = 0; CocosDenshion::SimpleAudioEngine* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"cc.SimpleAudioEngine",0,&tolua_err)) goto tolua_lerror; #endif cobj = (CocosDenshion::SimpleAudioEngine*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_stopEffect'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 1) { unsigned int arg0; ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.SimpleAudioEngine:stopEffect"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_stopEffect'", nullptr); return 0; } cobj->stopEffect(arg0); lua_settop(tolua_S, 1); return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.SimpleAudioEngine:stopEffect",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_stopEffect'.",&tolua_err); #endif return 0; }
int lua_cocos2dx_spine_Skeleton_onDraw(lua_State* tolua_S) { int argc = 0; spine::Skeleton* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"sp.Skeleton",0,&tolua_err)) goto tolua_lerror; #endif cobj = (spine::Skeleton*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_Skeleton_onDraw'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 2) { cocos2d::Mat4 arg0; unsigned int arg1; ok &= luaval_to_mat4(tolua_S, 2, &arg0, "sp.Skeleton:onDraw"); ok &= luaval_to_uint32(tolua_S, 3,&arg1, "sp.Skeleton:onDraw"); if(!ok) return 0; cobj->onDraw(arg0, arg1); return 0; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "sp.Skeleton:onDraw",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_Skeleton_onDraw'.",&tolua_err); #endif return 0; }
int lua_neo_Loader_setConnectionTimeout(lua_State* tolua_S) { int argc = 0; neo::Loader* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"neo.Loader",0,&tolua_err)) goto tolua_lerror; #endif cobj = (neo::Loader*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_neo_Loader_setConnectionTimeout'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 1) { unsigned int arg0; ok &= luaval_to_uint32(tolua_S, 2,&arg0); if(!ok) return 0; cobj->setConnectionTimeout(arg0); return 0; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setConnectionTimeout",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_neo_Loader_setConnectionTimeout'.",&tolua_err); #endif return 0; }
int lua_cocos2dx_tui_TuiUtil_createAnimWithNameAndNum(lua_State* tolua_S) { int argc = 0; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertable(tolua_S,1,"tui.TuiUtil",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; if (argc == 4) { const char* arg0; int arg1; double arg2; unsigned int arg3; std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1); ok &= luaval_to_number(tolua_S, 4,&arg2); ok &= luaval_to_uint32(tolua_S, 5,&arg3); if(!ok) return 0; cocos2d::Animation* ret = cocos2d::tui::TuiUtil::createAnimWithNameAndNum(arg0, arg1, arg2, arg3); object_to_luaval<cocos2d::Animation>(tolua_S, "cc.Animation",(cocos2d::Animation*)ret); return 1; } CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "createAnimWithNameAndNum",argc, 4); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_tui_TuiUtil_createAnimWithNameAndNum'.",&tolua_err); #endif return 0; }
int lua_PluginInMobiLua_PluginInMobi_setIncome(lua_State* tolua_S) { int argc = 0; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertable(tolua_S,1,"sdkbox.PluginInMobi",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; if (argc == 1) { unsigned int arg0; ok &= luaval_to_uint32(tolua_S, 2,&arg0, "sdkbox.PluginInMobi:setIncome"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_PluginInMobiLua_PluginInMobi_setIncome'", nullptr); return 0; } sdkbox::PluginInMobi::setIncome(arg0); lua_settop(tolua_S, 1); return 1; } luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "sdkbox.PluginInMobi:setIncome",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_PluginInMobiLua_PluginInMobi_setIncome'.",&tolua_err); #endif return 0; }
int tolua_cocos2dx_NVGDrawNode_drawPoints(lua_State* tolua_S) { int argc = 0; cocos2d::extension::NVGDrawNode* self = nullptr; bool ok = true; tolua_Error tolua_err; #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"cc.NVGDrawNode",0,&tolua_err)) goto tolua_lerror; #endif self = (cocos2d::extension::NVGDrawNode*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!self) { tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2dx_NVGDrawNode_drawPoints'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 3) { unsigned int size; luaval_to_uint32(tolua_S, 3, &size, "cc.NVGDrawNode:drawPoints"); if ( size > 0 ) { cocos2d::Vec2* points = new cocos2d::Vec2[size]; if (NULL == points) return 0; for (int i = 0; i < size; i++) { lua_pushnumber(tolua_S,i + 1); lua_gettable(tolua_S,2); if (!tolua_istable(tolua_S,-1, 0, &tolua_err)) { CC_SAFE_DELETE_ARRAY(points); #if COCOS2D_DEBUG >= 1 goto tolua_lerror; #endif } if(!luaval_to_vec2(tolua_S, lua_gettop(tolua_S), &points[i], "cc.NVGDrawNode:drawPoints")) { lua_pop(tolua_S, 1); CC_SAFE_DELETE_ARRAY(points); return 0; } lua_pop(tolua_S, 1); } cocos2d::Color4F arg2; ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.NVGDrawNode:drawPoints"); if(!ok) return 0; self->drawPoints(points, size, arg2); return 0; } } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.NVGDrawNode:drawPoints",argc, 3); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'tolua_cocos2dx_NVGDrawNode_drawPoints'.",&tolua_err); #endif return 0; }
int lua_cocos2dx_NetScoket_NetUtil_callRPC(lua_State* tolua_S) { int argc = 0; NetUtil* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"NetUtil",0,&tolua_err)) goto tolua_lerror; #endif cobj = (NetUtil*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_NetScoket_NetUtil_callRPC'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 4) { std::string arg0; std::string arg1; // const unsigned char* arg2; unsigned int arg3; ok &= luaval_to_std_string(tolua_S, 2,&arg0); ok &= luaval_to_std_string(tolua_S, 3,&arg1); #pragma warning NO CONVERSION TO NATIVE FOR unsigned char*; ///////////// by dong ok &= luaval_to_uint32(tolua_S, 5,&arg3); ///////////// by dong int nLength = arg3; unsigned char* binaryArray = new unsigned char[nLength]; if (NULL == binaryArray) { return 0; } for (int i = 0; i < nLength; i++) { binaryArray[i] = (unsigned char)tolua_tofieldnumber(tolua_S, 4, i+1, 0); CCLOG("s------>%c",binaryArray[i]); } if(!ok) return 0; bool ret = cobj->callRPC(arg0, arg1, binaryArray, arg3); delete [] binaryArray; tolua_pushboolean(tolua_S,(bool)ret); return 1; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "callRPC",argc, 4); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_NetScoket_NetUtil_callRPC'.",&tolua_err); #endif return 0; }
int tolua_cocos2dx_AttackArea_drawPolygon(lua_State* tolua_S) { if (NULL == tolua_S) return 0; int argc = 0; AttackArea* self = nullptr; bool ok = true; tolua_Error tolua_err; #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"AttackArea",0,&tolua_err)) goto tolua_lerror; #endif self = static_cast<AttackArea*>(tolua_tousertype(tolua_S,1,0)); #if COCOS2D_DEBUG >= 1 if (!self) { tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2dx_AttackArea_drawPolygon'", NULL); return 0; } #endif argc = lua_gettop(tolua_S)-1; if (argc == 4) { unsigned int size; luaval_to_uint32(tolua_S, 3, &size, "AttackArea:drawPolygon"); if ( size > 0 ) { cocos2d::Vec2* points = new cocos2d::Vec2[size]; if (NULL == points) return 0; for (int i = 0; i < size; i++) { lua_pushnumber(tolua_S,i + 1); lua_gettable(tolua_S,2); if (!tolua_istable(tolua_S,-1, 0, &tolua_err)) { CC_SAFE_DELETE_ARRAY(points); #if COCOS2D_DEBUG >= 1 goto tolua_lerror; #endif } if(!luaval_to_vec2(tolua_S, lua_gettop(tolua_S), &points[i], "AttackArea:drawPolygon")) { lua_pop(tolua_S, 1); CC_SAFE_DELETE_ARRAY(points); return 0; } lua_pop(tolua_S, 1); } bool arg2; cocos2d::Color4F arg3; ok &= luaval_to_boolean(tolua_S, 4,&arg2, "AttackArea:drawPolygon"); ok &= luaval_to_color4f(tolua_S, 5, &arg3, "AttackArea:drawPolygon"); if(!ok) return 0; self->drawPolygon(points, size, arg2, arg3); CC_SAFE_DELETE_ARRAY(points); return 0; } } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "AttackArea:drawPolygon",argc, 4); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: tolua_error(tolua_S,"#ferror in function 'tolua_cocos2dx_AttackArea_drawPolygon'.",&tolua_err); #endif return 0; }