diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index edee553017..683331595a 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1203,7 +1203,7 @@ const kmMat4& Node::getNodeToParentTransform() const 0, 0, 1, 0, 0, 0, 0, 1}; - kmMat4Multiply(&_transform, &skewMatrix, &_transform); + kmMat4Multiply(&_transform, &_transform, &skewMatrix); // adjust anchor point if (!_anchorPointInPoints.equals(Point::ZERO)) diff --git a/cocos/2d/cocos2d.vcxproj b/cocos/2d/cocos2d.vcxproj index d84fcac426..827704b4ad 100644 --- a/cocos/2d/cocos2d.vcxproj +++ b/cocos/2d/cocos2d.vcxproj @@ -322,9 +322,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou - - - @@ -534,9 +531,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou - - - diff --git a/cocos/2d/cocos2d.vcxproj.filters b/cocos/2d/cocos2d.vcxproj.filters index 1df2150ea2..e7e447cb45 100644 --- a/cocos/2d/cocos2d.vcxproj.filters +++ b/cocos/2d/cocos2d.vcxproj.filters @@ -587,15 +587,6 @@ renderer - - renderer - - - renderer - - - renderer - renderer @@ -1215,15 +1206,6 @@ renderer - - renderer - - - renderer - - - renderer - renderer diff --git a/cocos/scripting/auto-generated b/cocos/scripting/auto-generated index fd61548d46..f7232cc118 160000 --- a/cocos/scripting/auto-generated +++ b/cocos/scripting/auto-generated @@ -1 +1 @@ -Subproject commit fd61548d4697e68b5f893bdb919ab0667af26096 +Subproject commit f7232cc1184f84b6a47cc2a44aaf045bf1a87c68 diff --git a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp index 2d12cd3522..3fde8293b7 100644 --- a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp +++ b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp @@ -32,11 +32,10 @@ static std::function createFunctions[] = { CL(IterateSpriteSheetForLoop), - CL(IterateSpriteSheetCArray), CL(IterateSpriteSheetIterator), + CL(IterateSpriteSheetForEach), CL(CallFuncsSpriteSheetForEach), - CL(CallFuncsSpriteSheetCMacro), CL(AddSprite), CL(AddSpriteSheet), @@ -312,43 +311,6 @@ const char* IterateSpriteSheetForLoop::testName() return "Iterator: C++11 for loop"; } -//////////////////////////////////////////////////////// -// -// IterateSpriteSheetCArray -// -//////////////////////////////////////////////////////// -void IterateSpriteSheetCArray::update(float dt) -{ - // iterate using fast enumeration protocol - auto& children = batchNode->getChildren(); -// Object* object = NULL; - - CC_PROFILER_START(this->profilerName()); - -//FIXME: James CCARRAY_FOREACH(children, object) -// { -// auto sprite = static_cast(object); -// sprite->setVisible(false); -// } - - CC_PROFILER_STOP(this->profilerName()); -} - - -std::string IterateSpriteSheetCArray::title() const -{ - return "Iterate SpriteSheet"; -} - -std::string IterateSpriteSheetCArray::subtitle() const -{ - return "Iterate children using C Array API. See console"; -} - -const char* IterateSpriteSheetCArray::testName() -{ - return "Iterator: CC_ARRAY_FOREACH"; -} //////////////////////////////////////////////////////// // @@ -387,6 +349,43 @@ const char* IterateSpriteSheetIterator::testName() return "Iterator: begin(), end()"; } +//////////////////////////////////////////////////////// +// +// IterateSpriteSheetForEach +// +//////////////////////////////////////////////////////// +void IterateSpriteSheetForEach::update(float dt) +{ + // iterate using fast enumeration protocol + auto& children = batchNode->getChildren(); + + CC_PROFILER_START(this->profilerName()); + + std::for_each(std::begin(children), std::end(children), [](Node *child) { + auto sprite = static_cast(child); + sprite->setVisible(false); + }); + + CC_PROFILER_STOP(this->profilerName()); +} + + +std::string IterateSpriteSheetForEach::title() const +{ + return "Iterate SpriteSheet"; +} + +std::string IterateSpriteSheetForEach::subtitle() const +{ + return "Iterate children using std::for_each(). See console"; +} + +const char* IterateSpriteSheetForEach::testName() +{ + return "Iterator: std::for_each()"; +} + + //////////////////////////////////////////////////////// // // CallFuncsSpriteSheetForEach @@ -428,38 +427,6 @@ const char* CallFuncsSpriteSheetForEach::testName() return "Map: std::for_each"; } -//////////////////////////////////////////////////////// -// -// CallFuncsSpriteSheetCMacro -// -//////////////////////////////////////////////////////// -void CallFuncsSpriteSheetCMacro::update(float dt) -{ - // iterate using fast enumeration protocol - auto& children = batchNode->getChildren(); - - CC_PROFILER_START(this->profilerName()); - -//FIXME: James arrayMakeObjectsPerformSelector(children, getPosition, Node*); - - CC_PROFILER_STOP(this->profilerName()); -} - - -std::string CallFuncsSpriteSheetCMacro::title() const -{ - return "'map' functional call"; -} - -std::string CallFuncsSpriteSheetCMacro::subtitle() const -{ - return "Using 'arrayMakeObjectsPerformSelector'. See console"; -} - -const char* CallFuncsSpriteSheetCMacro::testName() -{ - return "Map: arrayMakeObjectsPerformSelector"; -} //////////////////////////////////////////////////////// // // AddRemoveSpriteSheet diff --git a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.h b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.h index 5e4fc4c317..bd641cc232 100644 --- a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.h +++ b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceNodeChildrenTest.h @@ -83,10 +83,10 @@ public: virtual const char* testName(); }; -class IterateSpriteSheetCArray : public IterateSpriteSheet +class IterateSpriteSheetForEach : public IterateSpriteSheet { public: - CREATE_FUNC(IterateSpriteSheetCArray); + CREATE_FUNC(IterateSpriteSheetForEach); virtual void update(float dt); @@ -95,6 +95,7 @@ public: virtual const char* testName(); }; + class AddRemoveSpriteSheet : public NodeChildrenMainScene { public: @@ -126,18 +127,6 @@ public: virtual const char* testName(); }; -class CallFuncsSpriteSheetCMacro : public IterateSpriteSheet -{ -public: - CREATE_FUNC(CallFuncsSpriteSheetCMacro); - - virtual void update(float dt); - - virtual std::string title() const override; - virtual std::string subtitle() const override; - virtual const char* testName(); -}; - /// class AddSprite : public AddRemoveSpriteSheet diff --git a/samples/Cpp/TestCpp/Classes/ShaderTest/ShaderTest2.h b/samples/Cpp/TestCpp/Classes/ShaderTest/ShaderTest2.h index 7266b552e7..9b63b46a27 100644 --- a/samples/Cpp/TestCpp/Classes/ShaderTest/ShaderTest2.h +++ b/samples/Cpp/TestCpp/Classes/ShaderTest/ShaderTest2.h @@ -10,7 +10,7 @@ class ShaderTestDemo2 : public BaseTest { public: ShaderTestDemo2(void); - virtual std::string title() { return "Shader Sprite!";} + virtual std::string title() const { return "Shader Sprite!";} void restartCallback(Object* sender); void nextCallback(Object* sender); void backCallback(Object* sender); @@ -29,7 +29,7 @@ public: CREATE_FUNC(NormalSpriteTest); NormalSpriteTest(); - virtual std::string subtitle() {return "NormalSpriteTest";} + virtual std::string subtitle() const {return "NormalSpriteTest";} }; class GreyScaleSpriteTest : public ShaderTestDemo2 @@ -38,7 +38,7 @@ public: CREATE_FUNC(GreyScaleSpriteTest); GreyScaleSpriteTest(); - virtual std::string subtitle() {return "GreyScaleSpriteTest";} + virtual std::string subtitle() const {return "GreyScaleSpriteTest";} }; class BlurSpriteTest : public ShaderTestDemo2 @@ -47,7 +47,7 @@ public: CREATE_FUNC(BlurSpriteTest); BlurSpriteTest(); - virtual std::string subtitle() {return "BlurSpriteTest";} + virtual std::string subtitle() const {return "BlurSpriteTest";} }; class NoiseSpriteTest : public ShaderTestDemo2 @@ -55,7 +55,7 @@ class NoiseSpriteTest : public ShaderTestDemo2 public: CREATE_FUNC(NoiseSpriteTest); NoiseSpriteTest(); - virtual std::string subtitle() {return "NoiseSpriteTest";} + virtual std::string subtitle() const {return "NoiseSpriteTest";} }; class EdgeDetectionSpriteTest : public ShaderTestDemo2 @@ -64,7 +64,7 @@ public: CREATE_FUNC(EdgeDetectionSpriteTest); EdgeDetectionSpriteTest(); - virtual std::string subtitle() {return "EdgeDetectionSpriteTest";} + virtual std::string subtitle() const {return "EdgeDetectionSpriteTest";} }; class BloomSpriteTest : public ShaderTestDemo2 @@ -73,7 +73,7 @@ public: CREATE_FUNC(BloomSpriteTest); BloomSpriteTest(); - virtual std::string subtitle() {return "BloomSpriteTest";} + virtual std::string subtitle() const {return "BloomSpriteTest";} }; class LensFlareSpriteTest : public ShaderTestDemo2 @@ -82,7 +82,7 @@ public: CREATE_FUNC(LensFlareSpriteTest); LensFlareSpriteTest(); - virtual std::string subtitle() {return "LensFlareSpriteTest";} + virtual std::string subtitle() const {return "LensFlareSpriteTest";} }; class CelShadingSpriteTest : public ShaderTestDemo2 @@ -91,7 +91,7 @@ public: CREATE_FUNC(CelShadingSpriteTest); CelShadingSpriteTest(); - virtual std::string subtitle() {return "CelShadingSpriteTest";} + virtual std::string subtitle() const {return "CelShadingSpriteTest";} }; #endif \ No newline at end of file diff --git a/tools/bindings-generator b/tools/bindings-generator index 2385ac363e..a8e5123121 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit 2385ac363e94068c4b888f0c9d7730c88f52dfc9 +Subproject commit a8e5123121a4c537bfa9e79f7adb981c17b18e6e