Remove cocostudio header file from sprite and particle, and adjust tests

Fix compile error under iOS & Mac
This commit is contained in:
XiaoFeng 2015-12-04 09:26:14 +08:00
parent 30874d457f
commit 2da192a1c2
7 changed files with 5 additions and 33 deletions

View File

@ -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

View File

@ -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:
/**

View File

@ -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

View File

@ -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 :
/**

View File

@ -173,11 +173,8 @@ CSSceneSkyBoxTest::CSSceneSkyBoxTest()
CameraBackgroundSkyBoxBrush * brush = dynamic_cast<CameraBackgroundSkyBoxBrush *>(_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();

View File

@ -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++)
{

View File

@ -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<Touch*>& touches, Event* event)