From 6d1a7e089b292736213c4154555ab9fbc72dfd42 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 8 Nov 2012 12:55:32 +0800 Subject: [PATCH] fixed #1556: Removed CCParticleFire::create(const char* pListFile) since particle can be constructed from plist by CCParticleSystemQuad::create(plist). --- .../particle_nodes/CCParticleExamples.cpp | 154 ------------------ cocos2dx/particle_nodes/CCParticleExamples.h | 11 -- 2 files changed, 165 deletions(-) diff --git a/cocos2dx/particle_nodes/CCParticleExamples.cpp b/cocos2dx/particle_nodes/CCParticleExamples.cpp index e52a181bde..4dfa5740ec 100644 --- a/cocos2dx/particle_nodes/CCParticleExamples.cpp +++ b/cocos2dx/particle_nodes/CCParticleExamples.cpp @@ -74,20 +74,6 @@ CCParticleFire* CCParticleFire::create() return pRet; } -CCParticleFire* CCParticleFire::create(const char *plistFile) -{ - CCParticleFire* pRet = new CCParticleFire(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleFire* CCParticleFire::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleFire* pRet = new CCParticleFire(); @@ -197,20 +183,6 @@ CCParticleFireworks* CCParticleFireworks::create() return pRet; } -CCParticleFireworks* CCParticleFireworks::create(const char *plistFile) -{ - CCParticleFireworks* pRet = new CCParticleFireworks(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleFireworks* CCParticleFireworks::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleFireworks* pRet = new CCParticleFireworks(); @@ -318,20 +290,6 @@ CCParticleSun* CCParticleSun::create() return pRet; } -CCParticleSun* CCParticleSun::create(const char *plistFile) -{ - CCParticleSun* pRet = new CCParticleSun(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleSun* CCParticleSun::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleSun* pRet = new CCParticleSun(); @@ -444,20 +402,6 @@ CCParticleGalaxy* CCParticleGalaxy::create() return pRet; } -CCParticleGalaxy* CCParticleGalaxy::create(const char *plistFile) -{ - CCParticleGalaxy* pRet = new CCParticleGalaxy(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleGalaxy* CCParticleGalaxy::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleGalaxy* pRet = new CCParticleGalaxy(); @@ -572,20 +516,6 @@ CCParticleFlower* CCParticleFlower::create() return pRet; } -CCParticleFlower* CCParticleFlower::create(const char *plistFile) -{ - CCParticleFlower* pRet = new CCParticleFlower(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleFlower* CCParticleFlower::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleFlower* pRet = new CCParticleFlower(); @@ -699,20 +629,6 @@ CCParticleMeteor * CCParticleMeteor::create() return pRet; } -CCParticleMeteor* CCParticleMeteor::create(const char *plistFile) -{ - CCParticleMeteor* pRet = new CCParticleMeteor(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleMeteor* CCParticleMeteor::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleMeteor* pRet = new CCParticleMeteor(); @@ -827,20 +743,6 @@ CCParticleSpiral* CCParticleSpiral::create() return pRet; } -CCParticleSpiral* CCParticleSpiral::create(const char *plistFile) -{ - CCParticleSpiral* pRet = new CCParticleSpiral(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleSpiral* CCParticleSpiral::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleSpiral* pRet = new CCParticleSpiral(); @@ -955,20 +857,6 @@ CCParticleExplosion* CCParticleExplosion::create() return pRet; } -CCParticleExplosion* CCParticleExplosion::create(const char *plistFile) -{ - CCParticleExplosion* pRet = new CCParticleExplosion(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleExplosion* CCParticleExplosion::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleExplosion* pRet = new CCParticleExplosion(); @@ -1082,20 +970,6 @@ CCParticleSmoke* CCParticleSmoke::create() return pRet; } -CCParticleSmoke* CCParticleSmoke::create(const char *plistFile) -{ - CCParticleSmoke* pRet = new CCParticleSmoke(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleSmoke* CCParticleSmoke::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleSmoke* pRet = new CCParticleSmoke(); @@ -1206,20 +1080,6 @@ CCParticleSnow* CCParticleSnow::create() return pRet; } -CCParticleSnow* CCParticleSnow::create(const char *plistFile) -{ - CCParticleSnow* pRet = new CCParticleSnow(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleSnow* CCParticleSnow::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleSnow* pRet = new CCParticleSnow(); @@ -1332,20 +1192,6 @@ CCParticleRain* CCParticleRain::create() return pRet; } -CCParticleRain* CCParticleRain::create(const char *plistFile) -{ - CCParticleRain* pRet = new CCParticleRain(); - if (pRet && pRet->initWithFile(plistFile)) - { - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - return pRet; -} - CCParticleRain* CCParticleRain::createWithTotalParticles(unsigned int numberOfParticles) { CCParticleRain* pRet = new CCParticleRain(); diff --git a/cocos2dx/particle_nodes/CCParticleExamples.h b/cocos2dx/particle_nodes/CCParticleExamples.h index 53f8338419..9a640f058f 100644 --- a/cocos2dx/particle_nodes/CCParticleExamples.h +++ b/cocos2dx/particle_nodes/CCParticleExamples.h @@ -47,7 +47,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleFire* node(); static CCParticleFire* create(); - static CCParticleFire* create(const char *plistFile); static CCParticleFire* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -63,7 +62,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleFireworks* node(); static CCParticleFireworks* create(); - static CCParticleFireworks* create(const char *plistFile); static CCParticleFireworks* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -79,7 +77,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleSun* node(); static CCParticleSun* create(); - static CCParticleSun* create(const char *plistFile); static CCParticleSun* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -95,7 +92,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleGalaxy* node(); static CCParticleGalaxy* create(); - static CCParticleGalaxy* create(const char *plistFile); static CCParticleGalaxy* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -111,7 +107,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleFlower* node(); static CCParticleFlower* create(); - static CCParticleFlower* create(const char *plistFile); static CCParticleFlower* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -125,7 +120,6 @@ public: virtual bool initWithTotalParticles(unsigned int numberOfParticles); CC_DEPRECATED_ATTRIBUTE static CCParticleMeteor * node(); static CCParticleMeteor * create(); - static CCParticleMeteor* create(const char *plistFile); static CCParticleMeteor* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -141,7 +135,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleSpiral* node(); static CCParticleSpiral* create(); - static CCParticleSpiral* create(const char *plistFile); static CCParticleSpiral* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -157,7 +150,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleExplosion* node(); static CCParticleExplosion* create(); - static CCParticleExplosion* create(const char *plistFile); static CCParticleExplosion* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -173,7 +165,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleSmoke* node(); static CCParticleSmoke* create(); - static CCParticleSmoke* create(const char *plistFile); static CCParticleSmoke* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -189,7 +180,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleSnow* node(); static CCParticleSnow* create(); - static CCParticleSnow* create(const char *plistFile); static CCParticleSnow* createWithTotalParticles(unsigned int numberOfParticles); }; @@ -205,7 +195,6 @@ public: CC_DEPRECATED_ATTRIBUTE static CCParticleRain* node(); static CCParticleRain* create(); - static CCParticleRain* create(const char *plistFile); static CCParticleRain* createWithTotalParticles(unsigned int numberOfParticles); };