From 3d222ab73a0c175c3e5ab7765ac3adcf1c7ebd69 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Mon, 11 Aug 2014 01:31:04 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Camera.lua | 83 +++ .../scripting/lua-bindings/auto/api/Node.lua | 11 + .../auto/api/lua_cocos2dx_auto_api.lua | 5 + .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 648 +++++++++++++++++- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 15 + 5 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 cocos/scripting/lua-bindings/auto/api/Camera.lua diff --git a/cocos/scripting/lua-bindings/auto/api/Camera.lua b/cocos/scripting/lua-bindings/auto/api/Camera.lua new file mode 100644 index 0000000000..af10889528 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/Camera.lua @@ -0,0 +1,83 @@ + +-------------------------------- +-- @module Camera +-- @extend Node +-- @parent_module cc + +-------------------------------- +-- @function [parent=#Camera] getProjectionMatrix +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- @function [parent=#Camera] getViewProjectionMatrix +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- @function [parent=#Camera] getViewMatrix +-- @param self +-- @return mat4_table#mat4_table ret (return value: mat4_table) + +-------------------------------- +-- @function [parent=#Camera] getCameraFlag +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- @function [parent=#Camera] getType +-- @param self +-- @return int#int ret (return value: int) + +-------------------------------- +-- @function [parent=#Camera] lookAt +-- @param self +-- @param #vec3_table vec3 +-- @param #vec3_table vec3 + +-------------------------------- +-- @function [parent=#Camera] setCameraFlag +-- @param self +-- @param #int cameraflag + +-------------------------------- +-- @function [parent=#Camera] unproject +-- @param self +-- @param #size_table size +-- @param #vec3_table vec3 +-- @param #vec3_table vec3 + +-------------------------------- +-- @function [parent=#Camera] create +-- @param self +-- @return Camera#Camera ret (return value: cc.Camera) + +-------------------------------- +-- @function [parent=#Camera] createPerspective +-- @param self +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @return Camera#Camera ret (return value: cc.Camera) + +-------------------------------- +-- @function [parent=#Camera] createOrthographic +-- @param self +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @return Camera#Camera ret (return value: cc.Camera) + +-------------------------------- +-- @function [parent=#Camera] getVisitingCamera +-- @param self +-- @return Camera#Camera ret (return value: cc.Camera) + +-------------------------------- +-- @function [parent=#Camera] setPosition3D +-- @param self +-- @param #vec3_table vec3 + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index f07a3b0682..78ed3e036e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -86,6 +86,11 @@ -- @param self -- @param #unsigned char char +-------------------------------- +-- @function [parent=#Node] getCameraMask +-- @param self +-- @return unsigned short#unsigned short ret (return value: unsigned short) + -------------------------------- -- @function [parent=#Node] setRotation -- @param self @@ -125,6 +130,12 @@ -- @param self -- @param #int int +-------------------------------- +-- @function [parent=#Node] setCameraMask +-- @param self +-- @param #unsigned short short +-- @param #bool bool + -------------------------------- -- @function [parent=#Node] getTag -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 3423d16801..2656af7e64 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -101,6 +101,11 @@ -- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module +-------------------------------------------------------- +-- the cc Camera +-- @field [parent=#cc] Camera#Camera Camera preloaded module + + -------------------------------------------------------- -- the cc EventListenerTouchOneByOne -- @field [parent=#cc] EventListenerTouchOneByOne#EventListenerTouchOneByOne EventListenerTouchOneByOne preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index b2401904b6..098b261d26 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -4282,6 +4282,50 @@ int lua_cocos2dx_Node_updateDisplayedOpacity(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_getCameraMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned short ret = cobj->getCameraMask(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getCameraMask",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getCameraMask'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_setRotation(lua_State* tolua_S) { int argc = 0; @@ -4651,6 +4695,65 @@ int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_setCameraMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned short arg0; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0); + return 0; + } + if (argc == 2) + { + unsigned short arg0; + bool arg1; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCameraMask",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCameraMask'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_getTag(lua_State* tolua_S) { int argc = 0; @@ -9731,6 +9834,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"isIgnoreAnchorPointForPosition",lua_cocos2dx_Node_isIgnoreAnchorPointForPosition); tolua_function(tolua_S,"getChildByName",lua_cocos2dx_Node_getChildByName); tolua_function(tolua_S,"updateDisplayedOpacity",lua_cocos2dx_Node_updateDisplayedOpacity); + tolua_function(tolua_S,"getCameraMask",lua_cocos2dx_Node_getCameraMask); tolua_function(tolua_S,"setRotation",lua_cocos2dx_Node_setRotation); tolua_function(tolua_S,"setScaleZ",lua_cocos2dx_Node_setScaleZ); tolua_function(tolua_S,"setScaleY",lua_cocos2dx_Node_setScaleY); @@ -9739,6 +9843,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); + tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform); @@ -18437,6 +18542,544 @@ int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getProjectionMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getProjectionMatrix(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getProjectionMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getProjectionMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getViewProjectionMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getViewProjectionMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getViewProjectionMatrix(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getViewProjectionMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewProjectionMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getViewMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getViewMatrix(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getViewMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getViewMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getCameraFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getCameraFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getCameraFlag(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getCameraFlag",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getCameraFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_getType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_getType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_lookAt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_lookAt'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Vec3 arg0; + cocos2d::Vec3 arg1; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Camera:lookAt"); + + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.Camera:lookAt"); + if(!ok) + return 0; + cobj->lookAt(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:lookAt",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_lookAt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_setCameraFlag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_setCameraFlag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::CameraFlag arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Camera:setCameraFlag"); + if(!ok) + return 0; + cobj->setCameraFlag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:setCameraFlag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_setCameraFlag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_unproject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_unproject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + cocos2d::Size arg0; + cocos2d::Vec3* arg1; + cocos2d::Vec3* arg2; + + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Camera:unproject"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Vec3",&arg1); + + ok &= luaval_to_object(tolua_S, 4, "cc.Vec3",&arg2); + if(!ok) + return 0; + cobj->unproject(arg0, arg1, arg2); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:unproject",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_unproject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Camera_create(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,"cc.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Camera* ret = cocos2d::Camera::create(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_createPerspective(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,"cc.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + double arg3; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:createPerspective"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createPerspective"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createPerspective"); + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createPerspective"); + if(!ok) + return 0; + cocos2d::Camera* ret = cocos2d::Camera::createPerspective(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createPerspective",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createPerspective'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_createOrthographic(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,"cc.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + double arg0; + double arg1; + double arg2; + double arg3; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:createOrthographic"); + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:createOrthographic"); + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:createOrthographic"); + ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:createOrthographic"); + if(!ok) + return 0; + cocos2d::Camera* ret = cocos2d::Camera::createOrthographic(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:createOrthographic",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_createOrthographic'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Camera_getVisitingCamera(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,"cc.Camera",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Camera* ret = cocos2d::Camera::getVisitingCamera(); + object_to_luaval(tolua_S, "cc.Camera",(cocos2d::Camera*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Camera:getVisitingCamera",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_getVisitingCamera'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Camera_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Camera)"); + return 0; +} + +int lua_register_cocos2dx_Camera(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Camera"); + tolua_cclass(tolua_S,"Camera","cc.Camera","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Camera"); + tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix); + tolua_function(tolua_S,"getViewProjectionMatrix",lua_cocos2dx_Camera_getViewProjectionMatrix); + tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); + tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag); + tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType); + tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt); + tolua_function(tolua_S,"setCameraFlag",lua_cocos2dx_Camera_setCameraFlag); + tolua_function(tolua_S,"unproject",lua_cocos2dx_Camera_unproject); + tolua_function(tolua_S,"create", lua_cocos2dx_Camera_create); + tolua_function(tolua_S,"createPerspective", lua_cocos2dx_Camera_createPerspective); + tolua_function(tolua_S,"createOrthographic", lua_cocos2dx_Camera_createOrthographic); + tolua_function(tolua_S,"getVisitingCamera", lua_cocos2dx_Camera_getVisitingCamera); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Camera).name(); + g_luaType[typeName] = "cc.Camera"; + g_typeCast["Camera"] = "cc.Camera"; + return 1; +} + int lua_cocos2dx_EventListenerTouchOneByOne_isSwallowTouches(lua_State* tolua_S) { int argc = 0; @@ -65159,7 +65802,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_SpriteBatchNode(tolua_S); lua_register_cocos2dx_Label(tolua_S); lua_register_cocos2dx_Application(tolua_S); - lua_register_cocos2dx_DelayTime(tolua_S); + lua_register_cocos2dx_Camera(tolua_S); lua_register_cocos2dx_LabelAtlas(tolua_S); lua_register_cocos2dx_AttachNode(tolua_S); lua_register_cocos2dx_ParticleSnow(tolua_S); @@ -65247,6 +65890,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionCrossFade(tolua_S); lua_register_cocos2dx_Ripple3D(tolua_S); lua_register_cocos2dx_Lens3D(tolua_S); + lua_register_cocos2dx_Animation(tolua_S); lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); @@ -65260,6 +65904,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EaseCircleActionOut(tolua_S); lua_register_cocos2dx_TransitionProgressInOut(tolua_S); lua_register_cocos2dx_EaseCubicActionInOut(tolua_S); + lua_register_cocos2dx_DelayTime(tolua_S); lua_register_cocos2dx_EaseBackIn(tolua_S); lua_register_cocos2dx_SplitRows(tolua_S); lua_register_cocos2dx_Follow(tolua_S); @@ -65272,7 +65917,6 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TransitionZoomFlipY(tolua_S); lua_register_cocos2dx_ScaleBy(tolua_S); lua_register_cocos2dx_EventTouch(tolua_S); - lua_register_cocos2dx_Animation(tolua_S); lua_register_cocos2dx_TMXMapInfo(tolua_S); lua_register_cocos2dx_EaseExponentialIn(tolua_S); lua_register_cocos2dx_ReuseGrid(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index bede494edf..fa251a5146 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1559,6 +1559,21 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + + + + + + + + + + + + +