mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' into v3_trianglesCommand
This commit is contained in:
commit
08006aa47a
32
CHANGELOG
32
CHANGELOG
|
@ -1,20 +1,19 @@
|
|||
cocos2d-x-3.3alpha0 ??
|
||||
[NEW] Added UIScale9Sprite
|
||||
[NEW] Added Camera, AABB, OBB and Ray
|
||||
[NEW] Added render primitive and render primitive command, support passing point, line and triangle data
|
||||
[NEW] Added support for applicationDidEnterBackground / applicationWillEnterForeground on desktop
|
||||
[NEW] Added method for custom precompiled shader program loading on WP8
|
||||
[NEW] Added c++11 random support
|
||||
[NEW] Added better reskin model support
|
||||
[NEW] Added consistent way to set GL context attributes
|
||||
cocos2d-x-3.3alpha0 Aug.28 2014
|
||||
[NEW] 3D: Added Camera, AABB, OBB and Ray
|
||||
[NEW] 3D: Added better reskin model support
|
||||
[NEW] Core: c++11 random support
|
||||
[NEW] Core: Using `(std::notrow)` for all the `new` statements
|
||||
[NEW] Desktop: Added support for applicationDidEnterBackground / applicationWillEnterForeground on desktop
|
||||
[NEW] Device: added setKeepScreenOn() for iOS and Android
|
||||
[NEW] EventMouse: support getDelta, getDeltaX, getDeltaY functions
|
||||
[NEW] FileUtils: add isDirectoryExist(), createDirectory(), removeDirectory(), removeFile(), renameFile()
|
||||
getFileSize()
|
||||
[NEW] FileUtils: add isDirectoryExist(), createDirectory(), removeDirectory(), removeFile(), renameFile(), getFileSize()
|
||||
[NEW] FileUtilsApple: allow setting bundle to use in file utils on iOS and Mac OS X
|
||||
[NEW] Image: support of software PVRTC v1 decompression
|
||||
[NEW] Lua-binding: added release_print that can print log even in release mode
|
||||
[NEW] Physics Integration: can invoke update in demand
|
||||
[NEW] Renderer: Added primitive and render primitive command, support passing point, line and triangle data
|
||||
[NEW] Renderer: Added method for custom precompiled shader program loading on WP8
|
||||
[NEW] Renderer: Added consistent way to set GL context attributes
|
||||
[NEW] RenderTexture: add a call back function for saveToFile()
|
||||
[NEW] RotateTo: added 3D rotation support
|
||||
[NEW] ScrollView: added `setMinScale()` and `setMaxScale()`
|
||||
|
@ -22,11 +21,12 @@ cocos2d-x-3.3alpha0 ??
|
|||
[NEW] Sprite3D: added getBoundingBox() and getAABB()
|
||||
[NEW] SpriteFrameCache: load from plist file content data
|
||||
[NEW] utils: added gettime()
|
||||
[NEW] ui::Button: support customize how much zoom scale is when pressing a button
|
||||
[NEW] ui::PageView: added `customScrollThreshold`, could determine the swipe distance to trigger a PageView scroll event
|
||||
[NEW] ui::TextField: support utf8
|
||||
[NEW] ui::TextField: support set color and placehold color
|
||||
[NEW] ui::Widget: support swallowing touch events
|
||||
[NEW] UI: Added Added UIScale9Sprite
|
||||
[NEW] UI: ui::Button: support customize how much zoom scale is when pressing a button
|
||||
[NEW] UI: ui::PageView: added `customScrollThreshold`, could determine the swipe distance to trigger a PageView scroll event
|
||||
[NEW] UI: ui::TextField: support utf8
|
||||
[NEW] UI: ui::TextField: support set color and placehold color
|
||||
[NEW] UI: ui::Widget: support swallowing touch events
|
||||
[NEW] Text: added getter and setter for TextColor
|
||||
|
||||
[FIX] EditBox: font size is not scaled when glview is scaled on Mac OS X
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
|
||||
|
@ -11,14 +9,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspine", "..\cocos\editor-support\spine\proj.win32\libspine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocosbuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libcocosbuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}"
|
||||
EndProject
|
||||
Global
|
||||
|
@ -27,10 +19,6 @@ Global
|
|||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
@ -47,22 +35,10 @@ Global
|
|||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32
|
||||
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
|
|
@ -2342,8 +2342,6 @@
|
|||
3EA3EDBB1991CDFA00645534 /* CCCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCCamera.h; path = ../base/CCCamera.h; sourceTree = "<group>"; };
|
||||
464AD6E3197EBB1400E502D8 /* pvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pvr.cpp; path = ../base/pvr.cpp; sourceTree = "<group>"; };
|
||||
464AD6E4197EBB1400E502D8 /* pvr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pvr.h; path = ../base/pvr.h; sourceTree = "<group>"; };
|
||||
46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCModuleManager.cpp; path = ../base/CCModuleManager.cpp; sourceTree = "<group>"; };
|
||||
46633BC3199DDB2F00F6E838 /* CCModuleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCModuleManager.h; path = ../base/CCModuleManager.h; sourceTree = "<group>"; };
|
||||
46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = "<group>"; };
|
||||
46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
|
||||
|
@ -3066,8 +3064,6 @@
|
|||
1A570095180BC5B00088DEC7 /* base-nodes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */,
|
||||
46633BC3199DDB2F00F6E838 /* CCModuleManager.h */,
|
||||
15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */,
|
||||
15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */,
|
||||
1A57009C180BC5D20088DEC7 /* CCNode.cpp */,
|
||||
|
|
|
@ -96,7 +96,7 @@ Speed::~Speed()
|
|||
|
||||
Speed* Speed::create(ActionInterval* action, float speed)
|
||||
{
|
||||
Speed *ret = new Speed();
|
||||
Speed *ret = new (std::nothrow) Speed();
|
||||
if (ret && ret->initWithAction(action, speed))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -118,7 +118,7 @@ bool Speed::initWithAction(ActionInterval *action, float speed)
|
|||
Speed *Speed::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Speed();
|
||||
auto a = new (std::nothrow) Speed();
|
||||
a->initWithAction(_innerAction->clone(), _speed);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -172,7 +172,7 @@ Follow::~Follow()
|
|||
|
||||
Follow* Follow::create(Node *followedNode, const Rect& rect/* = Rect::ZERO*/)
|
||||
{
|
||||
Follow *follow = new Follow();
|
||||
Follow *follow = new (std::nothrow) Follow();
|
||||
if (follow && follow->initWithTarget(followedNode, rect))
|
||||
{
|
||||
follow->autorelease();
|
||||
|
@ -185,7 +185,7 @@ Follow* Follow::create(Node *followedNode, const Rect& rect/* = Rect::ZERO*/)
|
|||
Follow* Follow::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Follow();
|
||||
auto a = new (std::nothrow) Follow();
|
||||
a->initWithTarget(_followedNode, _worldRect);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -47,7 +47,7 @@ void ActionCamera::startWithTarget(Node *target)
|
|||
ActionCamera* ActionCamera::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ActionCamera();
|
||||
auto a = new (std::nothrow) ActionCamera();
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ OrbitCamera::~OrbitCamera()
|
|||
|
||||
OrbitCamera * OrbitCamera::create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX)
|
||||
{
|
||||
OrbitCamera * obitCamera = new OrbitCamera();
|
||||
OrbitCamera * obitCamera = new (std::nothrow) OrbitCamera();
|
||||
if(obitCamera->initWithDuration(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX))
|
||||
{
|
||||
obitCamera->autorelease();
|
||||
|
@ -161,7 +161,7 @@ OrbitCamera * OrbitCamera::create(float t, float radius, float deltaRadius, floa
|
|||
OrbitCamera* OrbitCamera::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new OrbitCamera();
|
||||
auto a = new (std::nothrow) OrbitCamera();
|
||||
a->initWithDuration(_duration, _radius, _deltaRadius, _angleZ, _deltaAngleZ, _angleX, _deltaAngleX);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
#include "base/ccMacros.h"
|
||||
#include "2d/CCActionCatmullRom.h"
|
||||
#include "2d/CCNode.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -42,7 +43,7 @@ NS_CC_BEGIN;
|
|||
|
||||
PointArray* PointArray::create(ssize_t capacity)
|
||||
{
|
||||
PointArray* pointArray = new PointArray();
|
||||
PointArray* pointArray = new (std::nothrow) PointArray();
|
||||
if (pointArray)
|
||||
{
|
||||
if (pointArray->initWithCapacity(capacity))
|
||||
|
@ -76,7 +77,7 @@ PointArray* PointArray::clone() const
|
|||
newArray->push_back(new Vec2((*iter)->x, (*iter)->y));
|
||||
}
|
||||
|
||||
PointArray *points = new PointArray();
|
||||
PointArray *points = new (std::nothrow) PointArray();
|
||||
points->initWithCapacity(10);
|
||||
points->setControlPoints(newArray);
|
||||
|
||||
|
@ -125,7 +126,7 @@ void PointArray::addControlPoint(Vec2 controlPoint)
|
|||
|
||||
void PointArray::insertControlPoint(Vec2 &controlPoint, ssize_t index)
|
||||
{
|
||||
Vec2 *temp = new Vec2(controlPoint.x, controlPoint.y);
|
||||
Vec2 *temp = new (std::nothrow) Vec2(controlPoint.x, controlPoint.y);
|
||||
_controlPoints->insert(_controlPoints->begin() + index, temp);
|
||||
}
|
||||
|
||||
|
@ -221,7 +222,7 @@ Vec2 ccCardinalSplineAt(Vec2 &p0, Vec2 &p1, Vec2 &p2, Vec2 &p3, float tension, f
|
|||
|
||||
CardinalSplineTo* CardinalSplineTo::create(float duration, cocos2d::PointArray *points, float tension)
|
||||
{
|
||||
CardinalSplineTo *ret = new CardinalSplineTo();
|
||||
CardinalSplineTo *ret = new (std::nothrow) CardinalSplineTo();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithDuration(duration, points, tension))
|
||||
|
@ -280,7 +281,7 @@ void CardinalSplineTo::startWithTarget(cocos2d::Node *target)
|
|||
CardinalSplineTo* CardinalSplineTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CardinalSplineTo();
|
||||
auto a = new (std::nothrow) CardinalSplineTo();
|
||||
a->initWithDuration(this->_duration, this->_points->clone(), this->_tension);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -345,7 +346,7 @@ CardinalSplineTo* CardinalSplineTo::reverse() const
|
|||
|
||||
CardinalSplineBy* CardinalSplineBy::create(float duration, cocos2d::PointArray *points, float tension)
|
||||
{
|
||||
CardinalSplineBy *ret = new CardinalSplineBy();
|
||||
CardinalSplineBy *ret = new (std::nothrow) CardinalSplineBy();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithDuration(duration, points, tension))
|
||||
|
@ -424,7 +425,7 @@ void CardinalSplineBy::startWithTarget(cocos2d::Node *target)
|
|||
CardinalSplineBy* CardinalSplineBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CardinalSplineBy();
|
||||
auto a = new (std::nothrow) CardinalSplineBy();
|
||||
a->initWithDuration(this->_duration, this->_points->clone(), this->_tension);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -435,7 +436,7 @@ CardinalSplineBy* CardinalSplineBy::clone() const
|
|||
|
||||
CatmullRomTo* CatmullRomTo::create(float dt, cocos2d::PointArray *points)
|
||||
{
|
||||
CatmullRomTo *ret = new CatmullRomTo();
|
||||
CatmullRomTo *ret = new (std::nothrow) CatmullRomTo();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithDuration(dt, points))
|
||||
|
@ -464,7 +465,7 @@ bool CatmullRomTo::initWithDuration(float dt, cocos2d::PointArray *points)
|
|||
CatmullRomTo* CatmullRomTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CatmullRomTo();
|
||||
auto a = new (std::nothrow) CatmullRomTo();
|
||||
a->initWithDuration(this->_duration, this->_points->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -482,7 +483,7 @@ CatmullRomTo* CatmullRomTo::reverse() const
|
|||
|
||||
CatmullRomBy* CatmullRomBy::create(float dt, cocos2d::PointArray *points)
|
||||
{
|
||||
CatmullRomBy *ret = new CatmullRomBy();
|
||||
CatmullRomBy *ret = new (std::nothrow) CatmullRomBy();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithDuration(dt, points))
|
||||
|
@ -511,7 +512,7 @@ bool CatmullRomBy::initWithDuration(float dt, cocos2d::PointArray *points)
|
|||
CatmullRomBy* CatmullRomBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CatmullRomBy();
|
||||
auto a = new (std::nothrow) CatmullRomBy();
|
||||
a->initWithDuration(this->_duration, this->_points->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -38,11 +38,12 @@
|
|||
#include <vector>
|
||||
|
||||
#include "2d/CCActionInterval.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "math/CCGeometry.h"
|
||||
|
||||
NS_CC_BEGIN;
|
||||
|
||||
class Node;
|
||||
|
||||
/**
|
||||
* @addtogroup actions
|
||||
* @{
|
||||
|
|
|
@ -111,7 +111,7 @@ EaseRateAction::~EaseRateAction()
|
|||
|
||||
EaseIn* EaseIn::create(ActionInterval *action, float rate)
|
||||
{
|
||||
EaseIn *easeIn = new EaseIn();
|
||||
EaseIn *easeIn = new (std::nothrow) EaseIn();
|
||||
if (easeIn)
|
||||
{
|
||||
if (easeIn->initWithAction(action, rate))
|
||||
|
@ -130,7 +130,7 @@ EaseIn* EaseIn::create(ActionInterval *action, float rate)
|
|||
EaseIn* EaseIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseIn();
|
||||
auto a = new (std::nothrow) EaseIn();
|
||||
a->initWithAction(_inner->clone(), _rate);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -151,7 +151,7 @@ EaseIn* EaseIn::reverse() const
|
|||
//
|
||||
EaseOut* EaseOut::create(ActionInterval *action, float rate)
|
||||
{
|
||||
EaseOut *easeOut = new EaseOut();
|
||||
EaseOut *easeOut = new (std::nothrow) EaseOut();
|
||||
if (easeOut)
|
||||
{
|
||||
if (easeOut->initWithAction(action, rate))
|
||||
|
@ -170,7 +170,7 @@ EaseOut* EaseOut::create(ActionInterval *action, float rate)
|
|||
EaseOut* EaseOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseOut();
|
||||
auto a = new (std::nothrow) EaseOut();
|
||||
a->initWithAction(_inner->clone(), _rate);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -191,7 +191,7 @@ EaseOut* EaseOut::reverse() const
|
|||
//
|
||||
EaseInOut* EaseInOut::create(ActionInterval *action, float rate)
|
||||
{
|
||||
EaseInOut *easeInOut = new EaseInOut();
|
||||
EaseInOut *easeInOut = new (std::nothrow) EaseInOut();
|
||||
if (easeInOut)
|
||||
{
|
||||
if (easeInOut->initWithAction(action, rate))
|
||||
|
@ -210,7 +210,7 @@ EaseInOut* EaseInOut::create(ActionInterval *action, float rate)
|
|||
EaseInOut* EaseInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseInOut();
|
||||
auto a = new (std::nothrow) EaseInOut();
|
||||
a->initWithAction(_inner->clone(), _rate);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -232,7 +232,7 @@ EaseInOut* EaseInOut::reverse() const
|
|||
//
|
||||
EaseExponentialIn* EaseExponentialIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseExponentialIn *ret = new EaseExponentialIn();
|
||||
EaseExponentialIn *ret = new (std::nothrow) EaseExponentialIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -251,7 +251,7 @@ EaseExponentialIn* EaseExponentialIn::create(ActionInterval* action)
|
|||
EaseExponentialIn* EaseExponentialIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseExponentialIn();
|
||||
auto a = new (std::nothrow) EaseExponentialIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -272,7 +272,7 @@ ActionEase * EaseExponentialIn::reverse() const
|
|||
//
|
||||
EaseExponentialOut* EaseExponentialOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseExponentialOut *ret = new EaseExponentialOut();
|
||||
EaseExponentialOut *ret = new (std::nothrow) EaseExponentialOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -291,7 +291,7 @@ EaseExponentialOut* EaseExponentialOut::create(ActionInterval* action)
|
|||
EaseExponentialOut* EaseExponentialOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseExponentialOut();
|
||||
auto a = new (std::nothrow) EaseExponentialOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -313,7 +313,7 @@ ActionEase* EaseExponentialOut::reverse() const
|
|||
|
||||
EaseExponentialInOut* EaseExponentialInOut::create(ActionInterval *action)
|
||||
{
|
||||
EaseExponentialInOut *ret = new EaseExponentialInOut();
|
||||
EaseExponentialInOut *ret = new (std::nothrow) EaseExponentialInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -332,7 +332,7 @@ EaseExponentialInOut* EaseExponentialInOut::create(ActionInterval *action)
|
|||
EaseExponentialInOut* EaseExponentialInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseExponentialInOut();
|
||||
auto a = new (std::nothrow) EaseExponentialInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -354,7 +354,7 @@ EaseExponentialInOut* EaseExponentialInOut::reverse() const
|
|||
|
||||
EaseSineIn* EaseSineIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseSineIn *ret = new EaseSineIn();
|
||||
EaseSineIn *ret = new (std::nothrow) EaseSineIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -373,7 +373,7 @@ EaseSineIn* EaseSineIn::create(ActionInterval* action)
|
|||
EaseSineIn* EaseSineIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseSineIn();
|
||||
auto a = new (std::nothrow) EaseSineIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -395,7 +395,7 @@ ActionEase* EaseSineIn::reverse() const
|
|||
|
||||
EaseSineOut* EaseSineOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseSineOut *ret = new EaseSineOut();
|
||||
EaseSineOut *ret = new (std::nothrow) EaseSineOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -414,7 +414,7 @@ EaseSineOut* EaseSineOut::create(ActionInterval* action)
|
|||
EaseSineOut* EaseSineOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseSineOut();
|
||||
auto a = new (std::nothrow) EaseSineOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -436,7 +436,7 @@ ActionEase* EaseSineOut::reverse(void) const
|
|||
|
||||
EaseSineInOut* EaseSineInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseSineInOut *ret = new EaseSineInOut();
|
||||
EaseSineInOut *ret = new (std::nothrow) EaseSineInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -455,7 +455,7 @@ EaseSineInOut* EaseSineInOut::create(ActionInterval* action)
|
|||
EaseSineInOut* EaseSineInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseSineInOut();
|
||||
auto a = new (std::nothrow) EaseSineInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -497,7 +497,7 @@ EaseElasticIn* EaseElasticIn::create(ActionInterval *action)
|
|||
|
||||
EaseElasticIn* EaseElasticIn::create(ActionInterval *action, float period/* = 0.3f*/)
|
||||
{
|
||||
EaseElasticIn *ret = new EaseElasticIn();
|
||||
EaseElasticIn *ret = new (std::nothrow) EaseElasticIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, period))
|
||||
|
@ -516,7 +516,7 @@ EaseElasticIn* EaseElasticIn::create(ActionInterval *action, float period/* = 0.
|
|||
EaseElasticIn* EaseElasticIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseElasticIn();
|
||||
auto a = new (std::nothrow) EaseElasticIn();
|
||||
a->initWithAction(_inner->clone(), _period);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -543,7 +543,7 @@ EaseElasticOut* EaseElasticOut::create(ActionInterval *action)
|
|||
|
||||
EaseElasticOut* EaseElasticOut::create(ActionInterval *action, float period/* = 0.3f*/)
|
||||
{
|
||||
EaseElasticOut *ret = new EaseElasticOut();
|
||||
EaseElasticOut *ret = new (std::nothrow) EaseElasticOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, period))
|
||||
|
@ -562,7 +562,7 @@ EaseElasticOut* EaseElasticOut::create(ActionInterval *action, float period/* =
|
|||
EaseElasticOut* EaseElasticOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseElasticOut();
|
||||
auto a = new (std::nothrow) EaseElasticOut();
|
||||
a->initWithAction(_inner->clone(), _period);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -589,7 +589,7 @@ EaseElasticInOut* EaseElasticInOut::create(ActionInterval *action)
|
|||
|
||||
EaseElasticInOut* EaseElasticInOut::create(ActionInterval *action, float period/* = 0.3f*/)
|
||||
{
|
||||
EaseElasticInOut *ret = new EaseElasticInOut();
|
||||
EaseElasticInOut *ret = new (std::nothrow) EaseElasticInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, period))
|
||||
|
@ -608,7 +608,7 @@ EaseElasticInOut* EaseElasticInOut::create(ActionInterval *action, float period/
|
|||
EaseElasticInOut* EaseElasticInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseElasticInOut();
|
||||
auto a = new (std::nothrow) EaseElasticInOut();
|
||||
a->initWithAction(_inner->clone(), _period);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -634,7 +634,7 @@ EaseElasticInOut* EaseElasticInOut::reverse() const
|
|||
|
||||
EaseBounceIn* EaseBounceIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseBounceIn *ret = new EaseBounceIn();
|
||||
EaseBounceIn *ret = new (std::nothrow) EaseBounceIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -653,7 +653,7 @@ EaseBounceIn* EaseBounceIn::create(ActionInterval* action)
|
|||
EaseBounceIn* EaseBounceIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBounceIn();
|
||||
auto a = new (std::nothrow) EaseBounceIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -675,7 +675,7 @@ EaseBounce* EaseBounceIn::reverse() const
|
|||
|
||||
EaseBounceOut* EaseBounceOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseBounceOut *ret = new EaseBounceOut();
|
||||
EaseBounceOut *ret = new (std::nothrow) EaseBounceOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -694,7 +694,7 @@ EaseBounceOut* EaseBounceOut::create(ActionInterval* action)
|
|||
EaseBounceOut* EaseBounceOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBounceOut();
|
||||
auto a = new (std::nothrow) EaseBounceOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -716,7 +716,7 @@ EaseBounce* EaseBounceOut::reverse() const
|
|||
|
||||
EaseBounceInOut* EaseBounceInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseBounceInOut *ret = new EaseBounceInOut();
|
||||
EaseBounceInOut *ret = new (std::nothrow) EaseBounceInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -735,7 +735,7 @@ EaseBounceInOut* EaseBounceInOut::create(ActionInterval* action)
|
|||
EaseBounceInOut* EaseBounceInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBounceInOut();
|
||||
auto a = new (std::nothrow) EaseBounceInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -757,7 +757,7 @@ EaseBounceInOut* EaseBounceInOut::reverse() const
|
|||
|
||||
EaseBackIn* EaseBackIn::create(ActionInterval *action)
|
||||
{
|
||||
EaseBackIn *ret = new EaseBackIn();
|
||||
EaseBackIn *ret = new (std::nothrow) EaseBackIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -776,7 +776,7 @@ EaseBackIn* EaseBackIn::create(ActionInterval *action)
|
|||
EaseBackIn* EaseBackIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBackIn();
|
||||
auto a = new (std::nothrow) EaseBackIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -798,7 +798,7 @@ ActionEase* EaseBackIn::reverse() const
|
|||
|
||||
EaseBackOut* EaseBackOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseBackOut *ret = new EaseBackOut();
|
||||
EaseBackOut *ret = new (std::nothrow) EaseBackOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -817,7 +817,7 @@ EaseBackOut* EaseBackOut::create(ActionInterval* action)
|
|||
EaseBackOut* EaseBackOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBackOut();
|
||||
auto a = new (std::nothrow) EaseBackOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -839,7 +839,7 @@ ActionEase* EaseBackOut::reverse() const
|
|||
|
||||
EaseBackInOut* EaseBackInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseBackInOut *ret = new EaseBackInOut();
|
||||
EaseBackInOut *ret = new (std::nothrow) EaseBackInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -858,7 +858,7 @@ EaseBackInOut* EaseBackInOut::create(ActionInterval* action)
|
|||
EaseBackInOut* EaseBackInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBackInOut();
|
||||
auto a = new (std::nothrow) EaseBackInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -879,7 +879,7 @@ EaseBackInOut* EaseBackInOut::reverse() const
|
|||
|
||||
EaseBezierAction* EaseBezierAction::create(cocos2d::ActionInterval* action)
|
||||
{
|
||||
EaseBezierAction *ret = new EaseBezierAction();
|
||||
EaseBezierAction *ret = new (std::nothrow) EaseBezierAction();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -906,7 +906,7 @@ void EaseBezierAction::setBezierParamer( float p0, float p1, float p2, float p3)
|
|||
EaseBezierAction* EaseBezierAction::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseBezierAction();
|
||||
auto a = new (std::nothrow) EaseBezierAction();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->setBezierParamer(_p0,_p1,_p2,_p3);
|
||||
a->autorelease();
|
||||
|
@ -931,7 +931,7 @@ EaseBezierAction* EaseBezierAction::reverse() const
|
|||
|
||||
EaseQuadraticActionIn* EaseQuadraticActionIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuadraticActionIn *ret = new EaseQuadraticActionIn();
|
||||
EaseQuadraticActionIn *ret = new (std::nothrow) EaseQuadraticActionIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -950,7 +950,7 @@ EaseQuadraticActionIn* EaseQuadraticActionIn::create(ActionInterval* action)
|
|||
EaseQuadraticActionIn* EaseQuadraticActionIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuadraticActionIn();
|
||||
auto a = new (std::nothrow) EaseQuadraticActionIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -972,7 +972,7 @@ EaseQuadraticActionIn* EaseQuadraticActionIn::reverse() const
|
|||
|
||||
EaseQuadraticActionOut* EaseQuadraticActionOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuadraticActionOut *ret = new EaseQuadraticActionOut();
|
||||
EaseQuadraticActionOut *ret = new (std::nothrow) EaseQuadraticActionOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -991,7 +991,7 @@ EaseQuadraticActionOut* EaseQuadraticActionOut::create(ActionInterval* action)
|
|||
EaseQuadraticActionOut* EaseQuadraticActionOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuadraticActionOut();
|
||||
auto a = new (std::nothrow) EaseQuadraticActionOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1013,7 +1013,7 @@ EaseQuadraticActionOut* EaseQuadraticActionOut::reverse() const
|
|||
|
||||
EaseQuadraticActionInOut* EaseQuadraticActionInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuadraticActionInOut *ret = new EaseQuadraticActionInOut();
|
||||
EaseQuadraticActionInOut *ret = new (std::nothrow) EaseQuadraticActionInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1032,7 +1032,7 @@ EaseQuadraticActionInOut* EaseQuadraticActionInOut::create(ActionInterval* actio
|
|||
EaseQuadraticActionInOut* EaseQuadraticActionInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuadraticActionInOut();
|
||||
auto a = new (std::nothrow) EaseQuadraticActionInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1054,7 +1054,7 @@ EaseQuadraticActionInOut* EaseQuadraticActionInOut::reverse() const
|
|||
|
||||
EaseQuarticActionIn* EaseQuarticActionIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuarticActionIn *ret = new EaseQuarticActionIn();
|
||||
EaseQuarticActionIn *ret = new (std::nothrow) EaseQuarticActionIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1073,7 +1073,7 @@ EaseQuarticActionIn* EaseQuarticActionIn::create(ActionInterval* action)
|
|||
EaseQuarticActionIn* EaseQuarticActionIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuarticActionIn();
|
||||
auto a = new (std::nothrow) EaseQuarticActionIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1095,7 +1095,7 @@ EaseQuarticActionIn* EaseQuarticActionIn::reverse() const
|
|||
|
||||
EaseQuarticActionOut* EaseQuarticActionOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuarticActionOut *ret = new EaseQuarticActionOut();
|
||||
EaseQuarticActionOut *ret = new (std::nothrow) EaseQuarticActionOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1114,7 +1114,7 @@ EaseQuarticActionOut* EaseQuarticActionOut::create(ActionInterval* action)
|
|||
EaseQuarticActionOut* EaseQuarticActionOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuarticActionOut();
|
||||
auto a = new (std::nothrow) EaseQuarticActionOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1136,7 +1136,7 @@ EaseQuarticActionOut* EaseQuarticActionOut::reverse() const
|
|||
|
||||
EaseQuarticActionInOut* EaseQuarticActionInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuarticActionInOut *ret = new EaseQuarticActionInOut();
|
||||
EaseQuarticActionInOut *ret = new (std::nothrow) EaseQuarticActionInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1155,7 +1155,7 @@ EaseQuarticActionInOut* EaseQuarticActionInOut::create(ActionInterval* action)
|
|||
EaseQuarticActionInOut* EaseQuarticActionInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuarticActionInOut();
|
||||
auto a = new (std::nothrow) EaseQuarticActionInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1177,7 +1177,7 @@ EaseQuarticActionInOut* EaseQuarticActionInOut::reverse() const
|
|||
|
||||
EaseQuinticActionIn* EaseQuinticActionIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuinticActionIn *ret = new EaseQuinticActionIn();
|
||||
EaseQuinticActionIn *ret = new (std::nothrow) EaseQuinticActionIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1196,7 +1196,7 @@ EaseQuinticActionIn* EaseQuinticActionIn::create(ActionInterval* action)
|
|||
EaseQuinticActionIn* EaseQuinticActionIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuinticActionIn();
|
||||
auto a = new (std::nothrow) EaseQuinticActionIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1218,7 +1218,7 @@ EaseQuinticActionIn* EaseQuinticActionIn::reverse() const
|
|||
|
||||
EaseQuinticActionOut* EaseQuinticActionOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuinticActionOut *ret = new EaseQuinticActionOut();
|
||||
EaseQuinticActionOut *ret = new (std::nothrow) EaseQuinticActionOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1237,7 +1237,7 @@ EaseQuinticActionOut* EaseQuinticActionOut::create(ActionInterval* action)
|
|||
EaseQuinticActionOut* EaseQuinticActionOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuinticActionOut();
|
||||
auto a = new (std::nothrow) EaseQuinticActionOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1259,7 +1259,7 @@ EaseQuinticActionOut* EaseQuinticActionOut::reverse() const
|
|||
|
||||
EaseQuinticActionInOut* EaseQuinticActionInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseQuinticActionInOut *ret = new EaseQuinticActionInOut();
|
||||
EaseQuinticActionInOut *ret = new (std::nothrow) EaseQuinticActionInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1278,7 +1278,7 @@ EaseQuinticActionInOut* EaseQuinticActionInOut::create(ActionInterval* action)
|
|||
EaseQuinticActionInOut* EaseQuinticActionInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseQuinticActionInOut();
|
||||
auto a = new (std::nothrow) EaseQuinticActionInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1300,7 +1300,7 @@ EaseQuinticActionInOut* EaseQuinticActionInOut::reverse() const
|
|||
|
||||
EaseCircleActionIn* EaseCircleActionIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseCircleActionIn *ret = new EaseCircleActionIn();
|
||||
EaseCircleActionIn *ret = new (std::nothrow) EaseCircleActionIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1319,7 +1319,7 @@ EaseCircleActionIn* EaseCircleActionIn::create(ActionInterval* action)
|
|||
EaseCircleActionIn* EaseCircleActionIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCircleActionIn();
|
||||
auto a = new (std::nothrow) EaseCircleActionIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1341,7 +1341,7 @@ EaseCircleActionIn* EaseCircleActionIn::reverse() const
|
|||
|
||||
EaseCircleActionOut* EaseCircleActionOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseCircleActionOut *ret = new EaseCircleActionOut();
|
||||
EaseCircleActionOut *ret = new (std::nothrow) EaseCircleActionOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1360,7 +1360,7 @@ EaseCircleActionOut* EaseCircleActionOut::create(ActionInterval* action)
|
|||
EaseCircleActionOut* EaseCircleActionOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCircleActionOut();
|
||||
auto a = new (std::nothrow) EaseCircleActionOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1382,7 +1382,7 @@ EaseCircleActionOut* EaseCircleActionOut::reverse() const
|
|||
|
||||
EaseCircleActionInOut* EaseCircleActionInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseCircleActionInOut *ret = new EaseCircleActionInOut();
|
||||
EaseCircleActionInOut *ret = new (std::nothrow) EaseCircleActionInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1401,7 +1401,7 @@ EaseCircleActionInOut* EaseCircleActionInOut::create(ActionInterval* action)
|
|||
EaseCircleActionInOut* EaseCircleActionInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCircleActionInOut();
|
||||
auto a = new (std::nothrow) EaseCircleActionInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1423,7 +1423,7 @@ EaseCircleActionInOut* EaseCircleActionInOut::reverse() const
|
|||
|
||||
EaseCubicActionIn* EaseCubicActionIn::create(ActionInterval* action)
|
||||
{
|
||||
EaseCubicActionIn *ret = new EaseCubicActionIn();
|
||||
EaseCubicActionIn *ret = new (std::nothrow) EaseCubicActionIn();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1442,7 +1442,7 @@ EaseCubicActionIn* EaseCubicActionIn::create(ActionInterval* action)
|
|||
EaseCubicActionIn* EaseCubicActionIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCubicActionIn();
|
||||
auto a = new (std::nothrow) EaseCubicActionIn();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1464,7 +1464,7 @@ EaseCubicActionIn* EaseCubicActionIn::reverse() const
|
|||
|
||||
EaseCubicActionOut* EaseCubicActionOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseCubicActionOut *ret = new EaseCubicActionOut();
|
||||
EaseCubicActionOut *ret = new (std::nothrow) EaseCubicActionOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1483,7 +1483,7 @@ EaseCubicActionOut* EaseCubicActionOut::create(ActionInterval* action)
|
|||
EaseCubicActionOut* EaseCubicActionOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCubicActionOut();
|
||||
auto a = new (std::nothrow) EaseCubicActionOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1505,7 +1505,7 @@ EaseCubicActionOut* EaseCubicActionOut::reverse() const
|
|||
|
||||
EaseCubicActionInOut* EaseCubicActionInOut::create(ActionInterval* action)
|
||||
{
|
||||
EaseCubicActionInOut *ret = new EaseCubicActionInOut();
|
||||
EaseCubicActionInOut *ret = new (std::nothrow) EaseCubicActionInOut();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action))
|
||||
|
@ -1524,7 +1524,7 @@ EaseCubicActionInOut* EaseCubicActionInOut::create(ActionInterval* action)
|
|||
EaseCubicActionInOut* EaseCubicActionInOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new EaseCubicActionInOut();
|
||||
auto a = new (std::nothrow) EaseCubicActionInOut();
|
||||
a->initWithAction(_inner->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -152,7 +152,7 @@ void TiledGrid3DAction::setTile(const Vec2& pos, const Quad3& coords)
|
|||
|
||||
AccelDeccelAmplitude* AccelDeccelAmplitude::create(Action *action, float duration)
|
||||
{
|
||||
AccelDeccelAmplitude *ret = new AccelDeccelAmplitude();
|
||||
AccelDeccelAmplitude *ret = new (std::nothrow) AccelDeccelAmplitude();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, duration))
|
||||
|
@ -185,7 +185,7 @@ bool AccelDeccelAmplitude::initWithAction(Action *action, float duration)
|
|||
AccelDeccelAmplitude* AccelDeccelAmplitude::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new AccelDeccelAmplitude();
|
||||
auto a = new (std::nothrow) AccelDeccelAmplitude();
|
||||
a->initWithAction(_other->clone(), _rate);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -224,7 +224,7 @@ AccelDeccelAmplitude* AccelDeccelAmplitude::reverse() const
|
|||
|
||||
AccelAmplitude* AccelAmplitude::create(Action *action, float duration)
|
||||
{
|
||||
AccelAmplitude *ret = new AccelAmplitude();
|
||||
AccelAmplitude *ret = new (std::nothrow) AccelAmplitude();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, duration))
|
||||
|
@ -257,7 +257,7 @@ bool AccelAmplitude::initWithAction(Action *action, float duration)
|
|||
AccelAmplitude* AccelAmplitude::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new AccelAmplitude();
|
||||
auto a = new (std::nothrow) AccelAmplitude();
|
||||
a->initWithAction(_other->clone(), _duration);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -289,7 +289,7 @@ AccelAmplitude* AccelAmplitude::reverse() const
|
|||
|
||||
DeccelAmplitude* DeccelAmplitude::create(Action *action, float duration)
|
||||
{
|
||||
DeccelAmplitude *ret = new DeccelAmplitude();
|
||||
DeccelAmplitude *ret = new (std::nothrow) DeccelAmplitude();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithAction(action, duration))
|
||||
|
@ -339,7 +339,7 @@ void DeccelAmplitude::update(float time)
|
|||
DeccelAmplitude* DeccelAmplitude::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new DeccelAmplitude();
|
||||
auto a = new (std::nothrow) DeccelAmplitude();
|
||||
a->initWithAction(_other->clone(), _duration);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -371,7 +371,7 @@ void StopGrid::cacheTargetAsGridNode()
|
|||
|
||||
StopGrid* StopGrid::create()
|
||||
{
|
||||
StopGrid* pAction = new StopGrid();
|
||||
StopGrid* pAction = new (std::nothrow) StopGrid();
|
||||
pAction->autorelease();
|
||||
|
||||
return pAction;
|
||||
|
@ -392,7 +392,7 @@ StopGrid* StopGrid::reverse() const
|
|||
|
||||
ReuseGrid* ReuseGrid::create(int times)
|
||||
{
|
||||
ReuseGrid *action = new ReuseGrid();
|
||||
ReuseGrid *action = new (std::nothrow) ReuseGrid();
|
||||
if (action)
|
||||
{
|
||||
if (action->initWithTimes(times))
|
||||
|
|
|
@ -25,14 +25,13 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#include "2d/CCActionGrid3D.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
// implementation of Waves3D
|
||||
|
||||
Waves3D* Waves3D::create(float duration, const Size& gridSize, unsigned int waves, float amplitude)
|
||||
{
|
||||
Waves3D *pAction = new Waves3D();
|
||||
Waves3D *pAction = new (std::nothrow) Waves3D();
|
||||
|
||||
if (pAction)
|
||||
{
|
||||
|
@ -66,7 +65,7 @@ bool Waves3D::initWithDuration(float duration, const Size& gridSize, unsigned in
|
|||
Waves3D* Waves3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Waves3D();
|
||||
auto a = new (std::nothrow) Waves3D();
|
||||
a->initWithDuration(_duration, _gridSize, _waves, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -91,7 +90,7 @@ void Waves3D::update(float time)
|
|||
|
||||
FlipX3D* FlipX3D::create(float duration)
|
||||
{
|
||||
FlipX3D *action = new FlipX3D();
|
||||
FlipX3D *action = new (std::nothrow) FlipX3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -129,7 +128,7 @@ bool FlipX3D::initWithSize(const Size& gridSize, float duration)
|
|||
FlipX3D* FlipX3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FlipX3D();
|
||||
auto a = new (std::nothrow) FlipX3D();
|
||||
a->initWithSize(_gridSize, _duration);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -204,7 +203,7 @@ void FlipX3D::update(float time)
|
|||
FlipY3D* FlipY3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FlipY3D();
|
||||
auto a = new (std::nothrow) FlipY3D();
|
||||
a->initWithSize(_gridSize, _duration);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -212,7 +211,7 @@ FlipY3D* FlipY3D::clone() const
|
|||
|
||||
FlipY3D* FlipY3D::create(float duration)
|
||||
{
|
||||
FlipY3D *action = new FlipY3D();
|
||||
FlipY3D *action = new (std::nothrow) FlipY3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -298,7 +297,7 @@ void FlipY3D::update(float time)
|
|||
|
||||
Lens3D* Lens3D::create(float duration, const Size& gridSize, const Vec2& position, float radius)
|
||||
{
|
||||
Lens3D *action = new Lens3D();
|
||||
Lens3D *action = new (std::nothrow) Lens3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -335,7 +334,7 @@ bool Lens3D::initWithDuration(float duration, const Size& gridSize, const Vec2&
|
|||
Lens3D* Lens3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Lens3D();
|
||||
auto a = new (std::nothrow) Lens3D();
|
||||
a->initWithDuration(_duration, _gridSize, _position, _radius);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -397,7 +396,7 @@ void Lens3D::update(float time)
|
|||
|
||||
Ripple3D* Ripple3D::create(float duration, const Size& gridSize, const Vec2& position, float radius, unsigned int waves, float amplitude)
|
||||
{
|
||||
Ripple3D *action = new Ripple3D();
|
||||
Ripple3D *action = new (std::nothrow) Ripple3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -439,7 +438,7 @@ void Ripple3D::setPosition(const Vec2& position)
|
|||
Ripple3D* Ripple3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Ripple3D();
|
||||
auto a = new (std::nothrow) Ripple3D();
|
||||
a->initWithDuration(_duration, _gridSize, _position, _radius, _waves, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -473,7 +472,7 @@ void Ripple3D::update(float time)
|
|||
|
||||
Shaky3D* Shaky3D::create(float duration, const Size& gridSize, int range, bool shakeZ)
|
||||
{
|
||||
Shaky3D *action = new Shaky3D();
|
||||
Shaky3D *action = new (std::nothrow) Shaky3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -506,7 +505,7 @@ bool Shaky3D::initWithDuration(float duration, const Size& gridSize, int range,
|
|||
Shaky3D* Shaky3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Shaky3D();
|
||||
auto a = new (std::nothrow) Shaky3D();
|
||||
a->initWithDuration(_duration, _gridSize, _randrange, _shakeZ);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -538,7 +537,7 @@ void Shaky3D::update(float time)
|
|||
|
||||
Liquid* Liquid::create(float duration, const Size& gridSize, unsigned int waves, float amplitude)
|
||||
{
|
||||
Liquid *action = new Liquid();
|
||||
Liquid *action = new (std::nothrow) Liquid();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -572,7 +571,7 @@ bool Liquid::initWithDuration(float duration, const Size& gridSize, unsigned int
|
|||
Liquid* Liquid::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Liquid();
|
||||
auto a = new (std::nothrow) Liquid();
|
||||
a->initWithDuration(_duration, _gridSize, _waves, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -598,7 +597,7 @@ void Liquid::update(float time)
|
|||
|
||||
Waves* Waves::create(float duration, const Size& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical)
|
||||
{
|
||||
Waves *action = new Waves();
|
||||
Waves *action = new (std::nothrow) Waves();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -634,7 +633,7 @@ bool Waves::initWithDuration(float duration, const Size& gridSize, unsigned int
|
|||
Waves* Waves::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Waves();
|
||||
auto a = new (std::nothrow) Waves();
|
||||
a->initWithDuration(_duration, _gridSize, _waves, _amplitude, _horizontal, _vertical);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -669,7 +668,7 @@ void Waves::update(float time)
|
|||
|
||||
Twirl* Twirl::create(float duration, const Size& gridSize, Vec2 position, unsigned int twirls, float amplitude)
|
||||
{
|
||||
Twirl *action = new Twirl();
|
||||
Twirl *action = new (std::nothrow) Twirl();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -709,7 +708,7 @@ void Twirl::setPosition(const Vec2& position)
|
|||
Twirl *Twirl::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Twirl();
|
||||
auto a = new (std::nothrow) Twirl();
|
||||
a->initWithDuration(_duration, _gridSize, _position, _twirls, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "2d/CCActionInstant.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCSprite.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
@ -62,7 +61,7 @@ void ActionInstant::update(float time) {
|
|||
|
||||
Show* Show::create()
|
||||
{
|
||||
Show* ret = new Show();
|
||||
Show* ret = new (std::nothrow) Show();
|
||||
|
||||
if (ret) {
|
||||
ret->autorelease();
|
||||
|
@ -84,7 +83,7 @@ ActionInstant* Show::reverse() const
|
|||
Show * Show::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Show();
|
||||
auto a = new (std::nothrow) Show();
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
@ -94,7 +93,7 @@ Show * Show::clone() const
|
|||
//
|
||||
Hide * Hide::create()
|
||||
{
|
||||
Hide *ret = new Hide();
|
||||
Hide *ret = new (std::nothrow) Hide();
|
||||
|
||||
if (ret) {
|
||||
ret->autorelease();
|
||||
|
@ -116,7 +115,7 @@ ActionInstant *Hide::reverse() const
|
|||
Hide * Hide::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Hide();
|
||||
auto a = new (std::nothrow) Hide();
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
@ -126,7 +125,7 @@ Hide * Hide::clone() const
|
|||
//
|
||||
ToggleVisibility * ToggleVisibility::create()
|
||||
{
|
||||
ToggleVisibility *ret = new ToggleVisibility();
|
||||
ToggleVisibility *ret = new (std::nothrow) ToggleVisibility();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -150,7 +149,7 @@ ToggleVisibility * ToggleVisibility::reverse() const
|
|||
ToggleVisibility * ToggleVisibility::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ToggleVisibility();
|
||||
auto a = new (std::nothrow) ToggleVisibility();
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
@ -160,7 +159,7 @@ ToggleVisibility * ToggleVisibility::clone() const
|
|||
//
|
||||
RemoveSelf * RemoveSelf::create(bool isNeedCleanUp /*= true*/)
|
||||
{
|
||||
RemoveSelf *ret = new RemoveSelf();
|
||||
RemoveSelf *ret = new (std::nothrow) RemoveSelf();
|
||||
|
||||
if (ret && ret->init(isNeedCleanUp)) {
|
||||
ret->autorelease();
|
||||
|
@ -187,7 +186,7 @@ RemoveSelf *RemoveSelf::reverse() const
|
|||
RemoveSelf * RemoveSelf::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new RemoveSelf();
|
||||
auto a = new (std::nothrow) RemoveSelf();
|
||||
a->init(_isNeedCleanUp);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -199,7 +198,7 @@ RemoveSelf * RemoveSelf::clone() const
|
|||
|
||||
FlipX *FlipX::create(bool x)
|
||||
{
|
||||
FlipX *ret = new FlipX();
|
||||
FlipX *ret = new (std::nothrow) FlipX();
|
||||
|
||||
if (ret && ret->initWithFlipX(x)) {
|
||||
ret->autorelease();
|
||||
|
@ -228,7 +227,7 @@ FlipX* FlipX::reverse() const
|
|||
FlipX * FlipX::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FlipX();
|
||||
auto a = new (std::nothrow) FlipX();
|
||||
a->initWithFlipX(_flipX);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -239,7 +238,7 @@ FlipX * FlipX::clone() const
|
|||
|
||||
FlipY * FlipY::create(bool y)
|
||||
{
|
||||
FlipY *ret = new FlipY();
|
||||
FlipY *ret = new (std::nothrow) FlipY();
|
||||
|
||||
if (ret && ret->initWithFlipY(y)) {
|
||||
ret->autorelease();
|
||||
|
@ -268,7 +267,7 @@ FlipY* FlipY::reverse() const
|
|||
FlipY * FlipY::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FlipY();
|
||||
auto a = new (std::nothrow) FlipY();
|
||||
a->initWithFlipY(_flipY);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -280,7 +279,7 @@ FlipY * FlipY::clone() const
|
|||
|
||||
Place* Place::create(const Vec2& pos)
|
||||
{
|
||||
Place *ret = new Place();
|
||||
Place *ret = new (std::nothrow) Place();
|
||||
|
||||
if (ret && ret->initWithPosition(pos)) {
|
||||
ret->autorelease();
|
||||
|
@ -299,7 +298,7 @@ bool Place::initWithPosition(const Vec2& pos) {
|
|||
Place * Place::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Place();
|
||||
auto a = new (std::nothrow) Place();
|
||||
a->initWithPosition(_position);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -322,7 +321,7 @@ void Place::update(float time) {
|
|||
|
||||
CallFunc * CallFunc::create(const std::function<void()> &func)
|
||||
{
|
||||
CallFunc *ret = new CallFunc();
|
||||
CallFunc *ret = new (std::nothrow) CallFunc();
|
||||
|
||||
if (ret && ret->initWithFunction(func) ) {
|
||||
ret->autorelease();
|
||||
|
@ -335,7 +334,7 @@ CallFunc * CallFunc::create(const std::function<void()> &func)
|
|||
|
||||
CallFunc * CallFunc::create(Ref* selectorTarget, SEL_CallFunc selector)
|
||||
{
|
||||
CallFunc *ret = new CallFunc();
|
||||
CallFunc *ret = new (std::nothrow) CallFunc();
|
||||
|
||||
if (ret && ret->initWithTarget(selectorTarget)) {
|
||||
ret->_callFunc = selector;
|
||||
|
@ -376,7 +375,7 @@ CallFunc::~CallFunc()
|
|||
CallFunc * CallFunc::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CallFunc();
|
||||
auto a = new (std::nothrow) CallFunc();
|
||||
if( _selectorTarget) {
|
||||
a->initWithTarget(_selectorTarget);
|
||||
a->_callFunc = _callFunc;
|
||||
|
@ -414,7 +413,7 @@ void CallFunc::execute() {
|
|||
|
||||
CallFuncN * CallFuncN::create(const std::function<void(Node*)> &func)
|
||||
{
|
||||
auto ret = new CallFuncN();
|
||||
auto ret = new (std::nothrow) CallFuncN();
|
||||
|
||||
if (ret && ret->initWithFunction(func) ) {
|
||||
ret->autorelease();
|
||||
|
@ -428,7 +427,7 @@ CallFuncN * CallFuncN::create(const std::function<void(Node*)> &func)
|
|||
// XXX deprecated
|
||||
CallFuncN * CallFuncN::create(Ref* selectorTarget, SEL_CallFuncN selector)
|
||||
{
|
||||
CallFuncN *ret = new CallFuncN();
|
||||
CallFuncN *ret = new (std::nothrow) CallFuncN();
|
||||
|
||||
if (ret && ret->initWithTarget(selectorTarget, selector))
|
||||
{
|
||||
|
@ -468,7 +467,7 @@ bool CallFuncN::initWithTarget(Ref* selectorTarget, SEL_CallFuncN selector)
|
|||
CallFuncN * CallFuncN::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new CallFuncN();
|
||||
auto a = new (std::nothrow) CallFuncN();
|
||||
|
||||
if( _selectorTarget) {
|
||||
a->initWithTarget(_selectorTarget, _callFuncN);
|
||||
|
|
|
@ -28,10 +28,7 @@ THE SOFTWARE.
|
|||
#ifndef __CCINSTANT_ACTION_H__
|
||||
#define __CCINSTANT_ACTION_H__
|
||||
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#include "CCStdC.h"
|
||||
#include "2d/CCAction.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
|
@ -28,10 +28,12 @@ THE SOFTWARE.
|
|||
#include "2d/CCActionInterval.h"
|
||||
#include "2d/CCSprite.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCSpriteFrame.h"
|
||||
#include "CCStdC.h"
|
||||
#include "2d/CCActionInstant.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCEventCustom.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -50,7 +52,7 @@ public:
|
|||
|
||||
ExtraAction* ExtraAction::create()
|
||||
{
|
||||
ExtraAction* ret = new ExtraAction();
|
||||
ExtraAction* ret = new (std::nothrow) ExtraAction();
|
||||
if (ret)
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -60,7 +62,7 @@ ExtraAction* ExtraAction::create()
|
|||
ExtraAction* ExtraAction::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ExtraAction();
|
||||
auto a = new (std::nothrow) ExtraAction();
|
||||
a->autorelease();
|
||||
return a;
|
||||
}
|
||||
|
@ -155,7 +157,7 @@ void ActionInterval::startWithTarget(Node *target)
|
|||
|
||||
Sequence* Sequence::createWithTwoActions(FiniteTimeAction *actionOne, FiniteTimeAction *actionTwo)
|
||||
{
|
||||
Sequence *sequence = new Sequence();
|
||||
Sequence *sequence = new (std::nothrow) Sequence();
|
||||
sequence->initWithTwoActions(actionOne, actionTwo);
|
||||
sequence->autorelease();
|
||||
|
||||
|
@ -263,7 +265,7 @@ bool Sequence::initWithTwoActions(FiniteTimeAction *actionOne, FiniteTimeAction
|
|||
Sequence* Sequence::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Sequence();
|
||||
auto a = new (std::nothrow) Sequence();
|
||||
a->initWithTwoActions(_actions[0]->clone(), _actions[1]->clone() );
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -366,7 +368,7 @@ Sequence* Sequence::reverse() const
|
|||
|
||||
Repeat* Repeat::create(FiniteTimeAction *action, unsigned int times)
|
||||
{
|
||||
Repeat* repeat = new Repeat();
|
||||
Repeat* repeat = new (std::nothrow) Repeat();
|
||||
repeat->initWithAction(action, times);
|
||||
repeat->autorelease();
|
||||
|
||||
|
@ -400,7 +402,7 @@ bool Repeat::initWithAction(FiniteTimeAction *action, unsigned int times)
|
|||
Repeat* Repeat::clone(void) const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Repeat();
|
||||
auto a = new (std::nothrow) Repeat();
|
||||
a->initWithAction( _innerAction->clone(), _times );
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -489,7 +491,7 @@ RepeatForever::~RepeatForever()
|
|||
|
||||
RepeatForever *RepeatForever::create(ActionInterval *action)
|
||||
{
|
||||
RepeatForever *ret = new RepeatForever();
|
||||
RepeatForever *ret = new (std::nothrow) RepeatForever();
|
||||
if (ret && ret->initWithAction(action))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -510,7 +512,7 @@ bool RepeatForever::initWithAction(ActionInterval *action)
|
|||
RepeatForever *RepeatForever::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new RepeatForever();
|
||||
auto a = new (std::nothrow) RepeatForever();
|
||||
a->initWithAction(_innerAction->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -633,7 +635,7 @@ Spawn* Spawn::create(const Vector<FiniteTimeAction*>& arrayOfActions)
|
|||
|
||||
Spawn* Spawn::createWithTwoActions(FiniteTimeAction *action1, FiniteTimeAction *action2)
|
||||
{
|
||||
Spawn *spawn = new Spawn();
|
||||
Spawn *spawn = new (std::nothrow) Spawn();
|
||||
spawn->initWithTwoActions(action1, action2);
|
||||
spawn->autorelease();
|
||||
|
||||
|
@ -676,7 +678,7 @@ bool Spawn::initWithTwoActions(FiniteTimeAction *action1, FiniteTimeAction *acti
|
|||
Spawn* Spawn::clone(void) const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Spawn();
|
||||
auto a = new (std::nothrow) Spawn();
|
||||
a->initWithTwoActions(_one->clone(), _two->clone());
|
||||
|
||||
a->autorelease();
|
||||
|
@ -726,7 +728,7 @@ Spawn* Spawn::reverse() const
|
|||
|
||||
RotateTo* RotateTo::create(float duration, float dstAngle)
|
||||
{
|
||||
RotateTo* rotateTo = new RotateTo();
|
||||
RotateTo* rotateTo = new (std::nothrow) RotateTo();
|
||||
rotateTo->initWithDuration(duration, dstAngle, dstAngle);
|
||||
rotateTo->autorelease();
|
||||
|
||||
|
@ -735,7 +737,7 @@ RotateTo* RotateTo::create(float duration, float dstAngle)
|
|||
|
||||
RotateTo* RotateTo::create(float duration, float dstAngleX, float dstAngleY)
|
||||
{
|
||||
RotateTo* rotateTo = new RotateTo();
|
||||
RotateTo* rotateTo = new (std::nothrow) RotateTo();
|
||||
rotateTo->initWithDuration(duration, dstAngleX, dstAngleY);
|
||||
rotateTo->autorelease();
|
||||
|
||||
|
@ -744,7 +746,7 @@ RotateTo* RotateTo::create(float duration, float dstAngleX, float dstAngleY)
|
|||
|
||||
RotateTo* RotateTo::create(float duration, const Vec3& dstAngle3D)
|
||||
{
|
||||
RotateTo* rotateTo = new RotateTo();
|
||||
RotateTo* rotateTo = new (std::nothrow) RotateTo();
|
||||
rotateTo->initWithDuration(duration, dstAngle3D);
|
||||
rotateTo->autorelease();
|
||||
|
||||
|
@ -785,7 +787,7 @@ bool RotateTo::initWithDuration(float duration, const Vec3& dstAngle3D)
|
|||
RotateTo* RotateTo::clone(void) const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new RotateTo();
|
||||
auto a = new (std::nothrow) RotateTo();
|
||||
if(_is3D)
|
||||
a->initWithDuration(_duration, _dstAngle);
|
||||
else
|
||||
|
@ -885,7 +887,7 @@ RotateTo *RotateTo::reverse() const
|
|||
|
||||
RotateBy* RotateBy::create(float duration, float deltaAngle)
|
||||
{
|
||||
RotateBy *rotateBy = new RotateBy();
|
||||
RotateBy *rotateBy = new (std::nothrow) RotateBy();
|
||||
rotateBy->initWithDuration(duration, deltaAngle);
|
||||
rotateBy->autorelease();
|
||||
|
||||
|
@ -894,7 +896,7 @@ RotateBy* RotateBy::create(float duration, float deltaAngle)
|
|||
|
||||
RotateBy* RotateBy::create(float duration, float deltaAngleX, float deltaAngleY)
|
||||
{
|
||||
RotateBy *rotateBy = new RotateBy();
|
||||
RotateBy *rotateBy = new (std::nothrow) RotateBy();
|
||||
rotateBy->initWithDuration(duration, deltaAngleX, deltaAngleY);
|
||||
rotateBy->autorelease();
|
||||
|
||||
|
@ -903,7 +905,7 @@ RotateBy* RotateBy::create(float duration, float deltaAngleX, float deltaAngleY)
|
|||
|
||||
RotateBy* RotateBy::create(float duration, const Vec3& deltaAngle3D)
|
||||
{
|
||||
RotateBy *rotateBy = new RotateBy();
|
||||
RotateBy *rotateBy = new (std::nothrow) RotateBy();
|
||||
rotateBy->initWithDuration(duration, deltaAngle3D);
|
||||
rotateBy->autorelease();
|
||||
|
||||
|
@ -954,7 +956,7 @@ bool RotateBy::initWithDuration(float duration, const Vec3& deltaAngle3D)
|
|||
RotateBy* RotateBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new RotateBy();
|
||||
auto a = new (std::nothrow) RotateBy();
|
||||
if(_is3D)
|
||||
a->initWithDuration(_duration, _deltaAngle);
|
||||
else
|
||||
|
@ -1038,7 +1040,7 @@ RotateBy* RotateBy::reverse() const
|
|||
|
||||
MoveBy* MoveBy::create(float duration, const Vec2& deltaPosition)
|
||||
{
|
||||
MoveBy *ret = new MoveBy();
|
||||
MoveBy *ret = new (std::nothrow) MoveBy();
|
||||
ret->initWithDuration(duration, deltaPosition);
|
||||
ret->autorelease();
|
||||
|
||||
|
@ -1059,7 +1061,7 @@ bool MoveBy::initWithDuration(float duration, const Vec2& deltaPosition)
|
|||
MoveBy* MoveBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new MoveBy();
|
||||
auto a = new (std::nothrow) MoveBy();
|
||||
a->initWithDuration(_duration, _positionDelta);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1100,7 +1102,7 @@ void MoveBy::update(float t)
|
|||
|
||||
MoveTo* MoveTo::create(float duration, const Vec2& position)
|
||||
{
|
||||
MoveTo *ret = new MoveTo();
|
||||
MoveTo *ret = new (std::nothrow) MoveTo();
|
||||
ret->initWithDuration(duration, position);
|
||||
ret->autorelease();
|
||||
|
||||
|
@ -1121,7 +1123,7 @@ bool MoveTo::initWithDuration(float duration, const Vec2& position)
|
|||
MoveTo* MoveTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new MoveTo();
|
||||
auto a = new (std::nothrow) MoveTo();
|
||||
a->initWithDuration(_duration, _endPosition);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1139,7 +1141,7 @@ void MoveTo::startWithTarget(Node *target)
|
|||
//
|
||||
SkewTo* SkewTo::create(float t, float sx, float sy)
|
||||
{
|
||||
SkewTo *skewTo = new SkewTo();
|
||||
SkewTo *skewTo = new (std::nothrow) SkewTo();
|
||||
if (skewTo)
|
||||
{
|
||||
if (skewTo->initWithDuration(t, sx, sy))
|
||||
|
@ -1173,7 +1175,7 @@ bool SkewTo::initWithDuration(float t, float sx, float sy)
|
|||
SkewTo* SkewTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new SkewTo();
|
||||
auto a = new (std::nothrow) SkewTo();
|
||||
a->initWithDuration(_duration, _endSkewX, _endSkewY);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1257,7 +1259,7 @@ SkewTo::SkewTo()
|
|||
//
|
||||
SkewBy* SkewBy::create(float t, float sx, float sy)
|
||||
{
|
||||
SkewBy *skewBy = new SkewBy();
|
||||
SkewBy *skewBy = new (std::nothrow) SkewBy();
|
||||
if (skewBy)
|
||||
{
|
||||
if (skewBy->initWithDuration(t, sx, sy))
|
||||
|
@ -1276,7 +1278,7 @@ SkewBy* SkewBy::create(float t, float sx, float sy)
|
|||
SkewBy * SkewBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new SkewBy();
|
||||
auto a = new (std::nothrow) SkewBy();
|
||||
a->initWithDuration(_duration, _skewX, _skewY);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1317,7 +1319,7 @@ SkewBy* SkewBy::reverse() const
|
|||
|
||||
JumpBy* JumpBy::create(float duration, const Vec2& position, float height, int jumps)
|
||||
{
|
||||
JumpBy *jumpBy = new JumpBy();
|
||||
JumpBy *jumpBy = new (std::nothrow) JumpBy();
|
||||
jumpBy->initWithDuration(duration, position, height, jumps);
|
||||
jumpBy->autorelease();
|
||||
|
||||
|
@ -1343,7 +1345,7 @@ bool JumpBy::initWithDuration(float duration, const Vec2& position, float height
|
|||
JumpBy* JumpBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new JumpBy();
|
||||
auto a = new (std::nothrow) JumpBy();
|
||||
a->initWithDuration(_duration, _delta, _height, _jumps);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1393,7 +1395,7 @@ JumpBy* JumpBy::reverse() const
|
|||
|
||||
JumpTo* JumpTo::create(float duration, const Vec2& position, float height, int jumps)
|
||||
{
|
||||
JumpTo *jumpTo = new JumpTo();
|
||||
JumpTo *jumpTo = new (std::nothrow) JumpTo();
|
||||
jumpTo->initWithDuration(duration, position, height, jumps);
|
||||
jumpTo->autorelease();
|
||||
|
||||
|
@ -1403,7 +1405,7 @@ JumpTo* JumpTo::create(float duration, const Vec2& position, float height, int j
|
|||
JumpTo* JumpTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new JumpTo();
|
||||
auto a = new (std::nothrow) JumpTo();
|
||||
a->initWithDuration(_duration, _delta, _height, _jumps);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1439,7 +1441,7 @@ static inline float bezierat( float a, float b, float c, float d, float t )
|
|||
|
||||
BezierBy* BezierBy::create(float t, const ccBezierConfig& c)
|
||||
{
|
||||
BezierBy *bezierBy = new BezierBy();
|
||||
BezierBy *bezierBy = new (std::nothrow) BezierBy();
|
||||
bezierBy->initWithDuration(t, c);
|
||||
bezierBy->autorelease();
|
||||
|
||||
|
@ -1466,7 +1468,7 @@ void BezierBy::startWithTarget(Node *target)
|
|||
BezierBy* BezierBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new BezierBy();
|
||||
auto a = new (std::nothrow) BezierBy();
|
||||
a->initWithDuration(_duration, _config);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1522,7 +1524,7 @@ BezierBy* BezierBy::reverse() const
|
|||
|
||||
BezierTo* BezierTo::create(float t, const ccBezierConfig& c)
|
||||
{
|
||||
BezierTo *bezierTo = new BezierTo();
|
||||
BezierTo *bezierTo = new (std::nothrow) BezierTo();
|
||||
bezierTo->initWithDuration(t, c);
|
||||
bezierTo->autorelease();
|
||||
|
||||
|
@ -1543,7 +1545,7 @@ bool BezierTo::initWithDuration(float t, const ccBezierConfig &c)
|
|||
BezierTo* BezierTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new BezierTo();
|
||||
auto a = new (std::nothrow) BezierTo();
|
||||
a->initWithDuration(_duration, _toConfig);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1569,7 +1571,7 @@ BezierTo* BezierTo::reverse() const
|
|||
//
|
||||
ScaleTo* ScaleTo::create(float duration, float s)
|
||||
{
|
||||
ScaleTo *scaleTo = new ScaleTo();
|
||||
ScaleTo *scaleTo = new (std::nothrow) ScaleTo();
|
||||
scaleTo->initWithDuration(duration, s);
|
||||
scaleTo->autorelease();
|
||||
|
||||
|
@ -1578,7 +1580,7 @@ ScaleTo* ScaleTo::create(float duration, float s)
|
|||
|
||||
ScaleTo* ScaleTo::create(float duration, float sx, float sy)
|
||||
{
|
||||
ScaleTo *scaleTo = new ScaleTo();
|
||||
ScaleTo *scaleTo = new (std::nothrow) ScaleTo();
|
||||
scaleTo->initWithDuration(duration, sx, sy);
|
||||
scaleTo->autorelease();
|
||||
|
||||
|
@ -1587,7 +1589,7 @@ ScaleTo* ScaleTo::create(float duration, float sx, float sy)
|
|||
|
||||
ScaleTo* ScaleTo::create(float duration, float sx, float sy, float sz)
|
||||
{
|
||||
ScaleTo *scaleTo = new ScaleTo();
|
||||
ScaleTo *scaleTo = new (std::nothrow) ScaleTo();
|
||||
scaleTo->initWithDuration(duration, sx, sy, sz);
|
||||
scaleTo->autorelease();
|
||||
|
||||
|
@ -1639,7 +1641,7 @@ bool ScaleTo::initWithDuration(float duration, float sx, float sy, float sz)
|
|||
ScaleTo* ScaleTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ScaleTo();
|
||||
auto a = new (std::nothrow) ScaleTo();
|
||||
a->initWithDuration(_duration, _endScaleX, _endScaleY, _endScaleZ);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1679,7 +1681,7 @@ void ScaleTo::update(float time)
|
|||
|
||||
ScaleBy* ScaleBy::create(float duration, float s)
|
||||
{
|
||||
ScaleBy *scaleBy = new ScaleBy();
|
||||
ScaleBy *scaleBy = new (std::nothrow) ScaleBy();
|
||||
scaleBy->initWithDuration(duration, s);
|
||||
scaleBy->autorelease();
|
||||
|
||||
|
@ -1688,7 +1690,7 @@ ScaleBy* ScaleBy::create(float duration, float s)
|
|||
|
||||
ScaleBy* ScaleBy::create(float duration, float sx, float sy)
|
||||
{
|
||||
ScaleBy *scaleBy = new ScaleBy();
|
||||
ScaleBy *scaleBy = new (std::nothrow) ScaleBy();
|
||||
scaleBy->initWithDuration(duration, sx, sy, 1.f);
|
||||
scaleBy->autorelease();
|
||||
|
||||
|
@ -1697,7 +1699,7 @@ ScaleBy* ScaleBy::create(float duration, float sx, float sy)
|
|||
|
||||
ScaleBy* ScaleBy::create(float duration, float sx, float sy, float sz)
|
||||
{
|
||||
ScaleBy *scaleBy = new ScaleBy();
|
||||
ScaleBy *scaleBy = new (std::nothrow) ScaleBy();
|
||||
scaleBy->initWithDuration(duration, sx, sy, sz);
|
||||
scaleBy->autorelease();
|
||||
|
||||
|
@ -1707,7 +1709,7 @@ ScaleBy* ScaleBy::create(float duration, float sx, float sy, float sz)
|
|||
ScaleBy* ScaleBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ScaleBy();
|
||||
auto a = new (std::nothrow) ScaleBy();
|
||||
a->initWithDuration(_duration, _endScaleX, _endScaleY, _endScaleZ);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1732,7 +1734,7 @@ ScaleBy* ScaleBy::reverse() const
|
|||
|
||||
Blink* Blink::create(float duration, int blinks)
|
||||
{
|
||||
Blink *blink = new Blink();
|
||||
Blink *blink = new (std::nothrow) Blink();
|
||||
blink->initWithDuration(duration, blinks);
|
||||
blink->autorelease();
|
||||
|
||||
|
@ -1767,7 +1769,7 @@ void Blink::startWithTarget(Node *target)
|
|||
Blink* Blink::clone(void) const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Blink();
|
||||
auto a = new (std::nothrow) Blink();
|
||||
a->initWithDuration(_duration, _times);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1794,7 +1796,7 @@ Blink* Blink::reverse() const
|
|||
|
||||
FadeIn* FadeIn::create(float d)
|
||||
{
|
||||
FadeIn* action = new FadeIn();
|
||||
FadeIn* action = new (std::nothrow) FadeIn();
|
||||
|
||||
action->initWithDuration(d,255.0f);
|
||||
action->autorelease();
|
||||
|
@ -1805,7 +1807,7 @@ FadeIn* FadeIn::create(float d)
|
|||
FadeIn* FadeIn::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeIn();
|
||||
auto a = new (std::nothrow) FadeIn();
|
||||
a->initWithDuration(_duration,255.0f);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1848,7 +1850,7 @@ void FadeIn::startWithTarget(cocos2d::Node *target)
|
|||
|
||||
FadeOut* FadeOut::create(float d)
|
||||
{
|
||||
FadeOut* action = new FadeOut();
|
||||
FadeOut* action = new (std::nothrow) FadeOut();
|
||||
|
||||
action->initWithDuration(d,0.0f);
|
||||
action->autorelease();
|
||||
|
@ -1859,7 +1861,7 @@ FadeOut* FadeOut::create(float d)
|
|||
FadeOut* FadeOut::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeOut();
|
||||
auto a = new (std::nothrow) FadeOut();
|
||||
a->initWithDuration(_duration,0.0f);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1899,7 +1901,7 @@ FadeTo* FadeOut::reverse() const
|
|||
|
||||
FadeTo* FadeTo::create(float duration, GLubyte opacity)
|
||||
{
|
||||
FadeTo *fadeTo = new FadeTo();
|
||||
FadeTo *fadeTo = new (std::nothrow) FadeTo();
|
||||
fadeTo->initWithDuration(duration, opacity);
|
||||
fadeTo->autorelease();
|
||||
|
||||
|
@ -1920,7 +1922,7 @@ bool FadeTo::initWithDuration(float duration, GLubyte opacity)
|
|||
FadeTo* FadeTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeTo();
|
||||
auto a = new (std::nothrow) FadeTo();
|
||||
a->initWithDuration(_duration, _toOpacity);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -1957,7 +1959,7 @@ void FadeTo::update(float time)
|
|||
//
|
||||
TintTo* TintTo::create(float duration, GLubyte red, GLubyte green, GLubyte blue)
|
||||
{
|
||||
TintTo *tintTo = new TintTo();
|
||||
TintTo *tintTo = new (std::nothrow) TintTo();
|
||||
tintTo->initWithDuration(duration, red, green, blue);
|
||||
tintTo->autorelease();
|
||||
|
||||
|
@ -1978,7 +1980,7 @@ bool TintTo::initWithDuration(float duration, GLubyte red, GLubyte green, GLubyt
|
|||
TintTo* TintTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new TintTo();
|
||||
auto a = new (std::nothrow) TintTo();
|
||||
a->initWithDuration(_duration, _to.r, _to.g, _to.b);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -2016,7 +2018,7 @@ void TintTo::update(float time)
|
|||
|
||||
TintBy* TintBy::create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue)
|
||||
{
|
||||
TintBy *tintBy = new TintBy();
|
||||
TintBy *tintBy = new (std::nothrow) TintBy();
|
||||
tintBy->initWithDuration(duration, deltaRed, deltaGreen, deltaBlue);
|
||||
tintBy->autorelease();
|
||||
|
||||
|
@ -2040,7 +2042,7 @@ bool TintBy::initWithDuration(float duration, GLshort deltaRed, GLshort deltaGre
|
|||
TintBy* TintBy::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new TintBy();
|
||||
auto a = new (std::nothrow) TintBy();
|
||||
a->initWithDuration(_duration, (GLubyte)_deltaR, (GLubyte)_deltaG, (GLubyte)_deltaB);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -2079,7 +2081,7 @@ TintBy* TintBy::reverse() const
|
|||
//
|
||||
DelayTime* DelayTime::create(float d)
|
||||
{
|
||||
DelayTime* action = new DelayTime();
|
||||
DelayTime* action = new (std::nothrow) DelayTime();
|
||||
|
||||
action->initWithDuration(d);
|
||||
action->autorelease();
|
||||
|
@ -2090,7 +2092,7 @@ DelayTime* DelayTime::create(float d)
|
|||
DelayTime* DelayTime::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new DelayTime();
|
||||
auto a = new (std::nothrow) DelayTime();
|
||||
a->initWithDuration(_duration);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -2114,7 +2116,7 @@ DelayTime* DelayTime::reverse() const
|
|||
ReverseTime* ReverseTime::create(FiniteTimeAction *action)
|
||||
{
|
||||
// casting to prevent warnings
|
||||
ReverseTime *reverseTime = new ReverseTime();
|
||||
ReverseTime *reverseTime = new (std::nothrow) ReverseTime();
|
||||
reverseTime->initWithAction( action->clone() );
|
||||
reverseTime->autorelease();
|
||||
|
||||
|
@ -2143,7 +2145,7 @@ bool ReverseTime::initWithAction(FiniteTimeAction *action)
|
|||
ReverseTime* ReverseTime::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ReverseTime();
|
||||
auto a = new (std::nothrow) ReverseTime();
|
||||
a->initWithAction( _other->clone() );
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -2190,7 +2192,7 @@ ReverseTime* ReverseTime::reverse() const
|
|||
//
|
||||
Animate* Animate::create(Animation *animation)
|
||||
{
|
||||
Animate *animate = new Animate();
|
||||
Animate *animate = new (std::nothrow) Animate();
|
||||
animate->initWithAnimation(animation);
|
||||
animate->autorelease();
|
||||
|
||||
|
@ -2260,7 +2262,7 @@ void Animate::setAnimation(cocos2d::Animation *animation)
|
|||
Animate* Animate::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Animate();
|
||||
auto a = new (std::nothrow) Animate();
|
||||
a->initWithAnimation(_animation->clone());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -2325,7 +2327,7 @@ void Animate::update(float t)
|
|||
if ( !dict.empty() )
|
||||
{
|
||||
if (_frameDisplayedEvent == nullptr)
|
||||
_frameDisplayedEvent = new EventCustom(AnimationFrameDisplayedNotification);
|
||||
_frameDisplayedEvent = new (std::nothrow) EventCustom(AnimationFrameDisplayedNotification);
|
||||
|
||||
_frameDisplayedEventInfo.target = _target;
|
||||
_frameDisplayedEventInfo.userInfo = &dict;
|
||||
|
@ -2382,7 +2384,7 @@ TargetedAction::~TargetedAction()
|
|||
|
||||
TargetedAction* TargetedAction::create(Node* target, FiniteTimeAction* action)
|
||||
{
|
||||
TargetedAction* p = new TargetedAction();
|
||||
TargetedAction* p = new (std::nothrow) TargetedAction();
|
||||
p->initWithTarget(target, action);
|
||||
p->autorelease();
|
||||
return p;
|
||||
|
@ -2405,7 +2407,7 @@ bool TargetedAction::initWithTarget(Node* target, FiniteTimeAction* action)
|
|||
TargetedAction* TargetedAction::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new TargetedAction();
|
||||
auto a = new (std::nothrow) TargetedAction();
|
||||
// win32 : use the _other's copy object.
|
||||
a->initWithTarget(_forcedTarget, _action->clone());
|
||||
a->autorelease();
|
||||
|
@ -2415,7 +2417,7 @@ TargetedAction* TargetedAction::clone() const
|
|||
TargetedAction* TargetedAction::reverse() const
|
||||
{
|
||||
// just reverse the internal action
|
||||
auto a = new TargetedAction();
|
||||
auto a = new (std::nothrow) TargetedAction();
|
||||
a->initWithTarget(_forcedTarget, _action->reverse());
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -30,15 +30,17 @@ THE SOFTWARE.
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCAction.h"
|
||||
#include "2d/CCSpriteFrame.h"
|
||||
#include "2d/CCAnimation.h"
|
||||
#include "base/CCProtocols.h"
|
||||
#include "base/CCVector.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Node;
|
||||
class SpriteFrame;
|
||||
class EventCustom;
|
||||
|
||||
/**
|
||||
* @addtogroup actions
|
||||
* @{
|
||||
|
|
|
@ -28,6 +28,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCActionManager.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCAction.h"
|
||||
#include "base/CCScheduler.h"
|
||||
#include "base/ccMacros.h"
|
||||
#include "base/ccCArray.h"
|
||||
|
|
|
@ -35,6 +35,8 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Action;
|
||||
|
||||
struct _hashElement;
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@ NS_CC_BEGIN
|
|||
|
||||
PageTurn3D* PageTurn3D::create(float duration, const Size& gridSize)
|
||||
{
|
||||
PageTurn3D *action = new PageTurn3D();
|
||||
PageTurn3D *action = new (std::nothrow) PageTurn3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ PageTurn3D* PageTurn3D::create(float duration, const Size& gridSize)
|
|||
PageTurn3D *PageTurn3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new PageTurn3D();
|
||||
auto a = new (std::nothrow) PageTurn3D();
|
||||
a->initWithDuration(_duration, _gridSize);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -34,7 +34,7 @@ NS_CC_BEGIN
|
|||
|
||||
ProgressTo* ProgressTo::create(float duration, float percent)
|
||||
{
|
||||
ProgressTo *progressTo = new ProgressTo();
|
||||
ProgressTo *progressTo = new (std::nothrow) ProgressTo();
|
||||
progressTo->initWithDuration(duration, percent);
|
||||
progressTo->autorelease();
|
||||
|
||||
|
@ -56,7 +56,7 @@ bool ProgressTo::initWithDuration(float duration, float percent)
|
|||
ProgressTo* ProgressTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ProgressTo();
|
||||
auto a = new (std::nothrow) ProgressTo();
|
||||
a->initWithDuration(_duration, _to);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -83,7 +83,7 @@ void ProgressTo::update(float time)
|
|||
|
||||
ProgressFromTo* ProgressFromTo::create(float duration, float fromPercentage, float toPercentage)
|
||||
{
|
||||
ProgressFromTo *progressFromTo = new ProgressFromTo();
|
||||
ProgressFromTo *progressFromTo = new (std::nothrow) ProgressFromTo();
|
||||
progressFromTo->initWithDuration(duration, fromPercentage, toPercentage);
|
||||
progressFromTo->autorelease();
|
||||
|
||||
|
@ -106,7 +106,7 @@ bool ProgressFromTo::initWithDuration(float duration, float fromPercentage, floa
|
|||
ProgressFromTo* ProgressFromTo::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ProgressFromTo();
|
||||
auto a = new (std::nothrow) ProgressFromTo();
|
||||
a->initWithDuration(_duration, _from, _to);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -28,7 +28,6 @@ THE SOFTWARE.
|
|||
#include "2d/CCNodeGrid.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/ccMacros.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -43,7 +42,7 @@ struct Tile
|
|||
|
||||
ShakyTiles3D* ShakyTiles3D::create(float duration, const Size& gridSize, int range, bool shakeZ)
|
||||
{
|
||||
ShakyTiles3D *action = new ShakyTiles3D();
|
||||
ShakyTiles3D *action = new (std::nothrow) ShakyTiles3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -76,7 +75,7 @@ bool ShakyTiles3D::initWithDuration(float duration, const Size& gridSize, int ra
|
|||
ShakyTiles3D* ShakyTiles3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ShakyTiles3D();
|
||||
auto a = new (std::nothrow) ShakyTiles3D();
|
||||
a->initWithDuration(_duration, _gridSize, _randrange, _shakeZ);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -122,7 +121,7 @@ void ShakyTiles3D::update(float time)
|
|||
|
||||
ShatteredTiles3D* ShatteredTiles3D::create(float duration, const Size& gridSize, int range, bool shatterZ)
|
||||
{
|
||||
ShatteredTiles3D *action = new ShatteredTiles3D();
|
||||
ShatteredTiles3D *action = new (std::nothrow) ShatteredTiles3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -156,7 +155,7 @@ bool ShatteredTiles3D::initWithDuration(float duration, const Size& gridSize, in
|
|||
ShatteredTiles3D* ShatteredTiles3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ShatteredTiles3D();
|
||||
auto a = new (std::nothrow) ShatteredTiles3D();
|
||||
a->initWithDuration(_duration, _gridSize, _randrange, _shatterZ);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -207,7 +206,7 @@ void ShatteredTiles3D::update(float time)
|
|||
|
||||
ShuffleTiles* ShuffleTiles::create(float duration, const Size& gridSize, unsigned int seed)
|
||||
{
|
||||
ShuffleTiles *action = new ShuffleTiles();
|
||||
ShuffleTiles *action = new (std::nothrow) ShuffleTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -241,7 +240,7 @@ bool ShuffleTiles::initWithDuration(float duration, const Size& gridSize, unsign
|
|||
ShuffleTiles* ShuffleTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ShuffleTiles();
|
||||
auto a = new (std::nothrow) ShuffleTiles();
|
||||
a->initWithDuration(_duration, _gridSize, _seed);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -353,7 +352,7 @@ void ShuffleTiles::update(float time)
|
|||
|
||||
FadeOutTRTiles* FadeOutTRTiles::create(float duration, const Size& gridSize)
|
||||
{
|
||||
FadeOutTRTiles *action = new FadeOutTRTiles();
|
||||
FadeOutTRTiles *action = new (std::nothrow) FadeOutTRTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -373,7 +372,7 @@ FadeOutTRTiles* FadeOutTRTiles::create(float duration, const Size& gridSize)
|
|||
FadeOutTRTiles* FadeOutTRTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeOutTRTiles();
|
||||
auto a = new (std::nothrow) FadeOutTRTiles();
|
||||
a->initWithDuration(_duration, _gridSize);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -449,7 +448,7 @@ void FadeOutTRTiles::update(float time)
|
|||
|
||||
FadeOutBLTiles* FadeOutBLTiles::create(float duration, const Size& gridSize)
|
||||
{
|
||||
FadeOutBLTiles *action = new FadeOutBLTiles();
|
||||
FadeOutBLTiles *action = new (std::nothrow) FadeOutBLTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -469,7 +468,7 @@ FadeOutBLTiles* FadeOutBLTiles::create(float duration, const Size& gridSize)
|
|||
FadeOutBLTiles* FadeOutBLTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeOutBLTiles();
|
||||
auto a = new (std::nothrow) FadeOutBLTiles();
|
||||
a->initWithDuration(_duration, _gridSize);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -490,7 +489,7 @@ float FadeOutBLTiles::testFunc(const Size& pos, float time)
|
|||
|
||||
FadeOutUpTiles* FadeOutUpTiles::create(float duration, const Size& gridSize)
|
||||
{
|
||||
FadeOutUpTiles *action = new FadeOutUpTiles();
|
||||
FadeOutUpTiles *action = new (std::nothrow) FadeOutUpTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -510,7 +509,7 @@ FadeOutUpTiles* FadeOutUpTiles::create(float duration, const Size& gridSize)
|
|||
FadeOutUpTiles* FadeOutUpTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeOutUpTiles();
|
||||
auto a = new (std::nothrow) FadeOutUpTiles();
|
||||
a->initWithDuration(_duration, _gridSize);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -544,7 +543,7 @@ void FadeOutUpTiles::transformTile(const Vec2& pos, float distance)
|
|||
|
||||
FadeOutDownTiles* FadeOutDownTiles::create(float duration, const Size& gridSize)
|
||||
{
|
||||
FadeOutDownTiles *action = new FadeOutDownTiles();
|
||||
FadeOutDownTiles *action = new (std::nothrow) FadeOutDownTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -564,7 +563,7 @@ FadeOutDownTiles* FadeOutDownTiles::create(float duration, const Size& gridSize)
|
|||
FadeOutDownTiles* FadeOutDownTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new FadeOutDownTiles();
|
||||
auto a = new (std::nothrow) FadeOutDownTiles();
|
||||
a->initWithDuration(_duration, _gridSize);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -585,7 +584,7 @@ float FadeOutDownTiles::testFunc(const Size& pos, float time)
|
|||
|
||||
TurnOffTiles* TurnOffTiles::create(float duration, const Size& gridSize)
|
||||
{
|
||||
TurnOffTiles* pAction = new TurnOffTiles();
|
||||
TurnOffTiles* pAction = new (std::nothrow) TurnOffTiles();
|
||||
if (pAction->initWithDuration(duration, gridSize, 0))
|
||||
{
|
||||
pAction->autorelease();
|
||||
|
@ -599,7 +598,7 @@ TurnOffTiles* TurnOffTiles::create(float duration, const Size& gridSize)
|
|||
|
||||
TurnOffTiles* TurnOffTiles::create(float duration, const Size& gridSize, unsigned int seed)
|
||||
{
|
||||
TurnOffTiles *action = new TurnOffTiles();
|
||||
TurnOffTiles *action = new (std::nothrow) TurnOffTiles();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -632,7 +631,7 @@ bool TurnOffTiles::initWithDuration(float duration, const Size& gridSize, unsign
|
|||
TurnOffTiles* TurnOffTiles::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new TurnOffTiles();
|
||||
auto a = new (std::nothrow) TurnOffTiles();
|
||||
a->initWithDuration(_duration, _gridSize, _seed );
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -712,7 +711,7 @@ void TurnOffTiles::update(float time)
|
|||
|
||||
WavesTiles3D* WavesTiles3D::create(float duration, const Size& gridSize, unsigned int waves, float amplitude)
|
||||
{
|
||||
WavesTiles3D *action = new WavesTiles3D();
|
||||
WavesTiles3D *action = new (std::nothrow) WavesTiles3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -746,7 +745,7 @@ bool WavesTiles3D::initWithDuration(float duration, const Size& gridSize, unsign
|
|||
WavesTiles3D* WavesTiles3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new WavesTiles3D();
|
||||
auto a = new (std::nothrow) WavesTiles3D();
|
||||
a->initWithDuration(_duration, _gridSize, _waves, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -775,7 +774,7 @@ void WavesTiles3D::update(float time)
|
|||
|
||||
JumpTiles3D* JumpTiles3D::create(float duration, const Size& gridSize, unsigned int numberOfJumps, float amplitude)
|
||||
{
|
||||
JumpTiles3D *action = new JumpTiles3D();
|
||||
JumpTiles3D *action = new (std::nothrow) JumpTiles3D();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -809,7 +808,7 @@ bool JumpTiles3D::initWithDuration(float duration, const Size& gridSize, unsigne
|
|||
JumpTiles3D* JumpTiles3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new JumpTiles3D();
|
||||
auto a = new (std::nothrow) JumpTiles3D();
|
||||
a->initWithDuration(_duration, _gridSize, _jumps, _amplitude);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -850,7 +849,7 @@ void JumpTiles3D::update(float time)
|
|||
|
||||
SplitRows* SplitRows::create(float duration, unsigned int nRows)
|
||||
{
|
||||
SplitRows *action = new SplitRows();
|
||||
SplitRows *action = new (std::nothrow) SplitRows();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -877,7 +876,7 @@ bool SplitRows::initWithDuration(float duration, unsigned int rows)
|
|||
SplitRows* SplitRows::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new SplitRows();
|
||||
auto a = new (std::nothrow) SplitRows();
|
||||
a->initWithDuration(_duration, _rows);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
@ -914,7 +913,7 @@ void SplitRows::update(float time)
|
|||
|
||||
SplitCols* SplitCols::create(float duration, unsigned int cols)
|
||||
{
|
||||
SplitCols *action = new SplitCols();
|
||||
SplitCols *action = new (std::nothrow) SplitCols();
|
||||
|
||||
if (action)
|
||||
{
|
||||
|
@ -940,7 +939,7 @@ bool SplitCols::initWithDuration(float duration, unsigned int cols)
|
|||
SplitCols* SplitCols::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new SplitCols();
|
||||
auto a = new (std::nothrow) SplitCols();
|
||||
a->initWithDuration(_duration, _cols);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -30,7 +30,7 @@ NS_CC_BEGIN
|
|||
|
||||
ActionTween* ActionTween::create(float duration, const std::string& key, float from, float to)
|
||||
{
|
||||
ActionTween* ret = new ActionTween();
|
||||
ActionTween* ret = new (std::nothrow) ActionTween();
|
||||
if (ret && ret->initWithDuration(duration, key, from, to))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -58,7 +58,7 @@ bool ActionTween::initWithDuration(float duration, const std::string& key, float
|
|||
ActionTween *ActionTween::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new ActionTween();
|
||||
auto a = new (std::nothrow) ActionTween();
|
||||
a->initWithDuration(_duration, _key.c_str(), _from, _to);
|
||||
a->autorelease();
|
||||
return a;
|
||||
|
|
|
@ -35,7 +35,7 @@ NS_CC_BEGIN
|
|||
|
||||
AnimationFrame* AnimationFrame::create(SpriteFrame* spriteFrame, float delayUnits, const ValueMap& userInfo)
|
||||
{
|
||||
auto ret = new AnimationFrame();
|
||||
auto ret = new (std::nothrow) AnimationFrame();
|
||||
if (ret && ret->initWithSpriteFrame(spriteFrame, delayUnits, userInfo))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -73,7 +73,7 @@ AnimationFrame::~AnimationFrame()
|
|||
AnimationFrame* AnimationFrame::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto frame = new AnimationFrame();
|
||||
auto frame = new (std::nothrow) AnimationFrame();
|
||||
frame->initWithSpriteFrame(_spriteFrame->clone(),
|
||||
_delayUnits,
|
||||
_userInfo);
|
||||
|
@ -86,7 +86,7 @@ AnimationFrame* AnimationFrame::clone() const
|
|||
|
||||
Animation* Animation::create(void)
|
||||
{
|
||||
Animation *animation = new Animation();
|
||||
Animation *animation = new (std::nothrow) Animation();
|
||||
animation->init();
|
||||
animation->autorelease();
|
||||
|
||||
|
@ -95,7 +95,7 @@ Animation* Animation::create(void)
|
|||
|
||||
Animation* Animation::createWithSpriteFrames(const Vector<SpriteFrame*>& frames, float delay/* = 0.0f*/, unsigned int loops/* = 1*/)
|
||||
{
|
||||
Animation *animation = new Animation();
|
||||
Animation *animation = new (std::nothrow) Animation();
|
||||
animation->initWithSpriteFrames(frames, delay, loops);
|
||||
animation->autorelease();
|
||||
|
||||
|
@ -104,7 +104,7 @@ Animation* Animation::createWithSpriteFrames(const Vector<SpriteFrame*>& frames,
|
|||
|
||||
Animation* Animation::create(const Vector<AnimationFrame*>& arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops /* = 1 */)
|
||||
{
|
||||
Animation *animation = new Animation();
|
||||
Animation *animation = new (std::nothrow) Animation();
|
||||
animation->initWithAnimationFrames(arrayOfAnimationFrameNames, delayPerUnit, loops);
|
||||
animation->autorelease();
|
||||
return animation;
|
||||
|
@ -194,7 +194,7 @@ float Animation::getDuration(void) const
|
|||
Animation* Animation::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
auto a = new Animation();
|
||||
auto a = new (std::nothrow) Animation();
|
||||
a->initWithAnimationFrames(_frames, _delayPerUnit, _loops);
|
||||
a->setRestoreOriginalFrame(_restoreOriginalFrame);
|
||||
a->autorelease();
|
||||
|
|
|
@ -42,7 +42,7 @@ AnimationCache* AnimationCache::getInstance()
|
|||
{
|
||||
if (! s_sharedAnimationCache)
|
||||
{
|
||||
s_sharedAnimationCache = new AnimationCache();
|
||||
s_sharedAnimationCache = new (std::nothrow) AnimationCache();
|
||||
s_sharedAnimationCache->init();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,6 @@ THE SOFTWARE.
|
|||
#include "renderer/CCTextureCache.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "math/TransformUtils.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -62,7 +59,7 @@ AtlasNode::~AtlasNode()
|
|||
|
||||
AtlasNode * AtlasNode::create(const std::string& tile, int tileWidth, int tileHeight, int itemsToRender)
|
||||
{
|
||||
AtlasNode * ret = new AtlasNode();
|
||||
AtlasNode * ret = new (std::nothrow) AtlasNode();
|
||||
if (ret->initWithTileFile(tile, tileWidth, tileHeight, itemsToRender))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -89,7 +86,7 @@ bool AtlasNode::initWithTexture(Texture2D* texture, int tileWidth, int tileHeigh
|
|||
|
||||
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
|
||||
_textureAtlas = new TextureAtlas();
|
||||
_textureAtlas = new (std::nothrow) TextureAtlas();
|
||||
_textureAtlas->initWithTexture(texture, itemsToRender);
|
||||
|
||||
if (! _textureAtlas)
|
||||
|
|
|
@ -84,7 +84,7 @@ ClippingNode::~ClippingNode()
|
|||
|
||||
ClippingNode* ClippingNode::create()
|
||||
{
|
||||
ClippingNode *ret = new ClippingNode();
|
||||
ClippingNode *ret = new (std::nothrow) ClippingNode();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -99,7 +99,7 @@ ClippingNode* ClippingNode::create()
|
|||
|
||||
ClippingNode* ClippingNode::create(Node *pStencil)
|
||||
{
|
||||
ClippingNode *ret = new ClippingNode();
|
||||
ClippingNode *ret = new (std::nothrow) ClippingNode();
|
||||
if (ret && ret->init(pStencil))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -110,7 +110,7 @@ bool Component::serialize(void *ar)
|
|||
|
||||
Component* Component::create(void)
|
||||
{
|
||||
Component * ret = new Component();
|
||||
Component * ret = new (std::nothrow) Component();
|
||||
if (ret != nullptr && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -60,7 +60,7 @@ bool ComponentContainer::add(Component *com)
|
|||
{
|
||||
if (_components == nullptr)
|
||||
{
|
||||
_components = new Map<std::string, Component*>();
|
||||
_components = new (std::nothrow) Map<std::string, Component*>();
|
||||
}
|
||||
Component *component = _components->at(com->getName());
|
||||
|
||||
|
@ -135,7 +135,7 @@ void ComponentContainer::removeAll()
|
|||
|
||||
void ComponentContainer::alloc(void)
|
||||
{
|
||||
_components = new Map<std::string, Component*>();
|
||||
_components = new (std::nothrow) Map<std::string, Component*>();
|
||||
}
|
||||
|
||||
void ComponentContainer::visit(float delta)
|
||||
|
|
|
@ -25,9 +25,8 @@
|
|||
#include "CCGL.h"
|
||||
#include "base/CCEventType.h"
|
||||
#include "base/CCConfiguration.h"
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
|
@ -130,7 +129,7 @@ DrawNode::~DrawNode()
|
|||
|
||||
DrawNode* DrawNode::create()
|
||||
{
|
||||
DrawNode* ret = new DrawNode();
|
||||
DrawNode* ret = new (std::nothrow) DrawNode();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -41,13 +41,10 @@ THE SOFTWARE.
|
|||
#include <string.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "base/ccTypes.h"
|
||||
#include "base/ccMacros.h"
|
||||
#include "CCGL.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "renderer/CCGLProgramCache.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "2d/CCActionCatmullRom.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
|
||||
|
@ -161,7 +158,7 @@ void drawPoints( const Vec2 *points, unsigned int numberOfPoints )
|
|||
s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize);
|
||||
|
||||
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed
|
||||
Vec2* newPoints = new Vec2[numberOfPoints];
|
||||
Vec2* newPoints = new (std::nothrow) Vec2[numberOfPoints];
|
||||
|
||||
// iPhone and 32-bit machines optimization
|
||||
if( sizeof(Vec2) == sizeof(Vec2) )
|
||||
|
@ -272,7 +269,7 @@ void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon)
|
|||
{
|
||||
// Mac on 64-bit
|
||||
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed
|
||||
Vec2* newPoli = new Vec2[numberOfPoints];
|
||||
Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints];
|
||||
for( unsigned int i=0; i<numberOfPoints;i++) {
|
||||
newPoli[i].x = poli[i].x;
|
||||
newPoli[i].y = poli[i].y;
|
||||
|
@ -306,7 +303,7 @@ void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color)
|
|||
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION );
|
||||
|
||||
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed
|
||||
Vec2* newPoli = new Vec2[numberOfPoints];
|
||||
Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints];
|
||||
|
||||
// iPhone and 32-bit machines optimization
|
||||
if (sizeof(Vec2) == sizeof(Vec2))
|
||||
|
@ -438,7 +435,7 @@ void drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destina
|
|||
{
|
||||
lazy_init();
|
||||
|
||||
Vec2* vertices = new Vec2[segments + 1];
|
||||
Vec2* vertices = new (std::nothrow) Vec2[segments + 1];
|
||||
|
||||
float t = 0.0f;
|
||||
for(unsigned int i = 0; i < segments; i++)
|
||||
|
@ -477,7 +474,7 @@ void drawCardinalSpline( PointArray *config, float tension, unsigned int segmen
|
|||
{
|
||||
lazy_init();
|
||||
|
||||
Vec2* vertices = new Vec2[segments + 1];
|
||||
Vec2* vertices = new (std::nothrow) Vec2[segments + 1];
|
||||
|
||||
ssize_t p;
|
||||
float lt;
|
||||
|
@ -529,7 +526,7 @@ void drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& contr
|
|||
{
|
||||
lazy_init();
|
||||
|
||||
Vec2* vertices = new Vec2[segments + 1];
|
||||
Vec2* vertices = new (std::nothrow) Vec2[segments + 1];
|
||||
|
||||
float t = 0;
|
||||
for (unsigned int i = 0; i < segments; i++)
|
||||
|
|
|
@ -40,6 +40,7 @@ THE SOFTWARE.
|
|||
#include "2d/CCSprite.h"
|
||||
#include "renderer/CCTextureCache.h"
|
||||
#include "renderer/CCGLProgramCache.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCConfiguration.h"
|
||||
|
@ -58,7 +59,7 @@ const int TMXLayer::FAST_TMX_ORIENTATION_ISO = 2;
|
|||
// FastTMXLayer - init & alloc & dealloc
|
||||
TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
TMXLayer *ret = new TMXLayer();
|
||||
TMXLayer *ret = new (std::nothrow) TMXLayer();
|
||||
if (ret->initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace experimental {
|
|||
|
||||
TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
||||
{
|
||||
TMXTiledMap *ret = new TMXTiledMap();
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
if (ret->initWithTMXFile(tmxFile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -52,7 +52,7 @@ TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
|||
|
||||
TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
{
|
||||
TMXTiledMap *ret = new TMXTiledMap();
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
if (ret->initWithXML(tmxString, resourcePath))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -27,11 +27,12 @@
|
|||
#define _CCFont_h_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "2d/CCLabel.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class FontAtlas;
|
||||
|
||||
// fwd
|
||||
class FontAtlas;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ FontAtlas::FontAtlas(Font &theFont)
|
|||
{
|
||||
_commonLineHeight = _font->getFontMaxHeight();
|
||||
_fontAscender = fontTTf->getFontAscender();
|
||||
auto texture = new Texture2D;
|
||||
auto texture = new (std::nothrow) Texture2D;
|
||||
_currentPage = 0;
|
||||
_currentPageOrigX = 0;
|
||||
_currentPageOrigY = 0;
|
||||
|
@ -256,7 +256,7 @@ bool FontAtlas::prepareLetterDefinitions(const std::u16string& utf16String)
|
|||
_currentPageOrigY = 0;
|
||||
memset(_currentPageData, 0, _currentPageDataSize);
|
||||
_currentPage++;
|
||||
auto tex = new Texture2D;
|
||||
auto tex = new (std::nothrow) Texture2D;
|
||||
if (_antialiasEnabled)
|
||||
{
|
||||
tex->setAntiAliasTexParameters();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "base/CCPlatformMacros.h"
|
||||
#include "base/CCRef.h"
|
||||
#include "CCStdC.h"
|
||||
#include "CCStdC.h" // ssize_t on windows
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
|
||||
#include "2d/CCFontFNT.h"
|
||||
#include "2d/CCFontFreeType.h"
|
||||
#include "CCFontCharMap.h"
|
||||
#include "2d/CCFontAtlas.h"
|
||||
#include "2d/CCFontCharMap.h"
|
||||
#include "base/CCDirector.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "2d/CCFontAtlas.h"
|
||||
#include "2d/CCLabel.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class FontAtlas;
|
||||
|
||||
class CC_DLL FontAtlasCache
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -23,10 +23,9 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCFontCharMap.h"
|
||||
#include "2d/CCFontCharMap.h"
|
||||
#include "2d/CCFontAtlas.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "base/ccUTF8.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "renderer/CCTextureCache.h"
|
||||
|
||||
|
@ -120,7 +119,7 @@ int * FontCharMap::getHorizontalKerningForTextUTF16(const std::u16string& text,
|
|||
|
||||
FontAtlas * FontCharMap::createFontAtlas()
|
||||
{
|
||||
FontAtlas *tempAtlas = new FontAtlas(*this);
|
||||
FontAtlas *tempAtlas = new (std::nothrow) FontAtlas(*this);
|
||||
if (!tempAtlas)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef _CCFontCharMap_h_
|
||||
#define _CCFontCharMap_h_
|
||||
|
||||
#include "CCFont.h"
|
||||
#include "2d/CCFont.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "2d/CCFontFNT.h"
|
||||
#include "base/uthash.h"
|
||||
#include "2d/CCFontAtlas.h"
|
||||
#include "base/ccUTF8.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "base/CCConfiguration.h"
|
||||
#include "base/CCDirector.h"
|
||||
|
@ -168,7 +167,7 @@ BMFontConfiguration* FNTConfigLoadFile(const std::string& fntFile)
|
|||
|
||||
if( s_configurations == nullptr )
|
||||
{
|
||||
s_configurations = new Map<std::string, BMFontConfiguration*>();
|
||||
s_configurations = new (std::nothrow) Map<std::string, BMFontConfiguration*>();
|
||||
}
|
||||
|
||||
ret = s_configurations->at(fntFile);
|
||||
|
@ -190,7 +189,7 @@ BMFontConfiguration* FNTConfigLoadFile(const std::string& fntFile)
|
|||
|
||||
BMFontConfiguration * BMFontConfiguration::create(const std::string& FNTfile)
|
||||
{
|
||||
BMFontConfiguration * ret = new BMFontConfiguration();
|
||||
BMFontConfiguration * ret = new (std::nothrow) BMFontConfiguration();
|
||||
if (ret->initWithFNTfile(FNTfile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -753,7 +752,7 @@ int FontFNT::getHorizontalKerningForChars(unsigned short firstChar, unsigned sh
|
|||
|
||||
FontAtlas * FontFNT::createFontAtlas()
|
||||
{
|
||||
FontAtlas *tempAtlas = new FontAtlas(*this);
|
||||
FontAtlas *tempAtlas = new (std::nothrow) FontAtlas(*this);
|
||||
if (!tempAtlas)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCFontFreeType.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <algorithm>
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/ccUTF8.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
@ -174,7 +172,7 @@ FontFreeType::~FontFreeType()
|
|||
|
||||
FontAtlas * FontFreeType::createFontAtlas()
|
||||
{
|
||||
FontAtlas *atlas = new FontAtlas(*this);
|
||||
FontAtlas *atlas = new (std::nothrow) FontAtlas(*this);
|
||||
if (_usedGlyphs != GlyphCollection::DYNAMIC)
|
||||
{
|
||||
std::u16string utf16;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#define _FontFreetype_h_
|
||||
|
||||
#include "CCFont.h"
|
||||
#include "base/CCData.h"
|
||||
|
||||
#include <string>
|
||||
#include <ft2build.h>
|
||||
|
|
|
@ -26,7 +26,6 @@ THE SOFTWARE.
|
|||
#ifndef __EFFECTS_CCGRABBER_H__
|
||||
#define __EFFECTS_CCGRABBER_H__
|
||||
|
||||
#include "base/CCConfiguration.h"
|
||||
#include "base/CCRef.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
|
|
|
@ -23,25 +23,25 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "2d/CCGrid.h"
|
||||
|
||||
#include "base/ccMacros.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "2d/CCGrabber.h"
|
||||
#include "base/ccUtils.h"
|
||||
#include "2d/CCGrid.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCGrabber.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/CCGLProgramCache.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "renderer/CCTexture2D.h"
|
||||
#include "CCGL.h"
|
||||
#include "math/TransformUtils.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
// implementation of GridBase
|
||||
|
||||
GridBase* GridBase::create(const Size& gridSize)
|
||||
{
|
||||
GridBase *pGridBase = new GridBase();
|
||||
GridBase *pGridBase = new (std::nothrow) GridBase();
|
||||
|
||||
if (pGridBase)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ GridBase* GridBase::create(const Size& gridSize)
|
|||
|
||||
GridBase* GridBase::create(const Size& gridSize, Texture2D *texture, bool flipped)
|
||||
{
|
||||
GridBase *pGridBase = new GridBase();
|
||||
GridBase *pGridBase = new (std::nothrow) GridBase();
|
||||
|
||||
if (pGridBase)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ bool GridBase::initWithSize(const Size& gridSize, Texture2D *texture, bool flipp
|
|||
_step.x = texSize.width / _gridSize.width;
|
||||
_step.y = texSize.height / _gridSize.height;
|
||||
|
||||
_grabber = new Grabber();
|
||||
_grabber = new (std::nothrow) Grabber();
|
||||
if (_grabber)
|
||||
{
|
||||
_grabber->grab(_texture);
|
||||
|
@ -129,7 +129,7 @@ bool GridBase::initWithSize(const Size& gridSize)
|
|||
return false;
|
||||
}
|
||||
|
||||
Texture2D *texture = new Texture2D();
|
||||
Texture2D *texture = new (std::nothrow) Texture2D();
|
||||
texture->initWithData(data, dataLen, format, POTWide, POTHigh, s);
|
||||
|
||||
free(data);
|
||||
|
@ -254,7 +254,7 @@ void GridBase::calculateVertexPoints(void)
|
|||
|
||||
Grid3D* Grid3D::create(const Size& gridSize, Texture2D *texture, bool flipped)
|
||||
{
|
||||
Grid3D *ret= new Grid3D();
|
||||
Grid3D *ret= new (std::nothrow) Grid3D();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ Grid3D* Grid3D::create(const Size& gridSize, Texture2D *texture, bool flipped)
|
|||
|
||||
Grid3D* Grid3D::create(const Size& gridSize)
|
||||
{
|
||||
Grid3D *ret= new Grid3D();
|
||||
Grid3D *ret= new (std::nothrow) Grid3D();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -321,21 +321,7 @@ void Grid3D::blit(void)
|
|||
//
|
||||
// Attributes
|
||||
//
|
||||
#ifdef EMSCRIPTEN
|
||||
// Size calculations from calculateVertexPoints().
|
||||
unsigned int numOfPoints = (_gridSize.width+1) * (_gridSize.height+1);
|
||||
|
||||
// position
|
||||
setGLBufferData(_vertices, numOfPoints * sizeof(Vec3), 0);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, 0);
|
||||
|
||||
// texCoords
|
||||
setGLBufferData(_texCoordinates, numOfPoints * sizeof(Vec2), 1);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, 0);
|
||||
|
||||
setGLIndexData(_indices, n * 12, 0);
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, 0);
|
||||
#else
|
||||
// position
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices);
|
||||
|
||||
|
@ -343,8 +329,6 @@ void Grid3D::blit(void)
|
|||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates);
|
||||
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, _indices);
|
||||
#endif // EMSCRIPTEN
|
||||
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6);
|
||||
}
|
||||
|
||||
void Grid3D::calculateVertexPoints(void)
|
||||
|
@ -487,7 +471,7 @@ TiledGrid3D::~TiledGrid3D(void)
|
|||
|
||||
TiledGrid3D* TiledGrid3D::create(const Size& gridSize, Texture2D *texture, bool flipped)
|
||||
{
|
||||
TiledGrid3D *ret= new TiledGrid3D();
|
||||
TiledGrid3D *ret= new (std::nothrow) TiledGrid3D();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -507,7 +491,7 @@ TiledGrid3D* TiledGrid3D::create(const Size& gridSize, Texture2D *texture, bool
|
|||
|
||||
TiledGrid3D* TiledGrid3D::create(const Size& gridSize)
|
||||
{
|
||||
TiledGrid3D *ret= new TiledGrid3D();
|
||||
TiledGrid3D *ret= new (std::nothrow) TiledGrid3D();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -537,20 +521,7 @@ void TiledGrid3D::blit(void)
|
|||
// Attributes
|
||||
//
|
||||
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION | GL::VERTEX_ATTRIB_FLAG_TEX_COORD );
|
||||
#ifdef EMSCRIPTEN
|
||||
int numQuads = _gridSize.width * _gridSize.height;
|
||||
|
||||
// position
|
||||
setGLBufferData(_vertices, (numQuads*4*sizeof(Vec3)), 0);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, 0);
|
||||
|
||||
// texCoords
|
||||
setGLBufferData(_texCoordinates, (numQuads*4*sizeof(Vec2)), 1);
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, 0);
|
||||
|
||||
setGLIndexData(_indices, n * 12, 0);
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, 0);
|
||||
#else
|
||||
// position
|
||||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices);
|
||||
|
||||
|
@ -558,8 +529,6 @@ void TiledGrid3D::blit(void)
|
|||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates);
|
||||
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei)n*6, GL_UNSIGNED_SHORT, _indices);
|
||||
#endif // EMSCRIPTEN
|
||||
|
||||
|
||||
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6);
|
||||
}
|
||||
|
|
|
@ -29,17 +29,13 @@ THE SOFTWARE.
|
|||
#include "base/CCRef.h"
|
||||
#include "base/ccTypes.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "2d/CCNode.h"
|
||||
#include "renderer/CCTexture2D.h"
|
||||
#ifdef EMSCRIPTEN
|
||||
#include "CCGLBufferedNode.h"
|
||||
#endif // EMSCRIPTEN
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Texture2D;
|
||||
class Grabber;
|
||||
class GLProgram;
|
||||
class Node;
|
||||
|
||||
/**
|
||||
* @addtogroup effects
|
||||
|
@ -108,9 +104,6 @@ protected:
|
|||
Grid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
|
||||
*/
|
||||
class CC_DLL Grid3D : public GridBase
|
||||
#ifdef EMSCRIPTEN
|
||||
, public GLBufferedNode
|
||||
#endif // EMSCRIPTEN
|
||||
{
|
||||
public:
|
||||
/** create one Grid */
|
||||
|
@ -171,9 +164,6 @@ protected:
|
|||
the tiles can be separated from the grid.
|
||||
*/
|
||||
class CC_DLL TiledGrid3D : public GridBase
|
||||
#ifdef EMSCRIPTEN
|
||||
, public GLBufferedNode
|
||||
#endif // EMSCRIPTEN
|
||||
{
|
||||
public:
|
||||
/** create one Grid */
|
||||
|
|
|
@ -28,17 +28,14 @@
|
|||
#include "2d/CCSprite.h"
|
||||
#include "2d/CCLabelTextFormatter.h"
|
||||
#include "base/ccUTF8.h"
|
||||
#include "2d/CCSpriteFrame.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "2d/CCFont.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
#include "base/CCEventType.h"
|
||||
#include "base/CCEventCustom.h"
|
||||
#include "base/CCProfiling.h"
|
||||
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
|
@ -48,7 +45,7 @@ const int Label::DistanceFieldFontSize = 50;
|
|||
|
||||
Label* Label::create()
|
||||
{
|
||||
auto ret = new Label();
|
||||
auto ret = new (std::nothrow) Label();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -72,7 +69,7 @@ Label* Label::create(const std::string& text, const std::string& font, float fon
|
|||
|
||||
Label* Label::createWithSystemFont(const std::string& text, const std::string& font, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
||||
{
|
||||
auto ret = new Label(nullptr,hAlignment,vAlignment);
|
||||
auto ret = new (std::nothrow) Label(nullptr,hAlignment,vAlignment);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -92,7 +89,7 @@ Label* Label::createWithSystemFont(const std::string& text, const std::string& f
|
|||
|
||||
Label* Label::createWithTTF(const std::string& text, const std::string& fontFile, float fontSize, const Size& dimensions /* = Size::ZERO */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */, TextVAlignment vAlignment /* = TextVAlignment::TOP */)
|
||||
{
|
||||
auto ret = new Label(nullptr,hAlignment,vAlignment);
|
||||
auto ret = new (std::nothrow) Label(nullptr,hAlignment,vAlignment);
|
||||
|
||||
if (ret && FileUtils::getInstance()->isFileExist(fontFile))
|
||||
{
|
||||
|
@ -114,7 +111,7 @@ Label* Label::createWithTTF(const std::string& text, const std::string& fontFile
|
|||
|
||||
Label* Label::createWithTTF(const TTFConfig& ttfConfig, const std::string& text, TextHAlignment alignment /* = TextHAlignment::CENTER */, int maxLineWidth /* = 0 */)
|
||||
{
|
||||
auto ret = new Label(nullptr,alignment);
|
||||
auto ret = new (std::nothrow) Label(nullptr,alignment);
|
||||
|
||||
if (ret && FileUtils::getInstance()->isFileExist(ttfConfig.fontFilePath) && ret->setTTFConfig(ttfConfig))
|
||||
{
|
||||
|
@ -131,7 +128,7 @@ Label* Label::createWithTTF(const TTFConfig& ttfConfig, const std::string& text,
|
|||
|
||||
Label* Label::createWithBMFont(const std::string& bmfontFilePath, const std::string& text,const TextHAlignment& alignment /* = TextHAlignment::LEFT */, int maxLineWidth /* = 0 */, const Vec2& imageOffset /* = Vec2::ZERO */)
|
||||
{
|
||||
auto ret = new Label(nullptr,alignment);
|
||||
auto ret = new (std::nothrow) Label(nullptr,alignment);
|
||||
|
||||
if (ret && ret->setBMFontFilePath(bmfontFilePath,imageOffset))
|
||||
{
|
||||
|
@ -148,7 +145,7 @@ Label* Label::createWithBMFont(const std::string& bmfontFilePath, const std::str
|
|||
|
||||
Label* Label::createWithCharMap(const std::string& plistFile)
|
||||
{
|
||||
auto ret = new Label();
|
||||
auto ret = new (std::nothrow) Label();
|
||||
|
||||
if (ret && ret->setCharMap(plistFile))
|
||||
{
|
||||
|
@ -162,7 +159,7 @@ Label* Label::createWithCharMap(const std::string& plistFile)
|
|||
|
||||
Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap)
|
||||
{
|
||||
auto ret = new Label();
|
||||
auto ret = new (std::nothrow) Label();
|
||||
|
||||
if (ret && ret->setCharMap(texture,itemWidth,itemHeight,startCharMap))
|
||||
{
|
||||
|
@ -176,7 +173,7 @@ Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeigh
|
|||
|
||||
Label* Label::createWithCharMap(const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap)
|
||||
{
|
||||
auto ret = new Label();
|
||||
auto ret = new (std::nothrow) Label();
|
||||
|
||||
if (ret && ret->setCharMap(charMapFile,itemWidth,itemHeight,startCharMap))
|
||||
{
|
||||
|
@ -895,7 +892,7 @@ void Label::createSpriteWithFontDefinition()
|
|||
{
|
||||
_currentLabelType = LabelType::STRING_TEXTURE;
|
||||
|
||||
auto texture = new Texture2D;
|
||||
auto texture = new (std::nothrow) Texture2D;
|
||||
texture->initWithString(_originalUTF8String.c_str(),_fontDefinition);
|
||||
|
||||
_textSprite = Sprite::createWithTexture(texture);
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define _COCOS2D_CCLABEL_H_
|
||||
|
||||
#include "2d/CCSpriteBatchNode.h"
|
||||
#include "base/ccTypes.h"
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
#include "2d/CCFontAtlas.h"
|
||||
|
||||
|
|
|
@ -24,17 +24,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "CCLabelAtlas.h"
|
||||
#include "2d/CCLabelAtlas.h"
|
||||
#include "renderer/CCTextureAtlas.h"
|
||||
#include "2d/CCDrawingPrimitives.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "base/ccConfig.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "renderer/CCTextureCache.h"
|
||||
#include "renderer/CCGLProgramCache.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "math/TransformUtils.h"
|
||||
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
|
@ -49,7 +43,7 @@ NS_CC_BEGIN
|
|||
|
||||
LabelAtlas* LabelAtlas::create()
|
||||
{
|
||||
LabelAtlas* ret = new LabelAtlas();
|
||||
LabelAtlas* ret = new (std::nothrow) LabelAtlas();
|
||||
if (ret)
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -64,7 +58,7 @@ LabelAtlas* LabelAtlas::create()
|
|||
|
||||
LabelAtlas* LabelAtlas::create(const std::string& string, const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap)
|
||||
{
|
||||
LabelAtlas* ret = new LabelAtlas();
|
||||
LabelAtlas* ret = new (std::nothrow) LabelAtlas();
|
||||
if(ret && ret->initWithString(string, charMapFile, itemWidth, itemHeight, startCharMap))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -93,7 +87,7 @@ bool LabelAtlas::initWithString(const std::string& string, Texture2D* texture, i
|
|||
|
||||
LabelAtlas* LabelAtlas::create(const std::string& string, const std::string& fntFile)
|
||||
{
|
||||
LabelAtlas *ret = new LabelAtlas();
|
||||
LabelAtlas *ret = new (std::nothrow) LabelAtlas();
|
||||
if (ret)
|
||||
{
|
||||
if (ret->initWithString(string, fntFile))
|
||||
|
|
|
@ -31,8 +31,7 @@ http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java)
|
|||
http://www.angelcode.com/products/bmfont/ (Free, Windows only)
|
||||
|
||||
****************************************************************************/
|
||||
#include "CCLabelBMFont.h"
|
||||
#include "2d/CCDrawingPrimitives.h"
|
||||
#include "2d/CCLabelBMFont.h"
|
||||
#include "deprecated/CCString.h"
|
||||
#include "2d/CCSprite.h"
|
||||
|
||||
|
@ -54,7 +53,7 @@ NS_CC_BEGIN
|
|||
|
||||
LabelBMFont * LabelBMFont::create()
|
||||
{
|
||||
LabelBMFont * pRet = new LabelBMFont();
|
||||
LabelBMFont * pRet = new (std::nothrow) LabelBMFont();
|
||||
if (pRet)
|
||||
{
|
||||
pRet->autorelease();
|
||||
|
@ -67,7 +66,7 @@ LabelBMFont * LabelBMFont::create()
|
|||
//LabelBMFont - Creation & Init
|
||||
LabelBMFont *LabelBMFont::create(const std::string& str, const std::string& fntFile, float width /* = 0 */, TextHAlignment alignment /* = TextHAlignment::LEFT */,const Vec2& imageOffset /* = Vec2::ZERO */)
|
||||
{
|
||||
LabelBMFont *ret = new LabelBMFont();
|
||||
LabelBMFont *ret = new (std::nothrow) LabelBMFont();
|
||||
if(ret && ret->initWithString(str, fntFile, width, alignment,imageOffset))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "CCLabelTTF.h"
|
||||
#include "2d/CCLabelTTF.h"
|
||||
#include "2d/CCLabel.h"
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@ LabelTTF::~LabelTTF()
|
|||
|
||||
LabelTTF * LabelTTF::create()
|
||||
{
|
||||
LabelTTF * ret = new LabelTTF();
|
||||
LabelTTF * ret = new (std::nothrow) LabelTTF();
|
||||
if (ret)
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -70,7 +70,7 @@ LabelTTF* LabelTTF::create(const std::string& string, const std::string& fontNam
|
|||
const Size &dimensions, TextHAlignment hAlignment,
|
||||
TextVAlignment vAlignment)
|
||||
{
|
||||
LabelTTF *ret = new LabelTTF();
|
||||
LabelTTF *ret = new (std::nothrow) LabelTTF();
|
||||
if(ret && ret->initWithString(string, fontName, fontSize, dimensions, hAlignment, vAlignment))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -82,7 +82,7 @@ LabelTTF* LabelTTF::create(const std::string& string, const std::string& fontNam
|
|||
|
||||
LabelTTF * LabelTTF::createWithFontDefinition(const std::string& string, FontDefinition &textDefinition)
|
||||
{
|
||||
LabelTTF *ret = new LabelTTF();
|
||||
LabelTTF *ret = new (std::nothrow) LabelTTF();
|
||||
if(ret && ret->initWithStringAndTextDefinition(string, textDefinition))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -29,10 +29,6 @@ THE SOFTWARE.
|
|||
#include "2d/CCLayer.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include "platform/CCDevice.h"
|
||||
#include "2d/CCScene.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "base/CCDirector.h"
|
||||
|
@ -43,7 +39,7 @@ THE SOFTWARE.
|
|||
#include "base/CCEventListenerKeyboard.h"
|
||||
#include "base/CCEventAcceleration.h"
|
||||
#include "base/CCEventListenerAcceleration.h"
|
||||
#include "math/TransformUtils.h"
|
||||
|
||||
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
|
@ -82,7 +78,7 @@ bool Layer::init()
|
|||
|
||||
Layer *Layer::create()
|
||||
{
|
||||
Layer *ret = new Layer();
|
||||
Layer *ret = new (std::nothrow) Layer();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -463,7 +459,7 @@ void LayerColor::setBlendFunc(const BlendFunc &var)
|
|||
|
||||
LayerColor* LayerColor::create()
|
||||
{
|
||||
LayerColor* ret = new LayerColor();
|
||||
LayerColor* ret = new (std::nothrow) LayerColor();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -477,7 +473,7 @@ LayerColor* LayerColor::create()
|
|||
|
||||
LayerColor * LayerColor::create(const Color4B& color, GLfloat width, GLfloat height)
|
||||
{
|
||||
LayerColor * layer = new LayerColor();
|
||||
LayerColor * layer = new (std::nothrow) LayerColor();
|
||||
if( layer && layer->initWithColor(color,width,height))
|
||||
{
|
||||
layer->autorelease();
|
||||
|
@ -489,7 +485,7 @@ LayerColor * LayerColor::create(const Color4B& color, GLfloat width, GLfloat hei
|
|||
|
||||
LayerColor * LayerColor::create(const Color4B& color)
|
||||
{
|
||||
LayerColor * layer = new LayerColor();
|
||||
LayerColor * layer = new (std::nothrow) LayerColor();
|
||||
if(layer && layer->initWithColor(color))
|
||||
{
|
||||
layer->autorelease();
|
||||
|
@ -645,7 +641,7 @@ LayerGradient::~LayerGradient()
|
|||
|
||||
LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end)
|
||||
{
|
||||
LayerGradient * layer = new LayerGradient();
|
||||
LayerGradient * layer = new (std::nothrow) LayerGradient();
|
||||
if( layer && layer->initWithColor(start, end))
|
||||
{
|
||||
layer->autorelease();
|
||||
|
@ -657,7 +653,7 @@ LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end)
|
|||
|
||||
LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end, const Vec2& v)
|
||||
{
|
||||
LayerGradient * layer = new LayerGradient();
|
||||
LayerGradient * layer = new (std::nothrow) LayerGradient();
|
||||
if( layer && layer->initWithColor(start, end, v))
|
||||
{
|
||||
layer->autorelease();
|
||||
|
@ -669,7 +665,7 @@ LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end, c
|
|||
|
||||
LayerGradient* LayerGradient::create()
|
||||
{
|
||||
LayerGradient* ret = new LayerGradient();
|
||||
LayerGradient* ret = new (std::nothrow) LayerGradient();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -852,7 +848,7 @@ LayerMultiplex * LayerMultiplex::createVariadic(Layer * layer, ...)
|
|||
va_list args;
|
||||
va_start(args,layer);
|
||||
|
||||
LayerMultiplex * multiplexLayer = new LayerMultiplex();
|
||||
LayerMultiplex * multiplexLayer = new (std::nothrow) LayerMultiplex();
|
||||
if(multiplexLayer && multiplexLayer->initWithLayers(layer, args))
|
||||
{
|
||||
multiplexLayer->autorelease();
|
||||
|
@ -869,7 +865,7 @@ LayerMultiplex * LayerMultiplex::create(Layer * layer, ...)
|
|||
va_list args;
|
||||
va_start(args,layer);
|
||||
|
||||
LayerMultiplex * multiplexLayer = new LayerMultiplex();
|
||||
LayerMultiplex * multiplexLayer = new (std::nothrow) LayerMultiplex();
|
||||
if(multiplexLayer && multiplexLayer->initWithLayers(layer, args))
|
||||
{
|
||||
multiplexLayer->autorelease();
|
||||
|
@ -889,7 +885,7 @@ LayerMultiplex * LayerMultiplex::createWithLayer(Layer* layer)
|
|||
|
||||
LayerMultiplex* LayerMultiplex::create()
|
||||
{
|
||||
LayerMultiplex* ret = new LayerMultiplex();
|
||||
LayerMultiplex* ret = new (std::nothrow) LayerMultiplex();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -903,7 +899,7 @@ LayerMultiplex* LayerMultiplex::create()
|
|||
|
||||
LayerMultiplex* LayerMultiplex::createWithArray(const Vector<Layer*>& arrayOfLayers)
|
||||
{
|
||||
LayerMultiplex* ret = new LayerMultiplex();
|
||||
LayerMultiplex* ret = new (std::nothrow) LayerMultiplex();
|
||||
if (ret && ret->initWithArray(arrayOfLayers))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -30,15 +30,8 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCNode.h"
|
||||
#include "base/CCProtocols.h"
|
||||
#include "base/CCEventTouch.h"
|
||||
#ifdef EMSCRIPTEN
|
||||
#include "CCGLBufferedNode.h"
|
||||
#endif // EMSCRIPTEN
|
||||
|
||||
#include "base/CCEventKeyboard.h"
|
||||
#include "renderer/CCCustomCommand.h"
|
||||
|
||||
#include "physics/CCPhysicsWorld.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -54,6 +47,8 @@ class EventListenerTouch;
|
|||
class EventListenerKeyboard;
|
||||
class EventListenerAcceleration;
|
||||
|
||||
class Touch;
|
||||
|
||||
//
|
||||
// Layer
|
||||
//
|
||||
|
@ -246,9 +241,6 @@ All features from Layer are valid, plus the following new features:
|
|||
- RGB colors
|
||||
*/
|
||||
class CC_DLL LayerColor : public Layer, public BlendProtocol
|
||||
#ifdef EMSCRIPTEN
|
||||
, public GLBufferedNode
|
||||
#endif // EMSCRIPTEN
|
||||
{
|
||||
public:
|
||||
/** creates a fullscreen black layer */
|
||||
|
|
|
@ -28,6 +28,7 @@ THE SOFTWARE.
|
|||
#include "base/CCTouch.h"
|
||||
#include "CCStdC.h"
|
||||
#include "base/CCEventListenerTouch.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
#include <vector>
|
||||
|
@ -88,7 +89,7 @@ Menu * Menu::create(MenuItem* item, ...)
|
|||
|
||||
Menu* Menu::createWithArray(const Vector<MenuItem*>& arrayOfItems)
|
||||
{
|
||||
auto ret = new Menu();
|
||||
auto ret = new (std::nothrow) Menu();
|
||||
if (ret && ret->initWithArray(arrayOfItems))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -28,11 +28,10 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCMenuItem.h"
|
||||
#include "2d/CCLayer.h"
|
||||
#include "base/CCVector.h"
|
||||
#include "base/CCEventTouch.h"
|
||||
#include "base/CCValue.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
class Touch;
|
||||
|
||||
/**
|
||||
* @addtogroup GUI
|
||||
|
|
|
@ -66,7 +66,7 @@ MenuItem* MenuItem::create()
|
|||
// XXX deprecated
|
||||
MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItem *ret = new MenuItem();
|
||||
MenuItem *ret = new (std::nothrow) MenuItem();
|
||||
ret->initWithTarget(target, selector);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -74,7 +74,7 @@ MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector)
|
|||
|
||||
MenuItem* MenuItem::create( const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItem *ret = new MenuItem();
|
||||
MenuItem *ret = new (std::nothrow) MenuItem();
|
||||
ret->initWithCallback(callback);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -195,7 +195,7 @@ void MenuItemLabel::setLabel(Node* var)
|
|||
// XXX: deprecated
|
||||
MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItemLabel *ret = new MenuItemLabel();
|
||||
MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
|
||||
ret->initWithLabel(label, target, selector);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -203,7 +203,7 @@ MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler s
|
|||
|
||||
MenuItemLabel * MenuItemLabel::create(Node*label, const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItemLabel *ret = new MenuItemLabel();
|
||||
MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
|
||||
ret->initWithLabel(label, callback);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -211,7 +211,7 @@ MenuItemLabel * MenuItemLabel::create(Node*label, const ccMenuCallback& callback
|
|||
|
||||
MenuItemLabel* MenuItemLabel::create(Node *label)
|
||||
{
|
||||
MenuItemLabel *ret = new MenuItemLabel();
|
||||
MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
|
||||
ret->initWithLabel(label, (const ccMenuCallback&) nullptr);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -325,7 +325,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st
|
|||
// XXX: deprecated
|
||||
MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItemAtlasFont *ret = new MenuItemAtlasFont();
|
||||
MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont();
|
||||
ret->initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -333,7 +333,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st
|
|||
|
||||
MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItemAtlasFont *ret = new MenuItemAtlasFont();
|
||||
MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont();
|
||||
ret->initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, callback);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -391,7 +391,7 @@ const std::string& MenuItemFont::getFontName()
|
|||
// XXX: deprecated
|
||||
MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItemFont *ret = new MenuItemFont();
|
||||
MenuItemFont *ret = new (std::nothrow) MenuItemFont();
|
||||
ret->initWithString(value, target, selector);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -399,7 +399,7 @@ MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_M
|
|||
|
||||
MenuItemFont * MenuItemFont::create(const std::string& value, const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItemFont *ret = new MenuItemFont();
|
||||
MenuItemFont *ret = new (std::nothrow) MenuItemFont();
|
||||
ret->initWithString(value, callback);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -408,7 +408,7 @@ MenuItemFont * MenuItemFont::create(const std::string& value, const ccMenuCallba
|
|||
|
||||
MenuItemFont * MenuItemFont::create(const std::string& value)
|
||||
{
|
||||
MenuItemFont *ret = new MenuItemFont();
|
||||
MenuItemFont *ret = new (std::nothrow) MenuItemFont();
|
||||
ret->initWithString(value, (const ccMenuCallback&)nullptr);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -560,7 +560,7 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite
|
|||
// XXX deprecated
|
||||
MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, Ref *target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItemSprite *ret = new MenuItemSprite();
|
||||
MenuItemSprite *ret = new (std::nothrow) MenuItemSprite();
|
||||
ret->initWithNormalSprite(normalSprite, selectedSprite, disabledSprite, target, selector);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -568,7 +568,7 @@ MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite
|
|||
|
||||
MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItemSprite *ret = new MenuItemSprite();
|
||||
MenuItemSprite *ret = new (std::nothrow) MenuItemSprite();
|
||||
ret->initWithNormalSprite(normalSprite, selectedSprite, disabledSprite, callback);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -686,7 +686,7 @@ void MenuItemSprite::updateImagesVisibility()
|
|||
|
||||
MenuItemImage* MenuItemImage::create()
|
||||
{
|
||||
MenuItemImage *ret = new MenuItemImage();
|
||||
MenuItemImage *ret = new (std::nothrow) MenuItemImage();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -720,7 +720,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
|
|||
// XXX deprecated
|
||||
MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector)
|
||||
{
|
||||
MenuItemImage *ret = new MenuItemImage();
|
||||
MenuItemImage *ret = new (std::nothrow) MenuItemImage();
|
||||
if (ret && ret->initWithNormalImage(normalImage, selectedImage, disabledImage, target, selector))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -732,7 +732,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
|
|||
|
||||
MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, const ccMenuCallback& callback)
|
||||
{
|
||||
MenuItemImage *ret = new MenuItemImage();
|
||||
MenuItemImage *ret = new (std::nothrow) MenuItemImage();
|
||||
if (ret && ret->initWithNormalImage(normalImage, selectedImage, disabledImage, callback))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -744,7 +744,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
|
|||
|
||||
MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage)
|
||||
{
|
||||
MenuItemImage *ret = new MenuItemImage();
|
||||
MenuItemImage *ret = new (std::nothrow) MenuItemImage();
|
||||
if (ret && ret->initWithNormalImage(normalImage, selectedImage, disabledImage, (const ccMenuCallback&)nullptr))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -809,7 +809,7 @@ void MenuItemImage::setDisabledSpriteFrame(SpriteFrame * frame)
|
|||
// XXX: deprecated
|
||||
MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector<MenuItem*>& menuItems)
|
||||
{
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->MenuItem::initWithTarget(target, selector);
|
||||
ret->_subItems = menuItems;
|
||||
ret->_selectedIndex = UINT_MAX;
|
||||
|
@ -819,7 +819,7 @@ MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler s
|
|||
|
||||
MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, const Vector<MenuItem*>& menuItems)
|
||||
{
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->MenuItem::initWithCallback(callback);
|
||||
ret->_subItems = menuItems;
|
||||
ret->_selectedIndex = UINT_MAX;
|
||||
|
@ -832,7 +832,7 @@ MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler s
|
|||
{
|
||||
va_list args;
|
||||
va_start(args, item);
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->initWithTarget(target, selector, item, args);
|
||||
ret->autorelease();
|
||||
va_end(args);
|
||||
|
@ -844,7 +844,7 @@ MenuItemToggle * MenuItemToggle::createWithCallbackVA(const ccMenuCallback &call
|
|||
{
|
||||
va_list args;
|
||||
va_start(args, item);
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->initWithCallback(callback, item, args);
|
||||
ret->autorelease();
|
||||
va_end(args);
|
||||
|
@ -855,7 +855,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba
|
|||
{
|
||||
va_list args;
|
||||
va_start(args, item);
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->initWithCallback(callback, item, args);
|
||||
ret->autorelease();
|
||||
va_end(args);
|
||||
|
@ -865,7 +865,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba
|
|||
|
||||
MenuItemToggle * MenuItemToggle::create()
|
||||
{
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->initWithItem(nullptr);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -898,7 +898,7 @@ bool MenuItemToggle::initWithCallback(const ccMenuCallback &callback, MenuItem *
|
|||
|
||||
MenuItemToggle* MenuItemToggle::create(MenuItem *item)
|
||||
{
|
||||
MenuItemToggle *ret = new MenuItemToggle();
|
||||
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
|
||||
ret->initWithItem(item);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
|
|
@ -69,7 +69,7 @@ MotionStreak::~MotionStreak()
|
|||
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const Color3B& color, const std::string& path)
|
||||
{
|
||||
MotionStreak *ret = new MotionStreak();
|
||||
MotionStreak *ret = new (std::nothrow) MotionStreak();
|
||||
if (ret && ret->initWithFade(fade, minSeg, stroke, color, path))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -82,7 +82,7 @@ MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const
|
|||
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const Color3B& color, Texture2D* texture)
|
||||
{
|
||||
MotionStreak *ret = new MotionStreak();
|
||||
MotionStreak *ret = new (std::nothrow) MotionStreak();
|
||||
if (ret && ret->initWithFade(fade, minSeg, stroke, color, texture))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2008-2010 Ricardo Quesada
|
||||
Copyright (c) 2009 Valentin Milea
|
||||
|
@ -34,26 +36,20 @@ THE SOFTWARE.
|
|||
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCScheduler.h"
|
||||
#include "base/CCTouch.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
#include "base/CCEvent.h"
|
||||
#include "base/CCEventTouch.h"
|
||||
#include "base/ccCArray.h"
|
||||
#include "base/CCCamera.h"
|
||||
#include "2d/CCGrid.h"
|
||||
#include "2d/CCActionManager.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include "2d/CCScene.h"
|
||||
#include "2d/CCComponent.h"
|
||||
#include "2d/CCComponentContainer.h"
|
||||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "math/TransformUtils.h"
|
||||
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
#if CC_USE_PHYSICS
|
||||
#include "physics/CCPhysicsBody.h"
|
||||
#include "physics/CCPhysicsWorld.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -761,7 +757,7 @@ Rect Node::getBoundingBox() const
|
|||
|
||||
Node * Node::create()
|
||||
{
|
||||
Node * ret = new Node();
|
||||
Node * ret = new (std::nothrow) Node();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -1851,7 +1847,7 @@ bool Node::addComponent(Component *component)
|
|||
{
|
||||
// lazy alloc
|
||||
if( !_componentContainer )
|
||||
_componentContainer = new ComponentContainer(this);
|
||||
_componentContainer = new (std::nothrow) ComponentContainer(this);
|
||||
return _componentContainer->add(component);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,11 @@
|
|||
#define __CCNODE_H__
|
||||
|
||||
#include "base/ccMacros.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
#include "base/CCVector.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include "base/CCProtocols.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include "math/CCAffineTransform.h"
|
||||
#include "math/CCMath.h"
|
||||
#include "renderer/ccGLStateCache.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ NS_CC_BEGIN
|
|||
|
||||
NodeGrid* NodeGrid::create()
|
||||
{
|
||||
NodeGrid * ret = new NodeGrid();
|
||||
NodeGrid * ret = new (std::nothrow) NodeGrid();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -34,7 +34,7 @@ class PointObject : public Ref
|
|||
public:
|
||||
static PointObject * create(Vec2 ratio, Vec2 offset)
|
||||
{
|
||||
PointObject *ret = new PointObject();
|
||||
PointObject *ret = new (std::nothrow) PointObject();
|
||||
ret->initWithPoint(ratio, offset);
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -80,7 +80,7 @@ ParallaxNode::~ParallaxNode()
|
|||
|
||||
ParallaxNode * ParallaxNode::create()
|
||||
{
|
||||
ParallaxNode *ret = new ParallaxNode();
|
||||
ParallaxNode *ret = new (std::nothrow) ParallaxNode();
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ ParticleBatchNode::~ParticleBatchNode()
|
|||
|
||||
ParticleBatchNode* ParticleBatchNode::createWithTexture(Texture2D *tex, int capacity/* = kParticleDefaultCapacity*/)
|
||||
{
|
||||
ParticleBatchNode * p = new ParticleBatchNode();
|
||||
ParticleBatchNode * p = new (std::nothrow) ParticleBatchNode();
|
||||
if( p && p->initWithTexture(tex, capacity))
|
||||
{
|
||||
p->autorelease();
|
||||
|
@ -81,7 +81,7 @@ ParticleBatchNode* ParticleBatchNode::createWithTexture(Texture2D *tex, int capa
|
|||
|
||||
ParticleBatchNode* ParticleBatchNode::create(const std::string& imageFile, int capacity/* = kParticleDefaultCapacity*/)
|
||||
{
|
||||
ParticleBatchNode * p = new ParticleBatchNode();
|
||||
ParticleBatchNode * p = new (std::nothrow) ParticleBatchNode();
|
||||
if( p && p->initWithFile(imageFile, capacity))
|
||||
{
|
||||
p->autorelease();
|
||||
|
@ -96,7 +96,7 @@ ParticleBatchNode* ParticleBatchNode::create(const std::string& imageFile, int c
|
|||
*/
|
||||
bool ParticleBatchNode::initWithTexture(Texture2D *tex, int capacity)
|
||||
{
|
||||
_textureAtlas = new TextureAtlas();
|
||||
_textureAtlas = new (std::nothrow) TextureAtlas();
|
||||
_textureAtlas->initWithTexture(tex, capacity);
|
||||
|
||||
_children.reserve(capacity);
|
||||
|
|
|
@ -47,7 +47,7 @@ static Texture2D* getDefaultTexture()
|
|||
texture = Director::getInstance()->getTextureCache()->getTextureForKey(key);
|
||||
CC_BREAK_IF(texture != nullptr);
|
||||
|
||||
image = new Image();
|
||||
image = new (std::nothrow) Image();
|
||||
CC_BREAK_IF(nullptr == image);
|
||||
ret = image->initWithImageData(__firePngData, sizeof(__firePngData));
|
||||
CC_BREAK_IF(!ret);
|
||||
|
@ -62,7 +62,7 @@ static Texture2D* getDefaultTexture()
|
|||
|
||||
ParticleFire* ParticleFire::create()
|
||||
{
|
||||
ParticleFire* ret = new ParticleFire();
|
||||
ParticleFire* ret = new (std::nothrow) ParticleFire();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -76,7 +76,7 @@ ParticleFire* ParticleFire::create()
|
|||
|
||||
ParticleFire* ParticleFire::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleFire* ret = new ParticleFire();
|
||||
ParticleFire* ret = new (std::nothrow) ParticleFire();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -167,7 +167,7 @@ bool ParticleFire::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleFireworks* ParticleFireworks::create()
|
||||
{
|
||||
ParticleFireworks* ret = new ParticleFireworks();
|
||||
ParticleFireworks* ret = new (std::nothrow) ParticleFireworks();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -181,7 +181,7 @@ ParticleFireworks* ParticleFireworks::create()
|
|||
|
||||
ParticleFireworks* ParticleFireworks::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleFireworks* ret = new ParticleFireworks();
|
||||
ParticleFireworks* ret = new (std::nothrow) ParticleFireworks();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -268,7 +268,7 @@ bool ParticleFireworks::initWithTotalParticles(int numberOfParticles)
|
|||
//
|
||||
ParticleSun* ParticleSun::create()
|
||||
{
|
||||
ParticleSun* ret = new ParticleSun();
|
||||
ParticleSun* ret = new (std::nothrow) ParticleSun();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -282,7 +282,7 @@ ParticleSun* ParticleSun::create()
|
|||
|
||||
ParticleSun* ParticleSun::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleSun* ret = new ParticleSun();
|
||||
ParticleSun* ret = new (std::nothrow) ParticleSun();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -375,7 +375,7 @@ bool ParticleSun::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleGalaxy* ParticleGalaxy::create()
|
||||
{
|
||||
ParticleGalaxy* ret = new ParticleGalaxy();
|
||||
ParticleGalaxy* ret = new (std::nothrow) ParticleGalaxy();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -389,7 +389,7 @@ ParticleGalaxy* ParticleGalaxy::create()
|
|||
|
||||
ParticleGalaxy* ParticleGalaxy::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleGalaxy* ret = new ParticleGalaxy();
|
||||
ParticleGalaxy* ret = new (std::nothrow) ParticleGalaxy();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -484,7 +484,7 @@ bool ParticleGalaxy::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleFlower* ParticleFlower::create()
|
||||
{
|
||||
ParticleFlower* ret = new ParticleFlower();
|
||||
ParticleFlower* ret = new (std::nothrow) ParticleFlower();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -498,7 +498,7 @@ ParticleFlower* ParticleFlower::create()
|
|||
|
||||
ParticleFlower* ParticleFlower::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleFlower* ret = new ParticleFlower();
|
||||
ParticleFlower* ret = new (std::nothrow) ParticleFlower();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -592,7 +592,7 @@ bool ParticleFlower::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleMeteor * ParticleMeteor::create()
|
||||
{
|
||||
ParticleMeteor *ret = new ParticleMeteor();
|
||||
ParticleMeteor *ret = new (std::nothrow) ParticleMeteor();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -606,7 +606,7 @@ ParticleMeteor * ParticleMeteor::create()
|
|||
|
||||
ParticleMeteor* ParticleMeteor::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleMeteor* ret = new ParticleMeteor();
|
||||
ParticleMeteor* ret = new (std::nothrow) ParticleMeteor();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -701,7 +701,7 @@ bool ParticleMeteor::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleSpiral* ParticleSpiral::create()
|
||||
{
|
||||
ParticleSpiral* ret = new ParticleSpiral();
|
||||
ParticleSpiral* ret = new (std::nothrow) ParticleSpiral();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -715,7 +715,7 @@ ParticleSpiral* ParticleSpiral::create()
|
|||
|
||||
ParticleSpiral* ParticleSpiral::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleSpiral* ret = new ParticleSpiral();
|
||||
ParticleSpiral* ret = new (std::nothrow) ParticleSpiral();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -810,7 +810,7 @@ bool ParticleSpiral::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleExplosion* ParticleExplosion::create()
|
||||
{
|
||||
ParticleExplosion* ret = new ParticleExplosion();
|
||||
ParticleExplosion* ret = new (std::nothrow) ParticleExplosion();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -824,7 +824,7 @@ ParticleExplosion* ParticleExplosion::create()
|
|||
|
||||
ParticleExplosion* ParticleExplosion::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleExplosion* ret = new ParticleExplosion();
|
||||
ParticleExplosion* ret = new (std::nothrow) ParticleExplosion();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -918,7 +918,7 @@ bool ParticleExplosion::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleSmoke* ParticleSmoke::create()
|
||||
{
|
||||
ParticleSmoke* ret = new ParticleSmoke();
|
||||
ParticleSmoke* ret = new (std::nothrow) ParticleSmoke();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -932,7 +932,7 @@ ParticleSmoke* ParticleSmoke::create()
|
|||
|
||||
ParticleSmoke* ParticleSmoke::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleSmoke* ret = new ParticleSmoke();
|
||||
ParticleSmoke* ret = new (std::nothrow) ParticleSmoke();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -1023,7 +1023,7 @@ bool ParticleSmoke::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleSnow* ParticleSnow::create()
|
||||
{
|
||||
ParticleSnow* ret = new ParticleSnow();
|
||||
ParticleSnow* ret = new (std::nothrow) ParticleSnow();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -1037,7 +1037,7 @@ ParticleSnow* ParticleSnow::create()
|
|||
|
||||
ParticleSnow* ParticleSnow::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleSnow* ret = new ParticleSnow();
|
||||
ParticleSnow* ret = new (std::nothrow) ParticleSnow();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -1131,7 +1131,7 @@ bool ParticleSnow::initWithTotalParticles(int numberOfParticles)
|
|||
|
||||
ParticleRain* ParticleRain::create()
|
||||
{
|
||||
ParticleRain* ret = new ParticleRain();
|
||||
ParticleRain* ret = new (std::nothrow) ParticleRain();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -1145,7 +1145,7 @@ ParticleRain* ParticleRain::create()
|
|||
|
||||
ParticleRain* ParticleRain::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleRain* ret = new ParticleRain();
|
||||
ParticleRain* ret = new (std::nothrow) ParticleRain();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -139,7 +139,7 @@ ParticleSystem::ParticleSystem()
|
|||
|
||||
ParticleSystem * ParticleSystem::create(const std::string& plistFile)
|
||||
{
|
||||
ParticleSystem *ret = new ParticleSystem();
|
||||
ParticleSystem *ret = new (std::nothrow) ParticleSystem();
|
||||
if (ret && ret->initWithFile(plistFile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -151,7 +151,7 @@ ParticleSystem * ParticleSystem::create(const std::string& plistFile)
|
|||
|
||||
ParticleSystem* ParticleSystem::createWithTotalParticles(int numberOfParticles)
|
||||
{
|
||||
ParticleSystem *ret = new ParticleSystem();
|
||||
ParticleSystem *ret = new (std::nothrow) ParticleSystem();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -405,7 +405,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
|
|||
CC_BREAK_IF(!deflated);
|
||||
|
||||
// For android, we should retain it in VolatileTexture::addImage which invoked in Director::getInstance()->getTextureCache()->addUIImage()
|
||||
image = new Image();
|
||||
image = new (std::nothrow) Image();
|
||||
bool isOK = image->initWithImageData(deflated, deflatedLen);
|
||||
CCASSERT(isOK, "CCParticleSystem: error init image with Data");
|
||||
CC_BREAK_IF(!isOK);
|
||||
|
|
|
@ -75,7 +75,7 @@ ParticleSystemQuad::~ParticleSystemQuad()
|
|||
|
||||
ParticleSystemQuad * ParticleSystemQuad::create(const std::string& filename)
|
||||
{
|
||||
ParticleSystemQuad *ret = new ParticleSystemQuad();
|
||||
ParticleSystemQuad *ret = new (std::nothrow) ParticleSystemQuad();
|
||||
if (ret && ret->initWithFile(filename))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -86,7 +86,7 @@ ParticleSystemQuad * ParticleSystemQuad::create(const std::string& filename)
|
|||
}
|
||||
|
||||
ParticleSystemQuad * ParticleSystemQuad::createWithTotalParticles(int numberOfParticles) {
|
||||
ParticleSystemQuad *ret = new ParticleSystemQuad();
|
||||
ParticleSystemQuad *ret = new (std::nothrow) ParticleSystemQuad();
|
||||
if (ret && ret->initWithTotalParticles(numberOfParticles))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -597,7 +597,7 @@ void ParticleSystemQuad::setBatchNode(ParticleBatchNode * batchNode)
|
|||
}
|
||||
|
||||
ParticleSystemQuad * ParticleSystemQuad::create() {
|
||||
ParticleSystemQuad *particleSystemQuad = new ParticleSystemQuad();
|
||||
ParticleSystemQuad *particleSystemQuad = new (std::nothrow) ParticleSystemQuad();
|
||||
if (particleSystemQuad && particleSystemQuad->init())
|
||||
{
|
||||
particleSystemQuad->autorelease();
|
||||
|
|
|
@ -59,7 +59,7 @@ ProgressTimer::ProgressTimer()
|
|||
|
||||
ProgressTimer* ProgressTimer::create(Sprite* sp)
|
||||
{
|
||||
ProgressTimer *progressTimer = new ProgressTimer();
|
||||
ProgressTimer *progressTimer = new (std::nothrow) ProgressTimer();
|
||||
if (progressTimer->initWithSprite(sp))
|
||||
{
|
||||
progressTimer->autorelease();
|
||||
|
|
|
@ -49,7 +49,7 @@ ProtectedNode::~ProtectedNode()
|
|||
|
||||
ProtectedNode * ProtectedNode::create(void)
|
||||
{
|
||||
ProtectedNode * ret = new ProtectedNode();
|
||||
ProtectedNode * ret = new (std::nothrow) ProtectedNode();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -150,7 +150,7 @@ void RenderTexture::listenToForeground(EventCustom *event)
|
|||
|
||||
RenderTexture * RenderTexture::create(int w, int h, Texture2D::PixelFormat eFormat)
|
||||
{
|
||||
RenderTexture *ret = new RenderTexture();
|
||||
RenderTexture *ret = new (std::nothrow) RenderTexture();
|
||||
|
||||
if(ret && ret->initWithWidthAndHeight(w, h, eFormat))
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ RenderTexture * RenderTexture::create(int w, int h, Texture2D::PixelFormat eForm
|
|||
|
||||
RenderTexture * RenderTexture::create(int w ,int h, Texture2D::PixelFormat eFormat, GLuint uDepthStencilFormat)
|
||||
{
|
||||
RenderTexture *ret = new RenderTexture();
|
||||
RenderTexture *ret = new (std::nothrow) RenderTexture();
|
||||
|
||||
if(ret && ret->initWithWidthAndHeight(w, h, eFormat, uDepthStencilFormat))
|
||||
{
|
||||
|
@ -176,7 +176,7 @@ RenderTexture * RenderTexture::create(int w ,int h, Texture2D::PixelFormat eForm
|
|||
|
||||
RenderTexture * RenderTexture::create(int w, int h)
|
||||
{
|
||||
RenderTexture *ret = new RenderTexture();
|
||||
RenderTexture *ret = new (std::nothrow) RenderTexture();
|
||||
|
||||
if(ret && ret->initWithWidthAndHeight(w, h, Texture2D::PixelFormat::RGBA8888, 0))
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat
|
|||
memset(data, 0, dataLen);
|
||||
_pixelFormat = format;
|
||||
|
||||
_texture = new Texture2D();
|
||||
_texture = new (std::nothrow) Texture2D();
|
||||
if (_texture)
|
||||
{
|
||||
_texture->initWithData(data, dataLen, (Texture2D::PixelFormat)_pixelFormat, powW, powH, Size((float)w, (float)h));
|
||||
|
@ -245,7 +245,7 @@ bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat
|
|||
|
||||
if (Configuration::getInstance()->checkForGLExtension("GL_QCOM"))
|
||||
{
|
||||
_textureCopy = new Texture2D();
|
||||
_textureCopy = new (std::nothrow) Texture2D();
|
||||
if (_textureCopy)
|
||||
{
|
||||
_textureCopy->initWithData(data, dataLen, (Texture2D::PixelFormat)_pixelFormat, powW, powH, Size((float)w, (float)h));
|
||||
|
@ -488,13 +488,13 @@ Image* RenderTexture::newImage(bool fliimage)
|
|||
|
||||
GLubyte *buffer = nullptr;
|
||||
GLubyte *tempData = nullptr;
|
||||
Image *image = new Image();
|
||||
Image *image = new (std::nothrow) Image();
|
||||
|
||||
do
|
||||
{
|
||||
CC_BREAK_IF(! (buffer = new GLubyte[savedBufferWidth * savedBufferHeight * 4]));
|
||||
CC_BREAK_IF(! (buffer = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4]));
|
||||
|
||||
if(! (tempData = new GLubyte[savedBufferWidth * savedBufferHeight * 4]))
|
||||
if(! (tempData = new (std::nothrow) GLubyte[savedBufferWidth * savedBufferHeight * 4]))
|
||||
{
|
||||
delete[] buffer;
|
||||
buffer = nullptr;
|
||||
|
|
|
@ -30,12 +30,12 @@ THE SOFTWARE.
|
|||
#include "base/CCCamera.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "2d/CCLayer.h"
|
||||
#include "2d/CCSprite.h"
|
||||
#include "2d/CCSpriteBatchNode.h"
|
||||
#include "physics/CCPhysicsWorld.h"
|
||||
#include "deprecated/CCString.h"
|
||||
|
||||
#if CC_USE_PHYSICS
|
||||
#include "physics/CCPhysicsWorld.h"
|
||||
#endif
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
Scene::Scene()
|
||||
|
@ -77,7 +77,7 @@ bool Scene::initWithSize(const Size& size)
|
|||
|
||||
Scene* Scene::create()
|
||||
{
|
||||
Scene *ret = new Scene();
|
||||
Scene *ret = new (std::nothrow) Scene();
|
||||
if (ret && ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -92,7 +92,7 @@ Scene* Scene::create()
|
|||
|
||||
Scene* Scene::createWithSize(const Size& size)
|
||||
{
|
||||
Scene *ret = new Scene();
|
||||
Scene *ret = new (std::nothrow) Scene();
|
||||
if (ret && ret->initWithSize(size))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -116,6 +116,14 @@ Scene* Scene::getScene() const
|
|||
return const_cast<Scene*>(this);
|
||||
}
|
||||
|
||||
void Scene::onProjectionChanged(EventCustom* event)
|
||||
{
|
||||
if (_defaultCamera)
|
||||
{
|
||||
_defaultCamera->initDefault();
|
||||
}
|
||||
}
|
||||
|
||||
#if CC_USE_PHYSICS
|
||||
void Scene::addChild(Node* child, int zOrder, int tag)
|
||||
{
|
||||
|
@ -140,7 +148,7 @@ void Scene::update(float delta)
|
|||
|
||||
Scene* Scene::createWithPhysics()
|
||||
{
|
||||
Scene *ret = new Scene();
|
||||
Scene *ret = new (std::nothrow) Scene();
|
||||
if (ret && ret->initWithPhysics())
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -193,14 +201,6 @@ void Scene::addChildToPhysicsWorld(Node* child)
|
|||
}
|
||||
}
|
||||
|
||||
void Scene::onProjectionChanged(EventCustom* event)
|
||||
{
|
||||
if (_defaultCamera)
|
||||
{
|
||||
_defaultCamera->initDefault();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -30,11 +30,15 @@ THE SOFTWARE.
|
|||
|
||||
#include <string>
|
||||
#include "2d/CCNode.h"
|
||||
#include "physics/CCPhysicsWorld.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Camera;
|
||||
class EventListenerCustom;
|
||||
class EventCustom;
|
||||
#if CC_USE_PHYSICS
|
||||
class PhysicsWorld;
|
||||
#endif
|
||||
/**
|
||||
* @addtogroup scene
|
||||
* @{
|
||||
|
@ -83,6 +87,7 @@ protected:
|
|||
friend class SpriteBatchNode;
|
||||
friend class Camera;
|
||||
friend class Director;
|
||||
friend class Renderer;
|
||||
|
||||
std::vector<Camera*> _cameras; //weak ref to Camera
|
||||
Camera* _defaultCamera; //weak ref, default camera created by scene, _cameras[0], Caution that the default camera can not be added to _cameras before onEnter is called
|
||||
|
|
|
@ -292,7 +292,7 @@ Sprite::~Sprite(void)
|
|||
* It's used for creating a default texture when sprite's texture is set to nullptr.
|
||||
* Supposing codes as follows:
|
||||
*
|
||||
* auto sp = new Sprite();
|
||||
* auto sp = new (std::nothrow) Sprite();
|
||||
* sp->init(); // Texture was set to nullptr, in order to make opacity and color to work correctly, we need to create a 2x2 white texture.
|
||||
*
|
||||
* The test is in "TestCpp/SpriteTest/Sprite without texture".
|
||||
|
@ -332,7 +332,7 @@ void Sprite::setTexture(Texture2D *texture)
|
|||
// If texture wasn't in cache, create it from RAW data.
|
||||
if (texture == nullptr)
|
||||
{
|
||||
Image* image = new Image();
|
||||
Image* image = new (std::nothrow) Image();
|
||||
bool isOK = image->initWithRawData(cc_2x2_white_image, sizeof(cc_2x2_white_image), 2, 2, 8);
|
||||
CC_UNUSED_PARAM(isOK);
|
||||
CCASSERT(isOK, "The 2x2 empty texture was created unsuccessfully.");
|
||||
|
|
|
@ -57,7 +57,7 @@ NS_CC_BEGIN
|
|||
|
||||
SpriteBatchNode* SpriteBatchNode::createWithTexture(Texture2D* tex, ssize_t capacity/* = DEFAULT_CAPACITY*/)
|
||||
{
|
||||
SpriteBatchNode *batchNode = new SpriteBatchNode();
|
||||
SpriteBatchNode *batchNode = new (std::nothrow) SpriteBatchNode();
|
||||
batchNode->initWithTexture(tex, capacity);
|
||||
batchNode->autorelease();
|
||||
|
||||
|
@ -70,7 +70,7 @@ SpriteBatchNode* SpriteBatchNode::createWithTexture(Texture2D* tex, ssize_t capa
|
|||
|
||||
SpriteBatchNode* SpriteBatchNode::create(const std::string& fileImage, ssize_t capacity/* = DEFAULT_CAPACITY*/)
|
||||
{
|
||||
SpriteBatchNode *batchNode = new SpriteBatchNode();
|
||||
SpriteBatchNode *batchNode = new (std::nothrow) SpriteBatchNode();
|
||||
batchNode->initWithFile(fileImage, capacity);
|
||||
batchNode->autorelease();
|
||||
|
||||
|
@ -89,7 +89,7 @@ bool SpriteBatchNode::initWithTexture(Texture2D *tex, ssize_t capacity)
|
|||
{
|
||||
_blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED;
|
||||
}
|
||||
_textureAtlas = new TextureAtlas();
|
||||
_textureAtlas = new (std::nothrow) TextureAtlas();
|
||||
|
||||
if (capacity == 0)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ bool SpriteBatchNode::initWithTexture(Texture2D *tex, ssize_t capacity)
|
|||
|
||||
bool SpriteBatchNode::init()
|
||||
{
|
||||
Texture2D * texture = new Texture2D();
|
||||
Texture2D * texture = new (std::nothrow) Texture2D();
|
||||
texture->autorelease();
|
||||
return this->initWithTexture(texture, 0);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ NS_CC_BEGIN
|
|||
|
||||
SpriteFrame* SpriteFrame::create(const std::string& filename, const Rect& rect)
|
||||
{
|
||||
SpriteFrame *spriteFrame = new SpriteFrame();
|
||||
SpriteFrame *spriteFrame = new (std::nothrow) SpriteFrame();
|
||||
spriteFrame->initWithTextureFilename(filename, rect);
|
||||
spriteFrame->autorelease();
|
||||
|
||||
|
@ -44,7 +44,7 @@ SpriteFrame* SpriteFrame::create(const std::string& filename, const Rect& rect)
|
|||
|
||||
SpriteFrame* SpriteFrame::createWithTexture(Texture2D *texture, const Rect& rect)
|
||||
{
|
||||
SpriteFrame *spriteFrame = new SpriteFrame();
|
||||
SpriteFrame *spriteFrame = new (std::nothrow) SpriteFrame();
|
||||
spriteFrame->initWithTexture(texture, rect);
|
||||
spriteFrame->autorelease();
|
||||
|
||||
|
@ -53,7 +53,7 @@ SpriteFrame* SpriteFrame::createWithTexture(Texture2D *texture, const Rect& rect
|
|||
|
||||
SpriteFrame* SpriteFrame::createWithTexture(Texture2D* texture, const Rect& rect, bool rotated, const Vec2& offset, const Size& originalSize)
|
||||
{
|
||||
SpriteFrame *spriteFrame = new SpriteFrame();
|
||||
SpriteFrame *spriteFrame = new (std::nothrow) SpriteFrame();
|
||||
spriteFrame->initWithTexture(texture, rect, rotated, offset, originalSize);
|
||||
spriteFrame->autorelease();
|
||||
|
||||
|
@ -62,7 +62,7 @@ SpriteFrame* SpriteFrame::createWithTexture(Texture2D* texture, const Rect& rect
|
|||
|
||||
SpriteFrame* SpriteFrame::create(const std::string& filename, const Rect& rect, bool rotated, const Vec2& offset, const Size& originalSize)
|
||||
{
|
||||
SpriteFrame *spriteFrame = new SpriteFrame();
|
||||
SpriteFrame *spriteFrame = new (std::nothrow) SpriteFrame();
|
||||
spriteFrame->initWithTextureFilename(filename, rect, rotated, offset, originalSize);
|
||||
spriteFrame->autorelease();
|
||||
|
||||
|
@ -132,7 +132,7 @@ SpriteFrame::~SpriteFrame(void)
|
|||
SpriteFrame* SpriteFrame::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
SpriteFrame *copy = new SpriteFrame();
|
||||
SpriteFrame *copy = new (std::nothrow) SpriteFrame();
|
||||
copy->initWithTextureFilename(_textureFilename.c_str(), _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels);
|
||||
copy->setTexture(_texture);
|
||||
copy->autorelease();
|
||||
|
|
|
@ -53,7 +53,7 @@ SpriteFrameCache* SpriteFrameCache::getInstance()
|
|||
{
|
||||
if (! _sharedSpriteFrameCache)
|
||||
{
|
||||
_sharedSpriteFrameCache = new SpriteFrameCache();
|
||||
_sharedSpriteFrameCache = new (std::nothrow) SpriteFrameCache();
|
||||
_sharedSpriteFrameCache->init();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ NS_CC_BEGIN
|
|||
|
||||
TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
TMXLayer *ret = new TMXLayer();
|
||||
TMXLayer *ret = new (std::nothrow) TMXLayer();
|
||||
if (ret->initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -38,7 +38,7 @@ NS_CC_BEGIN
|
|||
|
||||
TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
||||
{
|
||||
TMXTiledMap *ret = new TMXTiledMap();
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
if (ret->initWithTMXFile(tmxFile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -50,7 +50,7 @@ TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
|||
|
||||
TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
{
|
||||
TMXTiledMap *ret = new TMXTiledMap();
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
if (ret->initWithXML(tmxString, resourcePath))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -100,7 +100,7 @@ Rect TMXTilesetInfo::getRectForGID(uint32_t gid)
|
|||
|
||||
TMXMapInfo * TMXMapInfo::create(const std::string& tmxFile)
|
||||
{
|
||||
TMXMapInfo *ret = new TMXMapInfo();
|
||||
TMXMapInfo *ret = new (std::nothrow) TMXMapInfo();
|
||||
if(ret->initWithTMXFile(tmxFile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -112,7 +112,7 @@ TMXMapInfo * TMXMapInfo::create(const std::string& tmxFile)
|
|||
|
||||
TMXMapInfo * TMXMapInfo::createWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
{
|
||||
TMXMapInfo *ret = new TMXMapInfo();
|
||||
TMXMapInfo *ret = new (std::nothrow) TMXMapInfo();
|
||||
if(ret->initWithXML(tmxString, resourcePath))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -278,7 +278,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
}
|
||||
else
|
||||
{
|
||||
TMXTilesetInfo *tileset = new TMXTilesetInfo();
|
||||
TMXTilesetInfo *tileset = new (std::nothrow) TMXTilesetInfo();
|
||||
tileset->_name = attributeDict["name"].asString();
|
||||
|
||||
if (_recordFirstGID)
|
||||
|
@ -332,7 +332,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
}
|
||||
else if (elementName == "layer")
|
||||
{
|
||||
TMXLayerInfo *layer = new TMXLayerInfo();
|
||||
TMXLayerInfo *layer = new (std::nothrow) TMXLayerInfo();
|
||||
layer->_name = attributeDict["name"].asString();
|
||||
|
||||
Size s;
|
||||
|
@ -359,7 +359,7 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
}
|
||||
else if (elementName == "objectgroup")
|
||||
{
|
||||
TMXObjectGroup *objectGroup = new TMXObjectGroup();
|
||||
TMXObjectGroup *objectGroup = new (std::nothrow) TMXObjectGroup();
|
||||
objectGroup->setGroupName(attributeDict["name"].asString());
|
||||
Vec2 positionOffset;
|
||||
positionOffset.x = attributeDict["x"].asFloat() * tmxMapInfo->getTileSize().width;
|
||||
|
|
|
@ -72,7 +72,7 @@ TextFieldTTF::~TextFieldTTF()
|
|||
|
||||
TextFieldTTF * TextFieldTTF::textFieldWithPlaceHolder(const std::string& placeholder, const Size& dimensions, TextHAlignment alignment, const std::string& fontName, float fontSize)
|
||||
{
|
||||
TextFieldTTF *ret = new TextFieldTTF();
|
||||
TextFieldTTF *ret = new (std::nothrow) TextFieldTTF();
|
||||
if(ret && ret->initWithPlaceHolder("", dimensions, alignment, fontName, fontSize))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -88,7 +88,7 @@ TextFieldTTF * TextFieldTTF::textFieldWithPlaceHolder(const std::string& placeho
|
|||
|
||||
TextFieldTTF * TextFieldTTF::textFieldWithPlaceHolder(const std::string& placeholder, const std::string& fontName, float fontSize)
|
||||
{
|
||||
TextFieldTTF *ret = new TextFieldTTF();
|
||||
TextFieldTTF *ret = new (std::nothrow) TextFieldTTF();
|
||||
if(ret && ret->initWithPlaceHolder("", fontName, fontSize))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -39,7 +39,7 @@ NS_CC_BEGIN
|
|||
|
||||
TileMapAtlas * TileMapAtlas::create(const std::string& tile, const std::string& mapFile, int tileWidth, int tileHeight)
|
||||
{
|
||||
TileMapAtlas *ret = new TileMapAtlas();
|
||||
TileMapAtlas *ret = new (std::nothrow) TileMapAtlas();
|
||||
if (ret->initWithTileFile(tile, mapFile, tileWidth, tileHeight))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
|
|
@ -26,7 +26,6 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "2d/CCTransition.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "2d/CCActionInterval.h"
|
||||
#include "2d/CCActionInstant.h"
|
||||
#include "2d/CCActionEase.h"
|
||||
|
@ -36,6 +35,8 @@ THE SOFTWARE.
|
|||
#include "2d/CCLayer.h"
|
||||
#include "2d/CCRenderTexture.h"
|
||||
#include "2d/CCNodeGrid.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -58,7 +59,7 @@ TransitionScene::~TransitionScene()
|
|||
|
||||
TransitionScene * TransitionScene::create(float t, Scene *scene)
|
||||
{
|
||||
TransitionScene * pScene = new TransitionScene();
|
||||
TransitionScene * pScene = new (std::nothrow) TransitionScene();
|
||||
if(pScene && pScene->initWithDuration(t,scene))
|
||||
{
|
||||
pScene->autorelease();
|
||||
|
@ -210,7 +211,7 @@ TransitionSceneOriented::~TransitionSceneOriented()
|
|||
|
||||
TransitionSceneOriented * TransitionSceneOriented::create(float t, Scene *scene, Orientation orientation)
|
||||
{
|
||||
TransitionSceneOriented * newScene = new TransitionSceneOriented();
|
||||
TransitionSceneOriented * newScene = new (std::nothrow) TransitionSceneOriented();
|
||||
newScene->initWithDuration(t,scene,orientation);
|
||||
newScene->autorelease();
|
||||
return newScene;
|
||||
|
@ -234,7 +235,7 @@ TransitionRotoZoom::TransitionRotoZoom()
|
|||
|
||||
TransitionRotoZoom* TransitionRotoZoom::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionRotoZoom* newScene = new TransitionRotoZoom();
|
||||
TransitionRotoZoom* newScene = new (std::nothrow) TransitionRotoZoom();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -294,7 +295,7 @@ TransitionJumpZoom::~TransitionJumpZoom()
|
|||
|
||||
TransitionJumpZoom* TransitionJumpZoom::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionJumpZoom* newScene = new TransitionJumpZoom();
|
||||
TransitionJumpZoom* newScene = new (std::nothrow) TransitionJumpZoom();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -349,7 +350,7 @@ TransitionMoveInL::~TransitionMoveInL()
|
|||
|
||||
TransitionMoveInL* TransitionMoveInL::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionMoveInL* newScene = new TransitionMoveInL();
|
||||
TransitionMoveInL* newScene = new (std::nothrow) TransitionMoveInL();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -406,7 +407,7 @@ TransitionMoveInR::~TransitionMoveInR()
|
|||
|
||||
TransitionMoveInR* TransitionMoveInR::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionMoveInR* newScene = new TransitionMoveInR();
|
||||
TransitionMoveInR* newScene = new (std::nothrow) TransitionMoveInR();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -434,7 +435,7 @@ TransitionMoveInT::~TransitionMoveInT()
|
|||
|
||||
TransitionMoveInT* TransitionMoveInT::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionMoveInT* newScene = new TransitionMoveInT();
|
||||
TransitionMoveInT* newScene = new (std::nothrow) TransitionMoveInT();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -462,7 +463,7 @@ TransitionMoveInB::~TransitionMoveInB()
|
|||
|
||||
TransitionMoveInB* TransitionMoveInB::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionMoveInB* newScene = new TransitionMoveInB();
|
||||
TransitionMoveInB* newScene = new (std::nothrow) TransitionMoveInB();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -539,7 +540,7 @@ ActionInterval* TransitionSlideInL::easeActionWithAction(ActionInterval* action)
|
|||
|
||||
TransitionSlideInL* TransitionSlideInL::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSlideInL* newScene = new TransitionSlideInL();
|
||||
TransitionSlideInL* newScene = new (std::nothrow) TransitionSlideInL();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -561,7 +562,7 @@ TransitionSlideInR::~TransitionSlideInR()
|
|||
|
||||
TransitionSlideInR* TransitionSlideInR::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSlideInR* newScene = new TransitionSlideInR();
|
||||
TransitionSlideInR* newScene = new (std::nothrow) TransitionSlideInR();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -602,7 +603,7 @@ TransitionSlideInT::~TransitionSlideInT()
|
|||
|
||||
TransitionSlideInT* TransitionSlideInT::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSlideInT* newScene = new TransitionSlideInT();
|
||||
TransitionSlideInT* newScene = new (std::nothrow) TransitionSlideInT();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -642,7 +643,7 @@ TransitionSlideInB::~TransitionSlideInB()
|
|||
|
||||
TransitionSlideInB* TransitionSlideInB::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSlideInB* newScene = new TransitionSlideInB();
|
||||
TransitionSlideInB* newScene = new (std::nothrow) TransitionSlideInB();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -682,7 +683,7 @@ TransitionShrinkGrow::~TransitionShrinkGrow()
|
|||
|
||||
TransitionShrinkGrow* TransitionShrinkGrow::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionShrinkGrow* newScene = new TransitionShrinkGrow();
|
||||
TransitionShrinkGrow* newScene = new (std::nothrow) TransitionShrinkGrow();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -780,7 +781,7 @@ void TransitionFlipX::onEnter()
|
|||
|
||||
TransitionFlipX* TransitionFlipX::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionFlipX* newScene = new TransitionFlipX();
|
||||
TransitionFlipX* newScene = new (std::nothrow) TransitionFlipX();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -850,7 +851,7 @@ void TransitionFlipY::onEnter()
|
|||
|
||||
TransitionFlipY* TransitionFlipY::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionFlipY* newScene = new TransitionFlipY();
|
||||
TransitionFlipY* newScene = new (std::nothrow) TransitionFlipY();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -920,7 +921,7 @@ void TransitionFlipAngular::onEnter()
|
|||
|
||||
TransitionFlipAngular* TransitionFlipAngular::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionFlipAngular* newScene = new TransitionFlipAngular();
|
||||
TransitionFlipAngular* newScene = new (std::nothrow) TransitionFlipAngular();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -998,7 +999,7 @@ void TransitionZoomFlipX::onEnter()
|
|||
|
||||
TransitionZoomFlipX* TransitionZoomFlipX::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionZoomFlipX* newScene = new TransitionZoomFlipX();
|
||||
TransitionZoomFlipX* newScene = new (std::nothrow) TransitionZoomFlipX();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -1077,7 +1078,7 @@ void TransitionZoomFlipY::onEnter()
|
|||
|
||||
TransitionZoomFlipY* TransitionZoomFlipY::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionZoomFlipY* newScene = new TransitionZoomFlipY();
|
||||
TransitionZoomFlipY* newScene = new (std::nothrow) TransitionZoomFlipY();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -1158,7 +1159,7 @@ void TransitionZoomFlipAngular::onEnter()
|
|||
|
||||
TransitionZoomFlipAngular* TransitionZoomFlipAngular::create(float t, Scene* s, Orientation o)
|
||||
{
|
||||
TransitionZoomFlipAngular* newScene = new TransitionZoomFlipAngular();
|
||||
TransitionZoomFlipAngular* newScene = new (std::nothrow) TransitionZoomFlipAngular();
|
||||
newScene->initWithDuration(t, s, o);
|
||||
newScene->autorelease();
|
||||
|
||||
|
@ -1182,7 +1183,7 @@ TransitionFade::~TransitionFade()
|
|||
|
||||
TransitionFade * TransitionFade::create(float duration, Scene *scene, const Color3B& color)
|
||||
{
|
||||
TransitionFade * transition = new TransitionFade();
|
||||
TransitionFade * transition = new (std::nothrow) TransitionFade();
|
||||
transition->initWithDuration(duration, scene, color);
|
||||
transition->autorelease();
|
||||
return transition;
|
||||
|
@ -1251,7 +1252,7 @@ TransitionCrossFade::~TransitionCrossFade()
|
|||
|
||||
TransitionCrossFade* TransitionCrossFade::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionCrossFade* newScene = new TransitionCrossFade();
|
||||
TransitionCrossFade* newScene = new (std::nothrow) TransitionCrossFade();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1362,7 +1363,7 @@ TransitionTurnOffTiles::~TransitionTurnOffTiles()
|
|||
|
||||
TransitionTurnOffTiles* TransitionTurnOffTiles::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionTurnOffTiles* newScene = new TransitionTurnOffTiles();
|
||||
TransitionTurnOffTiles* newScene = new (std::nothrow) TransitionTurnOffTiles();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1447,7 +1448,7 @@ TransitionSplitCols::~TransitionSplitCols()
|
|||
|
||||
TransitionSplitCols* TransitionSplitCols::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSplitCols* newScene = new TransitionSplitCols();
|
||||
TransitionSplitCols* newScene = new (std::nothrow) TransitionSplitCols();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1533,7 +1534,7 @@ ActionInterval* TransitionSplitRows::action()
|
|||
|
||||
TransitionSplitRows* TransitionSplitRows::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionSplitRows* newScene = new TransitionSplitRows();
|
||||
TransitionSplitRows* newScene = new (std::nothrow) TransitionSplitRows();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1558,7 +1559,7 @@ TransitionFadeTR::~TransitionFadeTR()
|
|||
|
||||
TransitionFadeTR* TransitionFadeTR::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionFadeTR* newScene = new TransitionFadeTR();
|
||||
TransitionFadeTR* newScene = new (std::nothrow) TransitionFadeTR();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1646,7 +1647,7 @@ TransitionFadeBL::~TransitionFadeBL()
|
|||
|
||||
TransitionFadeBL* TransitionFadeBL::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionFadeBL* newScene = new TransitionFadeBL();
|
||||
TransitionFadeBL* newScene = new (std::nothrow) TransitionFadeBL();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1674,7 +1675,7 @@ TransitionFadeUp::~TransitionFadeUp()
|
|||
|
||||
TransitionFadeUp* TransitionFadeUp::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionFadeUp* newScene = new TransitionFadeUp();
|
||||
TransitionFadeUp* newScene = new (std::nothrow) TransitionFadeUp();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -1701,7 +1702,7 @@ TransitionFadeDown::~TransitionFadeDown()
|
|||
|
||||
TransitionFadeDown* TransitionFadeDown::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionFadeDown* newScene = new TransitionFadeDown();
|
||||
TransitionFadeDown* newScene = new (std::nothrow) TransitionFadeDown();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
|
|
@ -29,7 +29,6 @@ THE SOFTWARE.
|
|||
#define __CCTRANSITION_H__
|
||||
|
||||
#include "2d/CCScene.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCTransitionPageTurn.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "2d/CCActionInterval.h"
|
||||
#include "2d/CCActionInstant.h"
|
||||
#include "2d/CCActionGrid.h"
|
||||
#include "2d/CCActionPageTurn3D.h"
|
||||
#include "2d/CCNodeGrid.h"
|
||||
#include "renderer/CCRenderer.h"
|
||||
|
@ -56,7 +53,7 @@ TransitionPageTurn::~TransitionPageTurn()
|
|||
/** creates a base transition with duration and incoming scene */
|
||||
TransitionPageTurn * TransitionPageTurn::create(float t, Scene *scene, bool backwards)
|
||||
{
|
||||
TransitionPageTurn * transition = new TransitionPageTurn();
|
||||
TransitionPageTurn * transition = new (std::nothrow) TransitionPageTurn();
|
||||
transition->initWithDuration(t,scene,backwards);
|
||||
transition->autorelease();
|
||||
return transition;
|
||||
|
|
|
@ -30,7 +30,6 @@ THE SOFTWARE.
|
|||
#include "base/CCDirector.h"
|
||||
#include "2d/CCRenderTexture.h"
|
||||
#include "2d/CCProgressTimer.h"
|
||||
#include "2d/CCLayer.h"
|
||||
#include "2d/CCActionInstant.h"
|
||||
#include "2d/CCActionProgressTimer.h"
|
||||
|
||||
|
@ -50,7 +49,7 @@ TransitionProgress::TransitionProgress()
|
|||
|
||||
TransitionProgress* TransitionProgress::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgress* newScene = new TransitionProgress();
|
||||
TransitionProgress* newScene = new (std::nothrow) TransitionProgress();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -153,7 +152,7 @@ ProgressTimer* TransitionProgressRadialCCW::progressTimerNodeWithRenderTexture(R
|
|||
|
||||
TransitionProgressRadialCCW* TransitionProgressRadialCCW::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressRadialCCW* newScene = new TransitionProgressRadialCCW();
|
||||
TransitionProgressRadialCCW* newScene = new (std::nothrow) TransitionProgressRadialCCW();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -166,7 +165,7 @@ TransitionProgressRadialCCW* TransitionProgressRadialCCW::create(float t, Scene*
|
|||
// TransitionProgressRadialCW
|
||||
TransitionProgressRadialCW* TransitionProgressRadialCW::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressRadialCW* newScene = new TransitionProgressRadialCW();
|
||||
TransitionProgressRadialCW* newScene = new (std::nothrow) TransitionProgressRadialCW();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -198,7 +197,7 @@ ProgressTimer* TransitionProgressRadialCW::progressTimerNodeWithRenderTexture(Re
|
|||
// TransitionProgressHorizontal
|
||||
TransitionProgressHorizontal* TransitionProgressHorizontal::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressHorizontal* newScene = new TransitionProgressHorizontal();
|
||||
TransitionProgressHorizontal* newScene = new (std::nothrow) TransitionProgressHorizontal();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -231,7 +230,7 @@ ProgressTimer* TransitionProgressHorizontal::progressTimerNodeWithRenderTexture(
|
|||
// TransitionProgressVertical
|
||||
TransitionProgressVertical* TransitionProgressVertical::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressVertical* newScene = new TransitionProgressVertical();
|
||||
TransitionProgressVertical* newScene = new (std::nothrow) TransitionProgressVertical();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -265,7 +264,7 @@ ProgressTimer* TransitionProgressVertical::progressTimerNodeWithRenderTexture(Re
|
|||
// TransitionProgressInOut
|
||||
TransitionProgressInOut* TransitionProgressInOut::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressInOut* newScene = new TransitionProgressInOut();
|
||||
TransitionProgressInOut* newScene = new (std::nothrow) TransitionProgressInOut();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
@ -311,7 +310,7 @@ ProgressTimer* TransitionProgressInOut::progressTimerNodeWithRenderTexture(Rende
|
|||
// TransitionProgressOutIn
|
||||
TransitionProgressOutIn* TransitionProgressOutIn::create(float t, Scene* scene)
|
||||
{
|
||||
TransitionProgressOutIn* newScene = new TransitionProgressOutIn();
|
||||
TransitionProgressOutIn* newScene = new (std::nothrow) TransitionProgressOutIn();
|
||||
if(newScene && newScene->initWithDuration(t, scene))
|
||||
{
|
||||
newScene->autorelease();
|
||||
|
|
|
@ -24,6 +24,10 @@ THE SOFTWARE.
|
|||
|
||||
#include "2d/CCTweenFunction.h"
|
||||
|
||||
#define _USE_MATH_DEFINES // needed for M_PI and M_PI2
|
||||
#include <math.h> // M_PI
|
||||
#undef _USE_MATH_DEFINES
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
namespace tweenfunc {
|
||||
|
|
|
@ -26,8 +26,6 @@ THE SOFTWARE.
|
|||
#define __CCTWEENFUNCTION_H__
|
||||
|
||||
#include "base/CCPlatformMacros.h"
|
||||
#include "base/ccMacros.h"
|
||||
#include <math.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;glfw3.lib;freetype250.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;glfw3.lib;freetype250.lib;winmm.lib;ws2_32.lib;libchipmunk.lib;libbox2d.lib;libspine.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
|
|
|
@ -104,7 +104,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(Ou
|
|||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"
|
||||
</Command>
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\debug-lib\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\box2d\prebuilt\debug-lib\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\debug-lib\*.*" "$(OutDir)"</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||
|
@ -116,7 +118,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)
|
|||
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ModuleDefinitionFile>cocos2d.def</ModuleDefinitionFile>
|
||||
<AdditionalDependencies>libchipmunk.lib;sqlite3.lib;libcurl_imp.lib;libBox2D.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>sqlite3.lib;libcurl_imp.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
|
@ -129,7 +131,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)
|
|||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32\;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
|
@ -155,10 +157,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\websockets\prebuilt\win32\*.*" "$(OutDi
|
|||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
|
||||
</Command>
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\release-lib\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\box2d\prebuilt\release-lib\*.*" "$(OutDir)"
|
||||
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-lib\*.*" "$(OutDir)"</Command>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalDependencies>libchipmunk.lib;sqlite3.lib;libcurl_imp.lib;libBox2D.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>sqlite3.lib;libcurl_imp.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries> ;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
|
@ -273,6 +277,28 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp" />
|
||||
<ClCompile Include="..\deprecated\CCSet.cpp" />
|
||||
<ClCompile Include="..\deprecated\CCString.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBAnimationManager.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBFileLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBKeyframe.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBReader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBSequence.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBSequenceProperty.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCControlButtonLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCControlLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLabelBMFontLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLabelTTFLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerColorLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerGradientLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCMenuItemImageLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCMenuItemLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNode+CCBRelativePositioning.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNodeLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNodeLoaderLibrary.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCParticleSystemQuadLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCScale9SpriteLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCScrollViewLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCSpriteLoader.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimeline.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp" />
|
||||
|
@ -607,6 +633,33 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClInclude Include="..\deprecated\CCNotificationCenter.h" />
|
||||
<ClInclude Include="..\deprecated\CCSet.h" />
|
||||
<ClInclude Include="..\deprecated\CCString.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBAnimationManager.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBFileLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBKeyframe.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBMemberVariableAssigner.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBReader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSelectorResolver.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSequence.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSequenceProperty.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCControlButtonLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCControlLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLabelBMFontLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLabelTTFLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerColorLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerGradientLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuItemImageLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuItemLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNode+CCBRelativePositioning.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoaderLibrary.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoaderListener.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCParticleSystemQuadLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCScale9SpriteLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCScrollViewLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCSpriteLoader.h" />
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CocosBuilder.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimeline.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.h" />
|
||||
|
@ -834,24 +887,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<None Include="..\math\Vec4.inl" />
|
||||
<None Include="cocos2d.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\external\Box2D\proj.win32\libbox2d.vcxproj">
|
||||
<Project>{929480e7-23c0-4df6-8456-096d71547116}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\external\chipmunk\proj.win32\chipmunk.vcxproj">
|
||||
<Project>{207bc7a9-ccf1-4f2f-a04d-45f72242ae25}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
@ -202,6 +202,15 @@
|
|||
<Filter Include="cocostudio\action">
|
||||
<UniqueIdentifier>{d48c8016-e933-48dd-a5c0-202b0a84b82a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="cocosbuilder">
|
||||
<UniqueIdentifier>{e25a6c9d-eaf2-446f-b9b2-d89fd21a9bdd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="cocosbuilder\Header Files">
|
||||
<UniqueIdentifier>{bbba68d3-e519-4e06-8a01-d8ee89b544f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="cocosbuilder\Source Files">
|
||||
<UniqueIdentifier>{8579ed15-b266-4f80-818d-a3a9251c4248}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
||||
|
@ -1090,6 +1099,72 @@
|
|||
<ClCompile Include="..\3d\CCMeshVertexIndexData.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBAnimationManager.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBFileLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBKeyframe.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBReader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBSequence.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCBSequenceProperty.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCControlButtonLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCControlLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLabelBMFontLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLabelTTFLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerColorLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerGradientLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCLayerLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCMenuItemImageLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCMenuItemLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNode+CCBRelativePositioning.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNodeLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCNodeLoaderLibrary.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCParticleSystemQuadLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCScale9SpriteLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCScrollViewLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocosbuilder\CCSpriteLoader.cpp">
|
||||
<Filter>cocosbuilder\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||
|
@ -2134,6 +2209,87 @@
|
|||
<ClInclude Include="..\3d\CCMeshVertexIndexData.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBAnimationManager.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBFileLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBKeyframe.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBMemberVariableAssigner.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBReader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSelectorResolver.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSequence.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCBSequenceProperty.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCControlButtonLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCControlLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLabelBMFontLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLabelTTFLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerColorLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerGradientLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCLayerLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuItemImageLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuItemLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCMenuLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNode+CCBRelativePositioning.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoaderLibrary.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCNodeLoaderListener.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCParticleSystemQuadLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCScale9SpriteLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCScrollViewLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CCSpriteLoader.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocosbuilder\CocosBuilder.h">
|
||||
<Filter>cocosbuilder\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\math\Mat4.inl">
|
||||
|
|
|
@ -20,13 +20,14 @@ CCMeshVertexIndexData.cpp \
|
|||
CCSprite3DMaterial.cpp \
|
||||
CCObjLoader.cpp \
|
||||
CCSkeleton3D.cpp \
|
||||
CCSprite3D.cpp \
|
||||
CCSprite3D.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \
|
||||
$(LOCAL_PATH)/../../external \
|
||||
$(LOCAL_PATH)/../platform/android
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
|
||||
LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
|
|
@ -36,7 +36,7 @@ NS_CC_BEGIN
|
|||
//create Animate3D using Animation.
|
||||
Animate3D* Animate3D::create(Animation3D* animation)
|
||||
{
|
||||
auto animate = new Animate3D();
|
||||
auto animate = new (std::nothrow) Animate3D();
|
||||
animate->_animation = animation;
|
||||
animation->retain();
|
||||
|
||||
|
@ -96,17 +96,19 @@ void Animate3D::startWithTarget(Node *target)
|
|||
|
||||
_boneCurves.clear();
|
||||
auto skin = sprite->getSkeleton();
|
||||
bool hasCurve = false;
|
||||
for (unsigned int i = 0; i < skin->getBoneCount(); i++) {
|
||||
auto bone = skin->getBoneByIndex(i);
|
||||
auto curve = _animation->getBoneCurveByName(bone->getName());
|
||||
if (curve)
|
||||
{
|
||||
_boneCurves[bone] = curve;
|
||||
hasCurve = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCLOG("warning: bone %s not find in animation", bone->getName().c_str());
|
||||
}
|
||||
}
|
||||
if (!hasCurve)
|
||||
{
|
||||
CCLOG("warning: no animation finde for the skeleton");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ Animation3D* Animation3D::create(const std::string& fileName, const std::string&
|
|||
return animation;
|
||||
|
||||
//load animation here
|
||||
animation = new Animation3D();
|
||||
animation = new (std::nothrow) Animation3D();
|
||||
auto bundle = Bundle3D::getInstance();
|
||||
Animation3DData animationdata;
|
||||
if (bundle->load(fullPath) && bundle->loadAnimationData(animationName, &animationdata) && animation->init(animationdata))
|
||||
|
@ -101,7 +101,7 @@ bool Animation3D::init(const Animation3DData &data)
|
|||
Curve* curve = _boneCurves[iter.first];
|
||||
if( curve == nullptr)
|
||||
{
|
||||
curve = new Curve();
|
||||
curve = new (std::nothrow) Curve();
|
||||
_boneCurves[iter.first] = curve;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ bool Animation3D::init(const Animation3DData &data)
|
|||
Curve* curve = _boneCurves[iter.first];
|
||||
if( curve == nullptr)
|
||||
{
|
||||
curve = new Curve();
|
||||
curve = new (std::nothrow) Curve();
|
||||
_boneCurves[iter.first] = curve;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ bool Animation3D::init(const Animation3DData &data)
|
|||
Curve* curve = _boneCurves[iter.first];
|
||||
if( curve == nullptr)
|
||||
{
|
||||
curve = new Curve();
|
||||
curve = new (std::nothrow) Curve();
|
||||
_boneCurves[iter.first] = curve;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ Animation3DCache* Animation3DCache::_cacheInstance = nullptr;
|
|||
Animation3DCache* Animation3DCache::getInstance()
|
||||
{
|
||||
if (_cacheInstance == nullptr)
|
||||
_cacheInstance = new Animation3DCache();
|
||||
_cacheInstance = new (std::nothrow) Animation3DCache();
|
||||
|
||||
return _cacheInstance;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ template <int componentSize>
|
|||
AnimationCurve<componentSize>* AnimationCurve<componentSize>::create(float* keytime, float* value, int count)
|
||||
{
|
||||
int floatSize = sizeof(float);
|
||||
AnimationCurve* curve = new AnimationCurve();
|
||||
AnimationCurve* curve = new (std::nothrow) AnimationCurve();
|
||||
curve->_keytime = new float[count];
|
||||
memcpy(curve->_keytime, keytime, count * floatSize);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ NS_CC_BEGIN
|
|||
|
||||
AttachNode* AttachNode::create(Bone3D* attachBone)
|
||||
{
|
||||
auto attachnode = new AttachNode();
|
||||
auto attachnode = new (std::nothrow) AttachNode();
|
||||
attachnode->_attachBone = attachBone;
|
||||
attachnode->autorelease();
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ void Bundle3D::setBundleInstance(Bundle3D* bundleInstance)
|
|||
Bundle3D* Bundle3D::getInstance()
|
||||
{
|
||||
if (_instance == nullptr)
|
||||
_instance = new Bundle3D();
|
||||
_instance = new (std::nothrow) Bundle3D();
|
||||
return _instance;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ bool Bundle3D::loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeD
|
|||
if (ret.empty())
|
||||
{
|
||||
//fill data
|
||||
MeshData* meshdata = new MeshData();
|
||||
MeshData* meshdata = new (std::nothrow) MeshData();
|
||||
MeshVertexAttrib attrib;
|
||||
attrib.size = 3;
|
||||
attrib.type = GL_FLOAT;
|
||||
|
@ -292,8 +292,8 @@ bool Bundle3D::loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeD
|
|||
|
||||
meshdata->subMeshIndices.push_back(it.mesh.indices);
|
||||
meshdata->subMeshIds.push_back(str);
|
||||
auto node = new NodeData();
|
||||
auto modelnode = new ModelData();
|
||||
auto node = new (std::nothrow) NodeData();
|
||||
auto modelnode = new (std::nothrow) ModelData();
|
||||
modelnode->matrialId = str;
|
||||
modelnode->subMeshId = str;
|
||||
node->id = it.name;
|
||||
|
@ -410,7 +410,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas)
|
|||
}
|
||||
for(int i = 0; i < meshSize ; i++ )
|
||||
{
|
||||
MeshData* meshData = new MeshData();
|
||||
MeshData* meshData = new (std::nothrow) MeshData();
|
||||
unsigned int attribSize=0;
|
||||
// read mesh data
|
||||
if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1)
|
||||
|
@ -486,7 +486,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas)
|
|||
|
||||
meshdatas.resetData();
|
||||
|
||||
MeshData* meshdata = new MeshData();
|
||||
MeshData* meshdata = new (std::nothrow) MeshData();
|
||||
|
||||
// read mesh data
|
||||
unsigned int attribSize=0;
|
||||
|
@ -594,7 +594,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas)
|
|||
|
||||
meshdatas.resetData();
|
||||
|
||||
MeshData* meshdata = new MeshData();
|
||||
MeshData* meshdata = new (std::nothrow) MeshData();
|
||||
|
||||
// read mesh data
|
||||
unsigned int attribSize=0;
|
||||
|
@ -706,7 +706,7 @@ bool Bundle3D::loadMeshDatasJson(MeshDatas& meshdatas)
|
|||
const rapidjson::Value& mesh_data_array = _jsonReader[MESHES];
|
||||
for (rapidjson::SizeType index = 0; index < mesh_data_array.Size(); index++)
|
||||
{
|
||||
MeshData* meshData = new MeshData();
|
||||
MeshData* meshData = new (std::nothrow) MeshData();
|
||||
const rapidjson::Value& mesh_data = mesh_data_array[index];
|
||||
// mesh_vertex_attribute
|
||||
const rapidjson::Value& mesh_vertex_attribute = mesh_data[ATTRIBUTES];
|
||||
|
@ -761,19 +761,19 @@ bool Bundle3D::loadNodes(NodeDatas& nodedatas)
|
|||
{
|
||||
SkinData skinData;
|
||||
loadSkinData("", &skinData);
|
||||
auto nodeDatas = new NodeData*[skinData.skinBoneNames.size() + skinData.nodeBoneNames.size()];
|
||||
auto nodeDatas = new (std::nothrow) NodeData*[skinData.skinBoneNames.size() + skinData.nodeBoneNames.size()];
|
||||
int index = 0;
|
||||
size_t i;
|
||||
for (i = 0; i < skinData.skinBoneNames.size(); i++)
|
||||
{
|
||||
nodeDatas[index] = new NodeData();
|
||||
nodeDatas[index] = new (std::nothrow) NodeData();
|
||||
nodeDatas[index]->id = skinData.skinBoneNames[i];
|
||||
nodeDatas[index]->transform = skinData.skinBoneOriginMatrices[i];
|
||||
index++;
|
||||
}
|
||||
for (i = 0; i < skinData.nodeBoneNames.size(); i++)
|
||||
{
|
||||
nodeDatas[index] = new NodeData();
|
||||
nodeDatas[index] = new (std::nothrow) NodeData();
|
||||
nodeDatas[index]->id = skinData.nodeBoneNames[i];
|
||||
nodeDatas[index]->transform = skinData.nodeBoneOriginMatrices[i];
|
||||
index++;
|
||||
|
@ -788,8 +788,8 @@ bool Bundle3D::loadNodes(NodeDatas& nodedatas)
|
|||
}
|
||||
}
|
||||
nodedatas.skeleton.push_back(nodeDatas[skinData.rootBoneIndex]);
|
||||
auto node= new NodeData();
|
||||
auto modelnode = new ModelData();
|
||||
auto node= new (std::nothrow) NodeData();
|
||||
auto modelnode = new (std::nothrow) ModelData();
|
||||
modelnode->matrialId = "";
|
||||
modelnode->subMeshId = "";
|
||||
modelnode->bones = skinData.skinBoneNames;
|
||||
|
@ -1202,6 +1202,10 @@ bool Bundle3D::loadAnimationDataJson(Animation3DData* animationdata)
|
|||
{
|
||||
const rapidjson::Value& bone_keyframes = bone[KEYFRAMES];
|
||||
rapidjson::SizeType keyframe_size = bone_keyframes.Size();
|
||||
animationdata->_rotationKeys[bone_name].reserve(keyframe_size);
|
||||
animationdata->_scaleKeys[bone_name].reserve(keyframe_size);
|
||||
animationdata->_translationKeys[bone_name].reserve(keyframe_size);
|
||||
|
||||
for (rapidjson::SizeType j = 0; j < keyframe_size; j++)
|
||||
{
|
||||
const rapidjson::Value& bone_keyframe = bone_keyframes[j];
|
||||
|
@ -1242,7 +1246,7 @@ bool Bundle3D::loadBinary(const std::string& path)
|
|||
|
||||
// get file data
|
||||
CC_SAFE_DELETE(_binaryBuffer);
|
||||
_binaryBuffer = new Data();
|
||||
_binaryBuffer = new (std::nothrow) Data();
|
||||
*_binaryBuffer = FileUtils::getInstance()->getDataFromFile(path);
|
||||
if (_binaryBuffer->isNull())
|
||||
{
|
||||
|
@ -1285,7 +1289,7 @@ bool Bundle3D::loadBinary(const std::string& path)
|
|||
|
||||
// Read all refs
|
||||
CC_SAFE_DELETE_ARRAY(_references);
|
||||
_references = new Reference[_referenceCount];
|
||||
_references = new (std::nothrow) Reference[_referenceCount];
|
||||
for (ssize_t i = 0; i < _referenceCount; ++i)
|
||||
{
|
||||
if ((_references[i].id = _binaryReader.readString()).empty() ||
|
||||
|
@ -1628,6 +1632,10 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata)
|
|||
return false;
|
||||
}
|
||||
|
||||
animationdata->_rotationKeys[boneName].reserve(keyframeNum);
|
||||
animationdata->_scaleKeys[boneName].reserve(keyframeNum);
|
||||
animationdata->_translationKeys[boneName].reserve(keyframeNum);
|
||||
|
||||
for (unsigned int j = 0; j < keyframeNum; ++j)
|
||||
{
|
||||
float keytime;
|
||||
|
@ -1688,11 +1696,11 @@ bool Bundle3D::loadNodesJson(NodeDatas& nodedatas)
|
|||
}
|
||||
NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue)
|
||||
{
|
||||
NodeData* nodedata = new NodeData();;
|
||||
NodeData* nodedata = new (std::nothrow) NodeData();;
|
||||
//if (jvalue.HasMember(PARTS))
|
||||
// nodedata = new ModelNodeData();
|
||||
// nodedata = new (std::nothrow) ModelNodeData();
|
||||
//else
|
||||
//nodedata = new NodeData();
|
||||
//nodedata = new (std::nothrow) NodeData();
|
||||
|
||||
// id
|
||||
nodedata->id = jvalue[ID].GetString();
|
||||
|
@ -1716,7 +1724,7 @@ NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue)
|
|||
|
||||
for (rapidjson::SizeType i = 0; i < parts.Size(); i++)
|
||||
{
|
||||
auto modelnodedata = new ModelData();;
|
||||
auto modelnodedata = new (std::nothrow) ModelData();;
|
||||
const rapidjson::Value& part = parts[i];
|
||||
modelnodedata->subMeshId = part[MESHPARTID].GetString();
|
||||
modelnodedata->matrialId = part[MATERIALID].GetString();
|
||||
|
@ -1829,14 +1837,14 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
NodeData* nodedata = new NodeData();
|
||||
NodeData* nodedata = new (std::nothrow) NodeData();
|
||||
nodedata->id = id;
|
||||
nodedata->transform = transform;
|
||||
if (partsSize > 0)
|
||||
{
|
||||
for (rapidjson::SizeType i = 0; i < partsSize; i++)
|
||||
{
|
||||
auto modelnodedata = new ModelData();
|
||||
auto modelnodedata = new (std::nothrow) ModelData();
|
||||
modelnodedata->subMeshId = _binaryReader.readString();
|
||||
modelnodedata->matrialId = _binaryReader.readString();
|
||||
|
||||
|
@ -1899,7 +1907,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton)
|
|||
}
|
||||
//else
|
||||
//{
|
||||
// nodedata = new NodeData();
|
||||
// nodedata = new (std::nothrow) NodeData();
|
||||
// nodedata->id = id;
|
||||
// nodedata->transform = transform;
|
||||
//}
|
||||
|
|
|
@ -166,7 +166,7 @@ Mesh* Mesh::create(const std::vector<float>& vertices, int perVertexSizeInFloat,
|
|||
|
||||
Mesh* Mesh::create(const std::string& name, MeshIndexData* indexData, MeshSkin* skin)
|
||||
{
|
||||
auto state = new Mesh();
|
||||
auto state = new (std::nothrow) Mesh();
|
||||
state->autorelease();
|
||||
state->bindMeshCommand();
|
||||
state->_name = name;
|
||||
|
|
|
@ -50,7 +50,7 @@ MeshSkin::~MeshSkin()
|
|||
|
||||
MeshSkin* MeshSkin::create(Skeleton3D* skeleton, const std::vector<std::string>& boneNames, const std::vector<Mat4>& invBindPose)
|
||||
{
|
||||
auto skin = new MeshSkin();
|
||||
auto skin = new (std::nothrow) MeshSkin();
|
||||
skin->_skeleton = skeleton;
|
||||
skeleton->retain();
|
||||
|
||||
|
@ -104,7 +104,7 @@ Vec4* MeshSkin::getMatrixPalette()
|
|||
{
|
||||
if (_matrixPalette == nullptr)
|
||||
{
|
||||
_matrixPalette = new Vec4[_skinBones.size() * PALETTE_ROWS];
|
||||
_matrixPalette = new (std::nothrow) Vec4[_skinBones.size() * PALETTE_ROWS];
|
||||
}
|
||||
int i = 0, paletteIndex = 0;
|
||||
static Mat4 t;
|
||||
|
|
|
@ -49,7 +49,7 @@ NS_CC_BEGIN
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
MeshIndexData* MeshIndexData::create(const std::string& id, MeshVertexData* vertexData, IndexBuffer* indexbuffer, const AABB& aabb)
|
||||
{
|
||||
auto meshindex = new MeshIndexData();
|
||||
auto meshindex = new (std::nothrow) MeshIndexData();
|
||||
|
||||
meshindex->_id = id;
|
||||
meshindex->_indexBuffer = indexbuffer;
|
||||
|
@ -82,7 +82,7 @@ MeshIndexData::~MeshIndexData()
|
|||
|
||||
MeshVertexData* MeshVertexData::create(const MeshData& meshdata)
|
||||
{
|
||||
auto vertexdata = new MeshVertexData();
|
||||
auto vertexdata = new (std::nothrow) MeshVertexData();
|
||||
int pervertexsize = meshdata.getPerVertexSize();
|
||||
vertexdata->_vertexBuffer = VertexBuffer::create(pervertexsize, (int)(meshdata.vertex.size() / (pervertexsize / 4)));
|
||||
vertexdata->_vertexData = VertexData::create();
|
||||
|
|
|
@ -137,7 +137,7 @@ void Bone3D::clearBoneBlendState()
|
|||
*/
|
||||
Bone3D* Bone3D::create(const std::string& id)
|
||||
{
|
||||
auto bone = new Bone3D(id);
|
||||
auto bone = new (std::nothrow) Bone3D(id);
|
||||
bone->autorelease();
|
||||
return bone;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ Skeleton3D::~Skeleton3D()
|
|||
|
||||
Skeleton3D* Skeleton3D::create(const std::vector<NodeData*>& skeletondata)
|
||||
{
|
||||
auto skeleton = new Skeleton3D();
|
||||
auto skeleton = new (std::nothrow) Skeleton3D();
|
||||
for (const auto& it : skeletondata) {
|
||||
auto bone = skeleton->createBone3D(*it);
|
||||
bone->resetPose();
|
||||
|
|
|
@ -50,7 +50,7 @@ Sprite3D* Sprite3D::create(const std::string &modelPath)
|
|||
if (modelPath.length() < 4)
|
||||
CCASSERT(false, "improper name specified when creating Sprite3D");
|
||||
|
||||
auto sprite = new Sprite3D();
|
||||
auto sprite = new (std::nothrow) Sprite3D();
|
||||
if (sprite && sprite->initWithFile(modelPath))
|
||||
{
|
||||
sprite->autorelease();
|
||||
|
@ -102,13 +102,13 @@ bool Sprite3D::loadFromObj(const std::string& path)
|
|||
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(path);
|
||||
|
||||
MeshDatas meshdatas;
|
||||
MaterialDatas* materialdatas = new MaterialDatas();
|
||||
NodeDatas* nodeDatas = new NodeDatas();
|
||||
MaterialDatas* materialdatas = new (std::nothrow) MaterialDatas();
|
||||
NodeDatas* nodeDatas = new (std::nothrow) NodeDatas();
|
||||
bool ret = Bundle3D::loadObj(meshdatas, *materialdatas, *nodeDatas, fullPath);
|
||||
if (ret && initFrom(*nodeDatas, meshdatas, *materialdatas))
|
||||
{
|
||||
//add to cache
|
||||
auto data = new Sprite3DCache::Sprite3DData();
|
||||
auto data = new (std::nothrow) Sprite3DCache::Sprite3DData();
|
||||
data->materialdatas = materialdatas;
|
||||
data->nodedatas = nodeDatas;
|
||||
data->meshVertexDatas = _meshVertexDatas;
|
||||
|
@ -130,15 +130,15 @@ bool Sprite3D::loadFromC3x(const std::string& path)
|
|||
return false;
|
||||
|
||||
MeshDatas meshdatas;
|
||||
MaterialDatas* materialdatas = new MaterialDatas();
|
||||
NodeDatas* nodeDatas = new NodeDatas();
|
||||
MaterialDatas* materialdatas = new (std::nothrow) MaterialDatas();
|
||||
NodeDatas* nodeDatas = new (std::nothrow) NodeDatas();
|
||||
if (bundle->loadMeshDatas(meshdatas)
|
||||
&& bundle->loadMaterials(*materialdatas)
|
||||
&& bundle->loadNodes(*nodeDatas)
|
||||
&& initFrom(*nodeDatas, meshdatas, *materialdatas))
|
||||
{
|
||||
//add to cache
|
||||
auto data = new Sprite3DCache::Sprite3DData();
|
||||
auto data = new (std::nothrow) Sprite3DCache::Sprite3DData();
|
||||
data->materialdatas = materialdatas;
|
||||
data->nodedatas = nodeDatas;
|
||||
data->meshVertexDatas = _meshVertexDatas;
|
||||
|
@ -228,7 +228,7 @@ bool Sprite3D::initFrom(const NodeDatas& nodeDatas, const MeshDatas& meshdatas,
|
|||
}
|
||||
Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,const MaterialDatas& matrialdatas)
|
||||
{
|
||||
auto sprite = new Sprite3D();
|
||||
auto sprite = new (std::nothrow) Sprite3D();
|
||||
if (sprite)
|
||||
{
|
||||
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
|
||||
|
@ -617,7 +617,7 @@ Sprite3DCache* Sprite3DCache::_cacheInstance = nullptr;
|
|||
Sprite3DCache* Sprite3DCache::getInstance()
|
||||
{
|
||||
if (_cacheInstance == nullptr)
|
||||
_cacheInstance = new Sprite3DCache();
|
||||
_cacheInstance = new (std::nothrow) Sprite3DCache();
|
||||
return _cacheInstance;
|
||||
}
|
||||
void Sprite3DCache::destroyInstance()
|
||||
|
|
|
@ -50,7 +50,7 @@ Sprite3DMaterialCache* Sprite3DMaterialCache::getInstance()
|
|||
{
|
||||
if (! _cacheInstance)
|
||||
{
|
||||
_cacheInstance = new Sprite3DMaterialCache();
|
||||
_cacheInstance = new (std::nothrow) Sprite3DMaterialCache();
|
||||
}
|
||||
|
||||
return _cacheInstance;
|
||||
|
|
|
@ -1,146 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\2d\libcocos2d.vcxproj">
|
||||
<Project>{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\CCAABB.cpp" />
|
||||
<ClCompile Include="..\CCAnimate3D.cpp" />
|
||||
<ClCompile Include="..\CCAnimation3D.cpp" />
|
||||
<ClCompile Include="..\CCAttachNode.cpp" />
|
||||
<ClCompile Include="..\CCBundle3D.cpp" />
|
||||
<ClCompile Include="..\CCBundleReader.cpp" />
|
||||
<ClCompile Include="..\CCMesh.cpp" />
|
||||
<ClCompile Include="..\CCMeshSkin.cpp" />
|
||||
<ClCompile Include="..\CCMeshVertexIndexData.cpp" />
|
||||
<ClCompile Include="..\CCOBB.cpp" />
|
||||
<ClCompile Include="..\CCObjLoader.cpp" />
|
||||
<ClCompile Include="..\CCRay.cpp" />
|
||||
<ClCompile Include="..\CCSkeleton3D.cpp" />
|
||||
<ClCompile Include="..\CCSprite3D.cpp" />
|
||||
<ClCompile Include="..\CCSprite3DMaterial.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\3dExport.h" />
|
||||
<ClInclude Include="..\CCAABB.h" />
|
||||
<ClInclude Include="..\CCAnimate3D.h" />
|
||||
<ClInclude Include="..\CCAnimation3D.h" />
|
||||
<ClInclude Include="..\CCAnimationCurve.h" />
|
||||
<ClInclude Include="..\CCAttachNode.h" />
|
||||
<ClInclude Include="..\CCBundle3D.h" />
|
||||
<ClInclude Include="..\CCBundle3DData.h" />
|
||||
<ClInclude Include="..\CCBundleReader.h" />
|
||||
<ClInclude Include="..\CCMesh.h" />
|
||||
<ClInclude Include="..\CCMeshSkin.h" />
|
||||
<ClInclude Include="..\CCMeshVertexIndexData.h" />
|
||||
<ClInclude Include="..\CCOBB.h" />
|
||||
<ClInclude Include="..\CCObjLoader.h" />
|
||||
<ClInclude Include="..\CCRay.h" />
|
||||
<ClInclude Include="..\CCSkeleton3D.h" />
|
||||
<ClInclude Include="..\CCSprite3D.h" />
|
||||
<ClInclude Include="..\CCSprite3DMaterial.h" />
|
||||
<ClInclude Include="..\cocos3d.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E24950FA-5BC1-4AEE-A900-4F0259354BF0}</ProjectGuid>
|
||||
<RootNamespace>libcocos3d</RootNamespace>
|
||||
<ProjectName>libcocos3d</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\2d\cocos2d_headers.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\2d\cocos2d_headers.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
|
||||
<IntDir>$(Configuration).win32\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
|
||||
<IntDir>$(Configuration).win32\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>
|
||||
</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>
|
||||
</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,114 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="3d">
|
||||
<UniqueIdentifier>{6107c94d-579b-488f-86b7-c191d4c3b9aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\CCAABB.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCAnimate3D.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCAnimation3D.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCAttachNode.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCBundle3D.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCBundleReader.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCMesh.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCMeshSkin.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCOBB.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCObjLoader.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCRay.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCSkeleton3D.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCSprite3D.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCSprite3DMaterial.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\CCMeshVertexIndexData.cpp">
|
||||
<Filter>3d</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\CCAABB.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCAnimate3D.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCAnimation3D.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCAnimationCurve.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCAttachNode.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCBundle3D.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCBundle3DData.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCBundleReader.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCMesh.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCMeshSkin.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCOBB.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCObjLoader.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCRay.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCSkeleton3D.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCSprite3D.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCSprite3DMaterial.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\cocos3d.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\3dExport.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\CCMeshVertexIndexData.h">
|
||||
<Filter>3d</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue