From d3d8c94c3292d22dccaa5cfbdf5bc8b6751e176c Mon Sep 17 00:00:00 2001 From: zhangbin Date: Wed, 21 May 2014 17:48:46 +0800 Subject: [PATCH 1/7] Update the reference of submodule cocos2d-console. --- tools/cocos2d-console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cocos2d-console b/tools/cocos2d-console index edd24a1dcc..29cfa00a4b 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit edd24a1dcc0d8344038e4d46367c603b2a846ab5 +Subproject commit 29cfa00a4b85f934eefe0b2fae460bd9a55ee345 From f3eb0d772205a5444b4c648204f34583ce552741 Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Thu, 22 May 2014 06:58:05 -0700 Subject: [PATCH 2/7] updated cpp template file --- .../proj.wp8-xaml/HelloCpp/MainPage.xaml.cs | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/templates/cpp-template-default/proj.wp8-xaml/HelloCpp/MainPage.xaml.cs b/templates/cpp-template-default/proj.wp8-xaml/HelloCpp/MainPage.xaml.cs index a4500a00d9..70d50eb5ee 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/HelloCpp/MainPage.xaml.cs +++ b/templates/cpp-template-default/proj.wp8-xaml/HelloCpp/MainPage.xaml.cs @@ -24,6 +24,7 @@ using Microsoft.Phone.Shell; using Windows.UI.Input; using System.Windows.Threading; using Microsoft.Phone.Info; +using Windows.Graphics.Display; namespace PhoneDirect3DXamlAppInterop { @@ -53,7 +54,30 @@ namespace PhoneDirect3DXamlAppInterop { if (m_d3dInterop == null) { - m_d3dInterop = new Direct3DInterop(); + PageOrientation pageOrientation = (PageOrientation)GetValue(OrientationProperty); + DisplayOrientations displayOrientation; + + switch(pageOrientation) + { + case PageOrientation.Portrait: + case PageOrientation.PortraitUp: + displayOrientation = DisplayOrientations.Portrait; + break; + case PageOrientation.PortraitDown: + displayOrientation = DisplayOrientations.PortraitFlipped; + break; + case PageOrientation.Landscape: + case PageOrientation.LandscapeLeft: + displayOrientation = DisplayOrientations.Landscape; + break; + case PageOrientation.LandscapeRight: + displayOrientation = DisplayOrientations.LandscapeFlipped; + break; + default: + displayOrientation = DisplayOrientations.Landscape; + break; + } + m_d3dInterop = new Direct3DInterop(displayOrientation); // Set WindowBounds to size of DrawingSurface m_d3dInterop.WindowBounds = new Windows.Foundation.Size( From 1b3af4be19e62905da936be4e2510f5f5d36416d Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 22 May 2014 22:07:11 +0800 Subject: [PATCH 3/7] move runtime res path --- .../frameworks/runtime-src/Classes/Runtime.cpp | 8 ++++---- .../runtime-src/proj.android/build-cfg.json | 4 ++++ .../runtime-src/proj.win32/HelloLua.vcxproj | 4 ++++ .../{res/debug => runtime/rtres}/Play0.png | Bin .../{res/debug => runtime/rtres}/Play1.png | Bin .../{res/debug => runtime/rtres}/landscape.png | Bin .../{res/debug => runtime/rtres}/portrait.png | Bin .../{res/debug => runtime/rtres}/shine.png | Bin 8 files changed, 12 insertions(+), 4 deletions(-) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/Play0.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/Play1.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/landscape.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/portrait.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/shine.png (100%) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 845dc87798..1c518a5e4a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -106,12 +106,12 @@ public: int designWidth = 1280; int designHeight = 800; Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designWidth,designHeight,ResolutionPolicy::EXACT_FIT); - string playEnbleFile = "res/debug/Play1.png"; - string shineFile = "res/debug/shine.png"; - string backgroundFile = "res/debug/landscape.png"; + string playEnbleFile = "rtres/Play1.png"; + string shineFile = "rtres/shine.png"; + string backgroundFile = "rtres/landscape.png"; if (!ConfigParser::getInstance()->isLanscape()) { - backgroundFile = "res/debug/portrait.png"; + backgroundFile = "rtres/portrait.png"; Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designHeight,designWidth,ResolutionPolicy::EXACT_FIT); } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json index ad111cc1f2..864fbb9975 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json @@ -30,6 +30,10 @@ "from": "../../../config.json", "to": "" }, + { + "from": "../../../runtime/rtres", + "to": "rtres" + }, { "from": "../../cocos2d-x/external/lua/luasocket", "to": "", diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index dc70165991..7b1faa92eb 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -109,9 +109,11 @@ if exist "$(OutDir)\Resource" rd /s /q "$(OutDir)\Resource" mkdir "$(OutDir)\Resource" mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" +mkdir "$(OutDir)\Resource\rtres" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\runtime\rtres" "$(OutDir)\Resource\rtres" /e /Y copy "$(ProjectDir)..\..\..\config.json" "$(OutDir)\Resource\config.json" /Y xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files @@ -165,9 +167,11 @@ if exist "$(OutDir)\Resource" rd /s /q "$(OutDir)\Resource" mkdir "$(OutDir)\Resource" mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" +mkdir "$(OutDir)\Resource\rtres" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\runtime\rtres" "$(OutDir)\Resource\rtres" /e /Y copy "$(ProjectDir)..\..\..\config.json" "$(OutDir)\Resource\config.json" /Y xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files diff --git a/templates/lua-template-runtime/res/debug/Play0.png b/templates/lua-template-runtime/runtime/rtres/Play0.png similarity index 100% rename from templates/lua-template-runtime/res/debug/Play0.png rename to templates/lua-template-runtime/runtime/rtres/Play0.png diff --git a/templates/lua-template-runtime/res/debug/Play1.png b/templates/lua-template-runtime/runtime/rtres/Play1.png similarity index 100% rename from templates/lua-template-runtime/res/debug/Play1.png rename to templates/lua-template-runtime/runtime/rtres/Play1.png diff --git a/templates/lua-template-runtime/res/debug/landscape.png b/templates/lua-template-runtime/runtime/rtres/landscape.png similarity index 100% rename from templates/lua-template-runtime/res/debug/landscape.png rename to templates/lua-template-runtime/runtime/rtres/landscape.png diff --git a/templates/lua-template-runtime/res/debug/portrait.png b/templates/lua-template-runtime/runtime/rtres/portrait.png similarity index 100% rename from templates/lua-template-runtime/res/debug/portrait.png rename to templates/lua-template-runtime/runtime/rtres/portrait.png diff --git a/templates/lua-template-runtime/res/debug/shine.png b/templates/lua-template-runtime/runtime/rtres/shine.png similarity index 100% rename from templates/lua-template-runtime/res/debug/shine.png rename to templates/lua-template-runtime/runtime/rtres/shine.png From 56010488290349801ec5cd6a2490af25bab4231a Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Thu, 22 May 2014 16:34:16 -0300 Subject: [PATCH 4/7] Fixes compiler warnings for mac and ios --- build/cocos2d_tests.xcodeproj/project.pbxproj | 9 --------- cocos/2d/CCFontFreeType.cpp | 12 ++++++------ .../cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp | 2 +- tests/cpp-tests/proj.ios/Info.plist | 2 ++ 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 479ff9081c..4142872d83 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -4022,11 +4022,6 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0510; - TargetAttributes = { - 1ABCA2CC18CD93580087CE3A = { - DevelopmentTeam = NQ596S94Q5; - }; - }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_tests" */; compatibilityVersion = "Xcode 3.2"; @@ -5427,14 +5422,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", CC_TARGET_OS_IPHONE, ); INFOPLIST_FILE = "$(SRCROOT)/../tests/lua-tests/project/proj.ios_mac/ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto"; @@ -5445,14 +5438,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", CC_TARGET_OS_IPHONE, ); INFOPLIST_FILE = "$(SRCROOT)/../tests/lua-tests/project/proj.ios_mac/ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/.. $(SRCROOT)/../cocos/platform/ios $(SRCROOT)/../external $(SRCROOT)/../external/lua/luajit/include $(SRCROOT)/../external/lua/tolua $(SRCROOT)/../cocos/scripting/lua-bindings/manual $(SRCROOT)/../cocos/scripting/lua-bindings/auto"; diff --git a/cocos/2d/CCFontFreeType.cpp b/cocos/2d/CCFontFreeType.cpp index 48ce2d8bba..9e462e7bdf 100644 --- a/cocos/2d/CCFontFreeType.cpp +++ b/cocos/2d/CCFontFreeType.cpp @@ -296,18 +296,18 @@ unsigned char* FontFreeType::getGlyphBitmap(unsigned short theChar, long &outWid break; } - long outlineWidth = (bbox.xMax - bbox.xMin)>>6; - long outlineHeight = (bbox.yMax - bbox.yMin)>>6; + auto outlineWidth = (bbox.xMax - bbox.xMin)>>6; + auto outlineHeight = (bbox.yMax - bbox.yMin)>>6; - long blendWidth = outlineWidth > outWidth ? outlineWidth : outWidth; - long blendHeight = outlineHeight > outHeight ? outlineHeight : outHeight; + auto blendWidth = outlineWidth > outWidth ? outlineWidth : outWidth; + auto blendHeight = outlineHeight > outHeight ? outlineHeight : outHeight; long index,index2; auto blendImage = new unsigned char[blendWidth * blendHeight * 2]; memset(blendImage, 0, blendWidth * blendHeight * 2); - int px = (blendWidth - outlineWidth) / 2; - int py = (blendHeight - outlineHeight) / 2; + auto px = (blendWidth - outlineWidth) / 2; + auto py = (blendHeight - outlineHeight) / 2; for (int x = 0; x < outlineWidth; ++x) { for (int y = 0; y < outlineHeight; ++y) diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 1554538efb..01791d13b0 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -373,7 +373,7 @@ void Effect3DOutline::drawWithSprite(EffectSprite3D* sprite, const Mat4 &transfo glBindBuffer(GL_ARRAY_BUFFER, mesh->getVertexBuffer()); _glProgramState->apply(transform); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh->getIndexBuffer()); - glDrawElements((GLenum)mesh->getPrimitiveType(), mesh->getIndexCount(), (GLenum)mesh->getIndexFormat(), 0); + glDrawElements((GLenum)mesh->getPrimitiveType(), (GLsizei)mesh->getIndexCount(), (GLenum)mesh->getIndexFormat(), 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); glDisable(GL_DEPTH_TEST); diff --git a/tests/cpp-tests/proj.ios/Info.plist b/tests/cpp-tests/proj.ios/Info.plist index 243910bb2a..467758a542 100644 --- a/tests/cpp-tests/proj.ios/Info.plist +++ b/tests/cpp-tests/proj.ios/Info.plist @@ -70,6 +70,8 @@ UIPrerenderedIcon + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeRight From 523d136cc5e0e4af8de3ade9cd35d0d603b719f1 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 22 May 2014 20:30:06 -0500 Subject: [PATCH 5/7] [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 31038df902..088559c3bc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ cocos2d-x-3.1 ??? [FIX] Physics integration: may crashes if remove bodies at physics contact callback [FIX] WP8: orientation is not correct when it is set to portrait [FIX] WP8: fix for precompiled shaders and precompiled headers + [FIX] WP8: template supports orientation cocos2d-x-3.1-rc0 May.18 2014 [NEW] Cocos2dxActivity: Adds a virtual method to load native libraries. From f76e2a5476a92f3cd86bd766700a51f5b7935125 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 23 May 2014 10:00:59 +0800 Subject: [PATCH 6/7] Readd the lua binding for `visit` and modify a requirement for IDE --- tests/lua-tests/src/controller.lua | 6 +++++- tools/tolua/cocos2dx.ini | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/lua-tests/src/controller.lua b/tests/lua-tests/src/controller.lua index 9a9d863513..9304229457 100644 --- a/tests/lua-tests/src/controller.lua +++ b/tests/lua-tests/src/controller.lua @@ -65,4 +65,8 @@ fileUtils:setSearchPaths(searchPaths) local scene = cc.Scene:create() scene:addChild(CreateTestMenu()) -cc.Director:getInstance():runWithScene(scene) +if cc.Director:getInstance():getRunningScene() then + cc.Director:getInstance():replaceScene(scene) +else + cc.Director:getInstance():runWithScene(scene) +end diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 0e182c71e9..c4baaf5154 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -101,7 +101,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS Scheduler::[pause resume unschedule schedule update isTargetPaused isScheduled performFunctionInCocosThread], TextureCache::[addPVRTCImage addImageAsync], Timer::[getSelector createWithScriptHandler], - *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType (g|s)etDelegate onTouch.* onAcc.* onKey.* onRegisterTouchListener], + *::[copyWith.* onEnter.* onExit.* ^description$ getObjectType (g|s)etDelegate onTouch.* onAcc.* onKey.* onRegisterTouchListener], FileUtils::[getFileData getDataFromFile getFullPathCache], Application::[^application.* ^run$], Camera::[getEyeXYZ getCenterXYZ getUpXYZ], From 293ced84c2b919b61dd10ec931c62c67754793c1 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 23 May 2014 03:12:39 +0000 Subject: [PATCH 7/7] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/ClippingNode.lua | 7 +++ .../scripting/lua-bindings/auto/api/Label.lua | 7 +++ .../lua-bindings/auto/api/LabelTTF.lua | 7 +++ .../scripting/lua-bindings/auto/api/Node.lua | 11 ++++ .../lua-bindings/auto/api/NodeGrid.lua | 7 +++ .../lua-bindings/auto/api/ParallaxNode.lua | 7 +++ .../auto/api/ParticleBatchNode.lua | 7 +++ .../lua-bindings/auto/api/ProtectedNode.lua | 7 +++ .../lua-bindings/auto/api/RenderTexture.lua | 7 +++ .../lua-bindings/auto/api/SpriteBatchNode.lua | 7 +++ .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 58 +++++++++++++++++++ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 12 files changed, 133 insertions(+) diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua index 9bba43a5ca..7c6dda1a3d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua @@ -43,4 +43,11 @@ -- @param #cc.Node node -- @return ClippingNode#ClippingNode ret (retunr value: cc.ClippingNode) +-------------------------------- +-- @function [parent=#ClippingNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index 5807c058d6..729a7e8a88 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -301,6 +301,13 @@ -- @param self -- @param #cc.BlendFunc blendfunc +-------------------------------- +-- @function [parent=#Label] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#Label] getScaleX -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua b/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua index a690ccc3e5..bbcc2d8a81 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua @@ -177,6 +177,13 @@ -- @param self -- @return size_table#size_table ret (return value: size_table) +-------------------------------- +-- @function [parent=#LabelTTF] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#LabelTTF] LabelTTF -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index c4c3985ad1..2eb794770b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -315,6 +315,17 @@ -- @param #cc.Component component -- @return bool#bool ret (return value: bool) +-------------------------------- +-- overload function: visit() +-- +-- overload function: visit(cc.Renderer, cc.Mat4, bool) +-- +-- @function [parent=#Node] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#Node] isOpacityModifyRGB -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua index a41680e6a7..f6e6bd8f3e 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua @@ -27,4 +27,11 @@ -- @param self -- @return NodeGrid#NodeGrid ret (return value: cc.NodeGrid) +-------------------------------- +-- @function [parent=#NodeGrid] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua index b58ba189a0..97ddf1b9cb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua @@ -33,6 +33,13 @@ -- @param #int int -- @param #int int +-------------------------------- +-- @function [parent=#ParallaxNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#ParallaxNode] removeChild -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua index 7880c00c57..6d66ed7d85 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua @@ -73,6 +73,13 @@ -- @param #cc.Mat4 mat4 -- @param #bool bool +-------------------------------- +-- @function [parent=#ParticleBatchNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#ParticleBatchNode] reorderChild -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua index 38343b0bf0..c91ad8a83d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua @@ -62,6 +62,13 @@ -- @param self -- @return ProtectedNode#ProtectedNode ret (return value: cc.ProtectedNode) +-------------------------------- +-- @function [parent=#ProtectedNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#ProtectedNode] updateDisplayedOpacity -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua index 41c187bef3..3fc026e3d2 100644 --- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua +++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua @@ -172,6 +172,13 @@ -- @param #cc.Mat4 mat4 -- @param #bool bool +-------------------------------- +-- @function [parent=#RenderTexture] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#RenderTexture] RenderTexture -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua index 1b3f5fce98..9310ee7413 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua @@ -126,6 +126,13 @@ -- @param self -- @return string#string ret (return value: string) +-------------------------------- +-- @function [parent=#SpriteBatchNode] visit +-- @param self +-- @param #cc.Renderer renderer +-- @param #cc.Mat4 mat4 +-- @param #bool bool + -------------------------------- -- @function [parent=#SpriteBatchNode] sortAllChildren -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 5415f2504e..9cb5bedf48 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -6330,6 +6330,63 @@ int lua_cocos2dx_Node_addComponent(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_visit(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_visit'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cobj->visit(); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Renderer* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1); + + if (!ok) { break; } + bool arg2; + ok &= luaval_to_boolean(tolua_S, 4,&arg2); + + if (!ok) { break; } + cobj->visit(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "visit",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_isOpacityModifyRGB(lua_State* tolua_S) { int argc = 0; @@ -9311,6 +9368,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent); + tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB); tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 858c8078c8..fffbcaca5c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1609,6 +1609,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__