diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 59be604eb4..2459a79004 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -54,7 +54,6 @@ THE SOFTWARE. #include "renderer/CCTextureCache.h" #include "deprecated/CCString.h" #include "platform/CCFileUtils.h" -#include "2d/CocosStudioExtension.h" using namespace std; @@ -1333,12 +1332,4 @@ void ParticleSystem::setScaleY(float newScaleY) Node::setScaleY(newScaleY); } -ResouceData ParticleSystem::getRenderFile() -{ - ResouceData rData; - rData.type = 0; - rData.file = _plistFile; - return rData; -} - NS_CC_END diff --git a/cocos/2d/CCParticleSystem.h b/cocos/2d/CCParticleSystem.h index d662a8da4a..eb7ab4afa9 100644 --- a/cocos/2d/CCParticleSystem.h +++ b/cocos/2d/CCParticleSystem.h @@ -33,8 +33,6 @@ THE SOFTWARE. NS_CC_BEGIN -struct CC_DLL ResouceData; - /** * @addtogroup _2d * @{ @@ -763,7 +761,7 @@ public: */ virtual const BlendFunc &getBlendFunc() const override; - ResouceData getRenderFile(); + const std::string getResourceFile() const { return _plistFile; } CC_CONSTRUCTOR_ACCESS: /** diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 54bc8ff2d7..e401be8d6b 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -38,7 +38,6 @@ THE SOFTWARE. #include "renderer/CCRenderer.h" #include "base/CCDirector.h" #include "2d/CCCamera.h" -#include "2d/CocosStudioExtension.h" #include "deprecated/CCString.h" @@ -1159,12 +1158,4 @@ void Sprite::setPolygonInfo(const PolygonInfo& info) _polyInfo = info; } -ResouceData Sprite::getRenderFile() -{ - ResouceData rData; - rData.type = (int)_fileType; - rData.file = _fileName; - return rData; -} - NS_CC_END diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 5bfff435eb..737b77045e 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -46,7 +46,6 @@ class Rect; class Size; class Texture2D; struct transformValues_; -struct CC_DLL ResouceData; #ifdef SPRITE_RENDER_IN_SUBPIXEL #undef SPRITE_RENDER_IN_SUBPIXEL @@ -475,7 +474,8 @@ public: virtual bool isOpacityModifyRGB() const override; /// @} - ResouceData getRenderFile(); + const int getResourceType() const { return _fileType; } + const std::string getResourceName() const { return _fileName; } CC_CONSTRUCTOR_ACCESS : /** diff --git a/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp b/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp index fbbb78926d..79f2414784 100644 --- a/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp +++ b/tests/cpp-tests/Classes/CocosStudio3DTest/CocosStudio3DTest.cpp @@ -173,11 +173,8 @@ CSSceneSkyBoxTest::CSSceneSkyBoxTest() CameraBackgroundSkyBoxBrush * brush = dynamic_cast(_camera->getBackgroundBrush()); if (nullptr != brush) { - char buf[256] = { 0, }; - sprintf(buf, "CameraBackgroundSkyBoxBrush active value is : %s", brush->isActived() ? "true" : "false"); - CCLOG(buf); - sprintf(buf, "CameraBackgroundSkyBoxBrush valid value is : %s", brush->isValid() ? "true" : "false"); - CCLOG(buf); + CCLOG("CameraBackgroundSkyBoxBrush active value is : %s", brush->isActived() ? "true" : "false"); + CCLOG("CameraBackgroundSkyBoxBrush valid value is : %s", brush->isValid() ? "true" : "false"); } auto listener = EventListenerTouchAllAtOnce::create(); diff --git a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp index b17dd30116..dee27526fa 100644 --- a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp +++ b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp @@ -1242,8 +1242,6 @@ void ParticleReorder::onEnter() auto parent1 = Node::create(); auto parent2 = ParticleBatchNode::createWithTexture(ignore->getTexture()); ignore->unscheduleUpdate(); - auto rd = ignore->getRenderFile(); - CCLOG("Get resource data from particle file type : %d, file name : %s", rd.type, 0 == rd.type ? rd.file.c_str() : rd.plist.c_str()); for( unsigned int i=0; i<2;i++) { diff --git a/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp b/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp index 36717029f3..20ccae70c3 100644 --- a/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp +++ b/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp @@ -168,9 +168,6 @@ void Sprite1::addNewSpriteWithCoords(Vec2 p) auto seq = Sequence::create( action, action_back, nullptr ); sprite->runAction( RepeatForever::create(seq) ); - - auto rd = sprite->getRenderFile(); - CCLOG("Test Sprite::getRenderFile function, texture type : %d, texture file : %s", rd.type, 0 == rd.type ? rd.file.c_str() : rd.plist.c_str()); } void Sprite1::onTouchesEnded(const std::vector& touches, Event* event)