diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index d2c2a23610..0223e9e62a 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -400,12 +400,17 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags) } #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - // GL_MULTISAMPLE & GL_LINE_SMOOTH only work on PC platform + // GL_MULTISAMPLE only work on PC platform, GL_LINE_SMOOTH will not support at GLES v3.0 if (this->_lineSmoothEnable == false) { glDisable(GL_MULTISAMPLE); glDisable(GL_LINE_SMOOTH); } + else + { + glEnable(GL_MULTISAMPLE); + glEnable(GL_LINE_SMOOTH); + } #endif glLineWidth(_lineWidth); @@ -419,14 +424,6 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags) glBindBuffer(GL_ARRAY_BUFFER, 0); CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCountGLLine); -#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - if (this->_lineSmoothEnable == true) - { - glEnable(GL_MULTISAMPLE); - glEnable(GL_LINE_SMOOTH); - } -#endif - CHECK_GL_ERROR_DEBUG(); } diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 45180379be..dde20244e6 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -701,8 +701,6 @@ bool SpriteFrameCache::reloadTexture(const std::string& plist) // append .png texturePath = texturePath.append(".png"); - - CCLOG("cocos2d: SpriteFrameCache: Trying to use file %s as texture", texturePath.c_str()); } Texture2D *texture = nullptr; diff --git a/cocos/2d/CCTMXTiledMap.cpp b/cocos/2d/CCTMXTiledMap.cpp index 9c33e29d7e..93967c4504 100644 --- a/cocos/2d/CCTMXTiledMap.cpp +++ b/cocos/2d/CCTMXTiledMap.cpp @@ -29,7 +29,6 @@ THE SOFTWARE. #include "2d/CCTMXLayer.h" #include "2d/CCSprite.h" #include "deprecated/CCString.h" // For StringUtils::format -#include "2d/CocosStudioExtension.h" NS_CC_BEGIN @@ -284,12 +283,4 @@ int TMXTiledMap::getLayerNum() return _tmxLayerNum; } -ResouceData TMXTiledMap::getRenderFile() -{ - ResouceData rData; - rData.type = 0; - rData.file = _tmxFile; - return rData; -} - NS_CC_END diff --git a/cocos/2d/CCTMXTiledMap.h b/cocos/2d/CCTMXTiledMap.h index 5ff396f6c9..d9a35ef096 100644 --- a/cocos/2d/CCTMXTiledMap.h +++ b/cocos/2d/CCTMXTiledMap.h @@ -37,7 +37,6 @@ class TMXLayer; class TMXLayerInfo; class TMXTilesetInfo; class TMXMapInfo; -struct CC_DLL ResouceData; /** * @addtogroup _2d @@ -253,8 +252,8 @@ public: */ virtual std::string getDescription() const override; - ResouceData getRenderFile(); int getLayerNum(); + const std::string getResourceFile() const { return _tmxFile; } CC_CONSTRUCTOR_ACCESS: /** diff --git a/cocos/2d/CocosStudioExtension.cpp b/cocos/editor-support/cocostudio/CocosStudioExtension.cpp similarity index 100% rename from cocos/2d/CocosStudioExtension.cpp rename to cocos/editor-support/cocostudio/CocosStudioExtension.cpp diff --git a/cocos/2d/CocosStudioExtension.h b/cocos/editor-support/cocostudio/CocosStudioExtension.h similarity index 100% rename from cocos/2d/CocosStudioExtension.h rename to cocos/editor-support/cocostudio/CocosStudioExtension.h diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp index d47a1699de..d5a1b12abe 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.cpp @@ -27,7 +27,7 @@ #include "js_manual_conversions.h" #include "cocos2d_specifics.hpp" #include "math/TransformUtils.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" USING_NS_CC; diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index bdb327f1f2..e9acb967e7 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -31,7 +31,7 @@ extern "C" { #include "tolua_fix.h" #include "cocos2d.h" #include "Lua-BindingsExport.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" using namespace cocos2d; diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 856b6fed28..c229afef98 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -57,7 +57,7 @@ THE SOFTWARE. #include "ui/UIScale9Sprite.h" #include "ui/UIEditBox/UIEditBox.h" #include "ui/UILayoutComponent.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" /** * @addtogroup ui diff --git a/cocos/ui/UIAbstractCheckButton.cpp b/cocos/ui/UIAbstractCheckButton.cpp index cfff50539f..fa80d68e09 100644 --- a/cocos/ui/UIAbstractCheckButton.cpp +++ b/cocos/ui/UIAbstractCheckButton.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "ui/UIAbstractCheckButton.h" #include "2d/CCSprite.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index bfdd983805..960d8eee35 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "ui/UIHelper.h" #include -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UIImageView.cpp b/cocos/ui/UIImageView.cpp index 9eb5619dda..44105340f8 100644 --- a/cocos/ui/UIImageView.cpp +++ b/cocos/ui/UIImageView.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "ui/UIScale9Sprite.h" #include "ui/UIHelper.h" #include "2d/CCSprite.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 6603846d9b..c620077966 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -38,7 +38,7 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "base/CCEventFocus.h" #include "base/CCStencilStateManager.hpp" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UILoadingBar.cpp b/cocos/ui/UILoadingBar.cpp index ab403122a7..8daeb67e9e 100644 --- a/cocos/ui/UILoadingBar.cpp +++ b/cocos/ui/UILoadingBar.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "ui/UIHelper.h" #include "ui/UIScale9Sprite.h" #include "2d/CCSprite.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UISlider.cpp b/cocos/ui/UISlider.cpp index 62a291e06e..18c85ba024 100644 --- a/cocos/ui/UISlider.cpp +++ b/cocos/ui/UISlider.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "ui/UIHelper.h" #include "2d/CCSprite.h" #include "2d/CCCamera.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UITextAtlas.cpp b/cocos/ui/UITextAtlas.cpp index c448791f2e..a8406224db 100644 --- a/cocos/ui/UITextAtlas.cpp +++ b/cocos/ui/UITextAtlas.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "ui/UITextAtlas.h" #include "2d/CCLabel.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/cocos/ui/UITextBMFont.cpp b/cocos/ui/UITextBMFont.cpp index 6ac518cb98..b9987ea3cb 100644 --- a/cocos/ui/UITextBMFont.cpp +++ b/cocos/ui/UITextBMFont.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "ui/UITextBMFont.h" #include "2d/CCLabel.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" NS_CC_BEGIN diff --git a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp index dee27526fa..104b8e1c4b 100644 --- a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp +++ b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp @@ -1,6 +1,6 @@ #include "ParticleTest.h" #include "../testResource.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" USING_NS_CC; diff --git a/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp b/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp index 20ccae70c3..3a1d31ec0d 100644 --- a/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp +++ b/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp @@ -27,7 +27,7 @@ #include #include "../testResource.h" -#include "2d/CocosStudioExtension.h" +#include "editor-support/cocostudio/CocosStudioExtension.h" USING_NS_CC; diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index c6a0dca3df..4d5e5fe512 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -1,6 +1,6 @@ #include "TileMapTest.h" #include "../testResource.h" -#include "2d/CocosStudioExtension.h" + USING_NS_CC; @@ -858,10 +858,6 @@ TMXIsoZorder::TMXIsoZorder() _tamara->runAction( RepeatForever::create(seq) ); schedule( CC_SCHEDULE_SELECTOR(TMXIsoZorder::repositionSprite) ); - - int layerCount = map->getLayerNum(); - auto rd = map->getRenderFile(); - CCLOG("There's %d layer in map. Resource type is : %d, file name : %s", layerCount, rd.type, 0 ==rd.type ? rd.file.c_str() : rd.plist.c_str()); } TMXIsoZorder::~TMXIsoZorder()