From 16ab05a8cf3c0adccfeb37cde35b3fbe96fdbd14 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Thu, 28 Aug 2014 13:47:17 +0800 Subject: [PATCH 01/61] sequence3d --- build/cocos2d_libs.xcodeproj/project.pbxproj | 12 + cocos/3d/CCSequence3D.cpp | 346 +++++++++++++++++++ cocos/3d/CCSequence3D.h | 107 ++++++ 3 files changed, 465 insertions(+) create mode 100644 cocos/3d/CCSequence3D.cpp create mode 100644 cocos/3d/CCSequence3D.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 6178a6bb87..9db966c5d6 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1858,6 +1858,10 @@ B37510841823ACA100B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B375104D1823AC7B00B3BA6A /* CCPhysicsShapeInfo_chipmunk.h */; }; B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B375104E1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp */; }; B37510861823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */; }; + B6F7149419AEF7C8009061BD /* CCSequence3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */; }; + B6F7149519AEF7C8009061BD /* CCSequence3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */; }; + B6F7149619AEF7C8009061BD /* CCSequence3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6F7149319AEF7C8009061BD /* CCSequence3D.h */; }; + B6F7149719AEF7C8009061BD /* CCSequence3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6F7149319AEF7C8009061BD /* CCSequence3D.h */; }; ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; }; @@ -2877,6 +2881,8 @@ B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorldInfo_chipmunk.h; sourceTree = ""; }; B3AF019E1842FBA400A98B85 /* b2MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MotorJoint.cpp; sourceTree = ""; }; B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MotorJoint.h; sourceTree = ""; }; + B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSequence3D.cpp; sourceTree = ""; }; + B6F7149319AEF7C8009061BD /* CCSequence3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSequence3D.h; sourceTree = ""; }; ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCNodeGrid.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeGrid.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -4888,6 +4894,8 @@ B29594B81926D61F003EEF37 /* 3d */ = { isa = PBXGroup; children = ( + B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */, + B6F7149319AEF7C8009061BD /* CCSequence3D.h */, 15AE17E319AAD2F700C27E9E /* 3dExport.h */, 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */, 15AE17E519AAD2F700C27E9E /* CCAABB.h */, @@ -5374,6 +5382,7 @@ 50ABC0031926664800A911A9 /* CCLock.h in Headers */, B37510721823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, + B6F7149619AEF7C8009061BD /* CCSequence3D.h in Headers */, 50ABBD5E1925AB0000A911A9 /* Vec3.h in Headers */, 15AE188919AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, 15AE19EE19AAD3A700C27E9E /* spine.h in Headers */, @@ -5708,6 +5717,7 @@ 15AE1AAB19AAD40300C27E9E /* b2World.h in Headers */, 15AE19FC19AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, + B6F7149719AEF7C8009061BD /* CCSequence3D.h in Headers */, 50ABBE341925AB6F00A911A9 /* CCConfiguration.h in Headers */, 1A570299180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, 15AE1ABF19AAD40300C27E9E /* b2PolygonContact.h in Headers */, @@ -6174,6 +6184,7 @@ 1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE19D819AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, 15AE19E819AAD3A700C27E9E /* Slot.cpp in Sources */, + B6F7149419AEF7C8009061BD /* CCSequence3D.cpp in Sources */, B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 15AE1A6A19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE19BE19AAD3A700C27E9E /* Event.cpp in Sources */, @@ -6624,6 +6635,7 @@ 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, 15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */, + B6F7149519AEF7C8009061BD /* CCSequence3D.cpp in Sources */, 15AE1AD619AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, diff --git a/cocos/3d/CCSequence3D.cpp b/cocos/3d/CCSequence3D.cpp new file mode 100644 index 0000000000..e75d100ee5 --- /dev/null +++ b/cocos/3d/CCSequence3D.cpp @@ -0,0 +1,346 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + 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 "3d/CCSequence3D.h" + +NS_CC_BEGIN + +class ExtraAnimate3D : public FiniteTimeAction +{ +public: + static ExtraAnimate3D* create(); + virtual ExtraAnimate3D* clone() const; + virtual ExtraAnimate3D* reverse(void) const; + virtual void update(float time); + virtual void step(float dt); +}; + +ExtraAnimate3D* ExtraAnimate3D::create() +{ + ExtraAnimate3D* ret = new ExtraAnimate3D(); + if (ret) + { + ret->autorelease(); + } + return ret; +} +ExtraAnimate3D* ExtraAnimate3D::clone() const +{ + // no copy constructor + auto a = new ExtraAnimate3D(); + a->autorelease(); + return a; +} + +ExtraAnimate3D* ExtraAnimate3D::reverse() const +{ + return ExtraAnimate3D::create(); +} + +void ExtraAnimate3D::update(float time) +{ + CC_UNUSED_PARAM(time); +} + +void ExtraAnimate3D::step(float dt) +{ + CC_UNUSED_PARAM(dt); +} + +Sequence3D* Sequence3D::createWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo) +{ + Sequence3D *sequence3d = new Sequence3D(); + sequence3d->initWithTwoActions(actionOne, actionTwo); + sequence3d->autorelease(); + + return sequence3d; +} + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +Sequence3D* Sequence3D::variadicCreate(Animate3D *action1, ...) +{ + va_list params; + va_start(params, action1); + + Sequence3D *ret = Sequence3D::createWithVariableList(action1, params); + + va_end(params); + + return ret; +} +#else +Sequence3D* Sequence3D::create(Animate3D *action1, ...) +{ + va_list params; + va_start(params, action1); + + Sequence3D *ret = Sequence3D::createWithVariableList(action1, params); + + va_end(params); + + return ret; +} +#endif + +Sequence3D* Sequence3D::createWithVariableList(Animate3D *action1, va_list args) +{ + Animate3D *now; + Animate3D *prev = action1; + bool bOneAction = true; + + while (action1) + { + now = va_arg(args, Animate3D*); + if (now) + { + prev = (Animate3D*)createWithTwoActions(prev, now); + bOneAction = false; + } + else + { + if (bOneAction) + { + prev = (Animate3D*)createWithTwoActions(prev, (Animate3D*)ExtraAnimate3D::create()); + } + break; + } + } + + return ((Sequence3D*)prev); +} + +Sequence3D* Sequence3D::create(const Vector& arrayOfActions) +{ + Sequence3D* ret = nullptr; + do + { + auto count = arrayOfActions.size(); + CC_BREAK_IF(count == 0); + + auto prev = arrayOfActions.at(0); + + if (count > 1) + { + for (int i = 1; i < count; ++i) + { + prev = (Animate3D*)createWithTwoActions(prev, arrayOfActions.at(i)); + } + } + else + { + prev = (Animate3D*)createWithTwoActions(prev, (Animate3D*)ExtraAnimate3D::create()); + } + ret = (Sequence3D*)prev; + }while (0); + return ret; +} + +bool Sequence3D::initWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo) +{ + CCASSERT(actionOne != nullptr, ""); + CCASSERT(actionTwo != nullptr, ""); + + float d = actionOne->getDuration() + actionTwo->getDuration(); + ActionInterval::initWithDuration(d); + + _actions[0] = actionOne; + actionOne->retain(); + + _actions[1] = actionTwo; + actionTwo->retain(); + + return true; +} + +Sequence3D* Sequence3D::clone() const +{ + // no copy constructor + auto seq3d = new Sequence3D(); + seq3d->initWithTwoActions(_actions[0]->clone(), _actions[1]->clone() ); + seq3d->autorelease(); + return seq3d; +} + +Sequence3D::Sequence3D() +: _blendTime(0.1f) +,_blendRemain(0.1f) +,_cutAnim(false) +,cut_t(0.0f) +{ + +} + +Sequence3D::~Sequence3D(void) +{ + CC_SAFE_RELEASE(_actions[0]); + CC_SAFE_RELEASE(_actions[1]); +} + +void Sequence3D::startWithTarget(Node *target) +{ + ActionInterval::startWithTarget(target); + _split = _actions[0]->getDuration() / _duration; + _last = -1; +} + +void Sequence3D::stop(void) +{ + if( _last != - 1) + { + _actions[_last]->stop(); + } + + ActionInterval::stop(); +} + +Sequence3D* Sequence3D::reverse() const +{ + return Sequence3D::createWithTwoActions(_actions[1]->reverse(), _actions[0]->reverse()); +} + +void Sequence3D::update(float t) +{ + int found = 0; + float new_t = 0.0f; + float blend_t = 0.0f; + + if( t < _split ) { + // action[0] + found = 0; + if( _split != 0 ) + new_t = t / _split; + else + new_t = 1; + + if( found != _last && found <= 0 ) + _actions[0]->startWithTarget(_target); + + _actions[0]->update(new_t); + + } + if(t >= (_split - _blendTime) && _cutAnim == false) + { + // action[1] + + blend_t += 0.01f; + Blend(blend_t); + found = 1; + if ( _split == 1 ) + new_t = 1; + else + new_t = (t-(_split - _blendTime)) / (1 - (_split - _blendTime)); + + if( found != _last && found >= 1 ) + _actions[1]->startWithTarget(_target); + + _actions[1]->update(new_t); + } + if(_cutAnim == true) + { + blend_t += 0.01f; + Blend(blend_t); + found = 1; + if(found != _last && found >= 1) + { + cut_t = t; + } + if ( _split == 1 ) + new_t = 1; + else + new_t = (t - cut_t) / (1 - cut_t); + + if( found != _last && found >= 1 ) + _actions[1]->startWithTarget(_target); + + _actions[1]->update(new_t); + } + // if ( found==1 ) { + + // if( _last == -1 ) { + // // action[0] was skipped, execute it. + // _actions[0]->startWithTarget(_target); + // _actions[0]->update(1.0f); + // _actions[0]->stop(); + // } + // else if( _last == 0 ) + // { + // // switching to action 1. stop action 0. + // _actions[0]->update(1.0f); + // _actions[0]->stop(); + // } + // } + //else if(found==0 && _last==1 ) + //{ + // // Reverse mode ? + // // XXX: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode" + // // since it will require a hack to know if an action is on reverse mode or not. + // // "step" should be overriden, and the "reverseMode" value propagated to inner Sequences. + // _actions[1]->update(0); + // _actions[1]->stop(); + //} + // // Last action found and it is done. + // if( found == _last && _actions[found]->isDone() ) + // { + // return; + // } + + // // Last action found and it is done + // if( found != _last ) + // { + // //_actions[found]->startWithTarget(_target); + // } + + //_actions[found]->update(new_t); + _last = found; +} + +void Sequence3D::Blend(float timeElapse) +{ + _blendRemain -= timeElapse; + bool bBlending = _blendRemain >= 0; + if (bBlending) + { + float fSrcWeight = _blendRemain / _blendTime; + _actions[0]->setWeight(fSrcWeight); + _actions[1]->setWeight(1 - fSrcWeight); + } +} + +void Sequence3D::addAnimate3D(Animate3D* animate) +{ + if(this->_duration > 0) + { + if(_actions[1]->getDuration() <= 0) + { + _actions[1] = animate; + _cutAnim = true; + _duration += _actions[1]->getDuration(); + _split = _actions[0]->getDuration() / _duration; + } + } + else + return; +} + +NS_CC_END diff --git a/cocos/3d/CCSequence3D.h b/cocos/3d/CCSequence3D.h new file mode 100644 index 0000000000..e580f6179e --- /dev/null +++ b/cocos/3d/CCSequence3D.h @@ -0,0 +1,107 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + 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. + ****************************************************************************/ + +#ifndef __CCSEQUECE3D_H__ +#define __CCSEQUECE3D_H__ + +#include "2d/CCActionInterval.h" +#include "3d/CCAnimate3D.h" + +NS_CC_BEGIN + + +class CC_3D_DLL Sequence3D : public ActionInterval +{ +public: + /** helper constructor to create an array of sequenceable actions */ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) + // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported + typedef Animate3D* M; + static Sequence3D* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } + static Sequence3D* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } + static Sequence3D* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } + static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } + + // On WP8 for variable argument lists longer than 10 items, use the other create functions or variadicCreate with NULL as the last argument + static Sequence3D* variadicCreate(Animate3D* item, ...); +#else + static Sequence3D* create(Animate3D *action1, ...) CC_REQUIRES_NULL_TERMINATION; +#endif + + /** helper constructor to create an array of sequenceable actions given an array + * @code + * When this funtion bound to the js or lua,the input params changed + * in js :var create(var object1,var object2, ...) + * in lua :local create(local object1,local object2, ...) + * @endcode + */ + static Sequence3D* create(const Vector& arrayOfActions); + /** helper constructor to create an array of sequence-able actions */ + static Sequence3D* createWithVariableList(Animate3D *action1, va_list args); + /** creates the action */ + static Sequence3D* createWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo); + + // + // Overrides + // + virtual Sequence3D* clone() const override; + virtual Sequence3D* reverse() const override; + virtual void startWithTarget(Node *target) override; + virtual void stop(void) override; + virtual void update(float t) override; + + void addAnimate3D(Animate3D* animate); + +CC_CONSTRUCTOR_ACCESS: + Sequence3D(); + virtual ~Sequence3D(void); + + /** initializes the action */ + bool initWithTwoActions(Animate3D *pActionOne, Animate3D *pActionTwo); + +protected: + Animate3D* _actions[2]; + float _split; + int _last; + float _blendTime; + float _blendRemain; + bool _cutAnim; + float cut_t; + +private: + CC_DISALLOW_COPY_AND_ASSIGN(Sequence3D); + + void Blend(float timeElapse); + +}; + +NS_CC_END + +#endif // __CCSEQUECE3D_H__ From a3dd4e101a5be527114cc26d9440ebbbe6688439 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Thu, 28 Aug 2014 18:53:15 +0800 Subject: [PATCH 02/61] animation transition --- cocos/3d/CCAnimate3D.cpp | 126 +++++++++++++++++++++++++++++++-------- cocos/3d/CCAnimate3D.h | 20 ++++++- 2 files changed, 120 insertions(+), 26 deletions(-) diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index 0aff12f2d1..8ebada6608 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -33,6 +33,10 @@ NS_CC_BEGIN +std::unordered_map Animate3D::s_fadeInAnimates; +std::unordered_map Animate3D::s_fadeOutAnimates; +std::unordered_map Animate3D::s_runningAnimates; + //create Animate3D using Animation. Animate3D* Animate3D::create(Animation3D* animation) { @@ -110,6 +114,41 @@ void Animate3D::startWithTarget(Node *target) { CCLOG("warning: no animation finde for the skeleton"); } + + auto runningAction = s_runningAnimates.find(sprite); + if (runningAction != s_runningAnimates.end()) + { + //make the running action fade out + auto action = (*runningAction).second; + s_fadeOutAnimates[sprite] = action; + action->_state = Animate3D::Animate3DState::FadeOut; + action->_accTransTime = 0.0f; + + s_fadeInAnimates[sprite] = this; + _accTransTime = 0.0f; + _state = Animate3D::Animate3DState::FadeIn; + _weight = 0.f; + } + else + { + s_runningAnimates[sprite] = this; + _state = Animate3D::Animate3DState::Running; + _weight = 1.0f; + } +} + +void Animate3D::stop() +{ + //remove this action from map + Sprite3D* sprite = static_cast(_target); + if (_state == Animate3D::Animate3DState::FadeIn) + s_fadeInAnimates.erase(sprite); + else if (_state == Animate3D::Animate3DState::FadeOut) + s_fadeOutAnimates.erase(sprite); + else + s_runningAnimates.erase(sprite); + + ActionInterval::stop(); } //! called every frame with it's delta time. DON'T override unless you know what you are doing. @@ -120,36 +159,69 @@ void Animate3D::step(float dt) void Animate3D::update(float t) { - if (_target && _weight > 0.f) + if (_target) { - float transDst[3], rotDst[4], scaleDst[3]; - float* trans = nullptr, *rot = nullptr, *scale = nullptr; - if (_playReverse) - t = 1 - t; + if (_state == Animate3D::Animate3DState::FadeIn && _accTransTime > 0.f) + { + _accTransTime += (t - _lastTime) * getDuration(); + + _weight = _accTransTime / _transTime; + if (_weight >= 1.0f) + { + _accTransTime = _transTime; + _weight = 1.0f; + + Sprite3D* sprite = static_cast(_target); + s_fadeInAnimates.erase(sprite); + s_runningAnimates[sprite] = this; + } + } + else if (_state == Animate3D::Animate3DState::FadeOut && _accTransTime > 0.f) + { + _accTransTime += (t - _lastTime) * getDuration(); + + _weight = 1 - _accTransTime / _transTime; + if (_weight <= 0.0f) + { + _accTransTime = _transTime; + _weight = 0.0f; + + Sprite3D* sprite = static_cast(_target); + s_fadeOutAnimates.erase(sprite); + } + } + _lastTime = t; - t = _start + t * _last; - for (const auto& it : _boneCurves) { - auto bone = it.first; - auto curve = it.second; - if (curve->translateCurve) - { - curve->translateCurve->evaluate(t, transDst, EvaluateType::INT_LINEAR); - trans = &transDst[0]; + if (_weight > 0.0f) + { + float transDst[3], rotDst[4], scaleDst[3]; + float* trans = nullptr, *rot = nullptr, *scale = nullptr; + if (_playReverse) + t = 1 - t; + + t = _start + t * _last; + for (const auto& it : _boneCurves) { + auto bone = it.first; + auto curve = it.second; + if (curve->translateCurve) + { + curve->translateCurve->evaluate(t, transDst, EvaluateType::INT_LINEAR); + trans = &transDst[0]; + } + if (curve->rotCurve) + { + curve->rotCurve->evaluate(t, rotDst, EvaluateType::INT_QUAT_SLERP); + rot = &rotDst[0]; + } + if (curve->scaleCurve) + { + curve->scaleCurve->evaluate(t, scaleDst, EvaluateType::INT_LINEAR); + scale = &scaleDst[0]; + } + bone->setAnimationValue(trans, rot, scale, this, _weight); } - if (curve->rotCurve) - { - curve->rotCurve->evaluate(t, rotDst, EvaluateType::INT_QUAT_SLERP); - rot = &rotDst[0]; - } - if (curve->scaleCurve) - { - curve->scaleCurve->evaluate(t, scaleDst, EvaluateType::INT_LINEAR); - scale = &scaleDst[0]; - } - bone->setAnimationValue(trans, rot, scale, this, _weight); } } - } float Animate3D::getSpeed() const @@ -175,6 +247,10 @@ Animate3D::Animate3D() , _last(1.f) , _animation(nullptr) , _playReverse(false) +, _state(Animate3D::Animate3DState::Running) +, _transTime(0.1f) +, _accTransTime(0.0f) +, _lastTime(0.0f) { } diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index d6d8152bb2..5782e175b8 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -26,6 +26,7 @@ #define __CCANIMATE3D_H__ #include +#include #include "3d/CCAnimation3D.h" @@ -40,6 +41,7 @@ NS_CC_BEGIN class Animation3D; class Bone3D; +class Sprite3D; /** * Animate3D, Animates a Sprite3D given with an Animation3D */ @@ -61,6 +63,7 @@ public: // // Overrides // + virtual void stop() override; virtual void step(float dt) override; virtual void startWithTarget(Node *target) override; virtual Animate3D* reverse() const override; @@ -86,6 +89,13 @@ CC_CONSTRUCTOR_ACCESS: virtual ~Animate3D(); protected: + enum class Animate3DState + { + FadeIn, + FadeOut, + Running, + }; + Animate3DState _state; //animation state Animation3D* _animation; //animation data float _absSpeed; //playing speed @@ -93,7 +103,15 @@ protected: float _start; //start time 0 - 1, used to generate sub Animate3D float _last; //last time 0 - 1, used to generate sub Animate3D bool _playReverse; // is playing reverse - std::map _boneCurves; //weak ref + float _transTime; //transition time from one animate3d to another + float _accTransTime; // acculate transition time + float _lastTime; // last t (0 - 1) + std::unordered_map _boneCurves; //weak ref + + //sprite animates + static std::unordered_map s_fadeInAnimates; + static std::unordered_map s_fadeOutAnimates; + static std::unordered_map s_runningAnimates; }; NS_CC_END From a039d6b0fc3824025bcfce8025ad29934885cef7 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Fri, 29 Aug 2014 18:25:42 +0800 Subject: [PATCH 03/61] animate3d transition --- cocos/3d/CCAnimate3D.cpp | 30 +++++++++++-------- cocos/3d/CCAnimate3D.h | 5 +++- .../Classes/Sprite3DTest/Sprite3DTest.cpp | 29 ++++++++---------- .../Classes/Sprite3DTest/Sprite3DTest.h | 4 +-- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index 8ebada6608..ae7afdc0b4 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -36,6 +36,7 @@ NS_CC_BEGIN std::unordered_map Animate3D::s_fadeInAnimates; std::unordered_map Animate3D::s_fadeOutAnimates; std::unordered_map Animate3D::s_runningAnimates; +float Animate3D::_transTime = 0.1f; //create Animate3D using Animation. Animate3D* Animate3D::create(Animation3D* animation) @@ -120,14 +121,20 @@ void Animate3D::startWithTarget(Node *target) { //make the running action fade out auto action = (*runningAction).second; - s_fadeOutAnimates[sprite] = action; - action->_state = Animate3D::Animate3DState::FadeOut; - action->_accTransTime = 0.0f; - - s_fadeInAnimates[sprite] = this; - _accTransTime = 0.0f; - _state = Animate3D::Animate3DState::FadeIn; - _weight = 0.f; + if (action != this) + { + s_fadeOutAnimates[sprite] = action; + action->_state = Animate3D::Animate3DState::FadeOut; + action->_accTransTime = 0.0f; + action->_weight = 1.0f; + action->_lastTime = 0.f; + + s_fadeInAnimates[sprite] = this; + _accTransTime = 0.0f; + _state = Animate3D::Animate3DState::FadeIn; + _weight = 0.f; + _lastTime = 0.f; + } } else { @@ -161,7 +168,7 @@ void Animate3D::update(float t) { if (_target) { - if (_state == Animate3D::Animate3DState::FadeIn && _accTransTime > 0.f) + if (_state == Animate3D::Animate3DState::FadeIn && _lastTime > 0.f) { _accTransTime += (t - _lastTime) * getDuration(); @@ -170,13 +177,13 @@ void Animate3D::update(float t) { _accTransTime = _transTime; _weight = 1.0f; - + _state = Animate3D::Animate3DState::Running; Sprite3D* sprite = static_cast(_target); s_fadeInAnimates.erase(sprite); s_runningAnimates[sprite] = this; } } - else if (_state == Animate3D::Animate3DState::FadeOut && _accTransTime > 0.f) + else if (_state == Animate3D::Animate3DState::FadeOut && _lastTime > 0.f) { _accTransTime += (t - _lastTime) * getDuration(); @@ -248,7 +255,6 @@ Animate3D::Animate3D() , _animation(nullptr) , _playReverse(false) , _state(Animate3D::Animate3DState::Running) -, _transTime(0.1f) , _accTransTime(0.0f) , _lastTime(0.0f) { diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index 5782e175b8..1ea5c96aa3 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -79,6 +79,9 @@ public: float getWeight() const { return _weight; } void setWeight(float weight); + /** animate transistion time */ + static float getTransitionTime() { return _transTime; } + /**get & set play reverse, these are deprecated, use set negative speed instead*/ CC_DEPRECATED_ATTRIBUTE bool getPlayBack() const { return _playReverse; } CC_DEPRECATED_ATTRIBUTE void setPlayBack(bool reverse) { _playReverse = reverse; } @@ -103,7 +106,7 @@ protected: float _start; //start time 0 - 1, used to generate sub Animate3D float _last; //last time 0 - 1, used to generate sub Animate3D bool _playReverse; // is playing reverse - float _transTime; //transition time from one animate3d to another + static float _transTime; //transition time from one animate3d to another float _accTransTime; // acculate transition time float _lastTime; // last t (0 - 1) std::unordered_map _boneCurves; //weak ref diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 1ec8d15e5d..72239dc621 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -808,7 +808,6 @@ Animate3DTest::Animate3DTest() , _swim(nullptr) , _sprite(nullptr) , _moveAction(nullptr) -, _transTime(0.1f) , _elapseTransTime(0.f) { addSprite3D(); @@ -842,28 +841,21 @@ void Animate3DTest::update(float dt) if (_state == State::HURT_TO_SWIMMING) { _elapseTransTime += dt; - float t = _elapseTransTime / _transTime; - if (t >= 1.f) + if (_elapseTransTime >= Animate3D::getTransitionTime()) { - t = 1.f; _sprite->stopAction(_hurt); _state = State::SWIMMING; } - _swim->setWeight(t); - _hurt->setWeight(1.f - t); } else if (_state == State::SWIMMING_TO_HURT) { _elapseTransTime += dt; - float t = _elapseTransTime / _transTime; - if (t >= 1.f) + if (_elapseTransTime >= Animate3D::getTransitionTime()) { - t = 1.f; + _sprite->stopAction(_swim); _state = State::HURT; } - _swim->setWeight(1.f - t); - _hurt->setWeight(t); } } @@ -880,8 +872,9 @@ void Animate3DTest::addSprite3D() if (animation) { auto animate = Animate3D::create(animation, 0.f, 1.933f); - sprite->runAction(RepeatForever::create(animate)); - _swim = animate; + _swim = RepeatForever::create(animate); + sprite->runAction(_swim); + _swim->retain(); _hurt = Animate3D::create(animation, 1.933f, 2.8f); _hurt->retain(); @@ -910,8 +903,10 @@ void Animate3DTest::reachEndCallBack() void Animate3DTest::renewCallBack() { - _sprite->stopActionByTag(101); + //rerun swim action + _sprite->runAction(_swim); _state = State::HURT_TO_SWIMMING; + _elapseTransTime = 0.0f; } void Animate3DTest::onTouchesEnded(const std::vector& touches, Event* event) @@ -928,12 +923,14 @@ void Animate3DTest::onTouchesEnded(const std::vector& touches, Event* ev //hurt the tortoise if (_state == State::SWIMMING) { + _elapseTransTime = 0.0f; + _state = State::SWIMMING_TO_HURT; + _sprite->stopAction(_hurt); _sprite->runAction(_hurt); - auto delay = DelayTime::create(_hurt->getDuration() - 0.1f); + auto delay = DelayTime::create(_hurt->getDuration() - Animate3D::getTransitionTime()); auto seq = Sequence::create(delay, CallFunc::create(CC_CALLBACK_0(Animate3DTest::renewCallBack, this)), nullptr); seq->setTag(101); _sprite->runAction(seq); - _state = State::SWIMMING_TO_HURT; } return; } diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h index b2ac350077..fcb5de6c0e 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h @@ -219,9 +219,9 @@ protected: cocos2d::Sprite3D* _sprite; - cocos2d::Animate3D* _swim; + cocos2d::Action* _swim; cocos2d::Animate3D* _hurt; - float _transTime; + float _elapseTransTime; State _state; From f3e017e139fef8f525f661a0bf77437dc7f90587 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 09:34:09 +0800 Subject: [PATCH 04/61] normalize quat --- cocos/3d/CCSkeleton3D.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/3d/CCSkeleton3D.cpp b/cocos/3d/CCSkeleton3D.cpp index 76a40eb7a0..e7b7ee4374 100644 --- a/cocos/3d/CCSkeleton3D.cpp +++ b/cocos/3d/CCSkeleton3D.cpp @@ -235,6 +235,7 @@ void Bone3D::updateLocalMat() } quat = Quaternion(it.localRot.x * weight + quat.x, it.localRot.y * weight + quat.y, it.localRot.z * weight + quat.z, it.localRot.w * weight + quat.w); } + quat.normalize(); } } From b5a3bb1c03c0474d6b60bee5ffe89df7f6529f08 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 15:07:06 +0800 Subject: [PATCH 05/61] sequence3d work --- cocos/3d/CCSequence3D.cpp | 299 ++++++++++---------------------------- cocos/3d/CCSequence3D.h | 27 ++-- 2 files changed, 88 insertions(+), 238 deletions(-) diff --git a/cocos/3d/CCSequence3D.cpp b/cocos/3d/CCSequence3D.cpp index e75d100ee5..620b76ee28 100644 --- a/cocos/3d/CCSequence3D.cpp +++ b/cocos/3d/CCSequence3D.cpp @@ -26,57 +26,6 @@ NS_CC_BEGIN -class ExtraAnimate3D : public FiniteTimeAction -{ -public: - static ExtraAnimate3D* create(); - virtual ExtraAnimate3D* clone() const; - virtual ExtraAnimate3D* reverse(void) const; - virtual void update(float time); - virtual void step(float dt); -}; - -ExtraAnimate3D* ExtraAnimate3D::create() -{ - ExtraAnimate3D* ret = new ExtraAnimate3D(); - if (ret) - { - ret->autorelease(); - } - return ret; -} -ExtraAnimate3D* ExtraAnimate3D::clone() const -{ - // no copy constructor - auto a = new ExtraAnimate3D(); - a->autorelease(); - return a; -} - -ExtraAnimate3D* ExtraAnimate3D::reverse() const -{ - return ExtraAnimate3D::create(); -} - -void ExtraAnimate3D::update(float time) -{ - CC_UNUSED_PARAM(time); -} - -void ExtraAnimate3D::step(float dt) -{ - CC_UNUSED_PARAM(dt); -} - -Sequence3D* Sequence3D::createWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo) -{ - Sequence3D *sequence3d = new Sequence3D(); - sequence3d->initWithTwoActions(actionOne, actionTwo); - sequence3d->autorelease(); - - return sequence3d; -} - #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) Sequence3D* Sequence3D::variadicCreate(Animate3D *action1, ...) { @@ -106,109 +55,106 @@ Sequence3D* Sequence3D::create(Animate3D *action1, ...) Sequence3D* Sequence3D::createWithVariableList(Animate3D *action1, va_list args) { Animate3D *now; - Animate3D *prev = action1; - bool bOneAction = true; + Vector actions; while (action1) { now = va_arg(args, Animate3D*); if (now) { - prev = (Animate3D*)createWithTwoActions(prev, now); - bOneAction = false; + actions.pushBack(now); } else - { - if (bOneAction) - { - prev = (Animate3D*)createWithTwoActions(prev, (Animate3D*)ExtraAnimate3D::create()); - } break; - } } - return ((Sequence3D*)prev); + return create(actions); } Sequence3D* Sequence3D::create(const Vector& arrayOfActions) { Sequence3D* ret = nullptr; - do + + ret = new (std::nothrow) Sequence3D(); + if (ret->initWithActions(arrayOfActions)) { - auto count = arrayOfActions.size(); - CC_BREAK_IF(count == 0); - - auto prev = arrayOfActions.at(0); - - if (count > 1) - { - for (int i = 1; i < count; ++i) - { - prev = (Animate3D*)createWithTwoActions(prev, arrayOfActions.at(i)); - } - } - else - { - prev = (Animate3D*)createWithTwoActions(prev, (Animate3D*)ExtraAnimate3D::create()); - } - ret = (Sequence3D*)prev; - }while (0); + ret->autorelease(); + return ret; + } + + CC_SAFE_RELEASE(ret); return ret; } -bool Sequence3D::initWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo) +bool Sequence3D::initWithActions(const Vector& arrayOfActions) { - CCASSERT(actionOne != nullptr, ""); - CCASSERT(actionTwo != nullptr, ""); - - float d = actionOne->getDuration() + actionTwo->getDuration(); - ActionInterval::initWithDuration(d); - - _actions[0] = actionOne; - actionOne->retain(); - - _actions[1] = actionTwo; - actionTwo->retain(); - + if (arrayOfActions.size() == 0) + return false; + + _actions.clear(); + _startTime.clear(); + _endTime.clear(); + + Animate3D* preAction = nullptr; + float duration = 0.f, dur = 0.f; + _startTime.push_back(duration); + for (auto& it : arrayOfActions) { + float d1 = 0.f; + if (preAction) + d1 = preAction->getDuration(); + + float d2 = it->getDuration(); + if (d1 < Animate3D::getTransitionTime() || d2 < Animate3D::getTransitionTime()) + dur = d1 > d2 ? d1 : d2; + else + dur = d1 + d2 - Animate3D::getTransitionTime(); + + preAction = it; + _actions.pushBack(it); + _startTime.push_back(dur); + _endTime.push_back(dur); + duration += dur; + } + _startTime.erase(_startTime.end() - 1); + for (ssize_t i = 0; i < _startTime.size(); i++) { + _startTime[i] /= duration; + _endTime[i] /= duration; + } + setDuration(duration); + _curActionIdx = -1; return true; } Sequence3D* Sequence3D::clone() const { // no copy constructor - auto seq3d = new Sequence3D(); - seq3d->initWithTwoActions(_actions[0]->clone(), _actions[1]->clone() ); + auto seq3d = new (std::nothrow) Sequence3D(); + seq3d->initWithActions(_actions); seq3d->autorelease(); return seq3d; } Sequence3D::Sequence3D() -: _blendTime(0.1f) -,_blendRemain(0.1f) -,_cutAnim(false) -,cut_t(0.0f) +: _curActionIdx(-1) { } Sequence3D::~Sequence3D(void) { - CC_SAFE_RELEASE(_actions[0]); - CC_SAFE_RELEASE(_actions[1]); + _actions.clear(); } void Sequence3D::startWithTarget(Node *target) { ActionInterval::startWithTarget(target); - _split = _actions[0]->getDuration() / _duration; - _last = -1; + _curActionIdx = -1; } void Sequence3D::stop(void) { - if( _last != - 1) - { - _actions[_last]->stop(); + for (auto& action : _actions) { + action->stop(); } ActionInterval::stop(); @@ -216,131 +162,40 @@ void Sequence3D::stop(void) Sequence3D* Sequence3D::reverse() const { - return Sequence3D::createWithTwoActions(_actions[1]->reverse(), _actions[0]->reverse()); + Vector actions; + for (auto it = _actions.rbegin(); it != _actions.rend(); ++it) { + actions.pushBack(*it); + } + + return create(actions); } void Sequence3D::update(float t) { - int found = 0; - float new_t = 0.0f; - float blend_t = 0.0f; - - if( t < _split ) { - // action[0] - found = 0; - if( _split != 0 ) - new_t = t / _split; - else - new_t = 1; - - if( found != _last && found <= 0 ) - _actions[0]->startWithTarget(_target); - - _actions[0]->update(new_t); - - } - if(t >= (_split - _blendTime) && _cutAnim == false) + if (_target) { - // action[1] - - blend_t += 0.01f; - Blend(blend_t); - found = 1; - if ( _split == 1 ) - new_t = 1; - else - new_t = (t-(_split - _blendTime)) / (1 - (_split - _blendTime)); - - if( found != _last && found >= 1 ) - _actions[1]->startWithTarget(_target); - - _actions[1]->update(new_t); - } - if(_cutAnim == true) - { - blend_t += 0.01f; - Blend(blend_t); - found = 1; - if(found != _last && found >= 1) + int nextIdx = _curActionIdx + 1; + if (nextIdx < _actions.size()) { - cut_t = t; + if (t >= _startTime[nextIdx]) + { + _actions.at(nextIdx)->startWithTarget(_target); + _curActionIdx = nextIdx; + } } - if ( _split == 1 ) - new_t = 1; - else - new_t = (t - cut_t) / (1 - cut_t); - - if( found != _last && found >= 1 ) - _actions[1]->startWithTarget(_target); - - _actions[1]->update(new_t); - } - // if ( found==1 ) { - - // if( _last == -1 ) { - // // action[0] was skipped, execute it. - // _actions[0]->startWithTarget(_target); - // _actions[0]->update(1.0f); - // _actions[0]->stop(); - // } - // else if( _last == 0 ) - // { - // // switching to action 1. stop action 0. - // _actions[0]->update(1.0f); - // _actions[0]->stop(); - // } - // } - //else if(found==0 && _last==1 ) - //{ - // // Reverse mode ? - // // XXX: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode" - // // since it will require a hack to know if an action is on reverse mode or not. - // // "step" should be overriden, and the "reverseMode" value propagated to inner Sequences. - // _actions[1]->update(0); - // _actions[1]->stop(); - //} - // // Last action found and it is done. - // if( found == _last && _actions[found]->isDone() ) - // { - // return; - // } - - // // Last action found and it is done - // if( found != _last ) - // { - // //_actions[found]->startWithTarget(_target); - // } - - //_actions[found]->update(new_t); - _last = found; -} - -void Sequence3D::Blend(float timeElapse) -{ - _blendRemain -= timeElapse; - bool bBlending = _blendRemain >= 0; - if (bBlending) - { - float fSrcWeight = _blendRemain / _blendTime; - _actions[0]->setWeight(fSrcWeight); - _actions[1]->setWeight(1 - fSrcWeight); - } -} - -void Sequence3D::addAnimate3D(Animate3D* animate) -{ - if(this->_duration > 0) - { - if(_actions[1]->getDuration() <= 0) + //update action + int preActionIdx = _curActionIdx - 1; + if (preActionIdx >= 0 && _endTime[preActionIdx] > t) { - _actions[1] = animate; - _cutAnim = true; - _duration += _actions[1]->getDuration(); - _split = _actions[0]->getDuration() / _duration; + float newt = (t - _startTime[preActionIdx]) / (_endTime[preActionIdx] - _startTime[preActionIdx]); + _actions.at(preActionIdx)->update(newt); + } + if (_curActionIdx >= 0 && _curActionIdx < _actions.size()) + { + float newt = (t - _startTime[_curActionIdx]) / (_endTime[_curActionIdx] - _startTime[_curActionIdx]); + _actions.at(_curActionIdx)->update(newt); } } - else - return; } NS_CC_END diff --git a/cocos/3d/CCSequence3D.h b/cocos/3d/CCSequence3D.h index e580f6179e..0e72d00391 100644 --- a/cocos/3d/CCSequence3D.h +++ b/cocos/3d/CCSequence3D.h @@ -30,7 +30,11 @@ NS_CC_BEGIN - +/** + * It is similar to Sequence in 2D action + * But it is only used to sequence Animate3D + * The difference between Sequence and Sequence3D is that Sequence3D play animation one by one and with some overlap time. We use the overlap time to make the transition between one action to another. The comming action fades in and the previous one fades out. + */ class CC_3D_DLL Sequence3D : public ActionInterval { public: @@ -65,8 +69,6 @@ public: static Sequence3D* create(const Vector& arrayOfActions); /** helper constructor to create an array of sequence-able actions */ static Sequence3D* createWithVariableList(Animate3D *action1, va_list args); - /** creates the action */ - static Sequence3D* createWithTwoActions(Animate3D *actionOne, Animate3D *actionTwo); // // Overrides @@ -76,30 +78,23 @@ public: virtual void startWithTarget(Node *target) override; virtual void stop(void) override; virtual void update(float t) override; - - void addAnimate3D(Animate3D* animate); CC_CONSTRUCTOR_ACCESS: Sequence3D(); virtual ~Sequence3D(void); - /** initializes the action */ - bool initWithTwoActions(Animate3D *pActionOne, Animate3D *pActionTwo); + /** initializes the action */ + bool initWithActions(const Vector& arrayOfActions); protected: - Animate3D* _actions[2]; - float _split; - int _last; - float _blendTime; - float _blendRemain; - bool _cutAnim; - float cut_t; + Vector _actions; + int _curActionIdx; + std::vector _startTime; + std::vector _endTime; private: CC_DISALLOW_COPY_AND_ASSIGN(Sequence3D); - void Blend(float timeElapse); - }; NS_CC_END From 97c8764ae728e1f1ee67347ddaa7858cb845804a Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 15:21:47 +0800 Subject: [PATCH 06/61] remove unused header --- cocos/3d/CCAnimate3D.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index b7d7c5dfd8..49508f005a 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -25,7 +25,6 @@ #include "3d/CCAnimate3D.h" #include "3d/CCSprite3D.h" #include "3d/CCSkeleton3D.h" -#include "3d/CCMeshSkin.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN From 33005bedcbdb407979599e6bb1bbc8c7fdea5df1 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 15:32:06 +0800 Subject: [PATCH 07/61] add to cocos3d --- cocos/3d/cocos3d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/3d/cocos3d.h b/cocos/3d/cocos3d.h index fdbfef8fca..b97df23784 100755 --- a/cocos/3d/cocos3d.h +++ b/cocos/3d/cocos3d.h @@ -37,5 +37,7 @@ #include "3d/CCSprite3DMaterial.h" #include "3d/CCAttachNode.h" #include "3d/CCMeshVertexIndexData.h" +#include "3d/CCSequence3D.h" +#include "3d/CCSkeleton3D.h" #endif From 57a70b629fa628a905a4a0c2ac134e51da6f5c4b Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 16:00:50 +0800 Subject: [PATCH 08/61] add sequence3d --- cocos/3d/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk index 0a9d859a27..ae72c67f4d 100644 --- a/cocos/3d/Android.mk +++ b/cocos/3d/Android.mk @@ -20,7 +20,8 @@ CCMeshVertexIndexData.cpp \ CCSprite3DMaterial.cpp \ CCObjLoader.cpp \ CCSkeleton3D.cpp \ -CCSprite3D.cpp +CCSprite3D.cpp \ +CCSequence3D.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. From c4242b4d0b637df2d297ec73315bf35ee8c5a2ad Mon Sep 17 00:00:00 2001 From: liuliang Date: Mon, 1 Sep 2014 17:45:45 +0800 Subject: [PATCH 09/61] Configure project file --- cocos/2d/libcocos2d.vcxproj | 2 ++ cocos/2d/libcocos2d.vcxproj.filters | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 9fdc34eb21..2e4bc274b9 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -220,6 +220,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l + @@ -557,6 +558,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l + diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 1a5d9f9b25..2afb927148 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -1165,6 +1165,9 @@ cocosbuilder\Source Files + + 3d + @@ -2290,6 +2293,9 @@ cocosbuilder\Header Files + + 3d + From 9ce30bdabd1d896cdf76f5700ad7618a7cd27c2b Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 17:52:13 +0800 Subject: [PATCH 10/61] add to linux --- cocos/3d/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/3d/CMakeLists.txt b/cocos/3d/CMakeLists.txt index 70e3560efd..5d56e92278 100644 --- a/cocos/3d/CMakeLists.txt +++ b/cocos/3d/CMakeLists.txt @@ -14,6 +14,7 @@ CCSprite3DMaterial.cpp CCObjLoader.cpp CCSkeleton3D.cpp CCSprite3D.cpp +CCSequence3D.cpp ) From d542624bfd426fce0a80ea2181043039bb07cf8b Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 2 Sep 2014 10:40:29 +0800 Subject: [PATCH 11/61] remove from map when release --- cocos/3d/CCAnimate3D.cpp | 26 ++++++++++++++++++-------- cocos/3d/CCAnimate3D.h | 2 ++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index 49508f005a..7327822d20 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -142,14 +142,7 @@ void Animate3D::startWithTarget(Node *target) void Animate3D::stop() { - //remove this action from map - Sprite3D* sprite = static_cast(_target); - if (_state == Animate3D::Animate3DState::FadeIn) - s_fadeInAnimates.erase(sprite); - else if (_state == Animate3D::Animate3DState::FadeOut) - s_fadeOutAnimates.erase(sprite); - else - s_runningAnimates.erase(sprite); + removeFromMap(); ActionInterval::stop(); } @@ -258,7 +251,24 @@ Animate3D::Animate3D() } Animate3D::~Animate3D() { + removeFromMap(); + CC_SAFE_RELEASE(_animation); } +void Animate3D::removeFromMap() +{ + //remove this action from map + if (_target) + { + Sprite3D* sprite = static_cast(_target); + if (_state == Animate3D::Animate3DState::FadeIn) + s_fadeInAnimates.erase(sprite); + else if (_state == Animate3D::Animate3DState::FadeOut) + s_fadeOutAnimates.erase(sprite); + else + s_runningAnimates.erase(sprite); + } +} + NS_CC_END diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index 0e5357751e..5591e96f4b 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -87,6 +87,8 @@ CC_CONSTRUCTOR_ACCESS: Animate3D(); virtual ~Animate3D(); + void removeFromMap(); + protected: enum class Animate3DState { From 50a7a1703ac0891a28d5ab2380d5eff4155263d8 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 2 Sep 2014 12:05:37 +0800 Subject: [PATCH 12/61] add sequence3d to template --- templates/cocos2dx_files.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 25d6d414cb..872a82ea93 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -226,6 +226,8 @@ "cocos/3d/CCSprite3D.h", "cocos/3d/CCSprite3DMaterial.cpp", "cocos/3d/CCSprite3DMaterial.h", + "cocos/3d/CCSequence3D.cpp", + "cocos/3d/CCSequence3D.h", "cocos/3d/CMakeLists.txt", "cocos/3d/cocos3d.h", "cocos/Android.mk", From 49a2122e17c12c6e6229bf887be3d3535b385ede Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 2 Sep 2014 14:28:46 +0800 Subject: [PATCH 13/61] add sequence3d to template --- templates/cocos2dx_files.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 872a82ea93..a9fc09ca33 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -220,14 +220,14 @@ "cocos/3d/CCObjLoader.h", "cocos/3d/CCRay.cpp", "cocos/3d/CCRay.h", + "cocos/3d/CCSequence3D.cpp", + "cocos/3d/CCSequence3D.h", "cocos/3d/CCSkeleton3D.cpp", "cocos/3d/CCSkeleton3D.h", "cocos/3d/CCSprite3D.cpp", "cocos/3d/CCSprite3D.h", "cocos/3d/CCSprite3DMaterial.cpp", "cocos/3d/CCSprite3DMaterial.h", - "cocos/3d/CCSequence3D.cpp", - "cocos/3d/CCSequence3D.h", "cocos/3d/CMakeLists.txt", "cocos/3d/cocos3d.h", "cocos/Android.mk", From 4276c599751a25d783aa8ddef5165c01fd9cba99 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 5 Sep 2014 10:42:59 +0800 Subject: [PATCH 14/61] remove chipmunk source code --- external/chipmunk/LICENSE.txt | 19 - external/chipmunk/README.txt | 46 - external/chipmunk/chipmunk-docs.html | 944 ------------------ external/chipmunk/proj.win32/chipmunk.vcxproj | 169 ---- .../proj.win32/chipmunk.vcxproj.filters | 186 ---- external/chipmunk/proj.winrt/chipmunk.vcxproj | 480 --------- .../proj.winrt/chipmunk.vcxproj.filters | 188 ---- external/chipmunk/proj.wp8/chipmunk.vcxproj | 335 ------- .../proj.wp8/chipmunk.vcxproj.filters | 188 ---- external/chipmunk/src/chipmunk.c | 324 ------ .../chipmunk/src/constraints/cpConstraint.c | 58 -- .../src/constraints/cpDampedRotarySpring.c | 114 --- .../chipmunk/src/constraints/cpDampedSpring.c | 122 --- .../chipmunk/src/constraints/cpGearJoint.c | 119 --- .../chipmunk/src/constraints/cpGrooveJoint.c | 165 --- .../chipmunk/src/constraints/cpPinJoint.c | 123 --- .../chipmunk/src/constraints/cpPivotJoint.c | 118 --- .../chipmunk/src/constraints/cpRatchetJoint.c | 131 --- .../src/constraints/cpRotaryLimitJoint.c | 126 --- .../chipmunk/src/constraints/cpSimpleMotor.c | 104 -- .../chipmunk/src/constraints/cpSlideJoint.c | 131 --- external/chipmunk/src/cpArbiter.c | 353 ------- external/chipmunk/src/cpArray.c | 124 --- external/chipmunk/src/cpBB.c | 36 - external/chipmunk/src/cpBBTree.c | 894 ----------------- external/chipmunk/src/cpBody.c | 330 ------ external/chipmunk/src/cpCollision.c | 741 -------------- external/chipmunk/src/cpHashSet.c | 253 ----- external/chipmunk/src/cpPolyShape.c | 329 ------ external/chipmunk/src/cpShape.c | 387 ------- external/chipmunk/src/cpSpace.c | 599 ----------- external/chipmunk/src/cpSpaceComponent.c | 357 ------- external/chipmunk/src/cpSpaceHash.c | 634 ------------ external/chipmunk/src/cpSpaceQuery.c | 324 ------ external/chipmunk/src/cpSpaceStep.c | 438 -------- external/chipmunk/src/cpSpatialIndex.c | 69 -- external/chipmunk/src/cpSweep1D.c | 254 ----- external/chipmunk/src/cpVect.c | 56 -- external/chipmunk/src/prime.h | 68 -- 39 files changed, 10436 deletions(-) delete mode 100644 external/chipmunk/LICENSE.txt delete mode 100644 external/chipmunk/README.txt delete mode 100644 external/chipmunk/chipmunk-docs.html delete mode 100644 external/chipmunk/proj.win32/chipmunk.vcxproj delete mode 100644 external/chipmunk/proj.win32/chipmunk.vcxproj.filters delete mode 100644 external/chipmunk/proj.winrt/chipmunk.vcxproj delete mode 100644 external/chipmunk/proj.winrt/chipmunk.vcxproj.filters delete mode 100644 external/chipmunk/proj.wp8/chipmunk.vcxproj delete mode 100644 external/chipmunk/proj.wp8/chipmunk.vcxproj.filters delete mode 100644 external/chipmunk/src/chipmunk.c delete mode 100644 external/chipmunk/src/constraints/cpConstraint.c delete mode 100644 external/chipmunk/src/constraints/cpDampedRotarySpring.c delete mode 100644 external/chipmunk/src/constraints/cpDampedSpring.c delete mode 100644 external/chipmunk/src/constraints/cpGearJoint.c delete mode 100644 external/chipmunk/src/constraints/cpGrooveJoint.c delete mode 100644 external/chipmunk/src/constraints/cpPinJoint.c delete mode 100644 external/chipmunk/src/constraints/cpPivotJoint.c delete mode 100644 external/chipmunk/src/constraints/cpRatchetJoint.c delete mode 100644 external/chipmunk/src/constraints/cpRotaryLimitJoint.c delete mode 100644 external/chipmunk/src/constraints/cpSimpleMotor.c delete mode 100644 external/chipmunk/src/constraints/cpSlideJoint.c delete mode 100644 external/chipmunk/src/cpArbiter.c delete mode 100644 external/chipmunk/src/cpArray.c delete mode 100644 external/chipmunk/src/cpBB.c delete mode 100644 external/chipmunk/src/cpBBTree.c delete mode 100644 external/chipmunk/src/cpBody.c delete mode 100644 external/chipmunk/src/cpCollision.c delete mode 100644 external/chipmunk/src/cpHashSet.c delete mode 100644 external/chipmunk/src/cpPolyShape.c delete mode 100644 external/chipmunk/src/cpShape.c delete mode 100644 external/chipmunk/src/cpSpace.c delete mode 100644 external/chipmunk/src/cpSpaceComponent.c delete mode 100644 external/chipmunk/src/cpSpaceHash.c delete mode 100644 external/chipmunk/src/cpSpaceQuery.c delete mode 100644 external/chipmunk/src/cpSpaceStep.c delete mode 100644 external/chipmunk/src/cpSpatialIndex.c delete mode 100644 external/chipmunk/src/cpSweep1D.c delete mode 100644 external/chipmunk/src/cpVect.c delete mode 100644 external/chipmunk/src/prime.h diff --git a/external/chipmunk/LICENSE.txt b/external/chipmunk/LICENSE.txt deleted file mode 100644 index e6234f7b06..0000000000 --- a/external/chipmunk/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2007 Scott Lembcke and Howling Moon Software - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. diff --git a/external/chipmunk/README.txt b/external/chipmunk/README.txt deleted file mode 100644 index 5ef29de217..0000000000 --- a/external/chipmunk/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -ABOUT: -Chipmunk is a simple, lightweight and fast 2D rigid body physics library written in C. It's licensed under the unrestrictive, OSI approved MIT license. My aim is to give 2D developers access the same quality of physics you find in newer 3D games. I hope you enjoy using Chipmunk, and please consider donating to help make it worth our time to continue to support Chipmunk with great new features. - -CONTRACTING: -Howling Moon Software (my company) is available for contracting if you want to make the physics in your game really stand out. Given our unique experience with the library, we can help you use Chipmunk to it's fullest potential. Feel free to contact us through our webpage: http://howlingmoonsoftware.com/contracting.php - -BUILDING: -Mac OS X: There is an included XCode project file for building the static library and demo application. Alteratively you could use the CMake files. - -iPhone: The XCode project can build a static library with all the proper compiler settings. Additionally, if you run the iphonestatic.sh script in the macosx/ directory, it will build you a fat library compiled as release for the device and debug for the simulator. After building that, just copy the static lib and include/chipmunk/ directory to your project. - -UNIX: A forum user was kind enough to make a set of CMake files for Chipmunk. This will require you to have CMake installed. To build run 'cmake .' then 'make'. This should build a dynamic library, a static library, and the demo application. - -Windows: There is an included MSVC project for building the library and demo application. I do not personally maintain the MSVC project and it apparently hasn't worked for a while. If you are a MSVC whiz, consider lending a hand. - -Ruby: I've been using maintaining a Ruby extension for Chipmunk, but at this time is not up to date with all the latest changes. A forum member has been working on an FFI based extention, and that may be a better way to take advantage of Chipmunk from Ruby. Another forum user has offered to maintain the non-FFI version of the extension. Stay tuned. - -GETTING STARTED: -First of all, you can find the C API documentation here: http://code.google.com/p/chipmunk-physics/wiki/Documentation - -A good starting point is to take a look at the included Demo application. The demos all just set up a Chipmunk simulation space and the demo app draws the graphics directly out of that. This makes it easy to see how the Chipmunk API works without worrying about the graphics code. You are free to use the demo drawing routines in your own projects, though it is certainly not the recommended way of drawing Chipmunk objects as it pokes around at the undocumented parts of Chipmunk. - -FORUM: -http://www.slembcke.net/forums - -CONTACT: -slembcke@gmail.com (also on Google Talk) - -CHANGES SINCE 5.0.0: -* Fixed a NaN issue where raycasts for horizontal or vertical lines would end up in an infinite loop. -* Fixed a number of memory leaks. -* Fixed a number of warnings for various compiler/OS combinations. -* Fixed a number of API issues: - * Rejecting a collision from a begin() callback permanently rejects the collision until separation. - * Erroneous collision type parameterns removed from cpSpaceDefaulteCollisionHandler(). -* Moved FFI declarations of inlined functions into their own header. -* Rearranged the project structure to separate out the header files into a separate include/ directory. -* Added a static library target for the iPhone. -* Type changes when building on the iPhone to make it friendlier to other APIs. -* Added an AABB query to complement point and segment queries. -* Added CP_NO_GROUP and CP_ALL_LAYERS constants. - -CHANGES SINCE 4.x: -* Brand new Joint/Constraint API: New constraints can be added easily and are much more flexible than the old joint system -* Efficient Segment Queries - Like raycasting, but with line segments. -* Brand new collision callback API: Collision begin/separate events, API for removal of objects within callbacks, more programable control over collision handling. \ No newline at end of file diff --git a/external/chipmunk/chipmunk-docs.html b/external/chipmunk/chipmunk-docs.html deleted file mode 100644 index 4ed673ef9f..0000000000 --- a/external/chipmunk/chipmunk-docs.html +++ /dev/null @@ -1,944 +0,0 @@ - - - - - - Chipmunk Game Dynamics Documentation - - - - -

Chipmunk Game Dynamics

- - -

Introduction

- - -

First of all, Chipmunk is a 2D rigid body physics library distributed under the MIT license. Though not yet complete, it is intended to be fast, numerically stable, and easy to use.

- - -

It’s been a long time in coming, but I’ve finally made a stable and usable physics implementation. While not feature complete yet, it’s well on it’s way. I would like to give a Erin Catto a big thank you, as the most of the ideas for the constraint solver come from his Box2D example code. (gPhysics Website). His contact persistence idea allows for stable stacks of objects with very few iterations of the contact solution. Couldn’t have gotten that working without his help.

- - -

Overview

- - -
    -
  • rigid bodies: A rigid body holds the physical properties of an object. (mass, position, rotation, velocity, etc.) It does not have a shape by itself. If you’ve done physics with particles before, rigid bodies differ mostly in that they are able to rotate.
  • -
  • collision shapes: By attaching shapes to bodies, you can define the a body’s shape. You can attach many shapes to a single body to define a complex shape, or none if it doesn’t require a shape.
  • -
  • joints: You can attach joints between two bodies to constrain their behavior.
  • -
  • spaces: Spaces are the basic simulation unit in Chipmunk. You add bodies, shapes and joints to a space, and then update the space as a whole.
  • -
- - -

Rigid bodies, collision shapes and sprites:

- - -

There is often confusion between rigid bodies and their collision shapes in Chipmunk and how they relate to sprites. A sprite would be a visual representation of an object, the sprite is drawn at the position of the rigid body. The collision shape would be the material representation of the object, and how it should collide with other objects. A sprite and collision shape have little to do with one another other than you probably want the collision shape to match the sprite’s shape.

- - -

C API Documentation

- - -

Initializing Chipmunk

- - -

Initializing Chipmunk is an extremely complicated process. The following code snippet steps you through the process:

- - -

-cpInitChipmunk(); /* Actually, that's pretty much it */
-
- -

Chipmunk memory management

- - -

For many of the structures you will use, Chipmunk uses a more or less standard set of memory management functions. For instance:

- - -
    -
  • cpSpaceAlloc() allocates but does not initialize a cpSpace struct.
  • -
  • cpSpaceInit(space, other_args) initializes a cpSpace struct.
  • -
  • cpSpaceNew(args) allocates and initializes a cpSpace struct using args.
  • -
  • cpSpaceDestroy(space) frees all dependancies, but does not free the cpSpace struct.
  • -
  • cpSpaceFree(space) frees all dependancies and the cpSpace struct.
  • -
- - -

While you will probably use the new/free versions exclusively, the others can be helpful when writing language extensions.

- - -

In general, you are responsible for freeing any structs that you allocate. The only exception is that cpShapeDestroy() also destroys the specific shape struct that was passed to the constructor.

- - -

Chipmunk floats: cpFloat

- - -

-typedef float cpFloat;
-
- -

All Chipmunk code should be double safe, so feel free to redefine this.

- - -

Chipmunk vectors: cpVect

- - -

User accessible fields:

- - -

-typedef struct cpVect{
-    cpFloat x,y;
-} cpVect
-
- -

Simply a 2D vector packed into a struct. May change in the future to take advantage of SIMD.

- - -

-#define cpvzero ((cpVect){0.0f, 0.0f})
-
- -

Constant for the zero vector.

- - -

-cpVect cpv(const cpFloat x, const cpFloat y)
-
- -

Convenience constructor for creating new cpVect structs.

- - -

-cpVect cpvadd(const cpVect v1, const cpVect v2)
-cpVect cpvsub(const cpVect v1, const cpVect v2)
-
- -

Add or subtract two vectors.

- - -

-cpVect cpvneg(const cpVect v)
-
- -

Negate a vector.

- - -

-cpVect cpvmult(const cpVect v, const cpFloat s)
-
- -

Scalar multiplication.

- - -

-cpFloat cpvdot(const cpVect v1, const cpVect v2)
-
- -

Vector dot product.

- - -

-cpFloat cpvcross(const cpVect v1, const cpVect v2)
-
- -

2D vector cross product analog. The cross product of 2D vectors exists only in the z component, so only that value is returned.

- - -

-cpVect cpvperp(const cpVect v)
-
- -

Returns the perpendicular vector. (90 degree rotation)

- - -

-cpVect cpvproject(const cpVect v1, const cpVect v2)
-
- -

Returns the vector projection of v1 onto v2.

- - -

-cpVect cpvrotate(const cpVect v1, const cpVect v2)
-
- -

Uses complex multiplication to rotate (and scale) v1 by v2.

- - -

-cpVect cpvunrotate(const cpVect v1, const cpVect v2)
-
- -

Inverse of cpvrotate().

- - -

-cpFloat cpvlength(const cpVect v)
-
- -

Returns the length of v.

- - -

-cpFloat cpvlengthsq(const cpVect v)
-
- -

Returns the squared length of v. Faster than cpvlength() when you only need to compare lengths.

- - -

-cpVect cpvnormalize(const cpVect v)
-
- -

Returns a normalized copy of v.

- - -

-cpVect cpvforangle(const cpFloat a)
-
- -

Returns the unit length vector for the given angle (in radians).

- - -

-cpFloat cpvtoangle(const cpVect v)
-
- -

Returns the angular direction v is pointing in (in radians).

- - -

-*cpvstr(const cpVect v)
-
- -

Returns a string representation of v. NOTE: The string points to a static local and is reset every time the function is called.

- - -

Chipmunk bounding boxes: cpBB

- - -

User accessible fields:

- - -

-typedef struct cpBB{
-    cpFloat l, b, r ,t;
-} cpBB
-
- -

Simple bounding box struct. Stored as left, bottom, right, top values.

- - -

-cpBB cpBBNew(const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t)
-
- -

Convenience constructor for cpBB structs.

- - -

-int cpBBintersects(const cpBB a, const cpBB b)
-
- -

Returns true if the bounding boxes intersect.

- - -

-int cpBBcontainsBB(const cpBB bb, const cpBB other)
-
- -

Returns true if bb completely contains other.

- - -

-int cpBBcontainsVect(const cpBB bb, const cpVect v)
-
- -

Returns true if bb contains v.

- - -

-cpVect cpBBClampVect(const cpBB bb, const cpVect v)
-
- -

Returns a copy of v clamped to the bounding box.

- - -

-cpVect cpBBWrapVect(const cpBB bb, const cpVect v)
-
- -

Returns a copy of v wrapped to the bounding box.

- - -

Chipmunk spatial hashes: cpSpaceHash

- - -

The spatial hash isn’t yet ready for user use. However, it has been made in a generic manner that would allow it to be used for more than just Chipmunk’s collision detection needs.

- - -

Chipmunk rigid bodies: cpBody

- - -

User accessible fields:

- - -

-typedef struct cpBody{
-    cpFloat m, m_inv;
-    cpFloat i, i_inv;
-
-    cpVect p, v, f;
-    cpFloat a, w, t;
-    cpVect rot;
-} cpBody
-
- -
    -
  • m, and m_inv are the mass and its inverse.
  • -
  • i, and i_inv are the moment of inertia and its inverse.
  • -
  • p, v, and f are the position, velocity and force respectively.
  • -
  • a, w, and t are the angle (in radians), angular velocity (rad/sec), and torque respectively.
  • -
  • rot is the rotation of the body as a unit length vector. (can be used with cpvrotate())
  • -
- - -

-cpBody *cpBodyAlloc(void)
-cpBody *cpBodyInit(cpBody *body, cpFloat m, cpFloat i)
-cpBody *cpBodyNew(cpFloat m, cpFloat i)
-
-void cpBodyDestroy(cpBody *body)
-void cpBodyFree(cpBody *body)
-
- -

Uses the standard suite of Chipmunk memory functions. m and i are the mass and moment of inertia for the body.

- - -

-void cpBodySetMass(cpBody *body, cpFloat m);
-void cpBodySetMoment(cpBody *body, cpFloat i);
-void cpBodySetAngle(cpBody *body, cpFloat a);
-
- -

Because several of the values are linked, (m/m_inv, i/i_inv, a/rot) don’t set them explicitly, use these setter functions instead.

- - -

-cpVect cpBodyLocal2World(cpBody *body, cpVect v)
-
- -

Convert from body local coordinates to world space coordinates.

- - -

-cpVect cpBodyWorld2Local(cpBody *body, cpVect v)
-
- -

Convert from world space coordinates to body local coordinates.

- - -

-void cpBodyApplyImpulse(cpBody *body, cpVect j, cpVect r)
-
- -

Apply the impulse j to body with offset r. Both j and r should be in world coordinates.

- - -

-void cpBodyResetForces(cpBody *body)
-
- -

Zero both the forces and torques accumulated on body.

- - -

-void cpBodyApplyForce(cpBody *body, cpVect f, cpVect r)
-
- -

Apply (accumulate) the force f on body with offset r. Both f and r should be in world coordinates.

- - -

-void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt)
-
- -

Updates the velocity of the body using Euler integration. You don’t need to call this unless you are managing the object manually instead of adding it to a cpSpace.

- - -

-void cpBodyUpdatePosition(cpBody *body, cpFloat dt)
-
- -

Updates the position of the body using Euler integration. Like cpBodyUpdateVelocity() you shouldn’t normally need to call this yourself.

- - -

-void cpDampedSpring(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat rlen, cpFloat k, cpFloat dmp, cpFloat dt)
-
- -

Apply a spring force between bodies a and b at anchors anchr1 and anchr2 respectively. k is the spring constant (force/distance), rlen is the rest length of the spring, dmp is the damping constant (force/velocity), and dt is the time step to apply the force over. Note: not solving the damping forces in the impulse solver causes problems with large damping values. This function will eventually be replaced by a new constraint (joint) type.

- - -

Notes:

- - -
    -
  • Use forces to modify the rigid bodies if possible. This is likely to be the most stable.
  • -
  • Modifying a body’s velocity shouldn’t necessarily be avoided, but applying large changes can cause strange results in the simulation. Experiment freely, but be warned.
  • -
  • Don’t modify a body’s position every step unless you really know what you are doing. Otherwise you’re likely to get the position/velocity badly out of sync.
  • -
- - -

Chipmunk collision shapes: cpShape

- - -

There are currently 3 possible collision shapes:

- - -
    -
  • Circles: Fastest collision shape. They also roll smoothly.
  • -
  • Line segments: Meant mainly as a static shape. They can be attached to moving bodies, but they don’t generate collisions with other line segments.
  • -
  • Convex polygons: Slowest, but most flexible collision shape.
  • -
- - -

User accessible fields:

- - -

-typedef struct cpShape{
-    cpBB bb;
-
-    unsigned long collision_type;
-    unsigned long group;
-    unsigned long layers;
-
-    void *data;
-
-    cpBody *body;
-    cpFloat e, u;
-    cpVect surface_v;
-} cpShape;
-
- -
    -
  • bb: The bounding box of the shape. Only guaranteed to be valid after cpShapeCacheBB() is called.
  • -
  • collision_type: A user definable field, see the collision pair function section below for more information.
  • -
  • group: Shapes in the same non-zero group do not generate collisions. Useful when creating an object out of many shapes that you don’t want to self collide. Defaults to 0;
  • -
  • layers: Shapes only collide if they are in the same bit-planes. i.e. (a->layers & b->layers) != 0 By default, a shape occupies all 32 bit-planes.
  • -
  • data: A user definable field.
  • -
  • body: The rigid body the shape is attached to.
  • -
  • e: Elasticity of the shape. A value of 0.0 gives no bounce, while a value of 1.0 will give a “perfect” bounce. However due to inaccuracies in the simulation using 1.0 or greater is not recommended however. See the notes at the end of the section.
  • -
  • u: Friction coefficient. Chipmunk uses the Coulomb friction model, a value of 0.0 is frictionless. Tables of friction coefficients. See the notes at the end of the section.
  • -
  • surface_v: The surface velocity of the object. Useful for creating conveyor belts or players that move around. This value is only used when calculating friction, not the collision.
  • -
- - -

-void cpShapeDestroy(cpShape *shape)
-void cpShapeFree(cpShape *shape)
-
- -

Destroy and Free functions are shared by all shape types.

- - -

-cpBB cpShapeCacheBB(cpShape *shape)
-
- -

Updates and returns the bounding box of shape.

- - -

-void cpResetShapeIdCounter(void)
-
- -

Chipmunk keeps a counter so that every new shape is given a unique hash value to be used in the spatial hash. Because this affects the order in which the collisions are found and handled, you should reset the shape counter every time you populate a space with new shapes. If you don’t, there might be (very) slight differences in the simulation.

- - -

-cpCircleShape *cpCircleShapeAlloc(void)
-cpCircleShape *cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpVect offset, cpFloat radius)
-cpShape *cpCircleShapeNew(cpBody *body, cpVect offset, cpFloat radius)
-
- -

body is the body to attach the circle to, offset is the offset from the body’s center of gravity in body local coordinates.

- - -

-cpSegmentShape* cpSegmentShapeAlloc(void)
-cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius)
-cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius)
-
- -

body is the body to attach the segment to, a and b are the endpoints, and radius is the thickness of the segment.

- - -

-cpPolyShape *cpPolyShapeAlloc(void)
-cpPolyShape *cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset)
-cpShape *cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset)
-
- -

body is the body to attach the poly to, verts is an array of cpVect’s defining a convex hull with a counterclockwise winding, offset is the offset from the body’s center of gravity in body local coordinates.

- - -Notes: -
    -
  • You can attach multiple collision shapes to a rigid body. This should allow you to create almost any shape you could possibly need.
  • -
  • Shapes attached to the same rigid body will never generate collisions. You don’t have to worry about overlap when attaching multiple shapes to a rigid body.
  • -
  • The amount of elasticity applied during a collision is determined by multiplying the elasticity of both shapes together. The same is done for determining the friction.
  • -
  • Make sure you add both the body and it’s collision shapes to a space. The exception is when you want to have a static body or a body that you integrate yourself. In that case, only add the shape.
  • -
- - -

Chipmunk joints: cpJoint

- - -

There are currently 4 kinds of joints:

- - -
    -
  • Pin Joints connect two rigid bodies with a solid pin or rod. It keeps the anchor points at a set distance from one another.
  • -
  • Slide Joints are like pin joints, but have a minimum and maximum distance. A chain could be modeled using this joint. It keeps the anchor points from getting to far apart, but will allow them to get closer together.
  • -
  • Pivot Joints simply allow two objects to pivot about a single point.
  • -
  • Groove Joints attach a point on one body to a groove on the other. Think of it as a sliding pivot joint.
  • -
- - -

-void cpJointDestroy(cpJoint *joint)
-void cpJointFree(cpJoint *joint)
-
- -

Destroy and Free functions are shared by all joint types.

- - -

-cpPinJoint *cpPinJointAlloc(void)
-cpPinJoint *cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-cpJoint *cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2)
-
- -

a and b are the two bodies to connect, and anchr1 and anchr2 are the anchor points on those bodies.

- - -

-cpSlideJoint *cpSlideJointAlloc(void)
-cpSlideJoint *cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max)
-cpJoint *cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max)
-
- -

a and b are the two bodies to connect, anchr1 and anchr2 are the anchor points on those bodies, and min and max define the allowed distances of the anchor points.

- - -

-cpPivotJoint *cpPivotJointAlloc(void)
-cpPivotJoint *cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect pivot)
-cpJoint *cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot)
-
- -

a and b are the two bodies to connect, and pivot is the point in world coordinates of the pivot. Because the pivot location is given in world coordinates, you must have the bodies moved into the correct positions already.

- - -

-cpGrooveJoint *cpGrooveJointAlloc(void)
-cpGrooveJoint *cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2)
-cpJoint *cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2)
-
- -

The groove goes from groov_a to groove_b on body a_, and the pivot is attached to _anchr2 on body b. All coordinates are body local.

- - -

Notes:

- - -
    -
  • You can add multiple joints between two bodies, but make sure that they don’t fight. It can cause the bodies to explode.
  • -
  • Make sure you add both of the connected bodies and the joint to a space.
  • -
- - -

Chipmunk spaces: cpSpace

- - -

User accessible fields:

- - -

-typedef struct cpSpace{
-    int iterations;
-
-    cpVect gravity;
-    cpFloat damping;
-
-    int stamp;
-} cpSpace;
-
- -
    -
  • iterations: The number of iterations to use when solving constraints (collisions and joints). Defaults to 10.
  • -
  • gravity: The amount of gravity applied to the system.
  • -
  • damping: The amount of viscous damping applied to the system.
  • -
  • stamp: The tick stamp. Incremented every time cpSpaceStep() is called. read only
  • -
- - -

-void cpSpaceFreeChildren(cpSpace *space)
-
- -

Frees all bodies, shapes and joints added to the system.

- - -

-cpSpace* cpSpaceAlloc(void)
-cpSpace* cpSpaceInit(cpSpace *space, int iterations)
-cpSpace* cpSpaceNew(int iterations)
-
-void cpSpaceDestroy(cpSpace *space)
-void cpSpaceFree(cpSpace *space)
-
- -

More standard Chipmunk memory functions.

- - -

-void cpSpaceFreeChildren(cpSpace *space)
-
- -

This function will free all of the shapes, bodies and joints that have been added to space.

- - -

-void cpSpaceAddShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceAddBody(cpSpace *space, cpBody *body)
-void cpSpaceAddJoint(cpSpace *space, cpJoint *joint)
-
-void cpSpaceRemoveShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape)
-void cpSpaceRemoveBody(cpSpace *space, cpBody *body)
-void cpSpaceRemoveJoint(cpSpace *space, cpJoint *joint)
-
- -

These functions add and remove shapes, bodies and joints from space. Shapes added as static are assumed not to move. Static shapes should be be attached to a rigid body with an infinite mass and moment of inertia. Also, don’t add the rigid body used to the space, as that will cause it to fall under the effects of gravity.

- - -

-void cpSpaceResizeStaticHash(cpSpace *space, cpFloat dim, int count)
-void cpSpaceResizeActiveHash(cpSpace *space, cpFloat dim, int count)
-
- -

The spatial hashes used by Chipmunk’s collision detection are fairly size sensitive. dim is the size of the hash cells. Setting dim to the average objects size is likely to give the best performance.

- - -

count is the suggested minimum number of cells in the hash table. Bigger is better, but only to a point. Setting count to ~10x the number of objects in the hash is probably a good starting point.

- - -

By default, dim is 100.0, and count is 1000.

- - -

-void cpSpaceRehashStatic(cpSpace *space)
-
- -

Rehashes the shapes in the static spatial hash. You only need to call this if you move one of the static shapes.

- - -

-void cpSpaceStep(cpSpace *space, cpFloat dt)
-
- -

Update the space for the given time step. Using a fixed time step is highly recommended. Doing so will increase the efficiency of the contact persistence, requiring an order of magnitude fewer iterations to resolve the collisions in the usual case.

- - -

Notes:

- - -
    -
  • When removing objects from the space, make sure you remove any other objects that reference it. For instance, when you remove a body, remove the joints and shapes attached to it.
  • -
  • The number of iterations, and the size of the time step determine the quality of the simulation. More iterations, or smaller time steps increase the quality.
  • -
  • Because static shapes are only rehashed when you request it, it’s possible to use a much higher count argument to cpHashResizeStaticHash() than to cpHashResizeStaticHash(). Doing so will use more memory though.
  • -
- - -

Miscellaneous.

- - -

-cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset)
-
- -

Calculate the moment of inertia for a circle. Arguments are similar to cpCircleShapeInit(). m_ is the mass, _r1 and r2 define an inner and outer radius, and offset is the offset of the center from the center of gravity of the rigid body.

- - -

-cpFloat cpMomentForPoly(cpFloat m, int numVerts, cpVect *verts, cpVect offset)
-
- -

Calculate the moment of inertia for a poly. Arguments are similar to cpPolyShapeInit() m_ is the mass, _numVerts is the number of vertexes in verts, and offset is the offset of the poly coordinates from the center of gravity of the rigid body.

- - -

Collision pair functions

- - -

Collision pair functions allow you to add callbacks for certain collision events. Each cpShape structure has a user definable collision_type field that is used to identify its type. For instance, you could define an enumeration of collision types such as bullets and players, and then register a collision pair function to reduce the players health when a collision is found between the two.

- - -

Additionally, the return value of a collision pair function determines whether or not a collision will be processed. If the function returns false, the collision will be ignored. One use for this functionality is to allow a rock object to break a vase object. If the approximated energy of the collision is above a certain level, flag the vase to be removed from the space, apply an impulse to the rock to slow it down, and return false. After the cpSpaceStep() returns, remove the vase from the space.

- - -

WARNING: It is not safe for collision pair functions to remove or free shapes or bodies from a space. Doing so will likely end in a segfault as an earlier collision may already be referencing the shape or body. You must wait until after the cpSpaceStep() function returns.

- - -

-typedef struct cpContact{
-    cpVect p, n;
-    cpFloat dist;
-
-    cpFloat jnAcc, jtAcc;
-} cpContact;
-
- -

An array of cpContact structs are passed to collision pair functions. Some user accessible fields include:

- - -
    -
  • p: position of the collision.
  • -
  • n: normal of the collision.
  • -
  • dist: penetration distance of the collision.
  • -
  • jnAcc and jtAcc: The normal and tangential components of the accumulated (final) impulse applied to resolve the collision. Values will not be valid until after the call to cpSpaceStep() returns.
  • -
- - -

-typedef int (*cpCollFunc)(cpShape *a, cpShape *b, cpContact *contacts, int numContacts, cpFloat normal_coef, void *data)
-
- -

Prototype for a collision callback function. The two colliding shapes are passed as a and b, along with the contact points, and a user definable pointer are passed as arguments. The shapes are passed in the same order as their types were registered using cpSpaceAddCollisionPairFunc(). Because Chipmunk may swap the shapes to accommodate your collision pair function the normals may be backwards. Always multiply the normals by normal_coef before using the values. The contacts array may be freed on the next call to cpSpaceStep().

- - -

-void cpSpaceAddCollisionPairFunc(cpSpace *space, unsigned long a, unsigned long b, cpCollFunc func, void *data)
-
- -

Register func to be called when a collision is found between a shapes with collision_type fields that match a and b. data is passed to func as a parameter. The ordering of the collision types will match the ordering passed to the callback function.

- - -

Passing NULL for func will reject any collision with the given collision type pair.

- - -

-void cpSpaceRemoveCollisionPairFunc(cpSpace *space, unsigned long a, unsigned long b)
-
- -

Remove the function for the given collision type pair. The order of a and b must match the original order used with cpSpaceAddCollisionPairFunc().

- - -

-void cpSpaceSetDefaultCollisionPairFunc(cpSpace *space, cpCollFunc func, void *data)
-
- -

The default function is called when no collision pair function is specified. By default, the default function simply accepts all collisions. Passing NULL for func will reset the default function back to the default. (You know what I mean.)

- - -

Passing NULL for func will reject collisions by default.

- - -

Advanced topics

- - -

Advanced collision processing

- - -

Using collision pair functions, it’s possible to get information about a collision such as the locations of the contact points and the normals, but you can’t get the impulse applied to each contact point at the time the callback is called. Because Chipmunk caches the impulses, it is possible to access them after the call to cpSpaceStep() returns.

- - -

The impulse information is stored in the jnAcc and jtAcc fields of the cpContact structures passed to the collision pair function. So you must store a reference to the contacts array in the collision pair function so that you can access it later once the impulses have been calculated.

- - -

-cpVect cpContactsSumImpulses(cpContact *contacts, int numContacts);
-cpVect cpContactsSumImpulsesWithFriction(cpContact *contacts, int numContacts);
-
- -

Sums the impulses applied to the the given contact points. cpContactsSumImpulses() sums only the normal components, while cpContactsSumImpulsesWithFriction() sums the normal and tangential componets.

- - -

Notes:

- - -
    -
  • The contact array will either be destroyed or out of date after the next call to cpSpaceStep(). If you need to store the collision information permanently, you’ll have to copy it.
  • -
- - -

Collision pair functions, groups, and layers

- - -

There are three ways that you can specify which shapes are allowed to collide in Chipmunk: collision pair functions, groups, and layers. What are their intended purposes?

- - -

Collision pair functions: More than just a callback, collision pair functions can conditionally allow a collision between two shapes. This is the only choice if you need to perform some logic based on the shapes or contact information before deciding to allow the collision.

- - -

Groups: Groups filter out collisions between objects in the same non-zero groups. A good example of when groups would be useful is to create a multi-body, multi-shape object such as a ragdoll. You don’t want the parts of the ragdoll to collide with itself, but you do want it to collide with other ragdolls.

- - -

Layers: Layers are another way of grouping shapes. Collision between shapes that don’t occupy one or more of the same layers are filtered out. Layers are implemented using a bitmask on an unsigned long, so there are up to 32 layers available.

- - -

To be clear, for a collision to occur, all of the tests have to pass. Additionally, collisions between static shapes are not considered nor are collisions between shapes connected to the same rigid body.

- - -

Mysteries of cpSpaceStep() explained.

- - -

The cpSpaceStep() function is really the workhorse of Chipmunk. So what exactly does it do?

- - -
    -
  • Persistent contacts with a stamp that is out of date by more than cp_contact_persistence are filtered out.
  • -
  • Velocities of all rigid bodies in the space are integrated using cpBodyUpdateVelocity().
  • -
  • All active shapes have their bounding boxes calculated and cached.
  • -
  • Collisions between the active shapes and static shapes are found. (collision pair functions are called)
  • -
  • Collisions between the active shapes are found. (collision pair functions are called)
  • -
  • Information about all constraints (collisions and joints) is pre-calculated.
  • -
  • Impulses are found and applied to solve all constraints (joints and collisions).
  • -
  • Positions of all rigid bodies in the space are integrated using cpBodyUpdatePosition().
  • -
- - -

Chipmunk does a lot of processing on the shapes in the system in order to provide robust and fast collision detection, but the same is not true of the rigid bodies. Really all cpSpaceStep() does to the bodies in the system is to integrate them and apply impulses to them.

- - -

The integration step is really just for convenience. If you integrate the velocity of your rigid bodies before calling cpSpaceStep() and integrate their positions afterward, you don’t have to add them to the space at all. In fact, there are good reasons for not doing so. All bodies in the space are integrated using the same gravity and damping, and this prevents you from providing interesting objects such as moving platforms.

- - -

If you are going to do the integration for your rigid bodies manually, I would highly recommend that you use cpBodyUpdatePosition() to integrate the position of the objects and only integrate the velocity. cpBodyUpdatePosition() is a required step for penetration resolution, and weird things could happen if it’s not called. Chipmunk uses Euler integration, so calculating the velocity required to move a body to a specific position is trivial if that is what you wish to do.

- - -

Chipmunk globals.

- - -

Chipmunk was designed with multithreading in mind, so very few globals are used. This shouldn’t be a problem in most cases as it’s likely you’ll only need to set them on a per application basis (if at all).

- - -

int cp_contact_persistence: This determines how long contacts should persist. This number should be fairly small as the cached contacts will only be close for a short time. cp_contact_persistence defaults to 3 as it is large enough to help prevent oscillating contacts, but doesn’t allow stale contact information to be used.

- - -

cpFloat cp_collision_slop: The amount that shapes are allowed to penetrate. Setting this to zero will work just fine, but using a small positive amount will help prevent oscillating contacts. cp_collision_slop defaults to 0.1.

- - -

cpFloat cp_bias_coef: The amount of penetration to reduce in each step. Values should range from 0 to 1. Using large values will eliminate penetration in fewer steps, but can cause vibration. cp_bias_coef defaults to 0.1.

- - -

cpFloat cp_joint_bias_coef: Similar to cp_bias_coef, but for joints. Defaults to 0.1. In the future, joints might have their own bias coefficient instead.

- - -

Known Problems

- - -
    -
  • Fast moving objects sometimes pass right through one another. This is because I’m not doing swept volume collisions. Use smaller time steps if this is a problem.
  • -
  • Pointy or thin polygons aren’t handled well. Collision points are generated at the poly’s vertexes. I haven’t decided what to do about this yet.
  • -
  • Elastic shapes don’t stack well.
  • -
- - -

Performance/Quality tuning

- - -

There are a number of things you can do to increase the performance of Chipmunk:

- - -
    -
  • Use simpler collision shapes when possible. It’s easier on the collision detection, you’ll generate fewer contact points, and require fewer iterations.
  • -
  • Make sure you have your spatial hashes tuned properly. It may take some experimenting to find the optimal dim/count parameters.
  • -
  • Use fewer iterations.
  • -
  • Use a larger time step.
  • -
  • Use a fixed time step. This allows contact persistence to work properly, reducing the number of iterations you need by an order of magnitude.
  • -
- - -

If you have problems with jittery or vibrating objects, you need to do mostly the opposite:

- - -
    -
  • Use simpler shapes. Simpler shapes generate fewer contacts, increasing the efficiency of each iteration.
  • -
  • Use more iterations.
  • -
  • Use a smaller time step.
  • -
  • Use a fixed time step. By allowing the contact persistence to work properly, you can use more iterations without increasing the computational cost.
  • -
- - -

To do

- - -There are a number of things left on my todo list: -
    -
  • More joint types.
  • -
  • Post collision queries. Being able to query for all the impulses that were applied to an object would be useful.
  • -
  • Python binding. (possibly others if I can get help)
  • -
- - -

Contact information

- - -

Drop me a line. Tell me how great you think Chipmunk is or how terribly buggy it is. I’d love to hear about any project that people are using Chipmunk for.

- - -

AIM: slembcke@mac.com

- - -

Email: lemb0029(at)morris(dot)umn(dot)edu or slembcke(at)gmail(dot)com

- - -

I can also be found lurking about the iDevGames forums.

- - -

License

- - -

Copyright© 2007 Scott Lembcke

- - -

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

- - -

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

- - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. - - - diff --git a/external/chipmunk/proj.win32/chipmunk.vcxproj b/external/chipmunk/proj.win32/chipmunk.vcxproj deleted file mode 100644 index eb3ca3460b..0000000000 --- a/external/chipmunk/proj.win32/chipmunk.vcxproj +++ /dev/null @@ -1,169 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - libchipmunk - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - Win32Proj - - - - StaticLibrary - Unicode - v100 - v110 - v110_xp - v120 - v120_xp - - - StaticLibrary - Unicode - v100 - v110 - v110_xp - v120 - v120_xp - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - AllRules.ruleset - - - AllRules.ruleset - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - Disabled - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - false - - - Level3 - EditAndContinue - CompileAsCpp - 4068;4996;%(DisableSpecificWarnings) - true - - - $(OutDir)$(ProjectName).lib - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDLL - false - - - Level3 - None - CompileAsCpp - 4068;4996;%(DisableSpecificWarnings) - true - MinSpace - false - - - $(OutDir)$(ProjectName).lib - - - - - - \ No newline at end of file diff --git a/external/chipmunk/proj.win32/chipmunk.vcxproj.filters b/external/chipmunk/proj.win32/chipmunk.vcxproj.filters deleted file mode 100644 index 7d0f136e9d..0000000000 --- a/external/chipmunk/proj.win32/chipmunk.vcxproj.filters +++ /dev/null @@ -1,186 +0,0 @@ - - - - - {ffa91ca5-f4b1-424f-9342-bd250042f423} - - - {70e7e6e1-042e-42b6-a19d-547b8de61bbc} - - - {78b690a1-6061-49d6-a8b7-ad6a231ddca2} - - - {179bc1e1-ed4a-4412-92b1-f74fddef2877} - - - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - \ No newline at end of file diff --git a/external/chipmunk/proj.winrt/chipmunk.vcxproj b/external/chipmunk/proj.winrt/chipmunk.vcxproj deleted file mode 100644 index 9ffaa7ecf6..0000000000 --- a/external/chipmunk/proj.winrt/chipmunk.vcxproj +++ /dev/null @@ -1,480 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {8B143765-5C1B-4076-9384-3E0EC3650B1A} - Win32Proj - libchipmunk - libchipmunk - en-US - 12.0 - true - Windows Store - 8.1 - - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - false - $(SolutionDir)\winrt$(Configuration)\$(MSBuildProjectName)\ - winrt$(Configuration)\ - - - - NotUsing - false - true - ..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - NotUsing - false - true - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - NotUsing - false - true - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - NotUsing - false - true - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - NotUsing - false - true - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - NotUsing - false - true - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;4056;%(DisableSpecificWarnings) - - - Console - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - \ No newline at end of file diff --git a/external/chipmunk/proj.winrt/chipmunk.vcxproj.filters b/external/chipmunk/proj.winrt/chipmunk.vcxproj.filters deleted file mode 100644 index b3dd86f096..0000000000 --- a/external/chipmunk/proj.winrt/chipmunk.vcxproj.filters +++ /dev/null @@ -1,188 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4dabab00-1a6f-41ee-be09-a30737358f86} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {e573d383-f016-40f6-999a-d804311ffc62} - - - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - \ No newline at end of file diff --git a/external/chipmunk/proj.wp8/chipmunk.vcxproj b/external/chipmunk/proj.wp8/chipmunk.vcxproj deleted file mode 100644 index 176e839e64..0000000000 --- a/external/chipmunk/proj.wp8/chipmunk.vcxproj +++ /dev/null @@ -1,335 +0,0 @@ - - - - - Debug - Win32 - - - Debug - ARM - - - Release - Win32 - - - Release - ARM - - - - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A} - libchipmunk - en-US - 11.0 - - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - StaticLibrary - false - true - v110_wp80 - - - - - - - - false - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;%(DisableSpecificWarnings) - - - Console - false - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;%(DisableSpecificWarnings) - - - Console - false - - - - - _LIB;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;%(DisableSpecificWarnings) - - - Console - false - - - - - _LIB;NDEBUG;%(PreprocessorDefinitions) - NotUsing - pch.h - $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories) - ..\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - 4068;4996;%(DisableSpecificWarnings) - - - Console - false - - - - - true - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - \ No newline at end of file diff --git a/external/chipmunk/proj.wp8/chipmunk.vcxproj.filters b/external/chipmunk/proj.wp8/chipmunk.vcxproj.filters deleted file mode 100644 index b3dd86f096..0000000000 --- a/external/chipmunk/proj.wp8/chipmunk.vcxproj.filters +++ /dev/null @@ -1,188 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4dabab00-1a6f-41ee-be09-a30737358f86} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {e573d383-f016-40f6-999a-d804311ffc62} - - - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - include\constraints - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - src\constraints - - - \ No newline at end of file diff --git a/external/chipmunk/src/chipmunk.c b/external/chipmunk/src/chipmunk.c deleted file mode 100644 index 2c098df4f6..0000000000 --- a/external/chipmunk/src/chipmunk.c +++ /dev/null @@ -1,324 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 -#include -#include - -#include "chipmunk_private.h" - -void -cpMessage(const char *condition, const char *file, int line, cpBool isError, cpBool isHardError, const char *message, ...) -{ - fprintf(stderr, (isError ? "Aborting due to Chipmunk error: " : "Chipmunk warning: ")); - - va_list vargs; - va_start(vargs, message); { - vfprintf(stderr, message, vargs); - fprintf(stderr, "\n"); - } va_end(vargs); - - fprintf(stderr, "\tFailed condition: %s\n", condition); - fprintf(stderr, "\tSource:%s:%d\n", file, line); - - if(isError) abort(); -} - -#define STR(s) #s -#define XSTR(s) STR(s) - -const char *cpVersionString = XSTR(CP_VERSION_MAJOR)"."XSTR(CP_VERSION_MINOR)"."XSTR(CP_VERSION_RELEASE); - -void -cpInitChipmunk(void) -{ - cpAssertWarn(cpFalse, "cpInitChipmunk is deprecated and no longer required. It will be removed in the future."); -} - -//MARK: Misc Functions - -cpFloat -cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset) -{ - return m*(0.5f*(r1*r1 + r2*r2) + cpvlengthsq(offset)); -} - -cpFloat -cpAreaForCircle(cpFloat r1, cpFloat r2) -{ - return (cpFloat)M_PI*cpfabs(r1*r1 - r2*r2); -} - -cpFloat -cpMomentForSegment(cpFloat m, cpVect a, cpVect b) -{ - cpVect offset = cpvmult(cpvadd(a, b), 0.5f); - return m*(cpvdistsq(b, a)/12.0f + cpvlengthsq(offset)); -} - -cpFloat -cpAreaForSegment(cpVect a, cpVect b, cpFloat r) -{ - return r*((cpFloat)M_PI*r + 2.0f*cpvdist(a, b)); -} - -cpFloat -cpMomentForPoly(cpFloat m, const int numVerts, const cpVect *verts, cpVect offset) -{ - if(numVerts == 2) return cpMomentForSegment(m, verts[0], verts[1]); - - cpFloat sum1 = 0.0f; - cpFloat sum2 = 0.0f; - for(int i=0; i max.x || (v.x == max.x && v.y > max.y)){ - max = v; - (*end) = i; - } - } -} - -#define SWAP(__A__, __B__) {cpVect __TMP__ = __A__; __A__ = __B__; __B__ = __TMP__;} - -static int -QHullPartition(cpVect *verts, int count, cpVect a, cpVect b, cpFloat tol) -{ - if(count == 0) return 0; - - cpFloat max = 0; - int pivot = 0; - - cpVect delta = cpvsub(b, a); - cpFloat valueTol = tol*cpvlength(delta); - - int head = 0; - for(int tail = count-1; head <= tail;){ - cpFloat value = cpvcross(delta, cpvsub(verts[head], a)); - if(value > valueTol){ - if(value > max){ - max = value; - pivot = head; - } - - head++; - } else { - SWAP(verts[head], verts[tail]); - tail--; - } - } - - // move the new pivot to the front if it's not already there. - if(pivot != 0) SWAP(verts[0], verts[pivot]); - return head; -} - -static int -QHullReduce(cpFloat tol, cpVect *verts, int count, cpVect a, cpVect pivot, cpVect b, cpVect *result) -{ - if(count < 0){ - return 0; - } else if(count == 0) { - result[0] = pivot; - return 1; - } else { - int left_count = QHullPartition(verts, count, a, pivot, tol); - int index = QHullReduce(tol, verts + 1, left_count - 1, a, verts[0], pivot, result); - - result[index++] = pivot; - - int right_count = QHullPartition(verts + left_count, count - left_count, pivot, b, tol); - return index + QHullReduce(tol, verts + left_count + 1, right_count - 1, pivot, verts[left_count], b, result + index); - } -} - -// QuickHull seemed like a neat algorithm, and efficient-ish for large input sets. -// My implementation performs an in place reduction using the result array as scratch space. -int -cpConvexHull(int count, cpVect *verts, cpVect *result, int *first, cpFloat tol) -{ - if(result){ - // Copy the line vertexes into the empty part of the result polyline to use as a scratch buffer. - memcpy(result, verts, count*sizeof(cpVect)); - } else { - // If a result array was not specified, reduce the input instead. - result = verts; - } - - // Degenerate case, all poins are the same. - int start, end; - cpLoopIndexes(verts, count, &start, &end); - if(start == end){ - if(first) (*first) = 0; - return 1; - } - - SWAP(result[0], result[start]); - SWAP(result[1], result[end == 0 ? start : end]); - - cpVect a = result[0]; - cpVect b = result[1]; - - if(first) (*first) = start; - int resultCount = QHullReduce(tol, result + 2, count - 2, a, b, a, result + 1) + 1; - cpAssertSoft(cpPolyValidate(result, resultCount), - "Internal error: cpConvexHull() and cpPolyValidate() did not agree." - "Please report this error with as much info as you can."); - return resultCount; -} - -//MARK: Alternate Block Iterators - -#if defined(__has_extension) -#if __has_extension(blocks) - -static void IteratorFunc(void *ptr, void (^block)(void *ptr)){block(ptr);} - -void cpSpaceEachBody_b(cpSpace *space, void (^block)(cpBody *body)){ - cpSpaceEachBody(space, (cpSpaceBodyIteratorFunc)IteratorFunc, block); -} - -void cpSpaceEachShape_b(cpSpace *space, void (^block)(cpShape *shape)){ - cpSpaceEachShape(space, (cpSpaceShapeIteratorFunc)IteratorFunc, block); -} - -void cpSpaceEachConstraint_b(cpSpace *space, void (^block)(cpConstraint *constraint)){ - cpSpaceEachConstraint(space, (cpSpaceConstraintIteratorFunc)IteratorFunc, block); -} - -static void BodyIteratorFunc(cpBody *body, void *ptr, void (^block)(void *ptr)){block(ptr);} - -void cpBodyEachShape_b(cpBody *body, void (^block)(cpShape *shape)){ - cpBodyEachShape(body, (cpBodyShapeIteratorFunc)BodyIteratorFunc, block); -} - -void cpBodyEachConstraint_b(cpBody *body, void (^block)(cpConstraint *constraint)){ - cpBodyEachConstraint(body, (cpBodyConstraintIteratorFunc)BodyIteratorFunc, block); -} - -void cpBodyEachArbiter_b(cpBody *body, void (^block)(cpArbiter *arbiter)){ - cpBodyEachArbiter(body, (cpBodyArbiterIteratorFunc)BodyIteratorFunc, block); -} - -static void NearestPointQueryIteratorFunc(cpShape *shape, cpFloat distance, cpVect point, cpSpaceNearestPointQueryBlock block){block(shape, distance, point);} -void cpSpaceNearestPointQuery_b(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpSpaceNearestPointQueryBlock block){ - cpSpaceNearestPointQuery(space, point, maxDistance, layers, group, (cpSpaceNearestPointQueryFunc)NearestPointQueryIteratorFunc, block); -} - -static void SegmentQueryIteratorFunc(cpShape *shape, cpFloat t, cpVect n, cpSpaceSegmentQueryBlock block){block(shape, t, n);} -void cpSpaceSegmentQuery_b(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryBlock block){ - cpSpaceSegmentQuery(space, start, end, layers, group, (cpSpaceSegmentQueryFunc)SegmentQueryIteratorFunc, block); -} - -void cpSpaceBBQuery_b(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryBlock block){ - cpSpaceBBQuery(space, bb, layers, group, (cpSpaceBBQueryFunc)IteratorFunc, block); -} - -static void ShapeQueryIteratorFunc(cpShape *shape, cpContactPointSet *points, cpSpaceShapeQueryBlock block){block(shape, points);} -cpBool cpSpaceShapeQuery_b(cpSpace *space, cpShape *shape, cpSpaceShapeQueryBlock block){ - return cpSpaceShapeQuery(space, shape, (cpSpaceShapeQueryFunc)ShapeQueryIteratorFunc, block); -} - -#endif -#endif - -#include "chipmunk_ffi.h" diff --git a/external/chipmunk/src/constraints/cpConstraint.c b/external/chipmunk/src/constraints/cpConstraint.c deleted file mode 100644 index d3902f46fe..0000000000 --- a/external/chipmunk/src/constraints/cpConstraint.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -// TODO: Comment me! - -void cpConstraintDestroy(cpConstraint *constraint){} - -void -cpConstraintFree(cpConstraint *constraint) -{ - if(constraint){ - cpConstraintDestroy(constraint); - cpfree(constraint); - } -} - -// *** declared in util.h TODO move declaration to chipmunk_private.h - -void -cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b) -{ - constraint->klass = klass; - - constraint->a = a; - constraint->b = b; - constraint->space = NULL; - - constraint->next_a = NULL; - constraint->next_b = NULL; - - constraint->maxForce = (cpFloat)INFINITY; - constraint->errorBias = cpfpow(1.0f - 0.1f, 60.0f); - constraint->maxBias = (cpFloat)INFINITY; - - constraint->preSolve = NULL; - constraint->postSolve = NULL; -} diff --git a/external/chipmunk/src/constraints/cpDampedRotarySpring.c b/external/chipmunk/src/constraints/cpDampedRotarySpring.c deleted file mode 100644 index f57c289e7f..0000000000 --- a/external/chipmunk/src/constraints/cpDampedRotarySpring.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static cpFloat -defaultSpringTorque(cpDampedRotarySpring *spring, cpFloat relativeAngle){ - return (relativeAngle - spring->restAngle)*spring->stiffness; -} - -static void -preStep(cpDampedRotarySpring *spring, cpFloat dt) -{ - cpBody *a = spring->constraint.a; - cpBody *b = spring->constraint.b; - - cpFloat moment = a->i_inv + b->i_inv; - cpAssertSoft(moment != 0.0, "Unsolvable spring."); - spring->iSum = 1.0f/moment; - - spring->w_coef = 1.0f - cpfexp(-spring->damping*dt*moment); - spring->target_wrn = 0.0f; - - // apply spring torque - cpFloat j_spring = spring->springTorqueFunc((cpConstraint *)spring, a->a - b->a)*dt; - spring->jAcc = j_spring; - - a->w -= j_spring*a->i_inv; - b->w += j_spring*b->i_inv; -} - -static void applyCachedImpulse(cpDampedRotarySpring *spring, cpFloat dt_coef){} - -static void -applyImpulse(cpDampedRotarySpring *spring, cpFloat dt) -{ - cpBody *a = spring->constraint.a; - cpBody *b = spring->constraint.b; - - // compute relative velocity - cpFloat wrn = a->w - b->w;//normal_relative_velocity(a, b, r1, r2, n) - spring->target_vrn; - - // compute velocity loss from drag - // not 100% certain this is derived correctly, though it makes sense - cpFloat w_damp = (spring->target_wrn - wrn)*spring->w_coef; - spring->target_wrn = wrn + w_damp; - - //apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, v_damp*spring->nMass)); - cpFloat j_damp = w_damp*spring->iSum; - spring->jAcc += j_damp; - - a->w += j_damp*a->i_inv; - b->w -= j_damp*b->i_inv; -} - -static cpFloat -getImpulse(cpDampedRotarySpring *spring) -{ - return spring->jAcc; -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpDampedRotarySpring) - -cpDampedRotarySpring * -cpDampedRotarySpringAlloc(void) -{ - return (cpDampedRotarySpring *)cpcalloc(1, sizeof(cpDampedRotarySpring)); -} - -cpDampedRotarySpring * -cpDampedRotarySpringInit(cpDampedRotarySpring *spring, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping) -{ - cpConstraintInit((cpConstraint *)spring, &klass, a, b); - - spring->restAngle = restAngle; - spring->stiffness = stiffness; - spring->damping = damping; - spring->springTorqueFunc = (cpDampedRotarySpringTorqueFunc)defaultSpringTorque; - - spring->jAcc = 0.0f; - - return spring; -} - -cpConstraint * -cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping) -{ - return (cpConstraint *)cpDampedRotarySpringInit(cpDampedRotarySpringAlloc(), a, b, restAngle, stiffness, damping); -} diff --git a/external/chipmunk/src/constraints/cpDampedSpring.c b/external/chipmunk/src/constraints/cpDampedSpring.c deleted file mode 100644 index 5a855f818d..0000000000 --- a/external/chipmunk/src/constraints/cpDampedSpring.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static cpFloat -defaultSpringForce(cpDampedSpring *spring, cpFloat dist){ - return (spring->restLength - dist)*spring->stiffness; -} - -static void -preStep(cpDampedSpring *spring, cpFloat dt) -{ - cpBody *a = spring->constraint.a; - cpBody *b = spring->constraint.b; - - spring->r1 = cpvrotate(spring->anchr1, a->rot); - spring->r2 = cpvrotate(spring->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, spring->r2), cpvadd(a->p, spring->r1)); - cpFloat dist = cpvlength(delta); - spring->n = cpvmult(delta, 1.0f/(dist ? dist : INFINITY)); - - cpFloat k = k_scalar(a, b, spring->r1, spring->r2, spring->n); - cpAssertSoft(k != 0.0, "Unsolvable spring."); - spring->nMass = 1.0f/k; - - spring->target_vrn = 0.0f; - spring->v_coef = 1.0f - cpfexp(-spring->damping*dt*k); - - // apply spring force - cpFloat f_spring = spring->springForceFunc((cpConstraint *)spring, dist); - cpFloat j_spring = spring->jAcc = f_spring*dt; - apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, j_spring)); -} - -static void applyCachedImpulse(cpDampedSpring *spring, cpFloat dt_coef){} - -static void -applyImpulse(cpDampedSpring *spring, cpFloat dt) -{ - cpBody *a = spring->constraint.a; - cpBody *b = spring->constraint.b; - - cpVect n = spring->n; - cpVect r1 = spring->r1; - cpVect r2 = spring->r2; - - // compute relative velocity - cpFloat vrn = normal_relative_velocity(a, b, r1, r2, n); - - // compute velocity loss from drag - cpFloat v_damp = (spring->target_vrn - vrn)*spring->v_coef; - spring->target_vrn = vrn + v_damp; - - cpFloat j_damp = v_damp*spring->nMass; - spring->jAcc += j_damp; - apply_impulses(a, b, spring->r1, spring->r2, cpvmult(spring->n, j_damp)); -} - -static cpFloat -getImpulse(cpDampedSpring *spring) -{ - return spring->jAcc; -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpDampedSpring) - -cpDampedSpring * -cpDampedSpringAlloc(void) -{ - return (cpDampedSpring *)cpcalloc(1, sizeof(cpDampedSpring)); -} - -cpDampedSpring * -cpDampedSpringInit(cpDampedSpring *spring, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping) -{ - cpConstraintInit((cpConstraint *)spring, cpDampedSpringGetClass(), a, b); - - spring->anchr1 = anchr1; - spring->anchr2 = anchr2; - - spring->restLength = restLength; - spring->stiffness = stiffness; - spring->damping = damping; - spring->springForceFunc = (cpDampedSpringForceFunc)defaultSpringForce; - - spring->jAcc = 0.0f; - - return spring; -} - -cpConstraint * -cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping) -{ - return (cpConstraint *)cpDampedSpringInit(cpDampedSpringAlloc(), a, b, anchr1, anchr2, restLength, stiffness, damping); -} diff --git a/external/chipmunk/src/constraints/cpGearJoint.c b/external/chipmunk/src/constraints/cpGearJoint.c deleted file mode 100644 index 818c1b4660..0000000000 --- a/external/chipmunk/src/constraints/cpGearJoint.c +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpGearJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv*joint->ratio_inv + joint->ratio*b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-bias_coef(joint->constraint.errorBias, dt)*(b->a*joint->ratio - a->a - joint->phase)/dt, -maxBias, maxBias); -} - -static void -applyCachedImpulse(cpGearJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat j = joint->jAcc*dt_coef; - a->w -= j*a->i_inv*joint->ratio_inv; - b->w += j*b->i_inv; -} - -static void -applyImpulse(cpGearJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // compute relative rotational velocity - cpFloat wr = b->w*joint->ratio - a->w; - - cpFloat jMax = joint->constraint.maxForce*dt; - - // compute normal impulse - cpFloat j = (joint->bias - wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp(jOld + j, -jMax, jMax); - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv*joint->ratio_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpGearJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpGearJoint) - -cpGearJoint * -cpGearJointAlloc(void) -{ - return (cpGearJoint *)cpcalloc(1, sizeof(cpGearJoint)); -} - -cpGearJoint * -cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->phase = phase; - joint->ratio = ratio; - joint->ratio_inv = 1.0f/ratio; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio) -{ - return (cpConstraint *)cpGearJointInit(cpGearJointAlloc(), a, b, phase, ratio); -} - -void -cpGearJointSetRatio(cpConstraint *constraint, cpFloat value) -{ - cpConstraintCheckCast(constraint, cpGearJoint); - ((cpGearJoint *)constraint)->ratio = value; - ((cpGearJoint *)constraint)->ratio_inv = 1.0f/value; - cpConstraintActivateBodies(constraint); -} diff --git a/external/chipmunk/src/constraints/cpGrooveJoint.c b/external/chipmunk/src/constraints/cpGrooveJoint.c deleted file mode 100644 index efe14aed71..0000000000 --- a/external/chipmunk/src/constraints/cpGrooveJoint.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpGrooveJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // calculate endpoints in worldspace - cpVect ta = cpBodyLocal2World(a, joint->grv_a); - cpVect tb = cpBodyLocal2World(a, joint->grv_b); - - // calculate axis - cpVect n = cpvrotate(joint->grv_n, a->rot); - cpFloat d = cpvdot(ta, n); - - joint->grv_tn = n; - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - // calculate tangential distance along the axis of r2 - cpFloat td = cpvcross(cpvadd(b->p, joint->r2), n); - // calculate clamping factor and r2 - if(td <= cpvcross(ta, n)){ - joint->clamp = 1.0f; - joint->r1 = cpvsub(ta, a->p); - } else if(td >= cpvcross(tb, n)){ - joint->clamp = -1.0f; - joint->r1 = cpvsub(tb, a->p); - } else { - joint->clamp = 0.0f; - joint->r1 = cpvsub(cpvadd(cpvmult(cpvperp(n), -td), cpvmult(n, d)), a->p); - } - - // Calculate mass tensor - joint->k = k_tensor(a, b, joint->r1, joint->r2); - - // calculate bias velocity - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - joint->bias = cpvclamp(cpvmult(delta, -bias_coef(joint->constraint.errorBias, dt)/dt), joint->constraint.maxBias); -} - -static void -applyCachedImpulse(cpGrooveJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(joint->jAcc, dt_coef)); -} - -static inline cpVect -grooveConstrain(cpGrooveJoint *joint, cpVect j, cpFloat dt){ - cpVect n = joint->grv_tn; - cpVect jClamp = (joint->clamp*cpvcross(j, n) > 0.0f) ? j : cpvproject(j, n); - return cpvclamp(jClamp, joint->constraint.maxForce*dt); -} - -static void -applyImpulse(cpGrooveJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute impulse - cpVect vr = relative_velocity(a, b, r1, r2); - - cpVect j = cpMat2x2Transform(joint->k, cpvsub(joint->bias, vr)); - cpVect jOld = joint->jAcc; - joint->jAcc = grooveConstrain(joint, cpvadd(jOld, j), dt); - j = cpvsub(joint->jAcc, jOld); - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static cpFloat -getImpulse(cpGrooveJoint *joint) -{ - return cpvlength(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpGrooveJoint) - -cpGrooveJoint * -cpGrooveJointAlloc(void) -{ - return (cpGrooveJoint *)cpcalloc(1, sizeof(cpGrooveJoint)); -} - -cpGrooveJoint * -cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->grv_a = groove_a; - joint->grv_b = groove_b; - joint->grv_n = cpvperp(cpvnormalize(cpvsub(groove_b, groove_a))); - joint->anchr2 = anchr2; - - joint->jAcc = cpvzero; - - return joint; -} - -cpConstraint * -cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2) -{ - return (cpConstraint *)cpGrooveJointInit(cpGrooveJointAlloc(), a, b, groove_a, groove_b, anchr2); -} - -void -cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value) -{ - cpGrooveJoint *g = (cpGrooveJoint *)constraint; - cpConstraintCheckCast(constraint, cpGrooveJoint); - - g->grv_a = value; - g->grv_n = cpvperp(cpvnormalize(cpvsub(g->grv_b, value))); - - cpConstraintActivateBodies(constraint); -} - -void -cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value) -{ - cpGrooveJoint *g = (cpGrooveJoint *)constraint; - cpConstraintCheckCast(constraint, cpGrooveJoint); - - g->grv_b = value; - g->grv_n = cpvperp(cpvnormalize(cpvsub(value, g->grv_a))); - - cpConstraintActivateBodies(constraint); -} - diff --git a/external/chipmunk/src/constraints/cpPinJoint.c b/external/chipmunk/src/constraints/cpPinJoint.c deleted file mode 100644 index abff6cef29..0000000000 --- a/external/chipmunk/src/constraints/cpPinJoint.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpPinJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - cpFloat dist = cpvlength(delta); - joint->n = cpvmult(delta, 1.0f/(dist ? dist : (cpFloat)INFINITY)); - - // calculate mass normal - joint->nMass = 1.0f/k_scalar(a, b, joint->r1, joint->r2, joint->n); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-bias_coef(joint->constraint.errorBias, dt)*(dist - joint->dist)/dt, -maxBias, maxBias); -} - -static void -applyCachedImpulse(cpPinJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpVect j = cpvmult(joint->n, joint->jnAcc*dt_coef); - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static void -applyImpulse(cpPinJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - cpVect n = joint->n; - - // compute relative velocity - cpFloat vrn = normal_relative_velocity(a, b, joint->r1, joint->r2, n); - - cpFloat jnMax = joint->constraint.maxForce*dt; - - // compute normal impulse - cpFloat jn = (joint->bias - vrn)*joint->nMass; - cpFloat jnOld = joint->jnAcc; - joint->jnAcc = cpfclamp(jnOld + jn, -jnMax, jnMax); - jn = joint->jnAcc - jnOld; - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(n, jn)); -} - -static cpFloat -getImpulse(cpPinJoint *joint) -{ - return cpfabs(joint->jnAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpPinJoint) - - -cpPinJoint * -cpPinJointAlloc(void) -{ - return (cpPinJoint *)cpcalloc(1, sizeof(cpPinJoint)); -} - -cpPinJoint * -cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - - // STATIC_BODY_CHECK - cpVect p1 = (a ? cpvadd(a->p, cpvrotate(anchr1, a->rot)) : anchr1); - cpVect p2 = (b ? cpvadd(b->p, cpvrotate(anchr2, b->rot)) : anchr2); - joint->dist = cpvlength(cpvsub(p2, p1)); - - cpAssertWarn(joint->dist > 0.0, "You created a 0 length pin joint. A pivot joint will be much more stable."); - - joint->jnAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - return (cpConstraint *)cpPinJointInit(cpPinJointAlloc(), a, b, anchr1, anchr2); -} diff --git a/external/chipmunk/src/constraints/cpPivotJoint.c b/external/chipmunk/src/constraints/cpPivotJoint.c deleted file mode 100644 index 5a042bc05e..0000000000 --- a/external/chipmunk/src/constraints/cpPivotJoint.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpPivotJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - // Calculate mass tensor - joint-> k = k_tensor(a, b, joint->r1, joint->r2); - - // calculate bias velocity - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - joint->bias = cpvclamp(cpvmult(delta, -bias_coef(joint->constraint.errorBias, dt)/dt), joint->constraint.maxBias); -} - -static void -applyCachedImpulse(cpPivotJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(joint->jAcc, dt_coef)); -} - -static void -applyImpulse(cpPivotJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute relative velocity - cpVect vr = relative_velocity(a, b, r1, r2); - - // compute normal impulse - cpVect j = cpMat2x2Transform(joint->k, cpvsub(joint->bias, vr)); - cpVect jOld = joint->jAcc; - joint->jAcc = cpvclamp(cpvadd(joint->jAcc, j), joint->constraint.maxForce*dt); - j = cpvsub(joint->jAcc, jOld); - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static cpFloat -getImpulse(cpConstraint *joint) -{ - return cpvlength(((cpPivotJoint *)joint)->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpPivotJoint) - -cpPivotJoint * -cpPivotJointAlloc(void) -{ - return (cpPivotJoint *)cpcalloc(1, sizeof(cpPivotJoint)); -} - -cpPivotJoint * -cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - - joint->jAcc = cpvzero; - - return joint; -} - -cpConstraint * -cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2) -{ - return (cpConstraint *)cpPivotJointInit(cpPivotJointAlloc(), a, b, anchr1, anchr2); -} - -cpConstraint * -cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot) -{ - cpVect anchr1 = (a ? cpBodyWorld2Local(a, pivot) : pivot); - cpVect anchr2 = (b ? cpBodyWorld2Local(b, pivot) : pivot); - return cpPivotJointNew2(a, b, anchr1, anchr2); -} diff --git a/external/chipmunk/src/constraints/cpRatchetJoint.c b/external/chipmunk/src/constraints/cpRatchetJoint.c deleted file mode 100644 index 4e30ba5c82..0000000000 --- a/external/chipmunk/src/constraints/cpRatchetJoint.c +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpRatchetJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat angle = joint->angle; - cpFloat phase = joint->phase; - cpFloat ratchet = joint->ratchet; - - cpFloat delta = b->a - a->a; - cpFloat diff = angle - delta; - cpFloat pdist = 0.0f; - - if(diff*ratchet > 0.0f){ - pdist = diff; - } else { - joint->angle = cpffloor((delta - phase)/ratchet)*ratchet + phase; - } - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-bias_coef(joint->constraint.errorBias, dt)*pdist/dt, -maxBias, maxBias); - - // If the bias is 0, the joint is not at a limit. Reset the impulse. - if(!joint->bias) joint->jAcc = 0.0f; -} - -static void -applyCachedImpulse(cpRatchetJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat j = joint->jAcc*dt_coef; - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static void -applyImpulse(cpRatchetJoint *joint, cpFloat dt) -{ - if(!joint->bias) return; // early exit - - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // compute relative rotational velocity - cpFloat wr = b->w - a->w; - cpFloat ratchet = joint->ratchet; - - cpFloat jMax = joint->constraint.maxForce*dt; - - // compute normal impulse - cpFloat j = -(joint->bias + wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp((jOld + j)*ratchet, 0.0f, jMax*cpfabs(ratchet))/ratchet; - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpRatchetJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpRatchetJoint) - -cpRatchetJoint * -cpRatchetJointAlloc(void) -{ - return (cpRatchetJoint *)cpcalloc(1, sizeof(cpRatchetJoint)); -} - -cpRatchetJoint * -cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->angle = 0.0f; - joint->phase = phase; - joint->ratchet = ratchet; - - // STATIC_BODY_CHECK - joint->angle = (b ? b->a : 0.0f) - (a ? a->a : 0.0f); - - return joint; -} - -cpConstraint * -cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet) -{ - return (cpConstraint *)cpRatchetJointInit(cpRatchetJointAlloc(), a, b, phase, ratchet); -} diff --git a/external/chipmunk/src/constraints/cpRotaryLimitJoint.c b/external/chipmunk/src/constraints/cpRotaryLimitJoint.c deleted file mode 100644 index a39c93fcd1..0000000000 --- a/external/chipmunk/src/constraints/cpRotaryLimitJoint.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpRotaryLimitJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat dist = b->a - a->a; - cpFloat pdist = 0.0f; - if(dist > joint->max) { - pdist = joint->max - dist; - } else if(dist < joint->min) { - pdist = joint->min - dist; - } - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-bias_coef(joint->constraint.errorBias, dt)*pdist/dt, -maxBias, maxBias); - - // If the bias is 0, the joint is not at a limit. Reset the impulse. - if(!joint->bias) joint->jAcc = 0.0f; -} - -static void -applyCachedImpulse(cpRotaryLimitJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat j = joint->jAcc*dt_coef; - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static void -applyImpulse(cpRotaryLimitJoint *joint, cpFloat dt) -{ - if(!joint->bias) return; // early exit - - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // compute relative rotational velocity - cpFloat wr = b->w - a->w; - - cpFloat jMax = joint->constraint.maxForce*dt; - - // compute normal impulse - cpFloat j = -(joint->bias + wr)*joint->iSum; - cpFloat jOld = joint->jAcc; - if(joint->bias < 0.0f){ - joint->jAcc = cpfclamp(jOld + j, 0.0f, jMax); - } else { - joint->jAcc = cpfclamp(jOld + j, -jMax, 0.0f); - } - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpRotaryLimitJoint *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpRotaryLimitJoint) - -cpRotaryLimitJoint * -cpRotaryLimitJointAlloc(void) -{ - return (cpRotaryLimitJoint *)cpcalloc(1, sizeof(cpRotaryLimitJoint)); -} - -cpRotaryLimitJoint * -cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->min = min; - joint->max = max; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max) -{ - return (cpConstraint *)cpRotaryLimitJointInit(cpRotaryLimitJointAlloc(), a, b, min, max); -} diff --git a/external/chipmunk/src/constraints/cpSimpleMotor.c b/external/chipmunk/src/constraints/cpSimpleMotor.c deleted file mode 100644 index b7a023bd15..0000000000 --- a/external/chipmunk/src/constraints/cpSimpleMotor.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpSimpleMotor *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // calculate moment of inertia coefficient. - joint->iSum = 1.0f/(a->i_inv + b->i_inv); -} - -static void -applyCachedImpulse(cpSimpleMotor *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpFloat j = joint->jAcc*dt_coef; - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static void -applyImpulse(cpSimpleMotor *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - // compute relative rotational velocity - cpFloat wr = b->w - a->w + joint->rate; - - cpFloat jMax = joint->constraint.maxForce*dt; - - // compute normal impulse - cpFloat j = -wr*joint->iSum; - cpFloat jOld = joint->jAcc; - joint->jAcc = cpfclamp(jOld + j, -jMax, jMax); - j = joint->jAcc - jOld; - - // apply impulse - a->w -= j*a->i_inv; - b->w += j*b->i_inv; -} - -static cpFloat -getImpulse(cpSimpleMotor *joint) -{ - return cpfabs(joint->jAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpSimpleMotor) - -cpSimpleMotor * -cpSimpleMotorAlloc(void) -{ - return (cpSimpleMotor *)cpcalloc(1, sizeof(cpSimpleMotor)); -} - -cpSimpleMotor * -cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->rate = rate; - - joint->jAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate) -{ - return (cpConstraint *)cpSimpleMotorInit(cpSimpleMotorAlloc(), a, b, rate); -} diff --git a/external/chipmunk/src/constraints/cpSlideJoint.c b/external/chipmunk/src/constraints/cpSlideJoint.c deleted file mode 100644 index 87e691d188..0000000000 --- a/external/chipmunk/src/constraints/cpSlideJoint.c +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -static void -preStep(cpSlideJoint *joint, cpFloat dt) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - joint->r1 = cpvrotate(joint->anchr1, a->rot); - joint->r2 = cpvrotate(joint->anchr2, b->rot); - - cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); - cpFloat dist = cpvlength(delta); - cpFloat pdist = 0.0f; - if(dist > joint->max) { - pdist = dist - joint->max; - joint->n = cpvnormalize_safe(delta); - } else if(dist < joint->min) { - pdist = joint->min - dist; - joint->n = cpvneg(cpvnormalize_safe(delta)); - } else { - joint->n = cpvzero; - joint->jnAcc = 0.0f; - } - - // calculate mass normal - joint->nMass = 1.0f/k_scalar(a, b, joint->r1, joint->r2, joint->n); - - // calculate bias velocity - cpFloat maxBias = joint->constraint.maxBias; - joint->bias = cpfclamp(-bias_coef(joint->constraint.errorBias, dt)*pdist/dt, -maxBias, maxBias); -} - -static void -applyCachedImpulse(cpSlideJoint *joint, cpFloat dt_coef) -{ - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpVect j = cpvmult(joint->n, joint->jnAcc*dt_coef); - apply_impulses(a, b, joint->r1, joint->r2, j); -} - -static void -applyImpulse(cpSlideJoint *joint, cpFloat dt) -{ - if(cpveql(joint->n, cpvzero)) return; // early exit - - cpBody *a = joint->constraint.a; - cpBody *b = joint->constraint.b; - - cpVect n = joint->n; - cpVect r1 = joint->r1; - cpVect r2 = joint->r2; - - // compute relative velocity - cpVect vr = relative_velocity(a, b, r1, r2); - cpFloat vrn = cpvdot(vr, n); - - // compute normal impulse - cpFloat jn = (joint->bias - vrn)*joint->nMass; - cpFloat jnOld = joint->jnAcc; - joint->jnAcc = cpfclamp(jnOld + jn, -joint->constraint.maxForce*dt, 0.0f); - jn = joint->jnAcc - jnOld; - - // apply impulse - apply_impulses(a, b, joint->r1, joint->r2, cpvmult(n, jn)); -} - -static cpFloat -getImpulse(cpConstraint *joint) -{ - return cpfabs(((cpSlideJoint *)joint)->jnAcc); -} - -static const cpConstraintClass klass = { - (cpConstraintPreStepImpl)preStep, - (cpConstraintApplyCachedImpulseImpl)applyCachedImpulse, - (cpConstraintApplyImpulseImpl)applyImpulse, - (cpConstraintGetImpulseImpl)getImpulse, -}; -CP_DefineClassGetter(cpSlideJoint) - -cpSlideJoint * -cpSlideJointAlloc(void) -{ - return (cpSlideJoint *)cpcalloc(1, sizeof(cpSlideJoint)); -} - -cpSlideJoint * -cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max) -{ - cpConstraintInit((cpConstraint *)joint, &klass, a, b); - - joint->anchr1 = anchr1; - joint->anchr2 = anchr2; - joint->min = min; - joint->max = max; - - joint->jnAcc = 0.0f; - - return joint; -} - -cpConstraint * -cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max) -{ - return (cpConstraint *)cpSlideJointInit(cpSlideJointAlloc(), a, b, anchr1, anchr2, min, max); -} diff --git a/external/chipmunk/src/cpArbiter.c b/external/chipmunk/src/cpArbiter.c deleted file mode 100644 index 9d170ad9e1..0000000000 --- a/external/chipmunk/src/cpArbiter.c +++ /dev/null @@ -1,353 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "constraints/util.h" - -cpContact* -cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash) -{ - con->p = p; - con->n = n; - con->dist = dist; - - con->jnAcc = 0.0f; - con->jtAcc = 0.0f; - con->jBias = 0.0f; - - con->hash = hash; - - return con; -} - -// TODO: make this generic so I can reuse it for constraints also. -static inline void -unthreadHelper(cpArbiter *arb, cpBody *body) -{ - struct cpArbiterThread *thread = cpArbiterThreadForBody(arb, body); - cpArbiter *prev = thread->prev; - cpArbiter *next = thread->next; - - if(prev){ - cpArbiterThreadForBody(prev, body)->next = next; - } else if(body->arbiterList == arb) { - // IFF prev is NULL and body->arbiterList == arb, is arb at the head of the list. - // This function may be called for an arbiter that was never in a list. - // In that case, we need to protect it from wiping out the body->arbiterList pointer. - body->arbiterList = next; - } - - if(next) cpArbiterThreadForBody(next, body)->prev = prev; - - thread->prev = NULL; - thread->next = NULL; -} - -void -cpArbiterUnthread(cpArbiter *arb) -{ - unthreadHelper(arb, arb->body_a); - unthreadHelper(arb, arb->body_b); -} - -cpBool cpArbiterIsFirstContact(const cpArbiter *arb) -{ - return arb->CP_PRIVATE(state) == cpArbiterStateFirstColl; -} - -int cpArbiterGetCount(const cpArbiter *arb) -{ - // Return 0 contacts if we are in a separate callback. - return (arb->CP_PRIVATE(state) != cpArbiterStateCached ? arb->CP_PRIVATE(numContacts) : 0); -} - -cpVect -cpArbiterGetNormal(const cpArbiter *arb, int i) -{ - cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter"); - - cpVect n = arb->contacts[i].n; - return arb->swappedColl ? cpvneg(n) : n; -} - -cpVect -cpArbiterGetPoint(const cpArbiter *arb, int i) -{ - cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter"); - - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(p); -} - -cpFloat -cpArbiterGetDepth(const cpArbiter *arb, int i) -{ - cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter"); - - return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); -} - -cpContactPointSet -cpArbiterGetContactPointSet(const cpArbiter *arb) -{ - cpContactPointSet set; - set.count = cpArbiterGetCount(arb); - - for(int i=0; iCP_PRIVATE(contacts)[i].CP_PRIVATE(p); - set.points[i].normal = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n); - set.points[i].dist = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist); - } - - return set; -} - -void -cpArbiterSetContactPointSet(cpArbiter *arb, cpContactPointSet *set) -{ - int count = set->count; - cpAssertHard(count == arb->numContacts, "The number of contact points cannot be changed."); - - for(int i=0; icontacts[i].p = set->points[i].point; - arb->contacts[i].n = set->points[i].normal; - arb->contacts[i].dist = set->points[i].dist; - } -} - -cpVect -cpArbiterTotalImpulse(const cpArbiter *arb) -{ - cpContact *contacts = arb->contacts; - cpVect sum = cpvzero; - - for(int i=0, count=cpArbiterGetCount(arb); in, con->jnAcc)); - } - - return (arb->swappedColl ? sum : cpvneg(sum)); -} - -cpVect -cpArbiterTotalImpulseWithFriction(const cpArbiter *arb) -{ - cpContact *contacts = arb->contacts; - cpVect sum = cpvzero; - - for(int i=0, count=cpArbiterGetCount(arb); in, cpv(con->jnAcc, con->jtAcc))); - } - - return (arb->swappedColl ? sum : cpvneg(sum)); -} - -cpFloat -cpArbiterTotalKE(const cpArbiter *arb) -{ - cpFloat eCoef = (1 - arb->e)/(1 + arb->e); - cpFloat sum = 0.0; - - cpContact *contacts = arb->contacts; - for(int i=0, count=cpArbiterGetCount(arb); ijnAcc; - cpFloat jtAcc = con->jtAcc; - - sum += eCoef*jnAcc*jnAcc/con->nMass + jtAcc*jtAcc/con->tMass; - } - - return sum; -} - -void -cpArbiterIgnore(cpArbiter *arb) -{ - arb->state = cpArbiterStateIgnore; -} - -cpVect -cpArbiterGetSurfaceVelocity(cpArbiter *arb) -{ - return cpvmult(arb->surface_vr, arb->swappedColl ? -1.0f : 1.0); -} - -void -cpArbiterSetSurfaceVelocity(cpArbiter *arb, cpVect vr) -{ - arb->surface_vr = cpvmult(vr, arb->swappedColl ? -1.0f : 1.0); -} - - -cpArbiter* -cpArbiterInit(cpArbiter *arb, cpShape *a, cpShape *b) -{ - arb->handler = NULL; - arb->swappedColl = cpFalse; - - arb->e = 0.0f; - arb->u = 0.0f; - arb->surface_vr = cpvzero; - - arb->numContacts = 0; - arb->contacts = NULL; - - arb->a = a; arb->body_a = a->body; - arb->b = b; arb->body_b = b->body; - - arb->thread_a.next = NULL; - arb->thread_b.next = NULL; - arb->thread_a.prev = NULL; - arb->thread_b.prev = NULL; - - arb->stamp = 0; - arb->state = cpArbiterStateFirstColl; - - arb->data = NULL; - - return arb; -} - -void -cpArbiterUpdate(cpArbiter *arb, cpContact *contacts, int numContacts, cpCollisionHandler *handler, cpShape *a, cpShape *b) -{ - // Iterate over the possible pairs to look for hash value matches. - for(int i=0; inumContacts; j++){ - cpContact *old = &arb->contacts[j]; - - // This could trigger false positives, but is fairly unlikely nor serious if it does. - if(con->hash == old->hash){ - // Copy the persistant contact information. - con->jnAcc = old->jnAcc; - con->jtAcc = old->jtAcc; - } - } - } - - arb->contacts = contacts; - arb->numContacts = numContacts; - - arb->handler = handler; - arb->swappedColl = (a->collision_type != handler->a); - - arb->e = a->e * b->e; - arb->u = a->u * b->u; - - // Currently all contacts will have the same normal. - // This may change in the future. - cpVect n = (numContacts ? contacts[0].n : cpvzero); - cpVect surface_vr = cpvsub(a->surface_v, b->surface_v); - arb->surface_vr = cpvsub(surface_vr, cpvmult(n, cpvdot(surface_vr, n))); - - // For collisions between two similar primitive types, the order could have been swapped. - arb->a = a; arb->body_a = a->body; - arb->b = b; arb->body_b = b->body; - - // mark it as new if it's been cached - if(arb->state == cpArbiterStateCached) arb->state = cpArbiterStateFirstColl; -} - -void -cpArbiterPreStep(cpArbiter *arb, cpFloat dt, cpFloat slop, cpFloat bias) -{ - cpBody *a = arb->body_a; - cpBody *b = arb->body_b; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - - // Calculate the offsets. - con->r1 = cpvsub(con->p, a->p); - con->r2 = cpvsub(con->p, b->p); - - // Calculate the mass normal and mass tangent. - con->nMass = 1.0f/k_scalar(a, b, con->r1, con->r2, con->n); - con->tMass = 1.0f/k_scalar(a, b, con->r1, con->r2, cpvperp(con->n)); - - // Calculate the target bias velocity. - con->bias = -bias*cpfmin(0.0f, con->dist + slop)/dt; - con->jBias = 0.0f; - - // Calculate the target bounce velocity. - con->bounce = normal_relative_velocity(a, b, con->r1, con->r2, con->n)*arb->e; - } -} - -void -cpArbiterApplyCachedImpulse(cpArbiter *arb, cpFloat dt_coef) -{ - if(cpArbiterIsFirstContact(arb)) return; - - cpBody *a = arb->body_a; - cpBody *b = arb->body_b; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - cpVect j = cpvrotate(con->n, cpv(con->jnAcc, con->jtAcc)); - apply_impulses(a, b, con->r1, con->r2, cpvmult(j, dt_coef)); - } -} - -// TODO: is it worth splitting velocity/position correction? - -void -cpArbiterApplyImpulse(cpArbiter *arb) -{ - cpBody *a = arb->body_a; - cpBody *b = arb->body_b; - cpVect surface_vr = arb->surface_vr; - cpFloat friction = arb->u; - - for(int i=0; inumContacts; i++){ - cpContact *con = &arb->contacts[i]; - cpFloat nMass = con->nMass; - cpVect n = con->n; - cpVect r1 = con->r1; - cpVect r2 = con->r2; - - cpVect vb1 = cpvadd(a->v_bias, cpvmult(cpvperp(r1), a->w_bias)); - cpVect vb2 = cpvadd(b->v_bias, cpvmult(cpvperp(r2), b->w_bias)); - cpVect vr = cpvadd(relative_velocity(a, b, r1, r2), surface_vr); - - cpFloat vbn = cpvdot(cpvsub(vb2, vb1), n); - cpFloat vrn = cpvdot(vr, n); - cpFloat vrt = cpvdot(vr, cpvperp(n)); - - cpFloat jbn = (con->bias - vbn)*nMass; - cpFloat jbnOld = con->jBias; - con->jBias = cpfmax(jbnOld + jbn, 0.0f); - - cpFloat jn = -(con->bounce + vrn)*nMass; - cpFloat jnOld = con->jnAcc; - con->jnAcc = cpfmax(jnOld + jn, 0.0f); - - cpFloat jtMax = friction*con->jnAcc; - cpFloat jt = -vrt*con->tMass; - cpFloat jtOld = con->jtAcc; - con->jtAcc = cpfclamp(jtOld + jt, -jtMax, jtMax); - - apply_bias_impulses(a, b, r1, r2, cpvmult(n, con->jBias - jbnOld)); - apply_impulses(a, b, r1, r2, cpvrotate(n, cpv(con->jnAcc - jnOld, con->jtAcc - jtOld))); - } -} diff --git a/external/chipmunk/src/cpArray.c b/external/chipmunk/src/cpArray.c deleted file mode 100644 index 4d46b422cd..0000000000 --- a/external/chipmunk/src/cpArray.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 - -#include "chipmunk_private.h" - - -cpArray * -cpArrayNew(int size) -{ - cpArray *arr = (cpArray *)cpcalloc(1, sizeof(cpArray)); - - arr->num = 0; - arr->max = (size ? size : 4); - arr->arr = (void **)cpcalloc(arr->max, sizeof(void*)); - - return arr; -} - -void -cpArrayFree(cpArray *arr) -{ - if(arr){ - cpfree(arr->arr); - arr->arr = NULL; - - cpfree(arr); - } -} - -void -cpArrayPush(cpArray *arr, void *object) -{ - if(arr->num == arr->max){ - arr->max *= 2; - arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void*)); - } - - arr->arr[arr->num] = object; - arr->num++; -} - -void * -cpArrayPop(cpArray *arr) -{ - arr->num--; - - void *value = arr->arr[arr->num]; - arr->arr[arr->num] = NULL; - - return value; -} - -//static void -//cpArrayDeleteIndex(cpArray *arr, int idx) -//{ -// arr->num--; -// -// arr->arr[idx] = arr->arr[arr->num]; -// arr->arr[arr->num] = NULL; -//} - -void -cpArrayDeleteObj(cpArray *arr, void *obj) -{ - for(int i=0; inum; i++){ - if(arr->arr[i] == obj){ - arr->num--; - - arr->arr[i] = arr->arr[arr->num]; - arr->arr[arr->num] = NULL; - - return; - } - } -} - -//void -//cpArrayAppend(cpArray *arr, cpArray *other) -//{ -// void *tail = &arr->arr[arr->num]; -// -// arr->num += other->num; -// if(arr->num >= arr->max){ -// arr->max = arr->num; -// arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void**)); -// } -// -// memcpy(tail, other->arr, other->num*sizeof(void**)); -//} - -void -cpArrayFreeEach(cpArray *arr, void (freeFunc)(void*)) -{ - for(int i=0; inum; i++) freeFunc(arr->arr[i]); -} - -cpBool -cpArrayContains(cpArray *arr, void *ptr) -{ - for(int i=0; inum; i++) - if(arr->arr[i] == ptr) return cpTrue; - - return cpFalse; -} diff --git a/external/chipmunk/src/cpBB.c b/external/chipmunk/src/cpBB.c deleted file mode 100644 index 5a8d20a6a9..0000000000 --- a/external/chipmunk/src/cpBB.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" - -cpVect -cpBBWrapVect(const cpBB bb, const cpVect v) -{ - cpFloat ix = cpfabs(bb.r - bb.l); - cpFloat modx = cpfmod(v.x - bb.l, ix); - cpFloat x = (modx > 0.0f) ? modx : modx + ix; - - cpFloat iy = cpfabs(bb.t - bb.b); - cpFloat mody = cpfmod(v.y - bb.b, iy); - cpFloat y = (mody > 0.0f) ? mody : mody + iy; - - return cpv(x + bb.l, y + bb.b); -} diff --git a/external/chipmunk/src/cpBBTree.c b/external/chipmunk/src/cpBBTree.c deleted file mode 100644 index 6d347e4d60..0000000000 --- a/external/chipmunk/src/cpBBTree.c +++ /dev/null @@ -1,894 +0,0 @@ -/* Copyright (c) 2009 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "stdlib.h" -#include "stdio.h" - -#include "chipmunk_private.h" - -static inline cpSpatialIndexClass *Klass(); - -typedef struct Node Node; -typedef struct Pair Pair; - -struct cpBBTree { - cpSpatialIndex spatialIndex; - cpBBTreeVelocityFunc velocityFunc; - - cpHashSet *leaves; - Node *root; - - Node *pooledNodes; - Pair *pooledPairs; - cpArray *allocatedBuffers; - - cpTimestamp stamp; -}; - -struct Node { - void *obj; - cpBB bb; - Node *parent; - - union { - // Internal nodes - struct { Node *a, *b; } children; - - // Leaves - struct { - cpTimestamp stamp; - Pair *pairs; - } leaf; - } node; -}; - -// Can't use anonymous unions and still get good x-compiler compatability -#define A node.children.a -#define B node.children.b -#define STAMP node.leaf.stamp -#define PAIRS node.leaf.pairs - -typedef struct Thread { - Pair *prev; - Node *leaf; - Pair *next; -} Thread; - -struct Pair { - Thread a, b; - cpCollisionID id; -}; - -//MARK: Misc Functions - -static inline cpBB -GetBB(cpBBTree *tree, void *obj) -{ - cpBB bb = tree->spatialIndex.bbfunc(obj); - - cpBBTreeVelocityFunc velocityFunc = tree->velocityFunc; - if(velocityFunc){ - cpFloat coef = 0.1f; - cpFloat x = (bb.r - bb.l)*coef; - cpFloat y = (bb.t - bb.b)*coef; - - cpVect v = cpvmult(velocityFunc(obj), 0.1f); - return cpBBNew(bb.l + cpfmin(-x, v.x), bb.b + cpfmin(-y, v.y), bb.r + cpfmax(x, v.x), bb.t + cpfmax(y, v.y)); - } else { - return bb; - } -} - -static inline cpBBTree * -GetTree(cpSpatialIndex *index) -{ - return (index && index->klass == Klass() ? (cpBBTree *)index : NULL); -} - -static inline Node * -GetRootIfTree(cpSpatialIndex *index){ - return (index && index->klass == Klass() ? ((cpBBTree *)index)->root : NULL); -} - -static inline cpBBTree * -GetMasterTree(cpBBTree *tree) -{ - cpBBTree *dynamicTree = GetTree(tree->spatialIndex.dynamicIndex); - return (dynamicTree ? dynamicTree : tree); -} - -static inline void -IncrementStamp(cpBBTree *tree) -{ - cpBBTree *dynamicTree = GetTree(tree->spatialIndex.dynamicIndex); - if(dynamicTree){ - dynamicTree->stamp++; - } else { - tree->stamp++; - } -} - -//MARK: Pair/Thread Functions - -static void -PairRecycle(cpBBTree *tree, Pair *pair) -{ - // Share the pool of the master tree. - // TODO would be lovely to move the pairs stuff into an external data structure. - tree = GetMasterTree(tree); - - pair->a.next = tree->pooledPairs; - tree->pooledPairs = pair; -} - -static Pair * -PairFromPool(cpBBTree *tree) -{ - // Share the pool of the master tree. - // TODO would be lovely to move the pairs stuff into an external data structure. - tree = GetMasterTree(tree); - - Pair *pair = tree->pooledPairs; - - if(pair){ - tree->pooledPairs = pair->a.next; - return pair; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(Pair); - cpAssertHard(count, "Internal Error: Buffer size is too small."); - - Pair *buffer = (Pair *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(tree->allocatedBuffers, buffer); - - // push all but the first one, return the first instead - for(int i=1; ia.leaf == thread.leaf) next->a.prev = prev; else next->b.prev = prev; - } - - if(prev){ - if(prev->a.leaf == thread.leaf) prev->a.next = next; else prev->b.next = next; - } else { - thread.leaf->PAIRS = next; - } -} - -static void -PairsClear(Node *leaf, cpBBTree *tree) -{ - Pair *pair = leaf->PAIRS; - leaf->PAIRS = NULL; - - while(pair){ - if(pair->a.leaf == leaf){ - Pair *next = pair->a.next; - ThreadUnlink(pair->b); - PairRecycle(tree, pair); - pair = next; - } else { - Pair *next = pair->b.next; - ThreadUnlink(pair->a); - PairRecycle(tree, pair); - pair = next; - } - } -} - -static void -PairInsert(Node *a, Node *b, cpBBTree *tree) -{ - Pair *nextA = a->PAIRS, *nextB = b->PAIRS; - Pair *pair = PairFromPool(tree); - Pair temp = {{NULL, a, nextA},{NULL, b, nextB}, 0}; - - a->PAIRS = b->PAIRS = pair; - *pair = temp; - - if(nextA){ - if(nextA->a.leaf == a) nextA->a.prev = pair; else nextA->b.prev = pair; - } - - if(nextB){ - if(nextB->a.leaf == b) nextB->a.prev = pair; else nextB->b.prev = pair; - } -} - - -//MARK: Node Functions - -static void -NodeRecycle(cpBBTree *tree, Node *node) -{ - node->parent = tree->pooledNodes; - tree->pooledNodes = node; -} - -static Node * -NodeFromPool(cpBBTree *tree) -{ - Node *node = tree->pooledNodes; - - if(node){ - tree->pooledNodes = node->parent; - return node; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(Node); - cpAssertHard(count, "Internal Error: Buffer size is too small."); - - Node *buffer = (Node *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(tree->allocatedBuffers, buffer); - - // push all but the first one, return the first instead - for(int i=1; iA = value; - value->parent = node; -} - -static inline void -NodeSetB(Node *node, Node *value) -{ - node->B = value; - value->parent = node; -} - -static Node * -NodeNew(cpBBTree *tree, Node *a, Node *b) -{ - Node *node = NodeFromPool(tree); - - node->obj = NULL; - node->bb = cpBBMerge(a->bb, b->bb); - node->parent = NULL; - - NodeSetA(node, a); - NodeSetB(node, b); - - return node; -} - -static inline cpBool -NodeIsLeaf(Node *node) -{ - return (node->obj != NULL); -} - -static inline Node * -NodeOther(Node *node, Node *child) -{ - return (node->A == child ? node->B : node->A); -} - -static inline void -NodeReplaceChild(Node *parent, Node *child, Node *value, cpBBTree *tree) -{ - cpAssertSoft(!NodeIsLeaf(parent), "Internal Error: Cannot replace child of a leaf."); - cpAssertSoft(child == parent->A || child == parent->B, "Internal Error: Node is not a child of parent."); - - if(parent->A == child){ - NodeRecycle(tree, parent->A); - NodeSetA(parent, value); - } else { - NodeRecycle(tree, parent->B); - NodeSetB(parent, value); - } - - for(Node *node=parent; node; node = node->parent){ - node->bb = cpBBMerge(node->A->bb, node->B->bb); - } -} - -//MARK: Subtree Functions - -static inline cpFloat -cpBBProximity(cpBB a, cpBB b) -{ - return cpfabs(a.l + a.r - b.l - b.r) + cpfabs(a.b + a.t - b.b - b.t); -} - -static Node * -SubtreeInsert(Node *subtree, Node *leaf, cpBBTree *tree) -{ - if(subtree == NULL){ - return leaf; - } else if(NodeIsLeaf(subtree)){ - return NodeNew(tree, leaf, subtree); - } else { - cpFloat cost_a = cpBBArea(subtree->B->bb) + cpBBMergedArea(subtree->A->bb, leaf->bb); - cpFloat cost_b = cpBBArea(subtree->A->bb) + cpBBMergedArea(subtree->B->bb, leaf->bb); - - if(cost_a == cost_b){ - cost_a = cpBBProximity(subtree->A->bb, leaf->bb); - cost_b = cpBBProximity(subtree->B->bb, leaf->bb); - } - - if(cost_b < cost_a){ - NodeSetB(subtree, SubtreeInsert(subtree->B, leaf, tree)); - } else { - NodeSetA(subtree, SubtreeInsert(subtree->A, leaf, tree)); - } - - subtree->bb = cpBBMerge(subtree->bb, leaf->bb); - return subtree; - } -} - -static void -SubtreeQuery(Node *subtree, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data) -{ - if(cpBBIntersects(subtree->bb, bb)){ - if(NodeIsLeaf(subtree)){ - func(obj, subtree->obj, 0, data); - } else { - SubtreeQuery(subtree->A, obj, bb, func, data); - SubtreeQuery(subtree->B, obj, bb, func, data); - } - } -} - - -static cpFloat -SubtreeSegmentQuery(Node *subtree, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpatialIndexSegmentQueryFunc func, void *data) -{ - if(NodeIsLeaf(subtree)){ - return func(obj, subtree->obj, data); - } else { - cpFloat t_a = cpBBSegmentQuery(subtree->A->bb, a, b); - cpFloat t_b = cpBBSegmentQuery(subtree->B->bb, a, b); - - if(t_a < t_b){ - if(t_a < t_exit) t_exit = cpfmin(t_exit, SubtreeSegmentQuery(subtree->A, obj, a, b, t_exit, func, data)); - if(t_b < t_exit) t_exit = cpfmin(t_exit, SubtreeSegmentQuery(subtree->B, obj, a, b, t_exit, func, data)); - } else { - if(t_b < t_exit) t_exit = cpfmin(t_exit, SubtreeSegmentQuery(subtree->B, obj, a, b, t_exit, func, data)); - if(t_a < t_exit) t_exit = cpfmin(t_exit, SubtreeSegmentQuery(subtree->A, obj, a, b, t_exit, func, data)); - } - - return t_exit; - } -} - -static void -SubtreeRecycle(cpBBTree *tree, Node *node) -{ - if(!NodeIsLeaf(node)){ - SubtreeRecycle(tree, node->A); - SubtreeRecycle(tree, node->B); - NodeRecycle(tree, node); - } -} - -static inline Node * -SubtreeRemove(Node *subtree, Node *leaf, cpBBTree *tree) -{ - if(leaf == subtree){ - return NULL; - } else { - Node *parent = leaf->parent; - if(parent == subtree){ - Node *other = NodeOther(subtree, leaf); - other->parent = subtree->parent; - NodeRecycle(tree, subtree); - return other; - } else { - NodeReplaceChild(parent->parent, parent, NodeOther(parent, leaf), tree); - return subtree; - } - } -} - -//MARK: Marking Functions - -typedef struct MarkContext { - cpBBTree *tree; - Node *staticRoot; - cpSpatialIndexQueryFunc func; - void *data; -} MarkContext; - -static void -MarkLeafQuery(Node *subtree, Node *leaf, cpBool left, MarkContext *context) -{ - if(cpBBIntersects(leaf->bb, subtree->bb)){ - if(NodeIsLeaf(subtree)){ - if(left){ - PairInsert(leaf, subtree, context->tree); - } else { - if(subtree->STAMP < leaf->STAMP) PairInsert(subtree, leaf, context->tree); - context->func(leaf->obj, subtree->obj, 0, context->data); - } - } else { - MarkLeafQuery(subtree->A, leaf, left, context); - MarkLeafQuery(subtree->B, leaf, left, context); - } - } -} - -static void -MarkLeaf(Node *leaf, MarkContext *context) -{ - cpBBTree *tree = context->tree; - if(leaf->STAMP == GetMasterTree(tree)->stamp){ - Node *staticRoot = context->staticRoot; - if(staticRoot) MarkLeafQuery(staticRoot, leaf, cpFalse, context); - - for(Node *node = leaf; node->parent; node = node->parent){ - if(node == node->parent->A){ - MarkLeafQuery(node->parent->B, leaf, cpTrue, context); - } else { - MarkLeafQuery(node->parent->A, leaf, cpFalse, context); - } - } - } else { - Pair *pair = leaf->PAIRS; - while(pair){ - if(leaf == pair->b.leaf){ - pair->id = context->func(pair->a.leaf->obj, leaf->obj, pair->id, context->data); - pair = pair->b.next; - } else { - pair = pair->a.next; - } - } - } -} - -static void -MarkSubtree(Node *subtree, MarkContext *context) -{ - if(NodeIsLeaf(subtree)){ - MarkLeaf(subtree, context); - } else { - MarkSubtree(subtree->A, context); - MarkSubtree(subtree->B, context); // TODO Force TCO here? - } -} - -//MARK: Leaf Functions - -static Node * -LeafNew(cpBBTree *tree, void *obj, cpBB bb) -{ - Node *node = NodeFromPool(tree); - node->obj = obj; - node->bb = GetBB(tree, obj); - - node->parent = NULL; - node->STAMP = 0; - node->PAIRS = NULL; - - return node; -} - -static cpBool -LeafUpdate(Node *leaf, cpBBTree *tree) -{ - Node *root = tree->root; - cpBB bb = tree->spatialIndex.bbfunc(leaf->obj); - - if(!cpBBContainsBB(leaf->bb, bb)){ - leaf->bb = GetBB(tree, leaf->obj); - - root = SubtreeRemove(root, leaf, tree); - tree->root = SubtreeInsert(root, leaf, tree); - - PairsClear(leaf, tree); - leaf->STAMP = GetMasterTree(tree)->stamp; - - return cpTrue; - } else { - return cpFalse; - } -} - -static cpCollisionID VoidQueryFunc(void *obj1, void *obj2, cpCollisionID id, void *data){return id;} - -static void -LeafAddPairs(Node *leaf, cpBBTree *tree) -{ - cpSpatialIndex *dynamicIndex = tree->spatialIndex.dynamicIndex; - if(dynamicIndex){ - Node *dynamicRoot = GetRootIfTree(dynamicIndex); - if(dynamicRoot){ - cpBBTree *dynamicTree = GetTree(dynamicIndex); - MarkContext context = {dynamicTree, NULL, NULL, NULL}; - MarkLeafQuery(dynamicRoot, leaf, cpTrue, &context); - } - } else { - Node *staticRoot = GetRootIfTree(tree->spatialIndex.staticIndex); - MarkContext context = {tree, staticRoot, VoidQueryFunc, NULL}; - MarkLeaf(leaf, &context); - } -} - -//MARK: Memory Management Functions - -cpBBTree * -cpBBTreeAlloc(void) -{ - return (cpBBTree *)cpcalloc(1, sizeof(cpBBTree)); -} - -static int -leafSetEql(void *obj, Node *node) -{ - return (obj == node->obj); -} - -static void * -leafSetTrans(void *obj, cpBBTree *tree) -{ - return LeafNew(tree, obj, tree->spatialIndex.bbfunc(obj)); -} - -cpSpatialIndex * -cpBBTreeInit(cpBBTree *tree, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - cpSpatialIndexInit((cpSpatialIndex *)tree, Klass(), bbfunc, staticIndex); - - tree->velocityFunc = NULL; - - tree->leaves = cpHashSetNew(0, (cpHashSetEqlFunc)leafSetEql); - tree->root = NULL; - - tree->pooledNodes = NULL; - tree->allocatedBuffers = cpArrayNew(0); - - tree->stamp = 0; - - return (cpSpatialIndex *)tree; -} - -void -cpBBTreeSetVelocityFunc(cpSpatialIndex *index, cpBBTreeVelocityFunc func) -{ - if(index->klass != Klass()){ - cpAssertWarn(cpFalse, "Ignoring cpBBTreeSetVelocityFunc() call to non-tree spatial index."); - return; - } - - ((cpBBTree *)index)->velocityFunc = func; -} - -cpSpatialIndex * -cpBBTreeNew(cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - return cpBBTreeInit(cpBBTreeAlloc(), bbfunc, staticIndex); -} - -static void -cpBBTreeDestroy(cpBBTree *tree) -{ - cpHashSetFree(tree->leaves); - - if(tree->allocatedBuffers) cpArrayFreeEach(tree->allocatedBuffers, cpfree); - cpArrayFree(tree->allocatedBuffers); -} - -//MARK: Insert/Remove - -static void -cpBBTreeInsert(cpBBTree *tree, void *obj, cpHashValue hashid) -{ - Node *leaf = (Node *)cpHashSetInsert(tree->leaves, hashid, obj, tree, (cpHashSetTransFunc)leafSetTrans); - - Node *root = tree->root; - tree->root = SubtreeInsert(root, leaf, tree); - - leaf->STAMP = GetMasterTree(tree)->stamp; - LeafAddPairs(leaf, tree); - IncrementStamp(tree); -} - -static void -cpBBTreeRemove(cpBBTree *tree, void *obj, cpHashValue hashid) -{ - Node *leaf = (Node *)cpHashSetRemove(tree->leaves, hashid, obj); - - tree->root = SubtreeRemove(tree->root, leaf, tree); - PairsClear(leaf, tree); - NodeRecycle(tree, leaf); -} - -static cpBool -cpBBTreeContains(cpBBTree *tree, void *obj, cpHashValue hashid) -{ - return (cpHashSetFind(tree->leaves, hashid, obj) != NULL); -} - -//MARK: Reindex - -static void -cpBBTreeReindexQuery(cpBBTree *tree, cpSpatialIndexQueryFunc func, void *data) -{ - if(!tree->root) return; - - // LeafUpdate() may modify tree->root. Don't cache it. - cpHashSetEach(tree->leaves, (cpHashSetIteratorFunc)LeafUpdate, tree); - - cpSpatialIndex *staticIndex = tree->spatialIndex.staticIndex; - Node *staticRoot = (staticIndex && staticIndex->klass == Klass() ? ((cpBBTree *)staticIndex)->root : NULL); - - MarkContext context = {tree, staticRoot, func, data}; - MarkSubtree(tree->root, &context); - if(staticIndex && !staticRoot) cpSpatialIndexCollideStatic((cpSpatialIndex *)tree, staticIndex, func, data); - - IncrementStamp(tree); -} - -static void -cpBBTreeReindex(cpBBTree *tree) -{ - cpBBTreeReindexQuery(tree, VoidQueryFunc, NULL); -} - -static void -cpBBTreeReindexObject(cpBBTree *tree, void *obj, cpHashValue hashid) -{ - Node *leaf = (Node *)cpHashSetFind(tree->leaves, hashid, obj); - if(leaf){ - if(LeafUpdate(leaf, tree)) LeafAddPairs(leaf, tree); - IncrementStamp(tree); - } -} - -//MARK: Query - -static void -cpBBTreeSegmentQuery(cpBBTree *tree, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpatialIndexSegmentQueryFunc func, void *data) -{ - Node *root = tree->root; - if(root) SubtreeSegmentQuery(root, obj, a, b, t_exit, func, data); -} - -static void -cpBBTreeQuery(cpBBTree *tree, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data) -{ - if(tree->root) SubtreeQuery(tree->root, obj, bb, func, data); -} - -//MARK: Misc - -static int -cpBBTreeCount(cpBBTree *tree) -{ - return cpHashSetCount(tree->leaves); -} - -typedef struct eachContext { - cpSpatialIndexIteratorFunc func; - void *data; -} eachContext; - -static void each_helper(Node *node, eachContext *context){context->func(node->obj, context->data);} - -static void -cpBBTreeEach(cpBBTree *tree, cpSpatialIndexIteratorFunc func, void *data) -{ - eachContext context = {func, data}; - cpHashSetEach(tree->leaves, (cpHashSetIteratorFunc)each_helper, &context); -} - -static cpSpatialIndexClass klass = { - (cpSpatialIndexDestroyImpl)cpBBTreeDestroy, - - (cpSpatialIndexCountImpl)cpBBTreeCount, - (cpSpatialIndexEachImpl)cpBBTreeEach, - - (cpSpatialIndexContainsImpl)cpBBTreeContains, - (cpSpatialIndexInsertImpl)cpBBTreeInsert, - (cpSpatialIndexRemoveImpl)cpBBTreeRemove, - - (cpSpatialIndexReindexImpl)cpBBTreeReindex, - (cpSpatialIndexReindexObjectImpl)cpBBTreeReindexObject, - (cpSpatialIndexReindexQueryImpl)cpBBTreeReindexQuery, - - (cpSpatialIndexQueryImpl)cpBBTreeQuery, - (cpSpatialIndexSegmentQueryImpl)cpBBTreeSegmentQuery, -}; - -static inline cpSpatialIndexClass *Klass(){return &klass;} - - -//MARK: Tree Optimization - -static int -cpfcompare(const cpFloat *a, const cpFloat *b){ - return (*a < *b ? -1 : (*b < *a ? 1 : 0)); -} - -static void -fillNodeArray(Node *node, Node ***cursor){ - (**cursor) = node; - (*cursor)++; -} - -static Node * -partitionNodes(cpBBTree *tree, Node **nodes, int count) -{ - if(count == 1){ - return nodes[0]; - } else if(count == 2) { - return NodeNew(tree, nodes[0], nodes[1]); - } - - // Find the AABB for these nodes - cpBB bb = nodes[0]->bb; - for(int i=1; ibb); - - // Split it on it's longest axis - cpBool splitWidth = (bb.r - bb.l > bb.t - bb.b); - - // Sort the bounds and use the median as the splitting point - cpFloat *bounds = (cpFloat *)cpcalloc(count*2, sizeof(cpFloat)); - if(splitWidth){ - for(int i=0; ibb.l; - bounds[2*i + 1] = nodes[i]->bb.r; - } - } else { - for(int i=0; ibb.b; - bounds[2*i + 1] = nodes[i]->bb.t; - } - } - - qsort(bounds, count*2, sizeof(cpFloat), (int (*)(const void *, const void *))cpfcompare); - cpFloat split = (bounds[count - 1] + bounds[count])*0.5f; // use the medain as the split - cpfree(bounds); - - // Generate the child BBs - cpBB a = bb, b = bb; - if(splitWidth) a.r = b.l = split; else a.t = b.b = split; - - // Partition the nodes - int right = count; - for(int left=0; left < right;){ - Node *node = nodes[left]; - if(cpBBMergedArea(node->bb, b) < cpBBMergedArea(node->bb, a)){ -// if(cpBBProximity(node->bb, b) < cpBBProximity(node->bb, a)){ - right--; - nodes[left] = nodes[right]; - nodes[right] = node; - } else { - left++; - } - } - - if(right == count){ - Node *node = NULL; - for(int i=0; iroot; -// Node *node = root; -// int bit = 0; -// unsigned int path = tree->opath; -// -// while(!NodeIsLeaf(node)){ -// node = (path&(1<a : node->b); -// bit = (bit + 1)&(sizeof(unsigned int)*8 - 1); -// } -// -// root = subtreeRemove(root, node, tree); -// tree->root = subtreeInsert(root, node, tree); -// } -//} - -void -cpBBTreeOptimize(cpSpatialIndex *index) -{ - if(index->klass != &klass){ - cpAssertWarn(cpFalse, "Ignoring cpBBTreeOptimize() call to non-tree spatial index."); - return; - } - - cpBBTree *tree = (cpBBTree *)index; - Node *root = tree->root; - if(!root) return; - - int count = cpBBTreeCount(tree); - Node **nodes = (Node **)cpcalloc(count, sizeof(Node *)); - Node **cursor = nodes; - - cpHashSetEach(tree->leaves, (cpHashSetIteratorFunc)fillNodeArray, &cursor); - - SubtreeRecycle(tree, root); - tree->root = partitionNodes(tree, nodes, count); - cpfree(nodes); -} - -//MARK: Debug Draw - -//#define CP_BBTREE_DEBUG_DRAW -#ifdef CP_BBTREE_DEBUG_DRAW -#include "OpenGL/gl.h" -#include "OpenGL/glu.h" -#include - -static void -NodeRender(Node *node, int depth) -{ - if(!NodeIsLeaf(node) && depth <= 10){ - NodeRender(node->a, depth + 1); - NodeRender(node->b, depth + 1); - } - - cpBB bb = node->bb; - -// GLfloat v = depth/2.0f; -// glColor3f(1.0f - v, v, 0.0f); - glLineWidth(cpfmax(5.0f - depth, 1.0f)); - glBegin(GL_LINES); { - glVertex2f(bb.l, bb.b); - glVertex2f(bb.l, bb.t); - - glVertex2f(bb.l, bb.t); - glVertex2f(bb.r, bb.t); - - glVertex2f(bb.r, bb.t); - glVertex2f(bb.r, bb.b); - - glVertex2f(bb.r, bb.b); - glVertex2f(bb.l, bb.b); - }; glEnd(); -} - -void -cpBBTreeRenderDebug(cpSpatialIndex *index){ - if(index->klass != &klass){ - cpAssertWarn(cpFalse, "Ignoring cpBBTreeRenderDebug() call to non-tree spatial index."); - return; - } - - cpBBTree *tree = (cpBBTree *)index; - if(tree->root) NodeRender(tree->root, 0); -} -#endif diff --git a/external/chipmunk/src/cpBody.c b/external/chipmunk/src/cpBody.c deleted file mode 100644 index f4dc8420ff..0000000000 --- a/external/chipmunk/src/cpBody.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 - -#include "chipmunk_private.h" -#include "constraints/util.h" - -// initialized in cpInitChipmunk() -cpBody cpStaticBodySingleton; - -cpBody* -cpBodyAlloc(void) -{ - return (cpBody *)cpcalloc(1, sizeof(cpBody)); -} - -cpBody * -cpBodyInit(cpBody *body, cpFloat m, cpFloat i) -{ - body->space = NULL; - body->shapeList = NULL; - body->arbiterList = NULL; - body->constraintList = NULL; - - body->velocity_func = cpBodyUpdateVelocity; - body->position_func = cpBodyUpdatePosition; - - cpComponentNode node = {NULL, NULL, 0.0f}; - body->node = node; - - body->p = cpvzero; - body->v = cpvzero; - body->f = cpvzero; - - body->w = 0.0f; - body->t = 0.0f; - - body->v_bias = cpvzero; - body->w_bias = 0.0f; - - body->v_limit = (cpFloat)INFINITY; - body->w_limit = (cpFloat)INFINITY; - - body->data = NULL; - - // Setters must be called after full initialization so the sanity checks don't assert on garbage data. - cpBodySetMass(body, m); - cpBodySetMoment(body, i); - cpBodySetAngle(body, 0.0f); - - return body; -} - -cpBody* -cpBodyNew(cpFloat m, cpFloat i) -{ - return cpBodyInit(cpBodyAlloc(), m, i); -} - -cpBody * -cpBodyInitStatic(cpBody *body) -{ - cpBodyInit(body, (cpFloat)INFINITY, (cpFloat)INFINITY); - body->node.idleTime = (cpFloat)INFINITY; - - return body; -} - -cpBody * -cpBodyNewStatic(void) -{ - return cpBodyInitStatic(cpBodyAlloc()); -} - -void cpBodyDestroy(cpBody *body){} - -void -cpBodyFree(cpBody *body) -{ - if(body){ - cpBodyDestroy(body); - cpfree(body); - } -} - -static void cpv_assert_nan(cpVect v, char *message){cpAssertSoft(v.x == v.x && v.y == v.y, message);} -static void cpv_assert_infinite(cpVect v, char *message){cpAssertSoft(cpfabs(v.x) != INFINITY && cpfabs(v.y) != INFINITY, message);} -static void cpv_assert_sane(cpVect v, char *message){cpv_assert_nan(v, message); cpv_assert_infinite(v, message);} - -#ifdef __cplusplus -extern "C" { -#endif - -void -cpBodySanityCheck(cpBody *body) -{ - cpAssertSoft(body->m == body->m && body->m_inv == body->m_inv, "Body's mass is invalid."); - cpAssertSoft(body->i == body->i && body->i_inv == body->i_inv, "Body's moment is invalid."); - - cpv_assert_sane(body->p, "Body's position is invalid."); - cpv_assert_sane(body->v, "Body's velocity is invalid."); - cpv_assert_sane(body->f, "Body's force is invalid."); - - cpAssertSoft(body->a == body->a && cpfabs(body->a) != INFINITY, "Body's angle is invalid."); - cpAssertSoft(body->w == body->w && cpfabs(body->w) != INFINITY, "Body's angular velocity is invalid."); - cpAssertSoft(body->t == body->t && cpfabs(body->t) != INFINITY, "Body's torque is invalid."); - - cpv_assert_sane(body->rot, "Body's rotation vector is invalid."); - - cpAssertSoft(body->v_limit == body->v_limit, "Body's velocity limit is invalid."); - cpAssertSoft(body->w_limit == body->w_limit, "Body's angular velocity limit is invalid."); -} - -#ifdef __cplusplus -} -#endif - -void -cpBodySetMass(cpBody *body, cpFloat mass) -{ - cpAssertHard(mass > 0.0f, "Mass must be positive and non-zero."); - - cpBodyActivate(body); - body->m = mass; - body->m_inv = 1.0f/mass; - cpBodyAssertSane(body); -} - -void -cpBodySetMoment(cpBody *body, cpFloat moment) -{ - cpAssertHard(moment > 0.0f, "Moment of Inertia must be positive and non-zero."); - - cpBodyActivate(body); - body->i = moment; - body->i_inv = 1.0f/moment; - cpBodyAssertSane(body); -} - -void -cpBodyAddShape(cpBody *body, cpShape *shape) -{ - cpShape *next = body->shapeList; - if(next) next->prev = shape; - - shape->next = next; - body->shapeList = shape; -} - -void -cpBodyRemoveShape(cpBody *body, cpShape *shape) -{ - cpShape *prev = shape->prev; - cpShape *next = shape->next; - - if(prev){ - prev->next = next; - } else { - body->shapeList = next; - } - - if(next){ - next->prev = prev; - } - - shape->prev = NULL; - shape->next = NULL; -} - -static cpConstraint * -filterConstraints(cpConstraint *node, cpBody *body, cpConstraint *filter) -{ - if(node == filter){ - return cpConstraintNext(node, body); - } else if(node->a == body){ - node->next_a = filterConstraints(node->next_a, body, filter); - } else { - node->next_b = filterConstraints(node->next_b, body, filter); - } - - return node; -} - -void -cpBodyRemoveConstraint(cpBody *body, cpConstraint *constraint) -{ - body->constraintList = filterConstraints(body->constraintList, body, constraint); -} - -void -cpBodySetPos(cpBody *body, cpVect pos) -{ - cpBodyActivate(body); - body->p = pos; - cpBodyAssertSane(body); -} - -static inline void -setAngle(cpBody *body, cpFloat angle) -{ - body->a = angle;//fmod(a, (cpFloat)M_PI*2.0f); - body->rot = cpvforangle(angle); - cpBodyAssertSane(body); -} - -void -cpBodySetAngle(cpBody *body, cpFloat angle) -{ - cpBodyActivate(body); - setAngle(body, angle); -} - -void -cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt) -{ - body->v = cpvclamp(cpvadd(cpvmult(body->v, damping), cpvmult(cpvadd(gravity, cpvmult(body->f, body->m_inv)), dt)), body->v_limit); - - cpFloat w_limit = body->w_limit; - body->w = cpfclamp(body->w*damping + body->t*body->i_inv*dt, -w_limit, w_limit); - - cpBodySanityCheck(body); -} - -void -cpBodyUpdatePosition(cpBody *body, cpFloat dt) -{ - body->p = cpvadd(body->p, cpvmult(cpvadd(body->v, body->v_bias), dt)); - setAngle(body, body->a + (body->w + body->w_bias)*dt); - - body->v_bias = cpvzero; - body->w_bias = 0.0f; - - cpBodySanityCheck(body); -} - -void -cpBodyResetForces(cpBody *body) -{ - cpBodyActivate(body); - body->f = cpvzero; - body->t = 0.0f; -} - -void -cpBodyApplyForce(cpBody *body, cpVect force, cpVect r) -{ - cpBodyActivate(body); - body->f = cpvadd(body->f, force); - body->t += cpvcross(r, force); -} - -void -cpBodyApplyImpulse(cpBody *body, const cpVect j, const cpVect r) -{ - cpBodyActivate(body); - apply_impulse(body, j, r); -} - -static inline cpVect -cpBodyGetVelAtPoint(cpBody *body, cpVect r) -{ - return cpvadd(body->v, cpvmult(cpvperp(r), body->w)); -} - -cpVect -cpBodyGetVelAtWorldPoint(cpBody *body, cpVect point) -{ - return cpBodyGetVelAtPoint(body, cpvsub(point, body->p)); -} - -cpVect -cpBodyGetVelAtLocalPoint(cpBody *body, cpVect point) -{ - return cpBodyGetVelAtPoint(body, cpvrotate(point, body->rot)); -} - -void -cpBodyEachShape(cpBody *body, cpBodyShapeIteratorFunc func, void *data) -{ - cpShape *shape = body->shapeList; - while(shape){ - cpShape *next = shape->next; - func(body, shape, data); - shape = next; - } -} - -void -cpBodyEachConstraint(cpBody *body, cpBodyConstraintIteratorFunc func, void *data) -{ - cpConstraint *constraint = body->constraintList; - while(constraint){ - cpConstraint *next = cpConstraintNext(constraint, body); - func(body, constraint, data); - constraint = next; - } -} - -void -cpBodyEachArbiter(cpBody *body, cpBodyArbiterIteratorFunc func, void *data) -{ - cpArbiter *arb = body->arbiterList; - while(arb){ - cpArbiter *next = cpArbiterNext(arb, body); - - arb->swappedColl = (body == arb->body_b); - func(body, arb, data); - - arb = next; - } -} diff --git a/external/chipmunk/src/cpCollision.c b/external/chipmunk/src/cpCollision.c deleted file mode 100644 index 3b3e4e1138..0000000000 --- a/external/chipmunk/src/cpCollision.c +++ /dev/null @@ -1,741 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 -#include - -#ifndef WIN32 -#include -#endif - -#include "chipmunk_private.h" - -#if DEBUG && 0 -#include "ChipmunkDemo.h" -#define DRAW_ALL 0 -#define DRAW_GJK (0 || DRAW_ALL) -#define DRAW_EPA (0 || DRAW_ALL) -#define DRAW_CLOSEST (0 || DRAW_ALL) -#define DRAW_CLIP (0 || DRAW_ALL) - -#define PRINT_LOG 0 -#endif - -#define ENABLE_CACHING 1 - -#define MAX_GJK_ITERATIONS 30 -#define MAX_EPA_ITERATIONS 30 -#define WARN_GJK_ITERATIONS 20 -#define WARN_EPA_ITERATIONS 20 - -// Add contact points for circle to circle collisions. -// Used by several collision tests. -// TODO should accept hash parameter -static int -CircleToCircleQuery(const cpVect p1, const cpVect p2, const cpFloat r1, const cpFloat r2, cpHashValue hash, cpContact *con) -{ - cpFloat mindist = r1 + r2; - cpVect delta = cpvsub(p2, p1); - cpFloat distsq = cpvlengthsq(delta); - - if(distsq < mindist*mindist){ - cpFloat dist = cpfsqrt(distsq); - cpVect n = (dist ? cpvmult(delta, 1.0f/dist) : cpv(1.0f, 0.0f)); - cpContactInit(con, cpvlerp(p1, p2, r1/(r1 + r2)), n, dist - mindist, hash); - - return 1; - } else { - return 0; - } -} - -//MARK: Support Points and Edges: - -static inline int -PolySupportPointIndex(const int count, const cpVect *verts, const cpVect n) -{ - cpFloat max = -INFINITY; - int index = 0; - - for(int i=0; i max){ - max = d; - index = i; - } - } - - return index; -} - -struct SupportPoint { - cpVect p; - cpCollisionID id; -}; - -static inline struct SupportPoint -SupportPointNew(cpVect p, cpCollisionID id) -{ - struct SupportPoint point = {p, id}; - return point; -} - -typedef struct SupportPoint (*SupportPointFunc)(const cpShape *shape, const cpVect n); - -static inline struct SupportPoint -CircleSupportPoint(const cpCircleShape *circle, const cpVect n) -{ - return SupportPointNew(circle->tc, 0); -} - -static inline struct SupportPoint -SegmentSupportPoint(const cpSegmentShape *seg, const cpVect n) -{ - if(cpvdot(seg->ta, n) > cpvdot(seg->tb, n)){ - return SupportPointNew(seg->ta, 0); - } else { - return SupportPointNew(seg->tb, 1); - } -} - -static inline struct SupportPoint -PolySupportPoint(const cpPolyShape *poly, const cpVect n) -{ - const cpVect *verts = poly->tVerts; - int i = PolySupportPointIndex(poly->numVerts, verts, n); - return SupportPointNew(verts[i], i); -} - -struct MinkowskiPoint { - cpVect a, b; - cpVect ab; - cpCollisionID id; -}; - -static inline struct MinkowskiPoint -MinkowskiPointNew(const struct SupportPoint a, const struct SupportPoint b) -{ - struct MinkowskiPoint point = {a.p, b.p, cpvsub(b.p, a.p), (a.id & 0xFF)<<8 | (b.id & 0xFF)}; - return point; -} - -struct SupportContext { - const cpShape *shape1, *shape2; - SupportPointFunc func1, func2; -}; - -static inline struct MinkowskiPoint -Support(const struct SupportContext *ctx, const cpVect n) -{ - struct SupportPoint a = ctx->func1(ctx->shape1, cpvneg(n)); - struct SupportPoint b = ctx->func2(ctx->shape2, n); - return MinkowskiPointNew(a, b); -} - -struct EdgePoint { - cpVect p; - cpHashValue hash; -}; - -struct Edge { - struct EdgePoint a, b; - cpFloat r; - cpVect n; -}; - -static inline struct Edge -EdgeNew(cpVect va, cpVect vb, cpHashValue ha, cpHashValue hb, cpFloat r) -{ - struct Edge edge = {{va, ha}, {vb, hb}, r, cpvnormalize(cpvperp(cpvsub(vb, va)))}; - return edge; -} - -static struct Edge -SupportEdgeForPoly(const cpPolyShape *poly, const cpVect n) -{ - int numVerts = poly->numVerts; - int i1 = PolySupportPointIndex(poly->numVerts, poly->tVerts, n); - - // TODO get rid of mod eventually, very expensive on ARM - int i0 = (i1 - 1 + numVerts)%numVerts; - int i2 = (i1 + 1)%numVerts; - - cpVect *verts = poly->tVerts; - if(cpvdot(n, poly->tPlanes[i1].n) > cpvdot(n, poly->tPlanes[i2].n)){ - struct Edge edge = {{verts[i0], CP_HASH_PAIR(poly, i0)}, {verts[i1], CP_HASH_PAIR(poly, i1)}, poly->r, poly->tPlanes[i1].n}; - return edge; - } else { - struct Edge edge = {{verts[i1], CP_HASH_PAIR(poly, i1)}, {verts[i2], CP_HASH_PAIR(poly, i2)}, poly->r, poly->tPlanes[i2].n}; - return edge; - } -} - -static struct Edge -SupportEdgeForSegment(const cpSegmentShape *seg, const cpVect n) -{ - if(cpvdot(seg->tn, n) > 0.0){ - struct Edge edge = {{seg->ta, CP_HASH_PAIR(seg, 0)}, {seg->tb, CP_HASH_PAIR(seg, 1)}, seg->r, seg->tn}; - return edge; - } else { - struct Edge edge = {{seg->tb, CP_HASH_PAIR(seg, 1)}, {seg->ta, CP_HASH_PAIR(seg, 0)}, seg->r, cpvneg(seg->tn)}; - return edge; - } -} - -static inline cpFloat -ClosestT(const cpVect a, const cpVect b) -{ - cpVect delta = cpvsub(b, a); - return -cpfclamp(cpvdot(delta, cpvadd(a, b))/cpvlengthsq(delta), -1.0f, 1.0f); -} - -static inline cpVect -LerpT(const cpVect a, const cpVect b, const cpFloat t) -{ - cpFloat ht = 0.5f*t; - return cpvadd(cpvmult(a, 0.5f - ht), cpvmult(b, 0.5f + ht)); -} - -struct ClosestPoints { - cpVect a, b; - cpVect n; - cpFloat d; - cpCollisionID id; -}; - -static inline struct ClosestPoints -ClosestPointsNew(const struct MinkowskiPoint v0, const struct MinkowskiPoint v1) -{ - cpFloat t = ClosestT(v0.ab, v1.ab); - cpVect p = LerpT(v0.ab, v1.ab, t); - - cpVect pa = LerpT(v0.a, v1.a, t); - cpVect pb = LerpT(v0.b, v1.b, t); - cpCollisionID id = (v0.id & 0xFFFF)<<16 | (v1.id & 0xFFFF); - - cpVect delta = cpvsub(v1.ab, v0.ab); - cpVect n = cpvnormalize(cpvperp(delta)); - cpFloat d = -cpvdot(n, p); - - if(d <= 0.0f || (0.0f < t && t < 1.0f)){ - struct ClosestPoints points = {pa, pb, cpvneg(n), d, id}; - return points; - } else { - cpFloat d2 = cpvlength(p); - cpVect n2 = cpvmult(p, 1.0f/(d2 + CPFLOAT_MIN)); - - struct ClosestPoints points = {pa, pb, n2, d2, id}; - return points; - } -} - -//MARK: EPA Functions - -static inline cpFloat -ClosestDist(const cpVect v0,const cpVect v1) -{ - return cpvlengthsq(LerpT(v0, v1, ClosestT(v0, v1))); -} - -static struct ClosestPoints -EPARecurse(const struct SupportContext *ctx, const int count, const struct MinkowskiPoint *hull, const int iteration) -{ - int mini = 0; - cpFloat minDist = INFINITY; - - // TODO: precalculate this when building the hull and save a step. - for(int j=0, i=count-1; j 0.0f && iteration < MAX_EPA_ITERATIONS){ - int count2 = 1; - struct MinkowskiPoint *hull2 = (struct MinkowskiPoint *)alloca((count + 1)*sizeof(struct MinkowskiPoint)); - hull2[0] = p; - - for(int i=0; i 0.0f){ - hull2[count2] = hull[index]; - count2++; - } - } - - return EPARecurse(ctx, count2, hull2, iteration + 1); - } else { - cpAssertWarn(iteration < WARN_EPA_ITERATIONS, "High EPA iterations: %d", iteration); - return ClosestPointsNew(v0, v1); - } -} - -static struct ClosestPoints -EPA(const struct SupportContext *ctx, const struct MinkowskiPoint v0, const struct MinkowskiPoint v1, const struct MinkowskiPoint v2) -{ - // TODO: allocate a NxM array here and do an in place convex hull reduction in EPARecurse - struct MinkowskiPoint hull[3] = {v0, v1, v2}; - return EPARecurse(ctx, 3, hull, 1); -} - -//MARK: GJK Functions. - -static inline struct ClosestPoints -GJKRecurse(const struct SupportContext *ctx, const struct MinkowskiPoint v0, const struct MinkowskiPoint v1, const int iteration) -{ - if(iteration > MAX_GJK_ITERATIONS){ - cpAssertWarn(iteration < WARN_GJK_ITERATIONS, "High GJK iterations: %d", iteration); - return ClosestPointsNew(v0, v1); - } - - cpVect delta = cpvsub(v1.ab, v0.ab); - if(cpvcross(delta, cpvadd(v0.ab, v1.ab)) > 0.0f){ - // Origin is behind axis. Flip and try again. - return GJKRecurse(ctx, v1, v0, iteration + 1); - } else { - cpFloat t = ClosestT(v0.ab, v1.ab); - cpVect n = (-1.0f < t && t < 1.0f ? cpvperp(delta) : cpvneg(LerpT(v0.ab, v1.ab, t))); - struct MinkowskiPoint p = Support(ctx, n); - -#if DRAW_GJK - ChipmunkDebugDrawSegment(v0.ab, v1.ab, RGBAColor(1, 1, 1, 1)); - cpVect c = cpvlerp(v0.ab, v1.ab, 0.5); - ChipmunkDebugDrawSegment(c, cpvadd(c, cpvmult(cpvnormalize(n), 5.0)), RGBAColor(1, 0, 0, 1)); - - ChipmunkDebugDrawPoints(5.0, 1, &p.ab, RGBAColor(1, 1, 1, 1)); -#endif - - if( - cpvcross(cpvsub(v1.ab, p.ab), cpvadd(v1.ab, p.ab)) > 0.0f && - cpvcross(cpvsub(v0.ab, p.ab), cpvadd(v0.ab, p.ab)) < 0.0f - ){ - cpAssertWarn(iteration < WARN_GJK_ITERATIONS, "High GJK->EPA iterations: %d", iteration); - // The triangle v0, p, v1 contains the origin. Use EPA to find the MSA. - return EPA(ctx, v0, p, v1); - } else { - // The new point must be farther along the normal than the existing points. - if(cpvdot(p.ab, n) <= cpfmax(cpvdot(v0.ab, n), cpvdot(v1.ab, n))){ - cpAssertWarn(iteration < WARN_GJK_ITERATIONS, "High GJK iterations: %d", iteration); - return ClosestPointsNew(v0, v1); - } else { - if(ClosestDist(v0.ab, p.ab) < ClosestDist(p.ab, v1.ab)){ - return GJKRecurse(ctx, v0, p, iteration + 1); - } else { - return GJKRecurse(ctx, p, v1, iteration + 1); - } - } - } - } -} - -static struct SupportPoint -ShapePoint(const cpShape *shape, const int i) -{ - switch(shape->klass->type){ - case CP_CIRCLE_SHAPE: { - return SupportPointNew(((cpCircleShape *)shape)->tc, 0); - } case CP_SEGMENT_SHAPE: { - cpSegmentShape *seg = (cpSegmentShape *)shape; - return SupportPointNew(i == 0 ? seg->ta : seg->tb, i); - } case CP_POLY_SHAPE: { - cpPolyShape *poly = (cpPolyShape *)shape; - // Poly shapes may change vertex count. - int index = (i < poly->numVerts ? i : 0); - return SupportPointNew(poly->tVerts[index], index); - } default: { - return SupportPointNew(cpvzero, 0); - } - } -} - -static struct ClosestPoints -GJK(const struct SupportContext *ctx, cpCollisionID *id) -{ -#if DRAW_GJK || DRAW_EPA - // draw the minkowski difference origin - cpVect origin = cpvzero; - ChipmunkDebugDrawPoints(5.0, 1, &origin, RGBAColor(1,0,0,1)); - - int mdiffCount = ctx->count1*ctx->count2; - cpVect *mdiffVerts = alloca(mdiffCount*sizeof(cpVect)); - - for(int i=0; icount1; i++){ - for(int j=0; jcount2; j++){ - cpVect v1 = ShapePoint(ctx->count1, ctx->verts1, i).p; - cpVect v2 = ShapePoint(ctx->count2, ctx->verts2, j).p; - mdiffVerts[i*ctx->count2 + j] = cpvsub(v2, v1); - } - } - - cpVect *hullVerts = alloca(mdiffCount*sizeof(cpVect)); - int hullCount = cpConvexHull(mdiffCount, mdiffVerts, hullVerts, NULL, 0.0); - - ChipmunkDebugDrawPolygon(hullCount, hullVerts, RGBAColor(1, 0, 0, 1), RGBAColor(1, 0, 0, 0.25)); - ChipmunkDebugDrawPoints(2.0, mdiffCount, mdiffVerts, RGBAColor(1, 0, 0, 1)); -#endif - - struct MinkowskiPoint v0, v1; - if(*id && ENABLE_CACHING){ - v0 = MinkowskiPointNew(ShapePoint(ctx->shape1, (*id>>24)&0xFF), ShapePoint(ctx->shape2, (*id>>16)&0xFF)); - v1 = MinkowskiPointNew(ShapePoint(ctx->shape1, (*id>> 8)&0xFF), ShapePoint(ctx->shape2, (*id )&0xFF)); - } else { - cpVect axis = cpvperp(cpvsub(cpBBCenter(ctx->shape1->bb), cpBBCenter(ctx->shape2->bb))); - v0 = Support(ctx, axis); - v1 = Support(ctx, cpvneg(axis)); - } - - struct ClosestPoints points = GJKRecurse(ctx, v0, v1, 1); - *id = points.id; - return points; -} - -//MARK: Contact Clipping - -static inline void -Contact1(cpFloat dist, cpVect a, cpVect b, cpFloat refr, cpFloat incr, cpVect n, cpHashValue hash, cpContact *arr) -{ - cpFloat rsum = refr + incr; - cpFloat alpha = (rsum > 0.0f ? refr/rsum : 0.5f); - cpVect point = cpvlerp(a, b, alpha); - - cpContactInit(arr, point, n, dist - rsum, hash); -} - -static inline int -Contact2(cpVect refp, cpVect inca, cpVect incb, cpFloat refr, cpFloat incr, cpVect refn, cpVect n, cpHashValue hash, cpContact *arr) -{ - cpFloat cian = cpvcross(inca, refn); - cpFloat cibn = cpvcross(incb, refn); - cpFloat crpn = cpvcross(refp, refn); - cpFloat t = 1.0f - cpfclamp01((cibn - crpn)/(cibn - cian)); - - cpVect point = cpvlerp(inca, incb, t); - cpFloat pd = cpvdot(cpvsub(point, refp), refn); - - if(t > 0.0f && pd <= 0.0f){ - cpFloat rsum = refr + incr; - cpFloat alpha = (rsum > 0.0f ? incr*(1.0f - (rsum + pd)/rsum) : -0.5f*pd); - - cpContactInit(arr, cpvadd(point, cpvmult(refn, alpha)), n, pd, hash); - return 1; - } else { - return 0; - } -} - -static inline int -ClipContacts(const struct Edge ref, const struct Edge inc, const struct ClosestPoints points, const cpFloat nflip, cpContact *arr) -{ - cpVect inc_offs = cpvmult(inc.n, inc.r); - cpVect ref_offs = cpvmult(ref.n, ref.r); - - cpVect inca = cpvadd(inc.a.p, inc_offs); - cpVect incb = cpvadd(inc.b.p, inc_offs); - - cpVect closest_inca = cpClosetPointOnSegment(inc.a.p, ref.a.p, ref.b.p); - cpVect closest_incb = cpClosetPointOnSegment(inc.b.p, ref.a.p, ref.b.p); - - cpVect msa = cpvmult(points.n, nflip*points.d); - cpFloat cost_a = cpvdistsq(cpvsub(inc.a.p, closest_inca), msa); - cpFloat cost_b = cpvdistsq(cpvsub(inc.b.p, closest_incb), msa); - -#if DRAW_CLIP - ChipmunkDebugDrawSegment(ref.a.p, ref.b.p, RGBAColor(1, 0, 0, 1)); - ChipmunkDebugDrawSegment(inc.a.p, inc.b.p, RGBAColor(0, 1, 0, 1)); - ChipmunkDebugDrawSegment(inca, incb, RGBAColor(0, 1, 0, 1)); - - cpVect cref = cpvlerp(ref.a.p, ref.b.p, 0.5); - ChipmunkDebugDrawSegment(cref, cpvadd(cref, cpvmult(ref.n, 5.0)), RGBAColor(1, 0, 0, 1)); - - cpVect cinc = cpvlerp(inc.a.p, inc.b.p, 0.5); - ChipmunkDebugDrawSegment(cinc, cpvadd(cinc, cpvmult(inc.n, 5.0)), RGBAColor(1, 0, 0, 1)); - - ChipmunkDebugDrawPoints(5.0, 2, (cpVect[]){ref.a.p, inc.a.p}, RGBAColor(1, 1, 0, 1)); - ChipmunkDebugDrawPoints(5.0, 2, (cpVect[]){ref.b.p, inc.b.p}, RGBAColor(0, 1, 1, 1)); - - if(cost_a < cost_b){ - ChipmunkDebugDrawSegment(closest_inca, inc.a.p, RGBAColor(1, 0, 1, 1)); - } else { - ChipmunkDebugDrawSegment(closest_incb, inc.b.p, RGBAColor(1, 0, 1, 1)); - } -#endif - - cpHashValue hash_iarb = CP_HASH_PAIR(inc.a.hash, ref.b.hash); - cpHashValue hash_ibra = CP_HASH_PAIR(inc.b.hash, ref.a.hash); - - if(cost_a < cost_b){ - cpVect refp = cpvadd(ref.a.p, ref_offs); - Contact1(points.d, closest_inca, inc.a.p, ref.r, inc.r, points.n, hash_iarb, arr); - return Contact2(refp, inca, incb, ref.r, inc.r, ref.n, points.n, hash_ibra, arr + 1) + 1; - } else { - cpVect refp = cpvadd(ref.b.p, ref_offs); - Contact1(points.d, closest_incb, inc.b.p, ref.r, inc.r, points.n, hash_ibra, arr); - return Contact2(refp, incb, inca, ref.r, inc.r, ref.n, points.n, hash_iarb, arr + 1) + 1; - } -} - -static inline int -ContactPoints(const struct Edge e1, const struct Edge e2, const struct ClosestPoints points, cpContact *arr) -{ - cpFloat mindist = e1.r + e2.r; - if(points.d <= mindist){ - cpFloat pick = cpvdot(e1.n, points.n) + cpvdot(e2.n, points.n); - - if( - (pick != 0.0f && pick > 0.0f) || - // If the edges are both perfectly aligned weird things happen. - // This is *very* common at the start of a simulation. - // Pick the longest edge as the reference to break the tie. - (pick == 0.0f && (cpvdistsq(e1.a.p, e1.b.p) > cpvdistsq(e2.a.p, e2.b.p))) - ){ - return ClipContacts(e1, e2, points, 1.0f, arr); - } else { - return ClipContacts(e2, e1, points, -1.0f, arr); - } - } else { - return 0; - } -} - -//MARK: Collision Functions - -typedef int (*CollisionFunc)(const cpShape *a, const cpShape *b, cpCollisionID *id, cpContact *arr); - -// Collide circle shapes. -static int -CircleToCircle(const cpCircleShape *c1, const cpCircleShape *c2, cpCollisionID *id, cpContact *arr) -{ - return CircleToCircleQuery(c1->tc, c2->tc, c1->r, c2->r, 0, arr); -} - -static int -CircleToSegment(const cpCircleShape *circleShape, const cpSegmentShape *segmentShape, cpCollisionID *id, cpContact *con) -{ - cpVect seg_a = segmentShape->ta; - cpVect seg_b = segmentShape->tb; - cpVect center = circleShape->tc; - - cpVect seg_delta = cpvsub(seg_b, seg_a); - cpFloat closest_t = cpfclamp01(cpvdot(seg_delta, cpvsub(center, seg_a))/cpvlengthsq(seg_delta)); - cpVect closest = cpvadd(seg_a, cpvmult(seg_delta, closest_t)); - - if(CircleToCircleQuery(center, closest, circleShape->r, segmentShape->r, 0, con)){ - cpVect n = con[0].n; - - // Reject endcap collisions if tangents are provided. - if( - (closest_t != 0.0f || cpvdot(n, cpvrotate(segmentShape->a_tangent, segmentShape->shape.body->rot)) >= 0.0) && - (closest_t != 1.0f || cpvdot(n, cpvrotate(segmentShape->b_tangent, segmentShape->shape.body->rot)) >= 0.0) - ){ - return 1; - } - } - - return 0; -} - -static int -SegmentToSegment(const cpSegmentShape *seg1, const cpSegmentShape *seg2, cpCollisionID *id, cpContact *arr) -{ - struct SupportContext context = {(cpShape *)seg1, (cpShape *)seg2, (SupportPointFunc)SegmentSupportPoint, (SupportPointFunc)SegmentSupportPoint}; - struct ClosestPoints points = GJK(&context, id); - -#if DRAW_CLOSEST -#if PRINT_LOG -// ChipmunkDemoPrintString("Distance: %.2f\n", points.d); -#endif - - ChipmunkDebugDrawDot(6.0, points.a, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawDot(6.0, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, cpvadd(points.a, cpvmult(points.n, 10.0)), RGBAColor(1, 0, 0, 1)); -#endif - - cpVect n = points.n; - cpVect rot1 = seg1->shape.body->rot; - cpVect rot2 = seg2->shape.body->rot; - if( - points.d <= (seg1->r + seg2->r) && - ( - (!cpveql(points.a, seg1->ta) || cpvdot(n, cpvrotate(seg1->a_tangent, rot1)) <= 0.0) && - (!cpveql(points.a, seg1->tb) || cpvdot(n, cpvrotate(seg1->b_tangent, rot1)) <= 0.0) && - (!cpveql(points.b, seg2->ta) || cpvdot(n, cpvrotate(seg2->a_tangent, rot2)) >= 0.0) && - (!cpveql(points.b, seg2->tb) || cpvdot(n, cpvrotate(seg2->b_tangent, rot2)) >= 0.0) - ) - ){ - return ContactPoints(SupportEdgeForSegment(seg1, n), SupportEdgeForSegment(seg2, cpvneg(n)), points, arr); - } else { - return 0; - } -} - -static int -PolyToPoly(const cpPolyShape *poly1, const cpPolyShape *poly2, cpCollisionID *id, cpContact *arr) -{ - struct SupportContext context = {(cpShape *)poly1, (cpShape *)poly2, (SupportPointFunc)PolySupportPoint, (SupportPointFunc)PolySupportPoint}; - struct ClosestPoints points = GJK(&context, id); - -#if DRAW_CLOSEST -#if PRINT_LOG -// ChipmunkDemoPrintString("Distance: %.2f\n", points.d); -#endif - - ChipmunkDebugDrawDot(3.0, points.a, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawDot(3.0, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, cpvadd(points.a, cpvmult(points.n, 10.0)), RGBAColor(1, 0, 0, 1)); -#endif - - if(points.d - poly1->r - poly2->r <= 0.0){ - return ContactPoints(SupportEdgeForPoly(poly1, points.n), SupportEdgeForPoly(poly2, cpvneg(points.n)), points, arr); - } else { - return 0; - } -} - -static int -SegmentToPoly(const cpSegmentShape *seg, const cpPolyShape *poly, cpCollisionID *id, cpContact *arr) -{ - struct SupportContext context = {(cpShape *)seg, (cpShape *)poly, (SupportPointFunc)SegmentSupportPoint, (SupportPointFunc)PolySupportPoint}; - struct ClosestPoints points = GJK(&context, id); - -#if DRAW_CLOSEST -#if PRINT_LOG -// ChipmunkDemoPrintString("Distance: %.2f\n", points.d); -#endif - - ChipmunkDebugDrawDot(3.0, points.a, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawDot(3.0, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, cpvadd(points.a, cpvmult(points.n, 10.0)), RGBAColor(1, 0, 0, 1)); -#endif - - // Reject endcap collisions if tangents are provided. - cpVect n = points.n; - cpVect rot = seg->shape.body->rot; - if( - points.d - seg->r - poly->r <= 0.0 && - ( - (!cpveql(points.a, seg->ta) || cpvdot(n, cpvrotate(seg->a_tangent, rot)) <= 0.0) && - (!cpveql(points.a, seg->tb) || cpvdot(n, cpvrotate(seg->b_tangent, rot)) <= 0.0) - ) - ){ - return ContactPoints(SupportEdgeForSegment(seg, n), SupportEdgeForPoly(poly, cpvneg(n)), points, arr); - } else { - return 0; - } -} - -// This one is less gross, but still gross. -// TODO: Comment me! -static int -CircleToPoly(const cpCircleShape *circle, const cpPolyShape *poly, cpCollisionID *id, cpContact *con) -{ - struct SupportContext context = {(cpShape *)circle, (cpShape *)poly, (SupportPointFunc)CircleSupportPoint, (SupportPointFunc)PolySupportPoint}; - struct ClosestPoints points = GJK(&context, id); - -#if DRAW_CLOSEST - ChipmunkDebugDrawDot(3.0, points.a, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawDot(3.0, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, points.b, RGBAColor(1, 1, 1, 1)); - ChipmunkDebugDrawSegment(points.a, cpvadd(points.a, cpvmult(points.n, 10.0)), RGBAColor(1, 0, 0, 1)); -#endif - - cpFloat mindist = circle->r + poly->r; - if(points.d - mindist <= 0.0){ - cpVect p = cpvlerp(points.a, points.b, circle->r/(mindist)); - cpContactInit(con, p, points.n, points.d - mindist, 0); - return 1; - } else { - return 0; - } -} - -static const CollisionFunc builtinCollisionFuncs[9] = { - (CollisionFunc)CircleToCircle, - NULL, - NULL, - (CollisionFunc)CircleToSegment, - NULL, - NULL, - (CollisionFunc)CircleToPoly, - (CollisionFunc)SegmentToPoly, - (CollisionFunc)PolyToPoly, -}; -static const CollisionFunc *colfuncs = builtinCollisionFuncs; - -static const CollisionFunc segmentCollisions[9] = { - (CollisionFunc)CircleToCircle, - NULL, - NULL, - (CollisionFunc)CircleToSegment, - (CollisionFunc)SegmentToSegment, - NULL, - (CollisionFunc)CircleToPoly, - (CollisionFunc)SegmentToPoly, - (CollisionFunc)PolyToPoly, -}; - -void -cpEnableSegmentToSegmentCollisions(void) -{ - colfuncs = segmentCollisions; -} - -int -cpCollideShapes(const cpShape *a, const cpShape *b, cpCollisionID *id, cpContact *arr) -{ - // Their shape types must be in order. - cpAssertSoft(a->klass->type <= b->klass->type, "Internal Error: Collision shapes passed to cpCollideShapes() are not sorted."); - - CollisionFunc cfunc = colfuncs[a->klass->type + b->klass->type*CP_NUM_SHAPES]; - - int numContacts = (cfunc? cfunc(a, b, id, arr) : 0); - cpAssertSoft(numContacts <= CP_MAX_CONTACTS_PER_ARBITER, "Internal error: Too many contact points returned."); - - return numContacts; -} diff --git a/external/chipmunk/src/cpHashSet.c b/external/chipmunk/src/cpHashSet.c deleted file mode 100644 index 0d68a07476..0000000000 --- a/external/chipmunk/src/cpHashSet.c +++ /dev/null @@ -1,253 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "prime.h" - -typedef struct cpHashSetBin { - void *elt; - cpHashValue hash; - struct cpHashSetBin *next; -} cpHashSetBin; - -struct cpHashSet { - unsigned int entries, size; - - cpHashSetEqlFunc eql; - void *default_value; - - cpHashSetBin **table; - cpHashSetBin *pooledBins; - - cpArray *allocatedBuffers; -}; - -void -cpHashSetFree(cpHashSet *set) -{ - if(set){ - cpfree(set->table); - - cpArrayFreeEach(set->allocatedBuffers, cpfree); - cpArrayFree(set->allocatedBuffers); - - cpfree(set); - } -} - -cpHashSet * -cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc) -{ - cpHashSet *set = (cpHashSet *)cpcalloc(1, sizeof(cpHashSet)); - - set->size = next_prime(size); - set->entries = 0; - - set->eql = eqlFunc; - set->default_value = NULL; - - set->table = (cpHashSetBin **)cpcalloc(set->size, sizeof(cpHashSetBin *)); - set->pooledBins = NULL; - - set->allocatedBuffers = cpArrayNew(0); - - return set; -} - -void -cpHashSetSetDefaultValue(cpHashSet *set, void *default_value) -{ - set->default_value = default_value; -} - -static int -setIsFull(cpHashSet *set) -{ - return (set->entries >= set->size); -} - -static void -cpHashSetResize(cpHashSet *set) -{ - // Get the next approximate doubled prime. - unsigned int newSize = next_prime(set->size + 1); - // Allocate a new table. - cpHashSetBin **newTable = (cpHashSetBin **)cpcalloc(newSize, sizeof(cpHashSetBin *)); - - // Iterate over the chains. - for(unsigned int i=0; isize; i++){ - // Rehash the bins into the new table. - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - - cpHashValue idx = bin->hash%newSize; - bin->next = newTable[idx]; - newTable[idx] = bin; - - bin = next; - } - } - - cpfree(set->table); - - set->table = newTable; - set->size = newSize; -} - -static inline void -recycleBin(cpHashSet *set, cpHashSetBin *bin) -{ - bin->next = set->pooledBins; - set->pooledBins = bin; - bin->elt = NULL; -} - -static cpHashSetBin * -getUnusedBin(cpHashSet *set) -{ - cpHashSetBin *bin = set->pooledBins; - - if(bin){ - set->pooledBins = bin->next; - return bin; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpHashSetBin); - cpAssertHard(count, "Internal Error: Buffer size is too small."); - - cpHashSetBin *buffer = (cpHashSetBin *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(set->allocatedBuffers, buffer); - - // push all but the first one, return it instead - for(int i=1; ientries; -} - -void * -cpHashSetInsert(cpHashSet *set, cpHashValue hash, void *ptr, void *data, cpHashSetTransFunc trans) -{ - cpHashValue idx = hash%set->size; - - // Find the bin with the matching element. - cpHashSetBin *bin = set->table[idx]; - while(bin && !set->eql(ptr, bin->elt)) - bin = bin->next; - - // Create it if necessary. - if(!bin){ - bin = getUnusedBin(set); - bin->hash = hash; - bin->elt = (trans ? trans(ptr, data) : data); - - bin->next = set->table[idx]; - set->table[idx] = bin; - - set->entries++; - if(setIsFull(set)) cpHashSetResize(set); - } - - return bin->elt; -} - -void * -cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr) -{ - cpHashValue idx = hash%set->size; - - cpHashSetBin **prev_ptr = &set->table[idx]; - cpHashSetBin *bin = set->table[idx]; - - // Find the bin - while(bin && !set->eql(ptr, bin->elt)){ - prev_ptr = &bin->next; - bin = bin->next; - } - - // Remove it if it exists. - if(bin){ - // Update the previous linked list pointer - (*prev_ptr) = bin->next; - set->entries--; - - void *elt = bin->elt; - recycleBin(set, bin); - - return elt; - } - - return NULL; -} - -void * -cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr) -{ - cpHashValue idx = hash%set->size; - cpHashSetBin *bin = set->table[idx]; - while(bin && !set->eql(ptr, bin->elt)) - bin = bin->next; - - return (bin ? bin->elt : set->default_value); -} - -void -cpHashSetEach(cpHashSet *set, cpHashSetIteratorFunc func, void *data) -{ - for(unsigned int i=0; isize; i++){ - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - func(bin->elt, data); - bin = next; - } - } -} - -void -cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data) -{ - for(unsigned int i=0; isize; i++){ - // The rest works similarly to cpHashSetRemove() above. - cpHashSetBin **prev_ptr = &set->table[i]; - cpHashSetBin *bin = set->table[i]; - while(bin){ - cpHashSetBin *next = bin->next; - - if(func(bin->elt, data)){ - prev_ptr = &bin->next; - } else { - (*prev_ptr) = next; - - set->entries--; - recycleBin(set, bin); - } - - bin = next; - } - } -} diff --git a/external/chipmunk/src/cpPolyShape.c b/external/chipmunk/src/cpPolyShape.c deleted file mode 100644 index 12f2168c9a..0000000000 --- a/external/chipmunk/src/cpPolyShape.c +++ /dev/null @@ -1,329 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "chipmunk_unsafe.h" - -cpPolyShape * -cpPolyShapeAlloc(void) -{ - return (cpPolyShape *)cpcalloc(1, sizeof(cpPolyShape)); -} - -static cpBB -cpPolyShapeTransformVerts(cpPolyShape *poly, cpVect p, cpVect rot) -{ - cpVect *src = poly->verts; - cpVect *dst = poly->tVerts; - - cpFloat l = (cpFloat)INFINITY, r = -(cpFloat)INFINITY; - cpFloat b = (cpFloat)INFINITY, t = -(cpFloat)INFINITY; - - for(int i=0; inumVerts; i++){ - cpVect v = cpvadd(p, cpvrotate(src[i], rot)); - - dst[i] = v; - l = cpfmin(l, v.x); - r = cpfmax(r, v.x); - b = cpfmin(b, v.y); - t = cpfmax(t, v.y); - } - - cpFloat radius = poly->r; - return cpBBNew(l - radius, b - radius, r + radius, t + radius); -} - -static void -cpPolyShapeTransformAxes(cpPolyShape *poly, cpVect p, cpVect rot) -{ - cpSplittingPlane *src = poly->planes; - cpSplittingPlane *dst = poly->tPlanes; - - for(int i=0; inumVerts; i++){ - cpVect n = cpvrotate(src[i].n, rot); - dst[i].n = n; - dst[i].d = cpvdot(p, n) + src[i].d; - } -} - -static cpBB -cpPolyShapeCacheData(cpPolyShape *poly, cpVect p, cpVect rot) -{ - cpPolyShapeTransformAxes(poly, p, rot); - cpBB bb = poly->shape.bb = cpPolyShapeTransformVerts(poly, p, rot); - - return bb; -} - -static void -cpPolyShapeDestroy(cpPolyShape *poly) -{ - cpfree(poly->verts); - cpfree(poly->planes); -} - -static void -cpPolyShapeNearestPointQuery(cpPolyShape *poly, cpVect p, cpNearestPointQueryInfo *info){ - int count = poly->numVerts; - cpSplittingPlane *planes = poly->tPlanes; - cpVect *verts = poly->tVerts; - cpFloat r = poly->r; - - cpVect v0 = verts[count - 1]; - cpFloat minDist = INFINITY; - cpVect closestPoint = cpvzero; - cpVect closestNormal = cpvzero; - cpBool outside = cpFalse; - - for(int i=0; i 0.0f) outside = cpTrue; - - cpVect v1 = verts[i]; - cpVect closest = cpClosetPointOnSegment(p, v0, v1); - - cpFloat dist = cpvdist(p, closest); - if(dist < minDist){ - minDist = dist; - closestPoint = closest; - closestNormal = planes[i].n; - } - - v0 = v1; - } - - cpFloat dist = (outside ? minDist : -minDist); - cpVect g = cpvmult(cpvsub(p, closestPoint), 1.0f/dist); - - info->shape = (cpShape *)poly; - info->p = cpvadd(closestPoint, cpvmult(g, r)); - info->d = dist - r; - - // Use the normal of the closest segment if the distance is small. - info->g = (minDist > MAGIC_EPSILON ? g : closestNormal); -} - -static void -cpPolyShapeSegmentQuery(cpPolyShape *poly, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - cpSplittingPlane *axes = poly->tPlanes; - cpVect *verts = poly->tVerts; - int numVerts = poly->numVerts; - cpFloat r = poly->r; - - for(int i=0; i 0.0f) continue; - - cpFloat bn = cpvdot(b, n); - cpFloat t = d/(bn - an); - if(t < 0.0f || 1.0f < t) continue; - - cpVect point = cpvlerp(a, b, t); - cpFloat dt = -cpvcross(n, point); - cpFloat dtMin = -cpvcross(n, verts[(i - 1 + numVerts)%numVerts]); - cpFloat dtMax = -cpvcross(n, verts[i]); - - if(dtMin <= dt && dt <= dtMax){ - info->shape = (cpShape *)poly; - info->t = t; - info->n = n; - } - } - - // Also check against the beveled vertexes. - if(r > 0.0f){ - for(int i=0; ishape, verts[i], r, a, b, &circle_info); - if(circle_info.t < info->t) (*info) = circle_info; - } - } -} - -static const cpShapeClass polyClass = { - CP_POLY_SHAPE, - (cpShapeCacheDataImpl)cpPolyShapeCacheData, - (cpShapeDestroyImpl)cpPolyShapeDestroy, - (cpShapeNearestPointQueryImpl)cpPolyShapeNearestPointQuery, - (cpShapeSegmentQueryImpl)cpPolyShapeSegmentQuery, -}; - -cpBool -cpPolyValidate(const cpVect *verts, const int numVerts) -{ - for(int i=0; i 0.0f){ - return cpFalse; - } - } - - return cpTrue; -} - -int -cpPolyShapeGetNumVerts(const cpShape *shape) -{ - cpAssertHard(shape->klass == &polyClass, "Shape is not a poly shape."); - return ((cpPolyShape *)shape)->numVerts; -} - -cpVect -cpPolyShapeGetVert(const cpShape *shape, int idx) -{ - cpAssertHard(shape->klass == &polyClass, "Shape is not a poly shape."); - cpAssertHard(0 <= idx && idx < cpPolyShapeGetNumVerts(shape), "Index out of range."); - - return ((cpPolyShape *)shape)->verts[idx]; -} - -cpFloat -cpPolyShapeGetRadius(const cpShape *shape) -{ - cpAssertHard(shape->klass == &polyClass, "Shape is not a poly shape."); - return ((cpPolyShape *)shape)->r; -} - - -static void -setUpVerts(cpPolyShape *poly, int numVerts, const cpVect *verts, cpVect offset) -{ - // Fail if the user attempts to pass a concave poly, or a bad winding. - cpAssertHard(cpPolyValidate(verts, numVerts), "Polygon is concave or has a reversed winding. Consider using cpConvexHull() or CP_CONVEX_HULL()."); - - poly->numVerts = numVerts; - poly->verts = (cpVect *)cpcalloc(2*numVerts, sizeof(cpVect)); - poly->planes = (cpSplittingPlane *)cpcalloc(2*numVerts, sizeof(cpSplittingPlane)); - poly->tVerts = poly->verts + numVerts; - poly->tPlanes = poly->planes + numVerts; - - for(int i=0; iverts[i] = a; - poly->planes[i].n = n; - poly->planes[i].d = cpvdot(n, a); - } - - // TODO: Why did I add this? It duplicates work from above. - for(int i=0; iplanes[i] = cpSplittingPlaneNew(poly->verts[(i - 1 + numVerts)%numVerts], poly->verts[i]); - } -} - -cpPolyShape * -cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, const cpVect *verts, cpVect offset) -{ - return cpPolyShapeInit2(poly, body, numVerts, verts, offset, 0.0f); -} - -cpPolyShape * -cpPolyShapeInit2(cpPolyShape *poly, cpBody *body, int numVerts, const cpVect *verts, cpVect offset, cpFloat radius) -{ - setUpVerts(poly, numVerts, verts, offset); - cpShapeInit((cpShape *)poly, &polyClass, body); - poly->r = radius; - - return poly; -} - - -cpShape * -cpPolyShapeNew(cpBody *body, int numVerts, const cpVect *verts, cpVect offset) -{ - return cpPolyShapeNew2(body, numVerts, verts, offset, 0.0f); -} - -cpShape * -cpPolyShapeNew2(cpBody *body, int numVerts, const cpVect *verts, cpVect offset, cpFloat radius) -{ - return (cpShape *)cpPolyShapeInit2(cpPolyShapeAlloc(), body, numVerts, verts, offset, radius); -} - -cpPolyShape * -cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height) -{ - cpFloat hw = width/2.0f; - cpFloat hh = height/2.0f; - - return cpBoxShapeInit2(poly, body, cpBBNew(-hw, -hh, hw, hh)); -} - -cpPolyShape * -cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box) -{ - return cpBoxShapeInit3(poly, body, box, 0.0f); -} - -cpPolyShape * -cpBoxShapeInit3(cpPolyShape *poly, cpBody *body, cpBB box, cpFloat radius) -{ - cpVect verts[] = { - cpv(box.l, box.b), - cpv(box.l, box.t), - cpv(box.r, box.t), - cpv(box.r, box.b), - }; - - return cpPolyShapeInit2(poly, body, 4, verts, cpvzero, radius); -} - -cpShape * -cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height) -{ - return (cpShape *)cpBoxShapeInit(cpPolyShapeAlloc(), body, width, height); -} - -cpShape * -cpBoxShapeNew2(cpBody *body, cpBB box) -{ - return (cpShape *)cpBoxShapeInit2(cpPolyShapeAlloc(), body, box); -} - -cpShape * -cpBoxShapeNew3(cpBody *body, cpBB box, cpFloat radius) -{ - return (cpShape *)cpBoxShapeInit3(cpPolyShapeAlloc(), body, box, radius); -} - -// Unsafe API (chipmunk_unsafe.h) - -void -cpPolyShapeSetVerts(cpShape *shape, int numVerts, cpVect *verts, cpVect offset) -{ - cpAssertHard(shape->klass == &polyClass, "Shape is not a poly shape."); - cpPolyShapeDestroy((cpPolyShape *)shape); - setUpVerts((cpPolyShape *)shape, numVerts, verts, offset); -} - -void -cpPolyShapeSetRadius(cpShape *shape, cpFloat radius) -{ - cpAssertHard(shape->klass == &polyClass, "Shape is not a poly shape."); - ((cpPolyShape *)shape)->r = radius; -} diff --git a/external/chipmunk/src/cpShape.c b/external/chipmunk/src/cpShape.c deleted file mode 100644 index 56f00b066a..0000000000 --- a/external/chipmunk/src/cpShape.c +++ /dev/null @@ -1,387 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "chipmunk_unsafe.h" - -#define CP_DefineShapeGetter(struct, type, member, name) \ -CP_DeclareShapeGetter(struct, type, name){ \ - cpAssertHard(shape->klass == &struct##Class, "shape is not a "#struct); \ - return ((struct *)shape)->member; \ -} - -static cpHashValue cpShapeIDCounter = 0; - -void -cpResetShapeIdCounter(void) -{ - cpShapeIDCounter = 0; -} - - -cpShape* -cpShapeInit(cpShape *shape, const cpShapeClass *klass, cpBody *body) -{ - shape->klass = klass; - - shape->hashid = cpShapeIDCounter; - cpShapeIDCounter++; - - shape->body = body; - shape->sensor = 0; - - shape->e = 0.0f; - shape->u = 0.0f; - shape->surface_v = cpvzero; - - shape->collision_type = 0; - shape->group = CP_NO_GROUP; - shape->layers = CP_ALL_LAYERS; - - shape->data = NULL; - - shape->space = NULL; - - shape->next = NULL; - shape->prev = NULL; - - return shape; -} - -void -cpShapeDestroy(cpShape *shape) -{ - if(shape->klass && shape->klass->destroy) shape->klass->destroy(shape); -} - -void -cpShapeFree(cpShape *shape) -{ - if(shape){ - cpShapeDestroy(shape); - cpfree(shape); - } -} - -void -cpShapeSetBody(cpShape *shape, cpBody *body) -{ - cpAssertHard(!cpShapeActive(shape), "You cannot change the body on an active shape. You must remove the shape from the space before changing the body."); - shape->body = body; -} - -cpBB -cpShapeCacheBB(cpShape *shape) -{ - cpBody *body = shape->body; - return cpShapeUpdate(shape, body->p, body->rot); -} - -cpBB -cpShapeUpdate(cpShape *shape, cpVect pos, cpVect rot) -{ - return (shape->bb = shape->klass->cacheData(shape, pos, rot)); -} - -cpBool -cpShapePointQuery(cpShape *shape, cpVect p){ - cpNearestPointQueryInfo info = {NULL, cpvzero, INFINITY, cpvzero}; - cpShapeNearestPointQuery(shape, p, &info); - - return (info.d < 0.0f); -} - -cpFloat -cpShapeNearestPointQuery(cpShape *shape, cpVect p, cpNearestPointQueryInfo *info) -{ - cpNearestPointQueryInfo blank = {NULL, cpvzero, INFINITY, cpvzero}; - if(info){ - (*info) = blank; - } else { - info = ␣ - } - - shape->klass->nearestPointQuery(shape, p, info); - return info->d; -} - - -cpBool -cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info){ - cpSegmentQueryInfo blank = {NULL, 1.0f, cpvzero}; - if(info){ - (*info) = blank; - } else { - info = ␣ - } - - cpNearestPointQueryInfo nearest; - shape->klass->nearestPointQuery(shape, a, &nearest); - if(nearest.d <= 0.0){ - info->shape = shape; - info->t = 0.0; - info->n = cpvnormalize(cpvsub(a, nearest.p)); - } else { - shape->klass->segmentQuery(shape, a, b, info); - } - - return (info->shape != NULL); -} - -cpCircleShape * -cpCircleShapeAlloc(void) -{ - return (cpCircleShape *)cpcalloc(1, sizeof(cpCircleShape)); -} - -static cpBB -cpCircleShapeCacheData(cpCircleShape *circle, cpVect p, cpVect rot) -{ - cpVect c = circle->tc = cpvadd(p, cpvrotate(circle->c, rot)); - return cpBBNewForCircle(c, circle->r); -} - -static void -cpCicleShapeNearestPointQuery(cpCircleShape *circle, cpVect p, cpNearestPointQueryInfo *info) -{ - cpVect delta = cpvsub(p, circle->tc); - cpFloat d = cpvlength(delta); - cpFloat r = circle->r; - - info->shape = (cpShape *)circle; - info->p = cpvadd(circle->tc, cpvmult(delta, r/d)); // TODO div/0 - info->d = d - r; - - // Use up for the gradient if the distance is very small. - info->g = (d > MAGIC_EPSILON ? cpvmult(delta, 1.0f/d) : cpv(0.0f, 1.0f)); -} - -static void -cpCircleShapeSegmentQuery(cpCircleShape *circle, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - CircleSegmentQuery((cpShape *)circle, circle->tc, circle->r, a, b, info); -} - -static const cpShapeClass cpCircleShapeClass = { - CP_CIRCLE_SHAPE, - (cpShapeCacheDataImpl)cpCircleShapeCacheData, - NULL, - (cpShapeNearestPointQueryImpl)cpCicleShapeNearestPointQuery, - (cpShapeSegmentQueryImpl)cpCircleShapeSegmentQuery, -}; - -cpCircleShape * -cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset) -{ - circle->c = offset; - circle->r = radius; - - cpShapeInit((cpShape *)circle, &cpCircleShapeClass, body); - - return circle; -} - -cpShape * -cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset) -{ - return (cpShape *)cpCircleShapeInit(cpCircleShapeAlloc(), body, radius, offset); -} - -CP_DefineShapeGetter(cpCircleShape, cpVect, c, Offset) -CP_DefineShapeGetter(cpCircleShape, cpFloat, r, Radius) - -cpSegmentShape * -cpSegmentShapeAlloc(void) -{ - return (cpSegmentShape *)cpcalloc(1, sizeof(cpSegmentShape)); -} - -static cpBB -cpSegmentShapeCacheData(cpSegmentShape *seg, cpVect p, cpVect rot) -{ - seg->ta = cpvadd(p, cpvrotate(seg->a, rot)); - seg->tb = cpvadd(p, cpvrotate(seg->b, rot)); - seg->tn = cpvrotate(seg->n, rot); - - cpFloat l,r,b,t; - - if(seg->ta.x < seg->tb.x){ - l = seg->ta.x; - r = seg->tb.x; - } else { - l = seg->tb.x; - r = seg->ta.x; - } - - if(seg->ta.y < seg->tb.y){ - b = seg->ta.y; - t = seg->tb.y; - } else { - b = seg->tb.y; - t = seg->ta.y; - } - - cpFloat rad = seg->r; - return cpBBNew(l - rad, b - rad, r + rad, t + rad); -} - -static void -cpSegmentShapeNearestPointQuery(cpSegmentShape *seg, cpVect p, cpNearestPointQueryInfo *info) -{ - cpVect closest = cpClosetPointOnSegment(p, seg->ta, seg->tb); - - cpVect delta = cpvsub(p, closest); - cpFloat d = cpvlength(delta); - cpFloat r = seg->r; - cpVect g = cpvmult(delta, 1.0f/d); - - info->shape = (cpShape *)seg; - info->p = (d ? cpvadd(closest, cpvmult(g, r)) : closest); - info->d = d - r; - - // Use the segment's normal if the distance is very small. - info->g = (d > MAGIC_EPSILON ? g : seg->n); -} - -static void -cpSegmentShapeSegmentQuery(cpSegmentShape *seg, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - cpVect n = seg->tn; - cpFloat d = cpvdot(cpvsub(seg->ta, a), n); - cpFloat r = seg->r; - - cpVect flipped_n = (d > 0.0f ? cpvneg(n) : n); - cpVect seg_offset = cpvsub(cpvmult(flipped_n, r), a); - - // Make the endpoints relative to 'a' and move them by the thickness of the segment. - cpVect seg_a = cpvadd(seg->ta, seg_offset); - cpVect seg_b = cpvadd(seg->tb, seg_offset); - cpVect delta = cpvsub(b, a); - - if(cpvcross(delta, seg_a)*cpvcross(delta, seg_b) <= 0.0f){ - cpFloat d_offset = d + (d > 0.0f ? -r : r); - cpFloat ad = -d_offset; - cpFloat bd = cpvdot(delta, n) - d_offset; - - if(ad*bd < 0.0f){ - info->shape = (cpShape *)seg; - info->t = ad/(ad - bd); - info->n = flipped_n; - } - } else if(r != 0.0f){ - cpSegmentQueryInfo info1 = {NULL, 1.0f, cpvzero}; - cpSegmentQueryInfo info2 = {NULL, 1.0f, cpvzero}; - CircleSegmentQuery((cpShape *)seg, seg->ta, seg->r, a, b, &info1); - CircleSegmentQuery((cpShape *)seg, seg->tb, seg->r, a, b, &info2); - - if(info1.t < info2.t){ - (*info) = info1; - } else { - (*info) = info2; - } - } -} - -static const cpShapeClass cpSegmentShapeClass = { - CP_SEGMENT_SHAPE, - (cpShapeCacheDataImpl)cpSegmentShapeCacheData, - NULL, - (cpShapeNearestPointQueryImpl)cpSegmentShapeNearestPointQuery, - (cpShapeSegmentQueryImpl)cpSegmentShapeSegmentQuery, -}; - -cpSegmentShape * -cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat r) -{ - seg->a = a; - seg->b = b; - seg->n = cpvperp(cpvnormalize(cpvsub(b, a))); - - seg->r = r; - - seg->a_tangent = cpvzero; - seg->b_tangent = cpvzero; - - cpShapeInit((cpShape *)seg, &cpSegmentShapeClass, body); - - return seg; -} - -cpShape* -cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat r) -{ - return (cpShape *)cpSegmentShapeInit(cpSegmentShapeAlloc(), body, a, b, r); -} - -CP_DefineShapeGetter(cpSegmentShape, cpVect, a, A) -CP_DefineShapeGetter(cpSegmentShape, cpVect, b, B) -CP_DefineShapeGetter(cpSegmentShape, cpVect, n, Normal) -CP_DefineShapeGetter(cpSegmentShape, cpFloat, r, Radius) - -void -cpSegmentShapeSetNeighbors(cpShape *shape, cpVect prev, cpVect next) -{ - cpAssertHard(shape->klass == &cpSegmentShapeClass, "Shape is not a segment shape."); - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->a_tangent = cpvsub(prev, seg->a); - seg->b_tangent = cpvsub(next, seg->b); -} - -// Unsafe API (chipmunk_unsafe.h) - -void -cpCircleShapeSetRadius(cpShape *shape, cpFloat radius) -{ - cpAssertHard(shape->klass == &cpCircleShapeClass, "Shape is not a circle shape."); - cpCircleShape *circle = (cpCircleShape *)shape; - - circle->r = radius; -} - -void -cpCircleShapeSetOffset(cpShape *shape, cpVect offset) -{ - cpAssertHard(shape->klass == &cpCircleShapeClass, "Shape is not a circle shape."); - cpCircleShape *circle = (cpCircleShape *)shape; - - circle->c = offset; -} - -void -cpSegmentShapeSetEndpoints(cpShape *shape, cpVect a, cpVect b) -{ - cpAssertHard(shape->klass == &cpSegmentShapeClass, "Shape is not a segment shape."); - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->a = a; - seg->b = b; - seg->n = cpvperp(cpvnormalize(cpvsub(b, a))); -} - -void -cpSegmentShapeSetRadius(cpShape *shape, cpFloat radius) -{ - cpAssertHard(shape->klass == &cpSegmentShapeClass, "Shape is not a segment shape."); - cpSegmentShape *seg = (cpSegmentShape *)shape; - - seg->r = radius; -} diff --git a/external/chipmunk/src/cpSpace.c b/external/chipmunk/src/cpSpace.c deleted file mode 100644 index 111d0d2444..0000000000 --- a/external/chipmunk/src/cpSpace.c +++ /dev/null @@ -1,599 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 -#include - -#include "chipmunk_private.h" - -//MARK: Contact Set Helpers - -// Equal function for arbiterSet. -static cpBool -arbiterSetEql(cpShape **shapes, cpArbiter *arb) -{ - cpShape *a = shapes[0]; - cpShape *b = shapes[1]; - - return ((a == arb->a && b == arb->b) || (b == arb->a && a == arb->b)); -} - -//MARK: Collision Handler Set HelperFunctions - -// Equals function for collisionHandlers. -static cpBool -handlerSetEql(cpCollisionHandler *check, cpCollisionHandler *pair) -{ - return ((check->a == pair->a && check->b == pair->b) || (check->b == pair->a && check->a == pair->b)); -} - -// Transformation function for collisionHandlers. -static void * -handlerSetTrans(cpCollisionHandler *handler, void *unused) -{ - cpCollisionHandler *copy = (cpCollisionHandler *)cpcalloc(1, sizeof(cpCollisionHandler)); - (*copy) = (*handler); - - return copy; -} - -//MARK: Misc Helper Funcs - -// Default collision functions. -static cpBool alwaysCollide(cpArbiter *arb, cpSpace *space, void *data){return 1;} -static void nothing(cpArbiter *arb, cpSpace *space, void *data){} - -// function to get the estimated velocity of a shape for the cpBBTree. -static cpVect shapeVelocityFunc(cpShape *shape){return shape->body->v;} - -static void freeWrap(void *ptr, void *unused){cpfree(ptr);} - -//MARK: Memory Management Functions - -cpSpace * -cpSpaceAlloc(void) -{ - return (cpSpace *)cpcalloc(1, sizeof(cpSpace)); -} - -cpCollisionHandler cpDefaultCollisionHandler = {0, 0, alwaysCollide, alwaysCollide, nothing, nothing, NULL}; - -cpSpace* -cpSpaceInit(cpSpace *space) -{ -#ifndef NDEBUG - static cpBool done = cpFalse; - if(!done){ - printf("Initializing cpSpace - Chipmunk v%s (Debug Enabled)\n", cpVersionString); - printf("Compile with -DNDEBUG defined to disable debug mode and runtime assertion checks\n"); - done = cpTrue; - } -#endif - - space->iterations = 10; - - space->gravity = cpvzero; - space->damping = 1.0f; - - space->collisionSlop = 0.1f; - space->collisionBias = cpfpow(1.0f - 0.1f, 60.0f); - space->collisionPersistence = 3; - - space->locked = 0; - space->stamp = 0; - - space->staticShapes = cpBBTreeNew((cpSpatialIndexBBFunc)cpShapeGetBB, NULL); - space->activeShapes = cpBBTreeNew((cpSpatialIndexBBFunc)cpShapeGetBB, space->staticShapes); - cpBBTreeSetVelocityFunc(space->activeShapes, (cpBBTreeVelocityFunc)shapeVelocityFunc); - - space->allocatedBuffers = cpArrayNew(0); - - space->bodies = cpArrayNew(0); - space->sleepingComponents = cpArrayNew(0); - space->rousedBodies = cpArrayNew(0); - - space->sleepTimeThreshold = INFINITY; - space->idleSpeedThreshold = 0.0f; - space->enableContactGraph = cpFalse; - - space->arbiters = cpArrayNew(0); - space->pooledArbiters = cpArrayNew(0); - - space->contactBuffersHead = NULL; - space->cachedArbiters = cpHashSetNew(0, (cpHashSetEqlFunc)arbiterSetEql); - - space->constraints = cpArrayNew(0); - - space->defaultHandler = cpDefaultCollisionHandler; - space->collisionHandlers = cpHashSetNew(0, (cpHashSetEqlFunc)handlerSetEql); - cpHashSetSetDefaultValue(space->collisionHandlers, &cpDefaultCollisionHandler); - - space->postStepCallbacks = cpArrayNew(0); - space->skipPostStep = cpFalse; - - cpBodyInitStatic(&space->_staticBody); - space->staticBody = &space->_staticBody; - - return space; -} - -cpSpace* -cpSpaceNew(void) -{ - return cpSpaceInit(cpSpaceAlloc()); -} - -void -cpSpaceDestroy(cpSpace *space) -{ - cpSpaceEachBody(space, (cpSpaceBodyIteratorFunc)cpBodyActivate, NULL); - - cpSpatialIndexFree(space->staticShapes); - cpSpatialIndexFree(space->activeShapes); - - cpArrayFree(space->bodies); - cpArrayFree(space->sleepingComponents); - cpArrayFree(space->rousedBodies); - - cpArrayFree(space->constraints); - - cpHashSetFree(space->cachedArbiters); - - cpArrayFree(space->arbiters); - cpArrayFree(space->pooledArbiters); - - if(space->allocatedBuffers){ - cpArrayFreeEach(space->allocatedBuffers, cpfree); - cpArrayFree(space->allocatedBuffers); - } - - if(space->postStepCallbacks){ - cpArrayFreeEach(space->postStepCallbacks, cpfree); - cpArrayFree(space->postStepCallbacks); - } - - if(space->collisionHandlers) cpHashSetEach(space->collisionHandlers, freeWrap, NULL); - cpHashSetFree(space->collisionHandlers); -} - -void -cpSpaceFree(cpSpace *space) -{ - if(space){ - cpSpaceDestroy(space); - cpfree(space); - } -} - -#define cpAssertSpaceUnlocked(space) \ - cpAssertHard(!space->locked, \ - "This operation cannot be done safely during a call to cpSpaceStep() or during a query. " \ - "Put these calls into a post-step callback." \ - ); - -//MARK: Collision Handler Function Management - -void -cpSpaceAddCollisionHandler( - cpSpace *space, - cpCollisionType a, cpCollisionType b, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -){ - cpAssertSpaceUnlocked(space); - - // Remove any old function so the new one will get added. - cpSpaceRemoveCollisionHandler(space, a, b); - - cpCollisionHandler handler = { - a, b, - begin ? begin : alwaysCollide, - preSolve ? preSolve : alwaysCollide, - postSolve ? postSolve : nothing, - separate ? separate : nothing, - data - }; - - cpHashSetInsert(space->collisionHandlers, CP_HASH_PAIR(a, b), &handler, NULL, (cpHashSetTransFunc)handlerSetTrans); -} - -void -cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b) -{ - cpAssertSpaceUnlocked(space); - - struct { cpCollisionType a, b; } ids = {a, b}; - cpCollisionHandler *old_handler = (cpCollisionHandler *) cpHashSetRemove(space->collisionHandlers, CP_HASH_PAIR(a, b), &ids); - cpfree(old_handler); -} - -void -cpSpaceSetDefaultCollisionHandler( - cpSpace *space, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -){ - cpAssertSpaceUnlocked(space); - - cpCollisionHandler handler = { - 0, 0, - begin ? begin : alwaysCollide, - preSolve ? preSolve : alwaysCollide, - postSolve ? postSolve : nothing, - separate ? separate : nothing, - data - }; - - space->defaultHandler = handler; - cpHashSetSetDefaultValue(space->collisionHandlers, &space->defaultHandler); -} - -//MARK: Body, Shape, and Joint Management -cpShape * -cpSpaceAddShape(cpSpace *space, cpShape *shape) -{ - cpBody *body = shape->body; - if(cpBodyIsStatic(body)) return cpSpaceAddStaticShape(space, shape); - - cpAssertHard(shape->space != space, "You have already added this shape to this space. You must not add it a second time."); - cpAssertHard(!shape->space, "You have already added this shape to another space. You cannot add it to a second."); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(body); - cpBodyAddShape(body, shape); - - cpShapeUpdate(shape, body->p, body->rot); - cpSpatialIndexInsert(space->activeShapes, shape, shape->hashid); - shape->space = space; - - return shape; -} - -cpShape * -cpSpaceAddStaticShape(cpSpace *space, cpShape *shape) -{ - cpAssertHard(shape->space != space, "You have already added this shape to this space. You must not add it a second time."); - cpAssertHard(!shape->space, "You have already added this shape to another space. You cannot add it to a second."); - cpAssertHard(cpBodyIsRogue(shape->body), "You are adding a static shape to a dynamic body. Did you mean to attach it to a static or rogue body? See the documentation for more information."); - cpAssertSpaceUnlocked(space); - - cpBody *body = shape->body; - cpBodyAddShape(body, shape); - cpShapeUpdate(shape, body->p, body->rot); - cpSpatialIndexInsert(space->staticShapes, shape, shape->hashid); - shape->space = space; - - return shape; -} - -cpBody * -cpSpaceAddBody(cpSpace *space, cpBody *body) -{ - cpAssertHard(!cpBodyIsStatic(body), "Do not add static bodies to a space. Static bodies do not move and should not be simulated."); - cpAssertHard(body->space != space, "You have already added this body to this space. You must not add it a second time."); - cpAssertHard(!body->space, "You have already added this body to another space. You cannot add it to a second."); - cpAssertSpaceUnlocked(space); - - cpArrayPush(space->bodies, body); - body->space = space; - - return body; -} - -cpConstraint * -cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint) -{ - cpAssertHard(constraint->space != space, "You have already added this constraint to this space. You must not add it a second time."); - cpAssertHard(!constraint->space, "You have already added this constraint to another space. You cannot add it to a second."); - cpAssertHard(constraint->a && constraint->b, "Constraint is attached to a NULL body."); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(constraint->a); - cpBodyActivate(constraint->b); - cpArrayPush(space->constraints, constraint); - - // Push onto the heads of the bodies' constraint lists - cpBody *a = constraint->a, *b = constraint->b; - constraint->next_a = a->constraintList; a->constraintList = constraint; - constraint->next_b = b->constraintList; b->constraintList = constraint; - constraint->space = space; - - return constraint; -} - -struct arbiterFilterContext { - cpSpace *space; - cpBody *body; - cpShape *shape; -}; - -static cpBool -cachedArbitersFilter(cpArbiter *arb, struct arbiterFilterContext *context) -{ - cpShape *shape = context->shape; - cpBody *body = context->body; - - - // Match on the filter shape, or if it's NULL the filter body - if( - (body == arb->body_a && (shape == arb->a || shape == NULL)) || - (body == arb->body_b && (shape == arb->b || shape == NULL)) - ){ - // Call separate when removing shapes. - if(shape && arb->state != cpArbiterStateCached) cpArbiterCallSeparate(arb, context->space); - - cpArbiterUnthread(arb); - cpArrayDeleteObj(context->space->arbiters, arb); - cpArrayPush(context->space->pooledArbiters, arb); - - return cpFalse; - } - - return cpTrue; -} - -void -cpSpaceFilterArbiters(cpSpace *space, cpBody *body, cpShape *filter) -{ - cpSpaceLock(space); { - struct arbiterFilterContext context = {space, body, filter}; - cpHashSetFilter(space->cachedArbiters, (cpHashSetFilterFunc)cachedArbitersFilter, &context); - } cpSpaceUnlock(space, cpTrue); -} - -void -cpSpaceRemoveShape(cpSpace *space, cpShape *shape) -{ - cpBody *body = shape->body; - if(cpBodyIsStatic(body)){ - cpSpaceRemoveStaticShape(space, shape); - } else { - cpAssertHard(cpSpaceContainsShape(space, shape), "Cannot remove a shape that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(body); - cpBodyRemoveShape(body, shape); - cpSpaceFilterArbiters(space, body, shape); - cpSpatialIndexRemove(space->activeShapes, shape, shape->hashid); - shape->space = NULL; - } -} - -void -cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape) -{ - cpAssertHard(cpSpaceContainsShape(space, shape), "Cannot remove a static or sleeping shape that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - cpBody *body = shape->body; - if(cpBodyIsStatic(body)) cpBodyActivateStatic(body, shape); - cpBodyRemoveShape(body, shape); - cpSpaceFilterArbiters(space, body, shape); - cpSpatialIndexRemove(space->staticShapes, shape, shape->hashid); - shape->space = NULL; -} - -void -cpSpaceRemoveBody(cpSpace *space, cpBody *body) -{ - cpAssertHard(cpSpaceContainsBody(space, body), "Cannot remove a body that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(body); -// cpSpaceFilterArbiters(space, body, NULL); - cpArrayDeleteObj(space->bodies, body); - body->space = NULL; -} - -void -cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint) -{ - cpAssertHard(cpSpaceContainsConstraint(space, constraint), "Cannot remove a constraint that was not added to the space. (Removed twice maybe?)"); - cpAssertSpaceUnlocked(space); - - cpBodyActivate(constraint->a); - cpBodyActivate(constraint->b); - cpArrayDeleteObj(space->constraints, constraint); - - cpBodyRemoveConstraint(constraint->a, constraint); - cpBodyRemoveConstraint(constraint->b, constraint); - constraint->space = NULL; -} - -cpBool cpSpaceContainsShape(cpSpace *space, cpShape *shape) -{ - return (shape->space == space); -} - -cpBool cpSpaceContainsBody(cpSpace *space, cpBody *body) -{ - return (body->space == space); -} - -cpBool cpSpaceContainsConstraint(cpSpace *space, cpConstraint *constraint) -{ - return (constraint->space == space); -} - -//MARK: Static/rogue body conversion. - -void -cpSpaceConvertBodyToStatic(cpSpace *space, cpBody *body) -{ - cpAssertHard(!cpBodyIsStatic(body), "Body is already static."); - cpAssertHard(cpBodyIsRogue(body), "Remove the body from the space before calling this function."); - cpAssertSpaceUnlocked(space); - - cpBodySetMass(body, INFINITY); - cpBodySetMoment(body, INFINITY); - - cpBodySetVel(body, cpvzero); - cpBodySetAngVel(body, 0.0f); - - body->node.idleTime = INFINITY; - CP_BODY_FOREACH_SHAPE(body, shape){ - cpSpatialIndexRemove(space->activeShapes, shape, shape->hashid); - cpSpatialIndexInsert(space->staticShapes, shape, shape->hashid); - } -} - -void -cpSpaceConvertBodyToDynamic(cpSpace *space, cpBody *body, cpFloat m, cpFloat i) -{ - cpAssertHard(cpBodyIsStatic(body), "Body is already dynamic."); - cpAssertSpaceUnlocked(space); - - cpBodyActivateStatic(body, NULL); - - cpBodySetMass(body, m); - cpBodySetMoment(body, i); - - body->node.idleTime = 0.0f; - CP_BODY_FOREACH_SHAPE(body, shape){ - cpSpatialIndexRemove(space->staticShapes, shape, shape->hashid); - cpSpatialIndexInsert(space->activeShapes, shape, shape->hashid); - } -} - -//MARK: Iteration - -void -cpSpaceEachBody(cpSpace *space, cpSpaceBodyIteratorFunc func, void *data) -{ - cpSpaceLock(space); { - cpArray *bodies = space->bodies; - - for(int i=0; inum; i++){ - func((cpBody *)bodies->arr[i], data); - } - - cpArray *components = space->sleepingComponents; - for(int i=0; inum; i++){ - cpBody *root = (cpBody *)components->arr[i]; - - cpBody *body = root; - while(body){ - cpBody *next = body->node.next; - func(body, data); - body = next; - } - } - } cpSpaceUnlock(space, cpTrue); -} - -typedef struct spaceShapeContext { - cpSpaceShapeIteratorFunc func; - void *data; -} spaceShapeContext; - -static void -spaceEachShapeIterator(cpShape *shape, spaceShapeContext *context) -{ - context->func(shape, context->data); -} - -void -cpSpaceEachShape(cpSpace *space, cpSpaceShapeIteratorFunc func, void *data) -{ - cpSpaceLock(space); { - spaceShapeContext context = {func, data}; - cpSpatialIndexEach(space->activeShapes, (cpSpatialIndexIteratorFunc)spaceEachShapeIterator, &context); - cpSpatialIndexEach(space->staticShapes, (cpSpatialIndexIteratorFunc)spaceEachShapeIterator, &context); - } cpSpaceUnlock(space, cpTrue); -} - -void -cpSpaceEachConstraint(cpSpace *space, cpSpaceConstraintIteratorFunc func, void *data) -{ - cpSpaceLock(space); { - cpArray *constraints = space->constraints; - - for(int i=0; inum; i++){ - func((cpConstraint *)constraints->arr[i], data); - } - } cpSpaceUnlock(space, cpTrue); -} - -//MARK: Spatial Index Management - -static void -updateBBCache(cpShape *shape, void *unused) -{ - cpBody *body = shape->body; - cpShapeUpdate(shape, body->p, body->rot); -} - -void -cpSpaceReindexStatic(cpSpace *space) -{ - cpAssertHard(!space->locked, "You cannot manually reindex objects while the space is locked. Wait until the current query or step is complete."); - - cpSpatialIndexEach(space->staticShapes, (cpSpatialIndexIteratorFunc)&updateBBCache, NULL); - cpSpatialIndexReindex(space->staticShapes); -} - -void -cpSpaceReindexShape(cpSpace *space, cpShape *shape) -{ - cpAssertHard(!space->locked, "You cannot manually reindex objects while the space is locked. Wait until the current query or step is complete."); - - cpBody *body = shape->body; - cpShapeUpdate(shape, body->p, body->rot); - - // attempt to rehash the shape in both hashes - cpSpatialIndexReindexObject(space->activeShapes, shape, shape->hashid); - cpSpatialIndexReindexObject(space->staticShapes, shape, shape->hashid); -} - -void -cpSpaceReindexShapesForBody(cpSpace *space, cpBody *body) -{ - CP_BODY_FOREACH_SHAPE(body, shape) cpSpaceReindexShape(space, shape); -} - - -static void -copyShapes(cpShape *shape, cpSpatialIndex *index) -{ - cpSpatialIndexInsert(index, shape, shape->hashid); -} - -void -cpSpaceUseSpatialHash(cpSpace *space, cpFloat dim, int count) -{ - cpSpatialIndex *staticShapes = cpSpaceHashNew(dim, count, (cpSpatialIndexBBFunc)cpShapeGetBB, NULL); - cpSpatialIndex *activeShapes = cpSpaceHashNew(dim, count, (cpSpatialIndexBBFunc)cpShapeGetBB, staticShapes); - - cpSpatialIndexEach(space->staticShapes, (cpSpatialIndexIteratorFunc)copyShapes, staticShapes); - cpSpatialIndexEach(space->activeShapes, (cpSpatialIndexIteratorFunc)copyShapes, activeShapes); - - cpSpatialIndexFree(space->staticShapes); - cpSpatialIndexFree(space->activeShapes); - - space->staticShapes = staticShapes; - space->activeShapes = activeShapes; -} diff --git a/external/chipmunk/src/cpSpaceComponent.c b/external/chipmunk/src/cpSpaceComponent.c deleted file mode 100644 index fe3ac84ebb..0000000000 --- a/external/chipmunk/src/cpSpaceComponent.c +++ /dev/null @@ -1,357 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 - -#include "chipmunk_private.h" - -//MARK: Sleeping Functions - -void -cpSpaceActivateBody(cpSpace *space, cpBody *body) -{ - cpAssertHard(!cpBodyIsRogue(body), "Internal error: Attempting to activate a rogue body."); - - if(space->locked){ - // cpSpaceActivateBody() is called again once the space is unlocked - if(!cpArrayContains(space->rousedBodies, body)) cpArrayPush(space->rousedBodies, body); - } else { - cpAssertSoft(body->node.root == NULL && body->node.next == NULL, "Internal error: Activating body non-NULL node pointers."); - cpArrayPush(space->bodies, body); - - CP_BODY_FOREACH_SHAPE(body, shape){ - cpSpatialIndexRemove(space->staticShapes, shape, shape->hashid); - cpSpatialIndexInsert(space->activeShapes, shape, shape->hashid); - } - - CP_BODY_FOREACH_ARBITER(body, arb){ - cpBody *bodyA = arb->body_a; - - // Arbiters are shared between two bodies that are always woken up together. - // You only want to restore the arbiter once, so bodyA is arbitrarily chosen to own the arbiter. - // The edge case is when static bodies are involved as the static bodies never actually sleep. - // If the static body is bodyB then all is good. If the static body is bodyA, that can easily be checked. - if(body == bodyA || cpBodyIsStatic(bodyA)){ - int numContacts = arb->numContacts; - cpContact *contacts = arb->contacts; - - // Restore contact values back to the space's contact buffer memory - arb->contacts = cpContactBufferGetArray(space); - memcpy(arb->contacts, contacts, numContacts*sizeof(cpContact)); - cpSpacePushContacts(space, numContacts); - - // Reinsert the arbiter into the arbiter cache - cpShape *a = arb->a, *b = arb->b; - cpShape *shape_pair[] = {a, b}; - cpHashValue arbHashID = CP_HASH_PAIR((cpHashValue)a, (cpHashValue)b); - cpHashSetInsert(space->cachedArbiters, arbHashID, shape_pair, arb, NULL); - - // Update the arbiter's state - arb->stamp = space->stamp; - arb->handler = cpSpaceLookupHandler(space, a->collision_type, b->collision_type); - cpArrayPush(space->arbiters, arb); - - cpfree(contacts); - } - } - - CP_BODY_FOREACH_CONSTRAINT(body, constraint){ - cpBody *bodyA = constraint->a; - if(body == bodyA || cpBodyIsStatic(bodyA)) cpArrayPush(space->constraints, constraint); - } - } -} - -static void -cpSpaceDeactivateBody(cpSpace *space, cpBody *body) -{ - cpAssertHard(!cpBodyIsRogue(body), "Internal error: Attempting to deactivate a rouge body."); - - cpArrayDeleteObj(space->bodies, body); - - CP_BODY_FOREACH_SHAPE(body, shape){ - cpSpatialIndexRemove(space->activeShapes, shape, shape->hashid); - cpSpatialIndexInsert(space->staticShapes, shape, shape->hashid); - } - - CP_BODY_FOREACH_ARBITER(body, arb){ - cpBody *bodyA = arb->body_a; - if(body == bodyA || cpBodyIsStatic(bodyA)){ - cpSpaceUncacheArbiter(space, arb); - - // Save contact values to a new block of memory so they won't time out - size_t bytes = arb->numContacts*sizeof(cpContact); - cpContact *contacts = (cpContact *)cpcalloc(1, bytes); - memcpy(contacts, arb->contacts, bytes); - arb->contacts = contacts; - } - } - - CP_BODY_FOREACH_CONSTRAINT(body, constraint){ - cpBody *bodyA = constraint->a; - if(body == bodyA || cpBodyIsStatic(bodyA)) cpArrayDeleteObj(space->constraints, constraint); - } -} - -static inline cpBody * -ComponentRoot(cpBody *body) -{ - return (body ? body->node.root : NULL); -} - -static inline void -ComponentActivate(cpBody *root) -{ - if(!root || !cpBodyIsSleeping(root)) return; - cpAssertHard(!cpBodyIsRogue(root), "Internal Error: ComponentActivate() called on a rogue body."); - - cpSpace *space = root->space; - cpBody *body = root; - while(body){ - cpBody *next = body->node.next; - - body->node.idleTime = 0.0f; - body->node.root = NULL; - body->node.next = NULL; - cpSpaceActivateBody(space, body); - - body = next; - } - - cpArrayDeleteObj(space->sleepingComponents, root); -} - -void -cpBodyActivate(cpBody *body) -{ - if(!cpBodyIsRogue(body)){ - body->node.idleTime = 0.0f; - ComponentActivate(ComponentRoot(body)); - } - - CP_BODY_FOREACH_ARBITER(body, arb){ - // Reset the idle timer of things the body is touching as well. - // That way things don't get left hanging in the air. - cpBody *other = (arb->body_a == body ? arb->body_b : arb->body_a); - if(!cpBodyIsStatic(other)) other->node.idleTime = 0.0f; - } -} - -void -cpBodyActivateStatic(cpBody *body, cpShape *filter) -{ - cpAssertHard(cpBodyIsStatic(body), "cpBodyActivateStatic() called on a non-static body."); - - CP_BODY_FOREACH_ARBITER(body, arb){ - if(!filter || filter == arb->a || filter == arb->b){ - cpBodyActivate(arb->body_a == body ? arb->body_b : arb->body_a); - } - } - - // TODO should also activate joints? -} - -static inline void -cpBodyPushArbiter(cpBody *body, cpArbiter *arb) -{ - cpAssertSoft(cpArbiterThreadForBody(arb, body)->next == NULL, "Internal Error: Dangling contact graph pointers detected. (A)"); - cpAssertSoft(cpArbiterThreadForBody(arb, body)->prev == NULL, "Internal Error: Dangling contact graph pointers detected. (B)"); - - cpArbiter *next = body->arbiterList; - cpAssertSoft(next == NULL || cpArbiterThreadForBody(next, body)->prev == NULL, "Internal Error: Dangling contact graph pointers detected. (C)"); - cpArbiterThreadForBody(arb, body)->next = next; - - if(next) cpArbiterThreadForBody(next, body)->prev = arb; - body->arbiterList = arb; -} - -static inline void -ComponentAdd(cpBody *root, cpBody *body){ - body->node.root = root; - - if(body != root){ - body->node.next = root->node.next; - root->node.next = body; - } -} - -static inline void -FloodFillComponent(cpBody *root, cpBody *body) -{ - // Rogue bodies cannot be put to sleep and prevent bodies they are touching from sleepining anyway. - // Static bodies (which are a type of rogue body) are effectively sleeping all the time. - if(!cpBodyIsRogue(body)){ - cpBody *other_root = ComponentRoot(body); - if(other_root == NULL){ - ComponentAdd(root, body); - CP_BODY_FOREACH_ARBITER(body, arb) FloodFillComponent(root, (body == arb->body_a ? arb->body_b : arb->body_a)); - CP_BODY_FOREACH_CONSTRAINT(body, constraint) FloodFillComponent(root, (body == constraint->a ? constraint->b : constraint->a)); - } else { - cpAssertSoft(other_root == root, "Internal Error: Inconsistency dectected in the contact graph."); - } - } -} - -static inline cpBool -ComponentActive(cpBody *root, cpFloat threshold) -{ - CP_BODY_FOREACH_COMPONENT(root, body){ - if(body->node.idleTime < threshold) return cpTrue; - } - - return cpFalse; -} - -void -cpSpaceProcessComponents(cpSpace *space, cpFloat dt) -{ - cpBool sleep = (space->sleepTimeThreshold != INFINITY); - cpArray *bodies = space->bodies; - -#ifndef NDEBUG - for(int i=0; inum; i++){ - cpBody *body = (cpBody*)bodies->arr[i]; - - cpAssertSoft(body->node.next == NULL, "Internal Error: Dangling next pointer detected in contact graph."); - cpAssertSoft(body->node.root == NULL, "Internal Error: Dangling root pointer detected in contact graph."); - } -#endif - - // Calculate the kinetic energy of all the bodies. - if(sleep){ - cpFloat dv = space->idleSpeedThreshold; - cpFloat dvsq = (dv ? dv*dv : cpvlengthsq(space->gravity)*dt*dt); - - // update idling and reset component nodes - for(int i=0; inum; i++){ - cpBody *body = (cpBody*)bodies->arr[i]; - - // Need to deal with infinite mass objects - cpFloat keThreshold = (dvsq ? body->m*dvsq : 0.0f); - body->node.idleTime = (cpBodyKineticEnergy(body) > keThreshold ? 0.0f : body->node.idleTime + dt); - } - } - - // Awaken any sleeping bodies found and then push arbiters to the bodies' lists. - cpArray *arbiters = space->arbiters; - for(int i=0, count=arbiters->num; iarr[i]; - cpBody *a = arb->body_a, *b = arb->body_b; - - if(sleep){ - if((cpBodyIsRogue(b) && !cpBodyIsStatic(b)) || cpBodyIsSleeping(a)) cpBodyActivate(a); - if((cpBodyIsRogue(a) && !cpBodyIsStatic(a)) || cpBodyIsSleeping(b)) cpBodyActivate(b); - } - - cpBodyPushArbiter(a, arb); - cpBodyPushArbiter(b, arb); - } - - if(sleep){ - // Bodies should be held active if connected by a joint to a non-static rouge body. - cpArray *constraints = space->constraints; - for(int i=0; inum; i++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[i]; - cpBody *a = constraint->a, *b = constraint->b; - - if(cpBodyIsRogue(b) && !cpBodyIsStatic(b)) cpBodyActivate(a); - if(cpBodyIsRogue(a) && !cpBodyIsStatic(a)) cpBodyActivate(b); - } - - // Generate components and deactivate sleeping ones - for(int i=0; inum;){ - cpBody *body = (cpBody*)bodies->arr[i]; - - if(ComponentRoot(body) == NULL){ - // Body not in a component yet. Perform a DFS to flood fill mark - // the component in the contact graph using this body as the root. - FloodFillComponent(body, body); - - // Check if the component should be put to sleep. - if(!ComponentActive(body, space->sleepTimeThreshold)){ - cpArrayPush(space->sleepingComponents, body); - CP_BODY_FOREACH_COMPONENT(body, other) cpSpaceDeactivateBody(space, other); - - // cpSpaceDeactivateBody() removed the current body from the list. - // Skip incrementing the index counter. - continue; - } - } - - i++; - - // Only sleeping bodies retain their component node pointers. - body->node.root = NULL; - body->node.next = NULL; - } - } -} - -void -cpBodySleep(cpBody *body) -{ - cpBodySleepWithGroup(body, NULL); -} - -void -cpBodySleepWithGroup(cpBody *body, cpBody *group){ - cpAssertHard(!cpBodyIsRogue(body), "Rogue (and static) bodies cannot be put to sleep."); - - cpSpace *space = body->space; - cpAssertHard(!space->locked, "Bodies cannot be put to sleep during a query or a call to cpSpaceStep(). Put these calls into a post-step callback."); - cpAssertHard(group == NULL || cpBodyIsSleeping(group), "Cannot use a non-sleeping body as a group identifier."); - - if(cpBodyIsSleeping(body)){ - cpAssertHard(ComponentRoot(body) == ComponentRoot(group), "The body is already sleeping and it's group cannot be reassigned."); - return; - } - - CP_BODY_FOREACH_SHAPE(body, shape) cpShapeUpdate(shape, body->p, body->rot); - cpSpaceDeactivateBody(space, body); - - if(group){ - cpBody *root = ComponentRoot(group); - - cpComponentNode node = {root, root->node.next, 0.0f}; - body->node = node; - - root->node.next = body; - } else { - cpComponentNode node = {body, NULL, 0.0f}; - body->node = node; - - cpArrayPush(space->sleepingComponents, body); - } - - cpArrayDeleteObj(space->bodies, body); -} - -static void -activateTouchingHelper(cpShape *shape, cpContactPointSet *points, cpShape *other){ - cpBodyActivate(shape->body); -} - -void -cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape){ - if(space->sleepTimeThreshold != INFINITY){ - cpSpaceShapeQuery(space, shape, (cpSpaceShapeQueryFunc)activateTouchingHelper, shape); - } -} diff --git a/external/chipmunk/src/cpSpaceHash.c b/external/chipmunk/src/cpSpaceHash.c deleted file mode 100644 index 9e20715e69..0000000000 --- a/external/chipmunk/src/cpSpaceHash.c +++ /dev/null @@ -1,634 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" -#include "prime.h" - -typedef struct cpSpaceHashBin cpSpaceHashBin; -typedef struct cpHandle cpHandle; - -struct cpSpaceHash { - cpSpatialIndex spatialIndex; - - int numcells; - cpFloat celldim; - - cpSpaceHashBin **table; - cpHashSet *handleSet; - - cpSpaceHashBin *pooledBins; - cpArray *pooledHandles; - cpArray *allocatedBuffers; - - cpTimestamp stamp; -}; - - -//MARK: Handle Functions - -struct cpHandle { - void *obj; - int retain; - cpTimestamp stamp; -}; - -static cpHandle* -cpHandleInit(cpHandle *hand, void *obj) -{ - hand->obj = obj; - hand->retain = 0; - hand->stamp = 0; - - return hand; -} - -static inline void cpHandleRetain(cpHandle *hand){hand->retain++;} - -static inline void -cpHandleRelease(cpHandle *hand, cpArray *pooledHandles) -{ - hand->retain--; - if(hand->retain == 0) cpArrayPush(pooledHandles, hand); -} - -static int handleSetEql(void *obj, cpHandle *hand){return (obj == hand->obj);} - -static void * -handleSetTrans(void *obj, cpSpaceHash *hash) -{ - if(hash->pooledHandles->num == 0){ - // handle pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpHandle); - cpAssertHard(count, "Internal Error: Buffer size is too small."); - - cpHandle *buffer = (cpHandle *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(hash->allocatedBuffers, buffer); - - for(int i=0; ipooledHandles, buffer + i); - } - - cpHandle *hand = cpHandleInit((cpHandle *)cpArrayPop(hash->pooledHandles), obj); - cpHandleRetain(hand); - - return hand; -} - -//MARK: Bin Functions - -struct cpSpaceHashBin { - cpHandle *handle; - cpSpaceHashBin *next; -}; - -static inline void -recycleBin(cpSpaceHash *hash, cpSpaceHashBin *bin) -{ - bin->next = hash->pooledBins; - hash->pooledBins = bin; -} - -static inline void -clearTableCell(cpSpaceHash *hash, int idx) -{ - cpSpaceHashBin *bin = hash->table[idx]; - while(bin){ - cpSpaceHashBin *next = bin->next; - - cpHandleRelease(bin->handle, hash->pooledHandles); - recycleBin(hash, bin); - - bin = next; - } - - hash->table[idx] = NULL; -} - -static void -clearTable(cpSpaceHash *hash) -{ - for(int i=0; inumcells; i++) clearTableCell(hash, i); -} - -// Get a recycled or new bin. -static inline cpSpaceHashBin * -getEmptyBin(cpSpaceHash *hash) -{ - cpSpaceHashBin *bin = hash->pooledBins; - - if(bin){ - hash->pooledBins = bin->next; - return bin; - } else { - // Pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpSpaceHashBin); - cpAssertHard(count, "Internal Error: Buffer size is too small."); - - cpSpaceHashBin *buffer = (cpSpaceHashBin *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(hash->allocatedBuffers, buffer); - - // push all but the first one, return the first instead - for(int i=1; itable); - - hash->numcells = numcells; - hash->table = (cpSpaceHashBin **)cpcalloc(numcells, sizeof(cpSpaceHashBin *)); -} - -static inline cpSpatialIndexClass *Klass(); - -cpSpatialIndex * -cpSpaceHashInit(cpSpaceHash *hash, cpFloat celldim, int numcells, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - cpSpatialIndexInit((cpSpatialIndex *)hash, Klass(), bbfunc, staticIndex); - - cpSpaceHashAllocTable(hash, next_prime(numcells)); - hash->celldim = celldim; - - hash->handleSet = cpHashSetNew(0, (cpHashSetEqlFunc)handleSetEql); - - hash->pooledHandles = cpArrayNew(0); - - hash->pooledBins = NULL; - hash->allocatedBuffers = cpArrayNew(0); - - hash->stamp = 1; - - return (cpSpatialIndex *)hash; -} - -cpSpatialIndex * -cpSpaceHashNew(cpFloat celldim, int cells, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - return cpSpaceHashInit(cpSpaceHashAlloc(), celldim, cells, bbfunc, staticIndex); -} - -static void -cpSpaceHashDestroy(cpSpaceHash *hash) -{ - if(hash->table) clearTable(hash); - cpfree(hash->table); - - cpHashSetFree(hash->handleSet); - - cpArrayFreeEach(hash->allocatedBuffers, cpfree); - cpArrayFree(hash->allocatedBuffers); - cpArrayFree(hash->pooledHandles); -} - -//MARK: Helper Functions - -static inline cpBool -containsHandle(cpSpaceHashBin *bin, cpHandle *hand) -{ - while(bin){ - if(bin->handle == hand) return cpTrue; - bin = bin->next; - } - - return cpFalse; -} - -// The hash function itself. -static inline cpHashValue -hash_func(cpHashValue x, cpHashValue y, cpHashValue n) -{ - return (x*1640531513ul ^ y*2654435789ul) % n; -} - -// Much faster than (int)floor(f) -// Profiling showed floor() to be a sizable performance hog -static inline int -floor_int(cpFloat f) -{ - int i = (int)f; - return (f < 0.0f && f != i ? i - 1 : i); -} - -static inline void -hashHandle(cpSpaceHash *hash, cpHandle *hand, cpBB bb) -{ - // Find the dimensions in cell coordinates. - cpFloat dim = hash->celldim; - int l = floor_int(bb.l/dim); // Fix by ShiftZ - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - int n = hash->numcells; - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - cpHashValue idx = hash_func(i,j,n); - cpSpaceHashBin *bin = hash->table[idx]; - - // Don't add an object twice to the same cell. - if(containsHandle(bin, hand)) continue; - - cpHandleRetain(hand); - // Insert a new bin for the handle in this cell. - cpSpaceHashBin *newBin = getEmptyBin(hash); - newBin->handle = hand; - newBin->next = bin; - hash->table[idx] = newBin; - } - } -} - -//MARK: Basic Operations - -static void -cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - cpHandle *hand = (cpHandle *)cpHashSetInsert(hash->handleSet, hashid, obj, hash, (cpHashSetTransFunc)handleSetTrans); - hashHandle(hash, hand, hash->spatialIndex.bbfunc(obj)); -} - -static void -cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - cpHandle *hand = (cpHandle *)cpHashSetRemove(hash->handleSet, hashid, obj); - - if(hand){ - hand->obj = NULL; - cpHandleRelease(hand, hash->pooledHandles); - - cpSpaceHashInsert(hash, obj, hashid); - } -} - -static void -rehash_helper(cpHandle *hand, cpSpaceHash *hash) -{ - hashHandle(hash, hand, hash->spatialIndex.bbfunc(hand->obj)); -} - -static void -cpSpaceHashRehash(cpSpaceHash *hash) -{ - clearTable(hash); - cpHashSetEach(hash->handleSet, (cpHashSetIteratorFunc)rehash_helper, hash); -} - -static void -cpSpaceHashRemove(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - cpHandle *hand = (cpHandle *)cpHashSetRemove(hash->handleSet, hashid, obj); - - if(hand){ - hand->obj = NULL; - cpHandleRelease(hand, hash->pooledHandles); - } -} - -typedef struct eachContext { - cpSpatialIndexIteratorFunc func; - void *data; -} eachContext; - -static void eachHelper(cpHandle *hand, eachContext *context){context->func(hand->obj, context->data);} - -static void -cpSpaceHashEach(cpSpaceHash *hash, cpSpatialIndexIteratorFunc func, void *data) -{ - eachContext context = {func, data}; - cpHashSetEach(hash->handleSet, (cpHashSetIteratorFunc)eachHelper, &context); -} - -static void -remove_orphaned_handles(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr) -{ - cpSpaceHashBin *bin = *bin_ptr; - while(bin){ - cpHandle *hand = bin->handle; - cpSpaceHashBin *next = bin->next; - - if(!hand->obj){ - // orphaned handle, unlink and recycle the bin - (*bin_ptr) = bin->next; - recycleBin(hash, bin); - - cpHandleRelease(hand, hash->pooledHandles); - } else { - bin_ptr = &bin->next; - } - - bin = next; - } -} - -//MARK: Query Functions - -static inline void -query_helper(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr, void *obj, cpSpatialIndexQueryFunc func, void *data) -{ - restart: - for(cpSpaceHashBin *bin = *bin_ptr; bin; bin = bin->next){ - cpHandle *hand = bin->handle; - void *other = hand->obj; - - if(hand->stamp == hash->stamp || obj == other){ - continue; - } else if(other){ - func(obj, other, 0, data); - hand->stamp = hash->stamp; - } else { - // The object for this handle has been removed - // cleanup this cell and restart the query - remove_orphaned_handles(hash, bin_ptr); - goto restart; // GCC not smart enough/able to tail call an inlined function. - } - } -} - -static void -cpSpaceHashQuery(cpSpaceHash *hash, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data) -{ - // Get the dimensions in cell coordinates. - cpFloat dim = hash->celldim; - int l = floor_int(bb.l/dim); // Fix by ShiftZ - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - int n = hash->numcells; - cpSpaceHashBin **table = hash->table; - - // Iterate over the cells and query them. - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - query_helper(hash, &table[hash_func(i,j,n)], obj, func, data); - } - } - - hash->stamp++; -} - -// Similar to struct eachPair above. -typedef struct queryRehashContext { - cpSpaceHash *hash; - cpSpatialIndexQueryFunc func; - void *data; -} queryRehashContext; - -// Hashset iterator func used with cpSpaceHashQueryRehash(). -static void -queryRehash_helper(cpHandle *hand, queryRehashContext *context) -{ - cpSpaceHash *hash = context->hash; - cpSpatialIndexQueryFunc func = context->func; - void *data = context->data; - - cpFloat dim = hash->celldim; - int n = hash->numcells; - - void *obj = hand->obj; - cpBB bb = hash->spatialIndex.bbfunc(obj); - - int l = floor_int(bb.l/dim); - int r = floor_int(bb.r/dim); - int b = floor_int(bb.b/dim); - int t = floor_int(bb.t/dim); - - cpSpaceHashBin **table = hash->table; - - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - cpHashValue idx = hash_func(i,j,n); - cpSpaceHashBin *bin = table[idx]; - - if(containsHandle(bin, hand)) continue; - - cpHandleRetain(hand); // this MUST be done first in case the object is removed in func() - query_helper(hash, &bin, obj, func, data); - - cpSpaceHashBin *newBin = getEmptyBin(hash); - newBin->handle = hand; - newBin->next = bin; - table[idx] = newBin; - } - } - - // Increment the stamp for each object hashed. - hash->stamp++; -} - -static void -cpSpaceHashReindexQuery(cpSpaceHash *hash, cpSpatialIndexQueryFunc func, void *data) -{ - clearTable(hash); - - queryRehashContext context = {hash, func, data}; - cpHashSetEach(hash->handleSet, (cpHashSetIteratorFunc)queryRehash_helper, &context); - - cpSpatialIndexCollideStatic((cpSpatialIndex *)hash, hash->spatialIndex.staticIndex, func, data); -} - -static inline cpFloat -segmentQuery_helper(cpSpaceHash *hash, cpSpaceHashBin **bin_ptr, void *obj, cpSpatialIndexSegmentQueryFunc func, void *data) -{ - cpFloat t = 1.0f; - - restart: - for(cpSpaceHashBin *bin = *bin_ptr; bin; bin = bin->next){ - cpHandle *hand = bin->handle; - void *other = hand->obj; - - // Skip over certain conditions - if(hand->stamp == hash->stamp){ - continue; - } else if(other){ - t = cpfmin(t, func(obj, other, data)); - hand->stamp = hash->stamp; - } else { - // The object for this handle has been removed - // cleanup this cell and restart the query - remove_orphaned_handles(hash, bin_ptr); - goto restart; // GCC not smart enough/able to tail call an inlined function. - } - } - - return t; -} - -// modified from http://playtechs.blogspot.com/2007/03/raytracing-on-grid.html -static void -cpSpaceHashSegmentQuery(cpSpaceHash *hash, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpatialIndexSegmentQueryFunc func, void *data) -{ - a = cpvmult(a, 1.0f/hash->celldim); - b = cpvmult(b, 1.0f/hash->celldim); - - int cell_x = floor_int(a.x), cell_y = floor_int(a.y); - - cpFloat t = 0; - - int x_inc, y_inc; - cpFloat temp_v, temp_h; - - if (b.x > a.x){ - x_inc = 1; - temp_h = (cpffloor(a.x + 1.0f) - a.x); - } else { - x_inc = -1; - temp_h = (a.x - cpffloor(a.x)); - } - - if (b.y > a.y){ - y_inc = 1; - temp_v = (cpffloor(a.y + 1.0f) - a.y); - } else { - y_inc = -1; - temp_v = (a.y - cpffloor(a.y)); - } - - // Division by zero is *very* slow on ARM - cpFloat dx = cpfabs(b.x - a.x), dy = cpfabs(b.y - a.y); - cpFloat dt_dx = (dx ? 1.0f/dx : INFINITY), dt_dy = (dy ? 1.0f/dy : INFINITY); - - // fix NANs in horizontal directions - cpFloat next_h = (temp_h ? temp_h*dt_dx : dt_dx); - cpFloat next_v = (temp_v ? temp_v*dt_dy : dt_dy); - - int n = hash->numcells; - cpSpaceHashBin **table = hash->table; - - while(t < t_exit){ - cpHashValue idx = hash_func(cell_x, cell_y, n); - t_exit = cpfmin(t_exit, segmentQuery_helper(hash, &table[idx], obj, func, data)); - - if (next_v < next_h){ - cell_y += y_inc; - t = next_v; - next_v += dt_dy; - } else { - cell_x += x_inc; - t = next_h; - next_h += dt_dx; - } - } - - hash->stamp++; -} - -//MARK: Misc - -void -cpSpaceHashResize(cpSpaceHash *hash, cpFloat celldim, int numcells) -{ - if(hash->spatialIndex.klass != Klass()){ - cpAssertWarn(cpFalse, "Ignoring cpSpaceHashResize() call to non-cpSpaceHash spatial index."); - return; - } - - clearTable(hash); - - hash->celldim = celldim; - cpSpaceHashAllocTable(hash, next_prime(numcells)); -} - -static int -cpSpaceHashCount(cpSpaceHash *hash) -{ - return cpHashSetCount(hash->handleSet); -} - -static int -cpSpaceHashContains(cpSpaceHash *hash, void *obj, cpHashValue hashid) -{ - return cpHashSetFind(hash->handleSet, hashid, obj) != NULL; -} - -static cpSpatialIndexClass klass = { - (cpSpatialIndexDestroyImpl)cpSpaceHashDestroy, - - (cpSpatialIndexCountImpl)cpSpaceHashCount, - (cpSpatialIndexEachImpl)cpSpaceHashEach, - (cpSpatialIndexContainsImpl)cpSpaceHashContains, - - (cpSpatialIndexInsertImpl)cpSpaceHashInsert, - (cpSpatialIndexRemoveImpl)cpSpaceHashRemove, - - (cpSpatialIndexReindexImpl)cpSpaceHashRehash, - (cpSpatialIndexReindexObjectImpl)cpSpaceHashRehashObject, - (cpSpatialIndexReindexQueryImpl)cpSpaceHashReindexQuery, - - (cpSpatialIndexQueryImpl)cpSpaceHashQuery, - (cpSpatialIndexSegmentQueryImpl)cpSpaceHashSegmentQuery, -}; - -static inline cpSpatialIndexClass *Klass(){return &klass;} - -//MARK: Debug Drawing - -//#define CP_BBTREE_DEBUG_DRAW -#ifdef CP_BBTREE_DEBUG_DRAW -#include "OpenGL/gl.h" -#include "OpenGL/glu.h" -#include - -void -cpSpaceHashRenderDebug(cpSpatialIndex *index) -{ - if(index->klass != &klass){ - cpAssertWarn(cpFalse, "Ignoring cpSpaceHashRenderDebug() call to non-spatial hash spatial index."); - return; - } - - cpSpaceHash *hash = (cpSpaceHash *)index; - cpBB bb = cpBBNew(-320, -240, 320, 240); - - cpFloat dim = hash->celldim; - int n = hash->numcells; - - int l = (int)floor(bb.l/dim); - int r = (int)floor(bb.r/dim); - int b = (int)floor(bb.b/dim); - int t = (int)floor(bb.t/dim); - - for(int i=l; i<=r; i++){ - for(int j=b; j<=t; j++){ - int cell_count = 0; - - int index = hash_func(i,j,n); - for(cpSpaceHashBin *bin = hash->table[index]; bin; bin = bin->next) - cell_count++; - - GLfloat v = 1.0f - (GLfloat)cell_count/10.0f; - glColor3f(v,v,v); - glRectf(i*dim, j*dim, (i + 1)*dim, (j + 1)*dim); - } - } -} -#endif diff --git a/external/chipmunk/src/cpSpaceQuery.c b/external/chipmunk/src/cpSpaceQuery.c deleted file mode 100644 index 944bc4cec1..0000000000 --- a/external/chipmunk/src/cpSpaceQuery.c +++ /dev/null @@ -1,324 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" - -//MARK: Point Query Functions - -struct PointQueryContext { - cpVect point; - cpLayers layers; - cpGroup group; - cpSpacePointQueryFunc func; - void *data; -}; - -static cpCollisionID -PointQuery(struct PointQueryContext *context, cpShape *shape, cpCollisionID id, void *data) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpShapePointQuery(shape, context->point) - ){ - context->func(shape, context->data); - } - - return id; -} - -void -cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data) -{ - struct PointQueryContext context = {point, layers, group, func, data}; - cpBB bb = cpBBNewForCircle(point, 0.0f); - - cpSpaceLock(space); { - cpSpatialIndexQuery(space->activeShapes, &context, bb, (cpSpatialIndexQueryFunc)PointQuery, data); - cpSpatialIndexQuery(space->staticShapes, &context, bb, (cpSpatialIndexQueryFunc)PointQuery, data); - } cpSpaceUnlock(space, cpTrue); -} - -static void -PointQueryFirst(cpShape *shape, cpShape **outShape) -{ - if(!shape->sensor) *outShape = shape; -} - -cpShape * -cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group) -{ - cpShape *shape = NULL; - cpSpacePointQuery(space, point, layers, group, (cpSpacePointQueryFunc)PointQueryFirst, &shape); - - return shape; -} - -//MARK: Nearest Point Query Functions - -struct NearestPointQueryContext { - cpVect point; - cpFloat maxDistance; - cpLayers layers; - cpGroup group; - cpSpaceNearestPointQueryFunc func; -}; - -static cpCollisionID -NearestPointQuery(struct NearestPointQueryContext *context, cpShape *shape, cpCollisionID id, void *data) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) - ){ - cpNearestPointQueryInfo info; - cpShapeNearestPointQuery(shape, context->point, &info); - - if(info.shape && info.d < context->maxDistance) context->func(shape, info.d, info.p, data); - } - - return id; -} - -void -cpSpaceNearestPointQuery(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpSpaceNearestPointQueryFunc func, void *data) -{ - struct NearestPointQueryContext context = {point, maxDistance, layers, group, func}; - cpBB bb = cpBBNewForCircle(point, cpfmax(maxDistance, 0.0f)); - - cpSpaceLock(space); { - cpSpatialIndexQuery(space->activeShapes, &context, bb, (cpSpatialIndexQueryFunc)NearestPointQuery, data); - cpSpatialIndexQuery(space->staticShapes, &context, bb, (cpSpatialIndexQueryFunc)NearestPointQuery, data); - } cpSpaceUnlock(space, cpTrue); -} - -static cpCollisionID -NearestPointQueryNearest(struct NearestPointQueryContext *context, cpShape *shape, cpCollisionID id, cpNearestPointQueryInfo *out) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && !shape->sensor - ){ - cpNearestPointQueryInfo info; - cpShapeNearestPointQuery(shape, context->point, &info); - - if(info.d < out->d) (*out) = info; - } - - return id; -} - -cpShape * -cpSpaceNearestPointQueryNearest(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpNearestPointQueryInfo *out) -{ - cpNearestPointQueryInfo info = {NULL, cpvzero, maxDistance, cpvzero}; - if(out){ - (*out) = info; - } else { - out = &info; - } - - struct NearestPointQueryContext context = { - point, maxDistance, - layers, group, - NULL - }; - - cpBB bb = cpBBNewForCircle(point, cpfmax(maxDistance, 0.0f)); - cpSpatialIndexQuery(space->activeShapes, &context, bb, (cpSpatialIndexQueryFunc)NearestPointQueryNearest, out); - cpSpatialIndexQuery(space->staticShapes, &context, bb, (cpSpatialIndexQueryFunc)NearestPointQueryNearest, out); - - return out->shape; -} - - -//MARK: Segment Query Functions - -struct SegmentQueryContext { - cpVect start, end; - cpLayers layers; - cpGroup group; - cpSpaceSegmentQueryFunc func; -}; - -static cpFloat -SegmentQuery(struct SegmentQueryContext *context, cpShape *shape, void *data) -{ - cpSegmentQueryInfo info; - - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpShapeSegmentQuery(shape, context->start, context->end, &info) - ){ - context->func(shape, info.t, info.n, data); - } - - return 1.0f; -} - -void -cpSpaceSegmentQuery(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryFunc func, void *data) -{ - struct SegmentQueryContext context = { - start, end, - layers, group, - func, - }; - - cpSpaceLock(space); { - cpSpatialIndexSegmentQuery(space->staticShapes, &context, start, end, 1.0f, (cpSpatialIndexSegmentQueryFunc)SegmentQuery, data); - cpSpatialIndexSegmentQuery(space->activeShapes, &context, start, end, 1.0f, (cpSpatialIndexSegmentQueryFunc)SegmentQuery, data); - } cpSpaceUnlock(space, cpTrue); -} - -static cpFloat -SegmentQueryFirst(struct SegmentQueryContext *context, cpShape *shape, cpSegmentQueryInfo *out) -{ - cpSegmentQueryInfo info; - - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - !shape->sensor && - cpShapeSegmentQuery(shape, context->start, context->end, &info) && - info.t < out->t - ){ - (*out) = info; - } - - return out->t; -} - -cpShape * -cpSpaceSegmentQueryFirst(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSegmentQueryInfo *out) -{ - cpSegmentQueryInfo info = {NULL, 1.0f, cpvzero}; - if(out){ - (*out) = info; - } else { - out = &info; - } - - struct SegmentQueryContext context = { - start, end, - layers, group, - NULL - }; - - cpSpatialIndexSegmentQuery(space->staticShapes, &context, start, end, 1.0f, (cpSpatialIndexSegmentQueryFunc)SegmentQueryFirst, out); - cpSpatialIndexSegmentQuery(space->activeShapes, &context, start, end, out->t, (cpSpatialIndexSegmentQueryFunc)SegmentQueryFirst, out); - - return out->shape; -} - -//MARK: BB Query Functions - -struct BBQueryContext { - cpBB bb; - cpLayers layers; - cpGroup group; - cpSpaceBBQueryFunc func; -}; - -static cpCollisionID -BBQuery(struct BBQueryContext *context, cpShape *shape, cpCollisionID id, void *data) -{ - if( - !(shape->group && context->group == shape->group) && (context->layers&shape->layers) && - cpBBIntersects(context->bb, shape->bb) - ){ - context->func(shape, data); - } - - return id; -} - -void -cpSpaceBBQuery(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryFunc func, void *data) -{ - struct BBQueryContext context = {bb, layers, group, func}; - - cpSpaceLock(space); { - cpSpatialIndexQuery(space->activeShapes, &context, bb, (cpSpatialIndexQueryFunc)BBQuery, data); - cpSpatialIndexQuery(space->staticShapes, &context, bb, (cpSpatialIndexQueryFunc)BBQuery, data); - } cpSpaceUnlock(space, cpTrue); -} - -//MARK: Shape Query Functions - -struct ShapeQueryContext { - cpSpaceShapeQueryFunc func; - void *data; - cpBool anyCollision; -}; - -// Callback from the spatial hash. -static cpCollisionID -ShapeQuery(cpShape *a, cpShape *b, cpCollisionID id, struct ShapeQueryContext *context) -{ - // Reject any of the simple cases - if( - (a->group && a->group == b->group) || - !(a->layers & b->layers) || - a == b - ) return id; - - cpContact contacts[CP_MAX_CONTACTS_PER_ARBITER]; - int numContacts = 0; - - // Shape 'a' should have the lower shape type. (required by cpCollideShapes() ) - if(a->klass->type <= b->klass->type){ - numContacts = cpCollideShapes(a, b, &id, contacts); - } else { - numContacts = cpCollideShapes(b, a, &id, contacts); - for(int i=0; ianyCollision = !(a->sensor || b->sensor); - - if(context->func){ - cpContactPointSet set; - set.count = numContacts; - - for(int i=0; ifunc(b, &set, context->data); - } - } - - return id; -} - -cpBool -cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data) -{ - cpBody *body = shape->body; - cpBB bb = (body ? cpShapeUpdate(shape, body->p, body->rot) : shape->bb); - struct ShapeQueryContext context = {func, data, cpFalse}; - - cpSpaceLock(space); { - cpSpatialIndexQuery(space->activeShapes, shape, bb, (cpSpatialIndexQueryFunc)ShapeQuery, &context); - cpSpatialIndexQuery(space->staticShapes, shape, bb, (cpSpatialIndexQueryFunc)ShapeQuery, &context); - } cpSpaceUnlock(space, cpTrue); - - return context.anyCollision; -} diff --git a/external/chipmunk/src/cpSpaceStep.c b/external/chipmunk/src/cpSpaceStep.c deleted file mode 100644 index f6f6d050f0..0000000000 --- a/external/chipmunk/src/cpSpaceStep.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" - -//MARK: Post Step Callback Functions - -cpPostStepCallback * -cpSpaceGetPostStepCallback(cpSpace *space, void *key) -{ - cpArray *arr = space->postStepCallbacks; - for(int i=0; inum; i++){ - cpPostStepCallback *callback = (cpPostStepCallback *)arr->arr[i]; - if(callback && callback->key == key) return callback; - } - - return NULL; -} - -static void PostStepDoNothing(cpSpace *space, void *obj, void *data){} - -cpBool -cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *key, void *data) -{ - cpAssertWarn(space->locked, - "Adding a post-step callback when the space is not locked is unnecessary. " - "Post-step callbacks will not called until the end of the next call to cpSpaceStep() or the next query."); - - if(!cpSpaceGetPostStepCallback(space, key)){ - cpPostStepCallback *callback = (cpPostStepCallback *)cpcalloc(1, sizeof(cpPostStepCallback)); - callback->func = (func ? func : PostStepDoNothing); - callback->key = key; - callback->data = data; - - cpArrayPush(space->postStepCallbacks, callback); - return cpTrue; - } else { - return cpFalse; - } -} - -//MARK: Locking Functions - -void -cpSpaceLock(cpSpace *space) -{ - space->locked++; -} - -void -cpSpaceUnlock(cpSpace *space, cpBool runPostStep) -{ - space->locked--; - cpAssertHard(space->locked >= 0, "Internal Error: Space lock underflow."); - - if(space->locked == 0){ - cpArray *waking = space->rousedBodies; - - for(int i=0, count=waking->num; iarr[i]); - waking->arr[i] = NULL; - } - - waking->num = 0; - - if(space->locked == 0 && runPostStep && !space->skipPostStep){ - space->skipPostStep = cpTrue; - - cpArray *arr = space->postStepCallbacks; - for(int i=0; inum; i++){ - cpPostStepCallback *callback = (cpPostStepCallback *)arr->arr[i]; - cpPostStepFunc func = callback->func; - - // Mark the func as NULL in case calling it calls cpSpaceRunPostStepCallbacks() again. - // TODO need more tests around this case I think. - callback->func = NULL; - if(func) func(space, callback->key, callback->data); - - arr->arr[i] = NULL; - cpfree(callback); - } - - arr->num = 0; - space->skipPostStep = cpFalse; - } - } -} - -//MARK: Contact Buffer Functions - -struct cpContactBufferHeader { - cpTimestamp stamp; - cpContactBufferHeader *next; - unsigned int numContacts; -}; - -#define CP_CONTACTS_BUFFER_SIZE ((CP_BUFFER_BYTES - sizeof(cpContactBufferHeader))/sizeof(cpContact)) -typedef struct cpContactBuffer { - cpContactBufferHeader header; - cpContact contacts[CP_CONTACTS_BUFFER_SIZE]; -} cpContactBuffer; - -static cpContactBufferHeader * -cpSpaceAllocContactBuffer(cpSpace *space) -{ - cpContactBuffer *buffer = (cpContactBuffer *)cpcalloc(1, sizeof(cpContactBuffer)); - cpArrayPush(space->allocatedBuffers, buffer); - return (cpContactBufferHeader *)buffer; -} - -static cpContactBufferHeader * -cpContactBufferHeaderInit(cpContactBufferHeader *header, cpTimestamp stamp, cpContactBufferHeader *splice) -{ - header->stamp = stamp; - header->next = (splice ? splice->next : header); - header->numContacts = 0; - - return header; -} - -void -cpSpacePushFreshContactBuffer(cpSpace *space) -{ - cpTimestamp stamp = space->stamp; - - cpContactBufferHeader *head = space->contactBuffersHead; - - if(!head){ - // No buffers have been allocated, make one - space->contactBuffersHead = cpContactBufferHeaderInit(cpSpaceAllocContactBuffer(space), stamp, NULL); - } else if(stamp - head->next->stamp > space->collisionPersistence){ - // The tail buffer is available, rotate the ring - cpContactBufferHeader *tail = head->next; - space->contactBuffersHead = cpContactBufferHeaderInit(tail, stamp, tail); - } else { - // Allocate a new buffer and push it into the ring - cpContactBufferHeader *buffer = cpContactBufferHeaderInit(cpSpaceAllocContactBuffer(space), stamp, head); - space->contactBuffersHead = head->next = buffer; - } -} - - -cpContact * -cpContactBufferGetArray(cpSpace *space) -{ - if(space->contactBuffersHead->numContacts + CP_MAX_CONTACTS_PER_ARBITER > CP_CONTACTS_BUFFER_SIZE){ - // contact buffer could overflow on the next collision, push a fresh one. - cpSpacePushFreshContactBuffer(space); - } - - cpContactBufferHeader *head = space->contactBuffersHead; - return ((cpContactBuffer *)head)->contacts + head->numContacts; -} - -void -cpSpacePushContacts(cpSpace *space, int count) -{ - cpAssertHard(count <= CP_MAX_CONTACTS_PER_ARBITER, "Internal Error: Contact buffer overflow!"); - space->contactBuffersHead->numContacts += count; -} - -static void -cpSpacePopContacts(cpSpace *space, int count){ - space->contactBuffersHead->numContacts -= count; -} - -//MARK: Collision Detection Functions - -static void * -cpSpaceArbiterSetTrans(cpShape **shapes, cpSpace *space) -{ - if(space->pooledArbiters->num == 0){ - // arbiter pool is exhausted, make more - int count = CP_BUFFER_BYTES/sizeof(cpArbiter); - cpAssertHard(count, "Internal Error: Buffer size too small."); - - cpArbiter *buffer = (cpArbiter *)cpcalloc(1, CP_BUFFER_BYTES); - cpArrayPush(space->allocatedBuffers, buffer); - - for(int i=0; ipooledArbiters, buffer + i); - } - - return cpArbiterInit((cpArbiter *)cpArrayPop(space->pooledArbiters), shapes[0], shapes[1]); -} - -static inline cpBool -queryReject(cpShape *a, cpShape *b) -{ - return ( - // BBoxes must overlap - !cpBBIntersects(a->bb, b->bb) - // Don't collide shapes attached to the same body. - || a->body == b->body - // Don't collide objects in the same non-zero group - || (a->group && a->group == b->group) - // Don't collide objects that don't share at least on layer. - || !(a->layers & b->layers) - // Don't collide infinite mass objects - || (a->body->m == INFINITY && b->body->m == INFINITY) - ); -} - -// Callback from the spatial hash. -cpCollisionID -cpSpaceCollideShapes(cpShape *a, cpShape *b, cpCollisionID id, cpSpace *space) -{ - // Reject any of the simple cases - if(queryReject(a,b)) return id; - - cpCollisionHandler *handler = cpSpaceLookupHandler(space, a->collision_type, b->collision_type); - - cpBool sensor = a->sensor || b->sensor; - if(sensor && handler == &cpDefaultCollisionHandler) return id; - - // Shape 'a' should have the lower shape type. (required by cpCollideShapes() ) - // TODO remove me: a < b comparison is for debugging collisions - if(a->klass->type > b->klass->type || (a->klass->type == b->klass->type && a < b)){ - cpShape *temp = a; - a = b; - b = temp; - } - - // Narrow-phase collision detection. - cpContact *contacts = cpContactBufferGetArray(space); - int numContacts = cpCollideShapes(a, b, &id, contacts); - if(!numContacts) return id; // Shapes are not colliding. - cpSpacePushContacts(space, numContacts); - - // Get an arbiter from space->arbiterSet for the two shapes. - // This is where the persistant contact magic comes from. - cpShape *shape_pair[] = {a, b}; - cpHashValue arbHashID = CP_HASH_PAIR((cpHashValue)a, (cpHashValue)b); - cpArbiter *arb = (cpArbiter *)cpHashSetInsert(space->cachedArbiters, arbHashID, shape_pair, space, (cpHashSetTransFunc)cpSpaceArbiterSetTrans); - cpArbiterUpdate(arb, contacts, numContacts, handler, a, b); - - // Call the begin function first if it's the first step - if(arb->state == cpArbiterStateFirstColl && !handler->begin(arb, space, handler->data)){ - cpArbiterIgnore(arb); // permanently ignore the collision until separation - } - - if( - // Ignore the arbiter if it has been flagged - (arb->state != cpArbiterStateIgnore) && - // Call preSolve - handler->preSolve(arb, space, handler->data) && - // Process, but don't add collisions for sensors. - !sensor - ){ - cpArrayPush(space->arbiters, arb); - } else { - cpSpacePopContacts(space, numContacts); - - arb->contacts = NULL; - arb->numContacts = 0; - - // Normally arbiters are set as used after calling the post-solve callback. - // However, post-solve callbacks are not called for sensors or arbiters rejected from pre-solve. - if(arb->state != cpArbiterStateIgnore) arb->state = cpArbiterStateNormal; - } - - // Time stamp the arbiter so we know it was used recently. - arb->stamp = space->stamp; - return id; -} - -// Hashset filter func to throw away old arbiters. -cpBool -cpSpaceArbiterSetFilter(cpArbiter *arb, cpSpace *space) -{ - cpTimestamp ticks = space->stamp - arb->stamp; - - cpBody *a = arb->body_a, *b = arb->body_b; - - // TODO should make an arbiter state for this so it doesn't require filtering arbiters for dangling body pointers on body removal. - // Preserve arbiters on sensors and rejected arbiters for sleeping objects. - // This prevents errant separate callbacks from happenening. - if( - (cpBodyIsStatic(a) || cpBodyIsSleeping(a)) && - (cpBodyIsStatic(b) || cpBodyIsSleeping(b)) - ){ - return cpTrue; - } - - // Arbiter was used last frame, but not this one - if(ticks >= 1 && arb->state != cpArbiterStateCached){ - arb->state = cpArbiterStateCached; - cpArbiterCallSeparate(arb, space); - } - - if(ticks >= space->collisionPersistence){ - arb->contacts = NULL; - arb->numContacts = 0; - - cpArrayPush(space->pooledArbiters, arb); - return cpFalse; - } - - return cpTrue; -} - -//MARK: All Important cpSpaceStep() Function - -void -cpShapeUpdateFunc(cpShape *shape, void *unused) -{ - cpBody *body = shape->body; - cpShapeUpdate(shape, body->p, body->rot); -} - -void -cpSpaceStep(cpSpace *space, cpFloat dt) -{ - // don't step if the timestep is 0! - if(dt == 0.0f) return; - - space->stamp++; - - cpFloat prev_dt = space->curr_dt; - space->curr_dt = dt; - - cpArray *bodies = space->bodies; - cpArray *constraints = space->constraints; - cpArray *arbiters = space->arbiters; - - // Reset and empty the arbiter lists. - for(int i=0; inum; i++){ - cpArbiter *arb = (cpArbiter *)arbiters->arr[i]; - arb->state = cpArbiterStateNormal; - - // If both bodies are awake, unthread the arbiter from the contact graph. - if(!cpBodyIsSleeping(arb->body_a) && !cpBodyIsSleeping(arb->body_b)){ - cpArbiterUnthread(arb); - } - } - arbiters->num = 0; - - cpSpaceLock(space); { - // Integrate positions - for(int i=0; inum; i++){ - cpBody *body = (cpBody *)bodies->arr[i]; - body->position_func(body, dt); - } - - // Find colliding pairs. - cpSpacePushFreshContactBuffer(space); - cpSpatialIndexEach(space->activeShapes, (cpSpatialIndexIteratorFunc)cpShapeUpdateFunc, NULL); - cpSpatialIndexReindexQuery(space->activeShapes, (cpSpatialIndexQueryFunc)cpSpaceCollideShapes, space); - } cpSpaceUnlock(space, cpFalse); - - // Rebuild the contact graph (and detect sleeping components if sleeping is enabled) - cpSpaceProcessComponents(space, dt); - - cpSpaceLock(space); { - // Clear out old cached arbiters and call separate callbacks - cpHashSetFilter(space->cachedArbiters, (cpHashSetFilterFunc)cpSpaceArbiterSetFilter, space); - - // Prestep the arbiters and constraints. - cpFloat slop = space->collisionSlop; - cpFloat biasCoef = 1.0f - cpfpow(space->collisionBias, dt); - for(int i=0; inum; i++){ - cpArbiterPreStep((cpArbiter *)arbiters->arr[i], dt, slop, biasCoef); - } - - for(int i=0; inum; i++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[i]; - - cpConstraintPreSolveFunc preSolve = constraint->preSolve; - if(preSolve) preSolve(constraint, space); - - constraint->klass->preStep(constraint, dt); - } - - // Integrate velocities. - cpFloat damping = cpfpow(space->damping, dt); - cpVect gravity = space->gravity; - for(int i=0; inum; i++){ - cpBody *body = (cpBody *)bodies->arr[i]; - body->velocity_func(body, gravity, damping, dt); - } - - // Apply cached impulses - cpFloat dt_coef = (prev_dt == 0.0f ? 0.0f : dt/prev_dt); - for(int i=0; inum; i++){ - cpArbiterApplyCachedImpulse((cpArbiter *)arbiters->arr[i], dt_coef); - } - - for(int i=0; inum; i++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[i]; - constraint->klass->applyCachedImpulse(constraint, dt_coef); - } - - // Run the impulse solver. - for(int i=0; iiterations; i++){ - for(int j=0; jnum; j++){ - cpArbiterApplyImpulse((cpArbiter *)arbiters->arr[j]); - } - - for(int j=0; jnum; j++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[j]; - constraint->klass->applyImpulse(constraint, dt); - } - } - - // Run the constraint post-solve callbacks - for(int i=0; inum; i++){ - cpConstraint *constraint = (cpConstraint *)constraints->arr[i]; - - cpConstraintPostSolveFunc postSolve = constraint->postSolve; - if(postSolve) postSolve(constraint, space); - } - - // run the post-solve callbacks - for(int i=0; inum; i++){ - cpArbiter *arb = (cpArbiter *) arbiters->arr[i]; - - cpCollisionHandler *handler = arb->handler; - handler->postSolve(arb, space, handler->data); - } - } cpSpaceUnlock(space, cpTrue); -} diff --git a/external/chipmunk/src/cpSpatialIndex.c b/external/chipmunk/src/cpSpatialIndex.c deleted file mode 100644 index e5c5c42919..0000000000 --- a/external/chipmunk/src/cpSpatialIndex.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2010 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" - -void -cpSpatialIndexFree(cpSpatialIndex *index) -{ - if(index){ - cpSpatialIndexDestroy(index); - cpfree(index); - } -} - -cpSpatialIndex * -cpSpatialIndexInit(cpSpatialIndex *index, cpSpatialIndexClass *klass, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - index->klass = klass; - index->bbfunc = bbfunc; - index->staticIndex = staticIndex; - - if(staticIndex){ - cpAssertHard(!staticIndex->dynamicIndex, "This static index is already associated with a dynamic index."); - staticIndex->dynamicIndex = index; - } - - return index; -} - -typedef struct dynamicToStaticContext { - cpSpatialIndexBBFunc bbfunc; - cpSpatialIndex *staticIndex; - cpSpatialIndexQueryFunc queryFunc; - void *data; -} dynamicToStaticContext; - -static void -dynamicToStaticIter(void *obj, dynamicToStaticContext *context) -{ - cpSpatialIndexQuery(context->staticIndex, obj, context->bbfunc(obj), context->queryFunc, context->data); -} - -void -cpSpatialIndexCollideStatic(cpSpatialIndex *dynamicIndex, cpSpatialIndex *staticIndex, cpSpatialIndexQueryFunc func, void *data) -{ - if(staticIndex && cpSpatialIndexCount(staticIndex) > 0){ - dynamicToStaticContext context = {dynamicIndex->bbfunc, staticIndex, func, data}; - cpSpatialIndexEach(dynamicIndex, (cpSpatialIndexIteratorFunc)dynamicToStaticIter, &context); - } -} - diff --git a/external/chipmunk/src/cpSweep1D.c b/external/chipmunk/src/cpSweep1D.c deleted file mode 100644 index 80b9a4ac53..0000000000 --- a/external/chipmunk/src/cpSweep1D.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (c) 2010 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 "chipmunk_private.h" - -static inline cpSpatialIndexClass *Klass(); - -//MARK: Basic Structures - -typedef struct Bounds { - cpFloat min, max; -} Bounds; - -typedef struct TableCell { - void *obj; - Bounds bounds; -} TableCell; - -struct cpSweep1D -{ - cpSpatialIndex spatialIndex; - - int num; - int max; - TableCell *table; -}; - -static inline cpBool -BoundsOverlap(Bounds a, Bounds b) -{ - return (a.min <= b.max && b.min <= a.max); -} - -static inline Bounds -BBToBounds(cpSweep1D *sweep, cpBB bb) -{ - Bounds bounds = {bb.l, bb.r}; - return bounds; -} - -static inline TableCell -MakeTableCell(cpSweep1D *sweep, void *obj) -{ - TableCell cell = {obj, BBToBounds(sweep, sweep->spatialIndex.bbfunc(obj))}; - return cell; -} - -//MARK: Memory Management Functions - -cpSweep1D * -cpSweep1DAlloc(void) -{ - return (cpSweep1D *)cpcalloc(1, sizeof(cpSweep1D)); -} - -static void -ResizeTable(cpSweep1D *sweep, int size) -{ - sweep->max = size; - sweep->table = (TableCell *)cprealloc(sweep->table, size*sizeof(TableCell)); -} - -cpSpatialIndex * -cpSweep1DInit(cpSweep1D *sweep, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - cpSpatialIndexInit((cpSpatialIndex *)sweep, Klass(), bbfunc, staticIndex); - - sweep->num = 0; - ResizeTable(sweep, 32); - - return (cpSpatialIndex *)sweep; -} - -cpSpatialIndex * -cpSweep1DNew(cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex) -{ - return cpSweep1DInit(cpSweep1DAlloc(), bbfunc, staticIndex); -} - -static void -cpSweep1DDestroy(cpSweep1D *sweep) -{ - cpfree(sweep->table); - sweep->table = NULL; -} - -//MARK: Misc - -static int -cpSweep1DCount(cpSweep1D *sweep) -{ - return sweep->num; -} - -static void -cpSweep1DEach(cpSweep1D *sweep, cpSpatialIndexIteratorFunc func, void *data) -{ - TableCell *table = sweep->table; - for(int i=0, count=sweep->num; itable; - for(int i=0, count=sweep->num; inum == sweep->max) ResizeTable(sweep, sweep->max*2); - - sweep->table[sweep->num] = MakeTableCell(sweep, obj); - sweep->num++; -} - -static void -cpSweep1DRemove(cpSweep1D *sweep, void *obj, cpHashValue hashid) -{ - TableCell *table = sweep->table; - for(int i=0, count=sweep->num; inum; - - table[i] = table[num]; - table[num].obj = NULL; - - return; - } - } -} - -//MARK: Reindexing Functions - -static void -cpSweep1DReindexObject(cpSweep1D *sweep, void *obj, cpHashValue hashid) -{ - // Nothing to do here -} - -static void -cpSweep1DReindex(cpSweep1D *sweep) -{ - // Nothing to do here - // Could perform a sort, but queries are not accelerated anyway. -} - -//MARK: Query Functions - -static void -cpSweep1DQuery(cpSweep1D *sweep, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data) -{ - // Implementing binary search here would allow you to find an upper limit - // but not a lower limit. Probably not worth the hassle. - - Bounds bounds = BBToBounds(sweep, bb); - - TableCell *table = sweep->table; - for(int i=0, count=sweep->num; itable; - for(int i=0, count=sweep->num; ibounds.min < b->bounds.min ? -1 : (a->bounds.min > b->bounds.min ? 1 : 0)); -} - -static void -cpSweep1DReindexQuery(cpSweep1D *sweep, cpSpatialIndexQueryFunc func, void *data) -{ - TableCell *table = sweep->table; - int count = sweep->num; - - // Update bounds and sort - for(int i=0; ispatialIndex.staticIndex, func, data); -} - -static cpSpatialIndexClass klass = { - (cpSpatialIndexDestroyImpl)cpSweep1DDestroy, - - (cpSpatialIndexCountImpl)cpSweep1DCount, - (cpSpatialIndexEachImpl)cpSweep1DEach, - (cpSpatialIndexContainsImpl)cpSweep1DContains, - - (cpSpatialIndexInsertImpl)cpSweep1DInsert, - (cpSpatialIndexRemoveImpl)cpSweep1DRemove, - - (cpSpatialIndexReindexImpl)cpSweep1DReindex, - (cpSpatialIndexReindexObjectImpl)cpSweep1DReindexObject, - (cpSpatialIndexReindexQueryImpl)cpSweep1DReindexQuery, - - (cpSpatialIndexQueryImpl)cpSweep1DQuery, - (cpSpatialIndexSegmentQueryImpl)cpSweep1DSegmentQuery, -}; - -static inline cpSpatialIndexClass *Klass(){return &klass;} - diff --git a/external/chipmunk/src/cpVect.c b/external/chipmunk/src/cpVect.c deleted file mode 100644 index 64d16639ef..0000000000 --- a/external/chipmunk/src/cpVect.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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 - -#include "chipmunk_private.h" - -cpVect -cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t) -{ - cpFloat dot = cpvdot(cpvnormalize(v1), cpvnormalize(v2)); - cpFloat omega = cpfacos(cpfclamp(dot, -1.0f, 1.0f)); - - if(omega < 1e-3){ - // If the angle between two vectors is very small, lerp instead to avoid precision issues. - return cpvlerp(v1, v2, t); - } else { - cpFloat denom = 1.0f/cpfsin(omega); - return cpvadd(cpvmult(v1, cpfsin((1.0f - t)*omega)*denom), cpvmult(v2, cpfsin(t*omega)*denom)); - } -} - -cpVect -cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a) -{ - cpFloat dot = cpvdot(cpvnormalize(v1), cpvnormalize(v2)); - cpFloat omega = cpfacos(cpfclamp(dot, -1.0f, 1.0f)); - - return cpvslerp(v1, v2, cpfmin(a, omega)/omega); -} - -char* -cpvstr(const cpVect v) -{ - static char str[256]; - sprintf(str, "(% .3f, % .3f)", v.x, v.y); - return str; -} diff --git a/external/chipmunk/src/prime.h b/external/chipmunk/src/prime.h deleted file mode 100644 index 419bdb89d6..0000000000 --- a/external/chipmunk/src/prime.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -// Used for resizing hash tables. -// Values approximately double. -// http://planetmath.org/encyclopedia/GoodHashTablePrimes.html -static int primes[] = { - 5, - 13, - 23, - 47, - 97, - 193, - 389, - 769, - 1543, - 3079, - 6151, - 12289, - 24593, - 49157, - 98317, - 196613, - 393241, - 786433, - 1572869, - 3145739, - 6291469, - 12582917, - 25165843, - 50331653, - 100663319, - 201326611, - 402653189, - 805306457, - 1610612741, - 0, -}; - -static inline int -next_prime(int n) -{ - int i = 0; - while(n > primes[i]){ - i++; - cpAssertHard(primes[i], "Tried to resize a hash table to a size greater than 1610612741 O_o"); // realistically this should never happen - } - - return primes[i]; -} From 4f217ed5770784a23dfcfa8fe37a0b1f16d1c42f Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 5 Sep 2014 10:43:33 +0800 Subject: [PATCH 15/61] remove include --- external/chipmunk/include/chipmunk/chipmunk.h | 222 -------------- .../chipmunk/include/chipmunk/chipmunk_ffi.h | 177 ----------- .../include/chipmunk/chipmunk_private.h | 254 ---------------- .../include/chipmunk/chipmunk_types.h | 222 -------------- .../include/chipmunk/chipmunk_unsafe.h | 65 ---- .../chipmunk/constraints/cpConstraint.h | 161 ---------- .../constraints/cpDampedRotarySpring.h | 56 ---- .../chipmunk/constraints/cpDampedSpring.h | 64 ---- .../chipmunk/constraints/cpGearJoint.h | 51 ---- .../chipmunk/constraints/cpGrooveJoint.h | 57 ---- .../include/chipmunk/constraints/cpPinJoint.h | 52 ---- .../chipmunk/constraints/cpPivotJoint.h | 51 ---- .../chipmunk/constraints/cpRatchetJoint.h | 49 --- .../chipmunk/constraints/cpRotaryLimitJoint.h | 48 --- .../chipmunk/constraints/cpSimpleMotor.h | 46 --- .../chipmunk/constraints/cpSlideJoint.h | 53 ---- .../include/chipmunk/constraints/util.h | 126 -------- .../chipmunk/include/chipmunk/cpArbiter.h | 207 ------------- external/chipmunk/include/chipmunk/cpBB.h | 143 --------- external/chipmunk/include/chipmunk/cpBody.h | 251 ---------------- .../chipmunk/include/chipmunk/cpPolyShape.h | 81 ----- external/chipmunk/include/chipmunk/cpShape.h | 232 -------------- external/chipmunk/include/chipmunk/cpSpace.h | 283 ------------------ .../include/chipmunk/cpSpatialIndex.h | 227 -------------- external/chipmunk/include/chipmunk/cpVect.h | 213 ------------- 25 files changed, 3391 deletions(-) delete mode 100644 external/chipmunk/include/chipmunk/chipmunk.h delete mode 100644 external/chipmunk/include/chipmunk/chipmunk_ffi.h delete mode 100644 external/chipmunk/include/chipmunk/chipmunk_private.h delete mode 100644 external/chipmunk/include/chipmunk/chipmunk_types.h delete mode 100644 external/chipmunk/include/chipmunk/chipmunk_unsafe.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpConstraint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpGearJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpPinJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpPivotJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h delete mode 100644 external/chipmunk/include/chipmunk/constraints/util.h delete mode 100644 external/chipmunk/include/chipmunk/cpArbiter.h delete mode 100644 external/chipmunk/include/chipmunk/cpBB.h delete mode 100644 external/chipmunk/include/chipmunk/cpBody.h delete mode 100644 external/chipmunk/include/chipmunk/cpPolyShape.h delete mode 100644 external/chipmunk/include/chipmunk/cpShape.h delete mode 100644 external/chipmunk/include/chipmunk/cpSpace.h delete mode 100644 external/chipmunk/include/chipmunk/cpSpatialIndex.h delete mode 100644 external/chipmunk/include/chipmunk/cpVect.h diff --git a/external/chipmunk/include/chipmunk/chipmunk.h b/external/chipmunk/include/chipmunk/chipmunk.h deleted file mode 100644 index 6337fb1a13..0000000000 --- a/external/chipmunk/include/chipmunk/chipmunk.h +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -#ifndef CHIPMUNK_HEADER -#define CHIPMUNK_HEADER - -#ifdef _MSC_VER - #define _USE_MATH_DEFINES -#endif - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef CP_ALLOW_PRIVATE_ACCESS - #define CP_ALLOW_PRIVATE_ACCESS 0 -#endif - -#if CP_ALLOW_PRIVATE_ACCESS == 1 - #define CP_PRIVATE(__symbol__) __symbol__ -#else - #define CP_PRIVATE(__symbol__) __symbol__##_private -#endif - -void cpMessage(const char *condition, const char *file, int line, int isError, int isHardError, const char *message, ...); -#ifdef NDEBUG - #define cpAssertWarn(__condition__, ...) -#else - #define cpAssertWarn(__condition__, ...) if(!(__condition__)) cpMessage(#__condition__, __FILE__, __LINE__, 0, 0, __VA_ARGS__) -#endif - -#ifdef NDEBUG - #define cpAssertSoft(__condition__, ...) -#else - #define cpAssertSoft(__condition__, ...) if(!(__condition__)) cpMessage(#__condition__, __FILE__, __LINE__, 1, 0, __VA_ARGS__) -#endif - -// Hard assertions are important and cheap to execute. They are not disabled by compiling as debug. -#define cpAssertHard(__condition__, ...) if(!(__condition__)) cpMessage(#__condition__, __FILE__, __LINE__, 1, 1, __VA_ARGS__) - - -#include "chipmunk_types.h" - -/// @defgroup misc Misc -/// @{ - -/// Allocated size for various Chipmunk buffers -#ifndef CP_BUFFER_BYTES - #define CP_BUFFER_BYTES (32*1024) -#endif - -#ifndef cpcalloc - /// Chipmunk calloc() alias. - #define cpcalloc calloc -#endif - -#ifndef cprealloc - /// Chipmunk realloc() alias. - #define cprealloc realloc -#endif - -#ifndef cpfree - /// Chipmunk free() alias. - #define cpfree free -#endif - -typedef struct cpArray cpArray; -typedef struct cpHashSet cpHashSet; - -typedef struct cpBody cpBody; -typedef struct cpShape cpShape; -typedef struct cpConstraint cpConstraint; - -typedef struct cpCollisionHandler cpCollisionHandler; -typedef struct cpArbiter cpArbiter; - -typedef struct cpSpace cpSpace; - -#include "cpVect.h" -#include "cpBB.h" -#include "cpSpatialIndex.h" - -#include "cpBody.h" -#include "cpShape.h" -#include "cpPolyShape.h" - -#include "cpArbiter.h" -#include "constraints/cpConstraint.h" - -#include "cpSpace.h" - -// Chipmunk 6.2.1 -#define CP_VERSION_MAJOR 6 -#define CP_VERSION_MINOR 2 -#define CP_VERSION_RELEASE 1 - -/// Version string. -extern const char *cpVersionString; - -/// @deprecated -void cpInitChipmunk(void); - -/// Enables segment to segment shape collisions. -void cpEnableSegmentToSegmentCollisions(void); - - -/// Calculate the moment of inertia for a circle. -/// @c r1 and @c r2 are the inner and outer diameters. A solid circle has an inner diameter of 0. -cpFloat cpMomentForCircle(cpFloat m, cpFloat r1, cpFloat r2, cpVect offset); - -/// Calculate area of a hollow circle. -/// @c r1 and @c r2 are the inner and outer diameters. A solid circle has an inner diameter of 0. -cpFloat cpAreaForCircle(cpFloat r1, cpFloat r2); - -/// Calculate the moment of inertia for a line segment. -/// Beveling radius is not supported. -cpFloat cpMomentForSegment(cpFloat m, cpVect a, cpVect b); - -/// Calculate the area of a fattened (capsule shaped) line segment. -cpFloat cpAreaForSegment(cpVect a, cpVect b, cpFloat r); - -/// Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex. -cpFloat cpMomentForPoly(cpFloat m, int numVerts, const cpVect *verts, cpVect offset); - -/// Calculate the signed area of a polygon. A Clockwise winding gives positive area. -/// This is probably backwards from what you expect, but matches Chipmunk's the winding for poly shapes. -cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts); - -/// Calculate the natural centroid of a polygon. -cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts); - -/// Center the polygon on the origin. (Subtracts the centroid of the polygon from each vertex) -void cpRecenterPoly(const int numVerts, cpVect *verts); - -/// Calculate the moment of inertia for a solid box. -cpFloat cpMomentForBox(cpFloat m, cpFloat width, cpFloat height); - -/// Calculate the moment of inertia for a solid box. -cpFloat cpMomentForBox2(cpFloat m, cpBB box); - -/// Calculate the convex hull of a given set of points. Returns the count of points in the hull. -/// @c result must be a pointer to a @c cpVect array with at least @c count elements. If @c result is @c NULL, then @c verts will be reduced instead. -/// @c first is an optional pointer to an integer to store where the first vertex in the hull came from (i.e. verts[first] == result[0]) -/// @c tol is the allowed amount to shrink the hull when simplifying it. A tolerance of 0.0 creates an exact hull. -int cpConvexHull(int count, cpVect *verts, cpVect *result, int *first, cpFloat tol); - -#ifdef _MSC_VER -#include "malloc.h" -#endif - -/// Convenience macro to work with cpConvexHull. -/// @c count and @c verts is the input array passed to cpConvexHull(). -/// @c count_var and @c verts_var are the names of the variables the macro creates to store the result. -/// The output vertex array is allocated on the stack using alloca() so it will be freed automatically, but cannot be returned from the current scope. -#define CP_CONVEX_HULL(__count__, __verts__, __count_var__, __verts_var__) \ -cpVect *__verts_var__ = (cpVect *)alloca(__count__*sizeof(cpVect)); \ -int __count_var__ = cpConvexHull(__count__, __verts__, __verts_var__, NULL, 0.0); \ - -#if defined(__has_extension) -#if __has_extension(blocks) -// Define alternate block based alternatives for a few of the callback heavy functions. -// Collision handlers are post-step callbacks are not included to avoid memory management issues. -// If you want to use blocks for those and are aware of how to correctly manage the memory, the implementation is trivial. - -void cpSpaceEachBody_b(cpSpace *space, void (^block)(cpBody *body)); -void cpSpaceEachShape_b(cpSpace *space, void (^block)(cpShape *shape)); -void cpSpaceEachConstraint_b(cpSpace *space, void (^block)(cpConstraint *constraint)); - -void cpBodyEachShape_b(cpBody *body, void (^block)(cpShape *shape)); -void cpBodyEachConstraint_b(cpBody *body, void (^block)(cpConstraint *constraint)); -void cpBodyEachArbiter_b(cpBody *body, void (^block)(cpArbiter *arbiter)); - -typedef void (^cpSpaceNearestPointQueryBlock)(cpShape *shape, cpFloat distance, cpVect point); -void cpSpaceNearestPointQuery_b(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpSpaceNearestPointQueryBlock block); - -typedef void (^cpSpaceSegmentQueryBlock)(cpShape *shape, cpFloat t, cpVect n); -void cpSpaceSegmentQuery_b(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryBlock block); - -typedef void (^cpSpaceBBQueryBlock)(cpShape *shape); -void cpSpaceBBQuery_b(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryBlock block); - -typedef void (^cpSpaceShapeQueryBlock)(cpShape *shape, cpContactPointSet *points); -cpBool cpSpaceShapeQuery_b(cpSpace *space, cpShape *shape, cpSpaceShapeQueryBlock block); - -#endif -#endif - - -//@} - -#ifdef __cplusplus -} - -static inline cpVect operator *(const cpVect v, const cpFloat s){return cpvmult(v, s);} -static inline cpVect operator +(const cpVect v1, const cpVect v2){return cpvadd(v1, v2);} -static inline cpVect operator -(const cpVect v1, const cpVect v2){return cpvsub(v1, v2);} -static inline cpBool operator ==(const cpVect v1, const cpVect v2){return cpveql(v1, v2);} -static inline cpVect operator -(const cpVect v){return cpvneg(v);} - -#endif -#endif diff --git a/external/chipmunk/include/chipmunk/chipmunk_ffi.h b/external/chipmunk/include/chipmunk/chipmunk_ffi.h deleted file mode 100644 index 53ac6937c2..0000000000 --- a/external/chipmunk/include/chipmunk/chipmunk_ffi.h +++ /dev/null @@ -1,177 +0,0 @@ -#ifdef CHIPMUNK_FFI - -// Create non static inlined copies of Chipmunk functions, useful for working with dynamic FFIs -// This file should only be included in chipmunk.c - -#ifdef _MSC_VER - #if _MSC_VER >= 1600 - #define MAKE_REF(name) decltype(name) *_##name = name - #else - #define MAKE_REF(name) - #endif -#else - #define MAKE_REF(name) __typeof__(name) *_##name = name -#endif - -#define MAKE_PROPERTIES_REF(struct, property) \ - MAKE_REF(struct##Get##property); MAKE_REF(struct##Set##property) - -MAKE_REF(cpv); // makes a variable named _cpv that contains the function pointer for cpv() -MAKE_REF(cpveql); -MAKE_REF(cpvadd); -MAKE_REF(cpvneg); -MAKE_REF(cpvsub); -MAKE_REF(cpvmult); -MAKE_REF(cpvdot); -MAKE_REF(cpvcross); -MAKE_REF(cpvperp); -MAKE_REF(cpvrperp); -MAKE_REF(cpvproject); -MAKE_REF(cpvforangle); -MAKE_REF(cpvtoangle); -MAKE_REF(cpvrotate); -MAKE_REF(cpvunrotate); -MAKE_REF(cpvlengthsq); -MAKE_REF(cpvlength); -MAKE_REF(cpvlerp); -MAKE_REF(cpvnormalize); -MAKE_REF(cpvnormalize_safe); -MAKE_REF(cpvclamp); -MAKE_REF(cpvlerpconst); -MAKE_REF(cpvdist); -MAKE_REF(cpvdistsq); -MAKE_REF(cpvnear); - -MAKE_REF(cpfmax); -MAKE_REF(cpfmin); -MAKE_REF(cpfabs); -MAKE_REF(cpfclamp); -MAKE_REF(cpflerp); -MAKE_REF(cpflerpconst); - -MAKE_REF(cpBBNew); -MAKE_REF(cpBBNewForCircle); -MAKE_REF(cpBBIntersects); -MAKE_REF(cpBBContainsBB); -MAKE_REF(cpBBContainsVect); -MAKE_REF(cpBBMerge); -MAKE_REF(cpBBExpand); -MAKE_REF(cpBBArea); -MAKE_REF(cpBBMergedArea); -MAKE_REF(cpBBSegmentQuery); -MAKE_REF(cpBBIntersectsSegment); -MAKE_REF(cpBBClampVect); - -MAKE_REF(cpBodyGetMass); -MAKE_REF(cpBodyGetMoment); -MAKE_REF(cpBodyGetPos); -MAKE_REF(cpBodyGetAngle); -MAKE_REF(cpBodyGetRot); -MAKE_PROPERTIES_REF(cpBody, Vel); -MAKE_PROPERTIES_REF(cpBody, Force); -MAKE_PROPERTIES_REF(cpBody, AngVel); -MAKE_PROPERTIES_REF(cpBody, Torque); -MAKE_PROPERTIES_REF(cpBody, VelLimit); -MAKE_PROPERTIES_REF(cpBody, AngVelLimit); -MAKE_PROPERTIES_REF(cpBody, UserData); -MAKE_REF(cpBodyIsSleeping); -MAKE_REF(cpBodyIsStatic); -MAKE_REF(cpBodyIsRogue); -MAKE_REF(cpBodyLocal2World); -MAKE_REF(cpBodyWorld2Local); -MAKE_REF(cpBodyKineticEnergy); - -MAKE_REF(cpShapeGetBB); -MAKE_PROPERTIES_REF(cpShape, Body); -MAKE_PROPERTIES_REF(cpShape, Sensor); -MAKE_PROPERTIES_REF(cpShape, Elasticity); -MAKE_PROPERTIES_REF(cpShape, Friction); -MAKE_PROPERTIES_REF(cpShape, SurfaceVelocity); -MAKE_PROPERTIES_REF(cpShape, UserData); -MAKE_PROPERTIES_REF(cpShape, CollisionType); -MAKE_PROPERTIES_REF(cpShape, Group); -MAKE_PROPERTIES_REF(cpShape, Layers); - -MAKE_REF(cpArbiterGetShapes); -MAKE_REF(cpArbiterGetBodies); -MAKE_REF(cpArbiterIsFirstContact); -MAKE_REF(cpArbiterGetCount); - -MAKE_REF(cpConstraintGetA); -MAKE_REF(cpConstraintGetB); -MAKE_PROPERTIES_REF(cpConstraint, MaxForce); -MAKE_PROPERTIES_REF(cpConstraint, ErrorBias); -MAKE_PROPERTIES_REF(cpConstraint, MaxBias); -MAKE_PROPERTIES_REF(cpConstraint, UserData); -MAKE_REF(cpConstraintGetImpulse); - -MAKE_PROPERTIES_REF(cpDampedRotarySpring, RestAngle); -MAKE_PROPERTIES_REF(cpDampedRotarySpring, Stiffness); -MAKE_PROPERTIES_REF(cpDampedRotarySpring, Damping); -//MAKE_PROPERTIES_REF(cpDampedRotarySpring, SpringTorqueFunc); - -MAKE_PROPERTIES_REF(cpDampedSpring, Anchr1); -MAKE_PROPERTIES_REF(cpDampedSpring, Anchr2); -MAKE_PROPERTIES_REF(cpDampedSpring, RestLength); -MAKE_PROPERTIES_REF(cpDampedSpring, Stiffness); -MAKE_PROPERTIES_REF(cpDampedSpring, Damping); -//MAKE_PROPERTIES_REF(cpDampedSpring, SpringForceFunc); - -MAKE_PROPERTIES_REF(cpGearJoint, Phase); -MAKE_REF(cpGearJointGetRatio); - -MAKE_PROPERTIES_REF(cpGrooveJoint, Anchr2); -MAKE_REF(cpGrooveJointGetGrooveA); -MAKE_REF(cpGrooveJointGetGrooveB); - -MAKE_PROPERTIES_REF(cpPinJoint, Anchr1); -MAKE_PROPERTIES_REF(cpPinJoint, Anchr2); -MAKE_PROPERTIES_REF(cpPinJoint, Dist); - -MAKE_PROPERTIES_REF(cpPivotJoint, Anchr1); -MAKE_PROPERTIES_REF(cpPivotJoint, Anchr2); - -MAKE_PROPERTIES_REF(cpRatchetJoint, Angle); -MAKE_PROPERTIES_REF(cpRatchetJoint, Phase); -MAKE_PROPERTIES_REF(cpRatchetJoint, Ratchet); - -MAKE_PROPERTIES_REF(cpRotaryLimitJoint, Min); -MAKE_PROPERTIES_REF(cpRotaryLimitJoint, Max); - -MAKE_PROPERTIES_REF(cpSimpleMotor, Rate); - -MAKE_PROPERTIES_REF(cpSlideJoint, Anchr1); -MAKE_PROPERTIES_REF(cpSlideJoint, Anchr2); -MAKE_PROPERTIES_REF(cpSlideJoint, Min); -MAKE_PROPERTIES_REF(cpSlideJoint, Max); - -MAKE_REF(cpSegmentQueryHitPoint); -MAKE_REF(cpSegmentQueryHitDist); - -MAKE_REF(cpSpatialIndexDestroy); -MAKE_REF(cpSpatialIndexCount); -MAKE_REF(cpSpatialIndexEach); -MAKE_REF(cpSpatialIndexContains); -MAKE_REF(cpSpatialIndexInsert); -MAKE_REF(cpSpatialIndexRemove); -MAKE_REF(cpSpatialIndexReindex); -MAKE_REF(cpSpatialIndexReindexObject); -MAKE_REF(cpSpatialIndexSegmentQuery); -MAKE_REF(cpSpatialIndexQuery); -MAKE_REF(cpSpatialIndexReindexQuery); - -MAKE_PROPERTIES_REF(cpSpace, Iterations); -MAKE_PROPERTIES_REF(cpSpace, Gravity); -MAKE_PROPERTIES_REF(cpSpace, Damping); -MAKE_PROPERTIES_REF(cpSpace, IdleSpeedThreshold); -MAKE_PROPERTIES_REF(cpSpace, SleepTimeThreshold); -MAKE_PROPERTIES_REF(cpSpace, CollisionSlop); -MAKE_PROPERTIES_REF(cpSpace, CollisionBias); -MAKE_PROPERTIES_REF(cpSpace, CollisionPersistence); -MAKE_PROPERTIES_REF(cpSpace, EnableContactGraph); -MAKE_PROPERTIES_REF(cpSpace, UserData); -MAKE_REF(cpSpaceGetStaticBody); -MAKE_REF(cpSpaceGetCurrentTimeStep); -MAKE_REF(cpSpaceIsLocked); - -#endif diff --git a/external/chipmunk/include/chipmunk/chipmunk_private.h b/external/chipmunk/include/chipmunk/chipmunk_private.h deleted file mode 100644 index f676345bc9..0000000000 --- a/external/chipmunk/include/chipmunk/chipmunk_private.h +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -#define CP_ALLOW_PRIVATE_ACCESS 1 -#include "chipmunk.h" - -#define CP_HASH_COEF (3344921057ul) -#define CP_HASH_PAIR(A, B) ((cpHashValue)(A)*CP_HASH_COEF ^ (cpHashValue)(B)*CP_HASH_COEF) - -// TODO: Eww. Magic numbers. -#define MAGIC_EPSILON 1e-5 - -//MARK: cpArray - -struct cpArray { - int num, max; - void **arr; -}; - -cpArray *cpArrayNew(int size); - -void cpArrayFree(cpArray *arr); - -void cpArrayPush(cpArray *arr, void *object); -void *cpArrayPop(cpArray *arr); -void cpArrayDeleteObj(cpArray *arr, void *obj); -cpBool cpArrayContains(cpArray *arr, void *ptr); - -void cpArrayFreeEach(cpArray *arr, void (freeFunc)(void*)); - - -//MARK: Foreach loops - -static inline cpConstraint * -cpConstraintNext(cpConstraint *node, cpBody *body) -{ - return (node->a == body ? node->next_a : node->next_b); -} - -#define CP_BODY_FOREACH_CONSTRAINT(bdy, var)\ - for(cpConstraint *var = bdy->constraintList; var; var = cpConstraintNext(var, bdy)) - -static inline cpArbiter * -cpArbiterNext(cpArbiter *node, cpBody *body) -{ - return (node->body_a == body ? node->thread_a.next : node->thread_b.next); -} - -#define CP_BODY_FOREACH_ARBITER(bdy, var)\ - for(cpArbiter *var = bdy->arbiterList; var; var = cpArbiterNext(var, bdy)) - -#define CP_BODY_FOREACH_SHAPE(body, var)\ - for(cpShape *var = body->shapeList; var; var = var->next) - -#define CP_BODY_FOREACH_COMPONENT(root, var)\ - for(cpBody *var = root; var; var = var->node.next) - - -//MARK: cpHashSet - -typedef cpBool (*cpHashSetEqlFunc)(void *ptr, void *elt); -typedef void *(*cpHashSetTransFunc)(void *ptr, void *data); - -cpHashSet *cpHashSetNew(int size, cpHashSetEqlFunc eqlFunc); -void cpHashSetSetDefaultValue(cpHashSet *set, void *default_value); - -void cpHashSetFree(cpHashSet *set); - -int cpHashSetCount(cpHashSet *set); -void *cpHashSetInsert(cpHashSet *set, cpHashValue hash, void *ptr, void *data, cpHashSetTransFunc trans); -void *cpHashSetRemove(cpHashSet *set, cpHashValue hash, void *ptr); -void *cpHashSetFind(cpHashSet *set, cpHashValue hash, void *ptr); - -typedef void (*cpHashSetIteratorFunc)(void *elt, void *data); -void cpHashSetEach(cpHashSet *set, cpHashSetIteratorFunc func, void *data); - -typedef cpBool (*cpHashSetFilterFunc)(void *elt, void *data); -void cpHashSetFilter(cpHashSet *set, cpHashSetFilterFunc func, void *data); - - -//MARK: Body Functions - -void cpBodyAddShape(cpBody *body, cpShape *shape); -void cpBodyRemoveShape(cpBody *body, cpShape *shape); -void cpBodyRemoveConstraint(cpBody *body, cpConstraint *constraint); - - -//MARK: Shape/Collision Functions - -// TODO should move this to the cpVect API. It's pretty useful. -static inline cpVect -cpClosetPointOnSegment(const cpVect p, const cpVect a, const cpVect b) -{ - cpVect delta = cpvsub(a, b); - cpFloat t = cpfclamp01(cpvdot(delta, cpvsub(p, b))/cpvlengthsq(delta)); - return cpvadd(b, cpvmult(delta, t)); -} - -cpShape* cpShapeInit(cpShape *shape, const cpShapeClass *klass, cpBody *body); - -static inline cpBool -cpShapeActive(cpShape *shape) -{ - return shape->prev || (shape->body && shape->body->shapeList == shape); -} - -int cpCollideShapes(const cpShape *a, const cpShape *b, cpCollisionID *id, cpContact *arr); - -static inline void -CircleSegmentQuery(cpShape *shape, cpVect center, cpFloat r, cpVect a, cpVect b, cpSegmentQueryInfo *info) -{ - cpVect da = cpvsub(a, center); - cpVect db = cpvsub(b, center); - - cpFloat qa = cpvdot(da, da) - 2.0f*cpvdot(da, db) + cpvdot(db, db); - cpFloat qb = -2.0f*cpvdot(da, da) + 2.0f*cpvdot(da, db); - cpFloat qc = cpvdot(da, da) - r*r; - - cpFloat det = qb*qb - 4.0f*qa*qc; - - if(det >= 0.0f){ - cpFloat t = (-qb - cpfsqrt(det))/(2.0f*qa); - if(0.0f<= t && t <= 1.0f){ - info->shape = shape; - info->t = t; - info->n = cpvnormalize(cpvlerp(da, db, t)); - } - } -} - -// TODO doesn't really need to be inline, but need a better place to put this function -static inline cpSplittingPlane -cpSplittingPlaneNew(cpVect a, cpVect b) -{ - cpVect n = cpvnormalize(cpvperp(cpvsub(b, a))); - cpSplittingPlane plane = {n, cpvdot(n, a)}; - return plane; -} - -static inline cpFloat -cpSplittingPlaneCompare(cpSplittingPlane plane, cpVect v) -{ - return cpvdot(plane.n, v) - plane.d; -} - -void cpLoopIndexes(cpVect *verts, int count, int *start, int *end); - - -//MARK: Spatial Index Functions - -cpSpatialIndex *cpSpatialIndexInit(cpSpatialIndex *index, cpSpatialIndexClass *klass, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); - - -//MARK: Space Functions - -extern cpCollisionHandler cpDefaultCollisionHandler; -void cpSpaceProcessComponents(cpSpace *space, cpFloat dt); - -void cpSpacePushFreshContactBuffer(cpSpace *space); -cpContact *cpContactBufferGetArray(cpSpace *space); -void cpSpacePushContacts(cpSpace *space, int count); - -typedef struct cpPostStepCallback { - cpPostStepFunc func; - void *key; - void *data; -} cpPostStepCallback; - -cpPostStepCallback *cpSpaceGetPostStepCallback(cpSpace *space, void *key); - -cpBool cpSpaceArbiterSetFilter(cpArbiter *arb, cpSpace *space); -void cpSpaceFilterArbiters(cpSpace *space, cpBody *body, cpShape *filter); - -void cpSpaceActivateBody(cpSpace *space, cpBody *body); -void cpSpaceLock(cpSpace *space); -void cpSpaceUnlock(cpSpace *space, cpBool runPostStep); - -static inline cpCollisionHandler * -cpSpaceLookupHandler(cpSpace *space, cpCollisionType a, cpCollisionType b) -{ - cpCollisionType types[] = {a, b}; - return (cpCollisionHandler *)cpHashSetFind(space->collisionHandlers, CP_HASH_PAIR(a, b), types); -} - -static inline void -cpSpaceUncacheArbiter(cpSpace *space, cpArbiter *arb) -{ - cpShape *a = arb->a, *b = arb->b; - cpShape *shape_pair[] = {a, b}; - cpHashValue arbHashID = CP_HASH_PAIR((cpHashValue)a, (cpHashValue)b); - cpHashSetRemove(space->cachedArbiters, arbHashID, shape_pair); - cpArrayDeleteObj(space->arbiters, arb); -} - -void cpShapeUpdateFunc(cpShape *shape, void *unused); -cpCollisionID cpSpaceCollideShapes(cpShape *a, cpShape *b, cpCollisionID id, cpSpace *space); - - -//MARK: Arbiters - -struct cpContact { - cpVect p, n; - cpFloat dist; - - cpVect r1, r2; - cpFloat nMass, tMass, bounce; - - cpFloat jnAcc, jtAcc, jBias; - cpFloat bias; - - cpHashValue hash; -}; - -cpContact* cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash); -cpArbiter* cpArbiterInit(cpArbiter *arb, cpShape *a, cpShape *b); - -static inline void -cpArbiterCallSeparate(cpArbiter *arb, cpSpace *space) -{ - // The handler needs to be looked up again as the handler cached on the arbiter may have been deleted since the last step. - cpCollisionHandler *handler = cpSpaceLookupHandler(space, arb->a->collision_type, arb->b->collision_type); - handler->separate(arb, space, handler->data); -} - -static inline struct cpArbiterThread * -cpArbiterThreadForBody(cpArbiter *arb, cpBody *body) -{ - return (arb->body_a == body ? &arb->thread_a : &arb->thread_b); -} - -void cpArbiterUnthread(cpArbiter *arb); - -void cpArbiterUpdate(cpArbiter *arb, cpContact *contacts, int numContacts, struct cpCollisionHandler *handler, cpShape *a, cpShape *b); -void cpArbiterPreStep(cpArbiter *arb, cpFloat dt, cpFloat bias, cpFloat slop); -void cpArbiterApplyCachedImpulse(cpArbiter *arb, cpFloat dt_coef); -void cpArbiterApplyImpulse(cpArbiter *arb); diff --git a/external/chipmunk/include/chipmunk/chipmunk_types.h b/external/chipmunk/include/chipmunk/chipmunk_types.h deleted file mode 100644 index fdfb6d1eef..0000000000 --- a/external/chipmunk/include/chipmunk/chipmunk_types.h +++ /dev/null @@ -1,222 +0,0 @@ -#include -#include - -#ifdef __APPLE__ - #include "TargetConditionals.h" -#endif - -//#if ((TARGET_OS_IPHONE == 1) || (TARGET_OS_MAC == 1)) && (!defined CP_USE_CGPOINTS) -// #define CP_USE_CGPOINTS 1 -//#endif - -#if CP_USE_CGPOINTS == 1 - #if TARGET_OS_IPHONE - #import - #elif TARGET_OS_MAC - #include - #endif - - #if defined(__LP64__) && __LP64__ - #define CP_USE_DOUBLES 1 - #else - #define CP_USE_DOUBLES 0 - #endif -#endif - -#ifndef CP_USE_DOUBLES - // use doubles by default for higher precision - #define CP_USE_DOUBLES 1 -#endif - -/// @defgroup basicTypes Basic Types -/// Most of these types can be configured at compile time. -/// @{ - -#if CP_USE_DOUBLES -/// Chipmunk's floating point type. -/// Can be reconfigured at compile time. - typedef double cpFloat; - #define cpfsqrt sqrt - #define cpfsin sin - #define cpfcos cos - #define cpfacos acos - #define cpfatan2 atan2 - #define cpfmod fmod - #define cpfexp exp - #define cpfpow pow - #define cpffloor floor - #define cpfceil ceil - #define CPFLOAT_MIN DBL_MIN -#else - typedef float cpFloat; - #define cpfsqrt sqrtf - #define cpfsin sinf - #define cpfcos cosf - #define cpfacos acosf - #define cpfatan2 atan2f - #define cpfmod fmodf - #define cpfexp expf - #define cpfpow powf - #define cpffloor floorf - #define cpfceil ceilf - #define CPFLOAT_MIN FLT_MIN -#endif - -#ifndef INFINITY - #ifdef _MSC_VER - union MSVC_EVIL_FLOAT_HACK - { - unsigned __int8 Bytes[4]; - float Value; - }; - static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}}; - #define INFINITY (INFINITY_HACK.Value) - #endif - - #ifdef __GNUC__ - #define INFINITY (__builtin_inf()) - #endif - - #ifndef INFINITY - #define INFINITY (1e1000) - #endif -#endif - -#ifndef M_PI - #define M_PI 3.14159265358979323846264338327950288 -#endif - -#ifndef M_E - #define M_E 2.71828182845904523536028747135266250 -#endif - - -/// Return the max of two cpFloats. -static inline cpFloat cpfmax(cpFloat a, cpFloat b) -{ - return (a > b) ? a : b; -} - -/// Return the min of two cpFloats. -static inline cpFloat cpfmin(cpFloat a, cpFloat b) -{ - return (a < b) ? a : b; -} - -/// Return the absolute value of a cpFloat. -static inline cpFloat cpfabs(cpFloat f) -{ - return (f < 0) ? -f : f; -} - -/// Clamp @c f to be between @c min and @c max. -static inline cpFloat cpfclamp(cpFloat f, cpFloat min, cpFloat max) -{ - return cpfmin(cpfmax(f, min), max); -} - -/// Clamp @c f to be between 0 and 1. -static inline cpFloat cpfclamp01(cpFloat f) -{ - return cpfmax(0.0f, cpfmin(f, 1.0f)); -} - - - -/// Linearly interpolate (or extrapolate) between @c f1 and @c f2 by @c t percent. -static inline cpFloat cpflerp(cpFloat f1, cpFloat f2, cpFloat t) -{ - return f1*(1.0f - t) + f2*t; -} - -/// Linearly interpolate from @c f1 to @c f2 by no more than @c d. -static inline cpFloat cpflerpconst(cpFloat f1, cpFloat f2, cpFloat d) -{ - return f1 + cpfclamp(f2 - f1, -d, d); -} - -/// Hash value type. -typedef uintptr_t cpHashValue; - -/// Type used internally to cache colliding object info for cpCollideShapes(). -/// Should be at least 32 bits. -typedef uint32_t cpCollisionID; - -// Oh C, how we love to define our own boolean types to get compiler compatibility -/// Chipmunk's boolean type. -#ifdef CP_BOOL_TYPE - typedef CP_BOOL_TYPE cpBool; -#else - typedef int cpBool; -#endif - -#ifndef cpTrue -/// true value. - #define cpTrue 1 -#endif - -#ifndef cpFalse -/// false value. - #define cpFalse 0 -#endif - -#ifdef CP_DATA_POINTER_TYPE - typedef CP_DATA_POINTER_TYPE cpDataPointer; -#else -/// Type used for user data pointers. - typedef void * cpDataPointer; -#endif - -#ifdef CP_COLLISION_TYPE_TYPE - typedef CP_COLLISION_TYPE_TYPE cpCollisionType; -#else -/// Type used for cpSpace.collision_type. - typedef uintptr_t cpCollisionType; -#endif - -#ifdef CP_GROUP_TYPE - typedef CP_GROUP_TYPE cpGroup; -#else -/// Type used for cpShape.group. - typedef uintptr_t cpGroup; -#endif - -#ifdef CP_LAYERS_TYPE - typedef CP_LAYERS_TYPE cpLayers; -#else -/// Type used for cpShape.layers. - typedef unsigned int cpLayers; -#endif - -#ifdef CP_TIMESTAMP_TYPE - typedef CP_TIMESTAMP_TYPE cpTimestamp; -#else -/// Type used for various timestamps in Chipmunk. - typedef unsigned int cpTimestamp; -#endif - -#ifndef CP_NO_GROUP -/// Value for cpShape.group signifying that a shape is in no group. - #define CP_NO_GROUP ((cpGroup)0) -#endif - -#ifndef CP_ALL_LAYERS -/// Value for cpShape.layers signifying that a shape is in every layer. - #define CP_ALL_LAYERS (~(cpLayers)0) -#endif -/// @} - -// CGPoints are structurally the same, and allow -// easy interoperability with other Cocoa libraries -#if CP_USE_CGPOINTS - typedef CGPoint cpVect; -#else -/// Chipmunk's 2D vector type. -/// @addtogroup cpVect - typedef struct cpVect{cpFloat x,y;} cpVect; -#endif - -typedef struct cpMat2x2 { - // Row major [[a, b][c d]] - cpFloat a, b, c, d; -} cpMat2x2; diff --git a/external/chipmunk/include/chipmunk/chipmunk_unsafe.h b/external/chipmunk/include/chipmunk/chipmunk_unsafe.h deleted file mode 100644 index 4428814c07..0000000000 --- a/external/chipmunk/include/chipmunk/chipmunk_unsafe.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/* This header defines a number of "unsafe" operations on Chipmunk objects. - * In this case "unsafe" is referring to operations which may reduce the - * physical accuracy or numerical stability of the simulation, but will not - * cause crashes. - * - * The prime example is mutating collision shapes. Chipmunk does not support - * this directly. Mutating shapes using this API will caused objects in contact - * to be pushed apart using Chipmunk's overlap solver, but not using real - * persistent velocities. Probably not what you meant, but perhaps close enough. - */ - -/// @defgroup unsafe Chipmunk Unsafe Shape Operations -/// These functions are used for mutating collision shapes. -/// Chipmunk does not have any way to get velocity information on changing shapes, -/// so the results will be unrealistic. You must explicity include the chipmunk_unsafe.h header to use them. -/// @{ - -#ifndef CHIPMUNK_UNSAFE_HEADER -#define CHIPMUNK_UNSAFE_HEADER - -#ifdef __cplusplus -extern "C" { -#endif - -/// Set the radius of a circle shape. -void cpCircleShapeSetRadius(cpShape *shape, cpFloat radius); -/// Set the offset of a circle shape. -void cpCircleShapeSetOffset(cpShape *shape, cpVect offset); - -/// Set the endpoints of a segment shape. -void cpSegmentShapeSetEndpoints(cpShape *shape, cpVect a, cpVect b); -/// Set the radius of a segment shape. -void cpSegmentShapeSetRadius(cpShape *shape, cpFloat radius); - -/// Set the vertexes of a poly shape. -void cpPolyShapeSetVerts(cpShape *shape, int numVerts, cpVect *verts, cpVect offset); -/// Set the radius of a poly shape. -void cpPolyShapeSetRadius(cpShape *shape, cpFloat radius); - -#ifdef __cplusplus -} -#endif -#endif -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpConstraint.h b/external/chipmunk/include/chipmunk/constraints/cpConstraint.h deleted file mode 100644 index d1059fffab..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpConstraint.h +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpConstraint cpConstraint -/// @{ - -typedef struct cpConstraintClass cpConstraintClass; - -typedef void (*cpConstraintPreStepImpl)(cpConstraint *constraint, cpFloat dt); -typedef void (*cpConstraintApplyCachedImpulseImpl)(cpConstraint *constraint, cpFloat dt_coef); -typedef void (*cpConstraintApplyImpulseImpl)(cpConstraint *constraint, cpFloat dt); -typedef cpFloat (*cpConstraintGetImpulseImpl)(cpConstraint *constraint); - -/// @private -struct cpConstraintClass { - cpConstraintPreStepImpl preStep; - cpConstraintApplyCachedImpulseImpl applyCachedImpulse; - cpConstraintApplyImpulseImpl applyImpulse; - cpConstraintGetImpulseImpl getImpulse; -}; - -/// Callback function type that gets called before solving a joint. -typedef void (*cpConstraintPreSolveFunc)(cpConstraint *constraint, cpSpace *space); -/// Callback function type that gets called after solving a joint. -typedef void (*cpConstraintPostSolveFunc)(cpConstraint *constraint, cpSpace *space); - - -/// Opaque cpConstraint struct. -struct cpConstraint { - CP_PRIVATE(const cpConstraintClass *klass); - - /// The first body connected to this constraint. - cpBody *a; - /// The second body connected to this constraint. - cpBody *b; - - CP_PRIVATE(cpSpace *space); - - CP_PRIVATE(cpConstraint *next_a); - CP_PRIVATE(cpConstraint *next_b); - - /// The maximum force that this constraint is allowed to use. - /// Defaults to infinity. - cpFloat maxForce; - /// The rate at which joint error is corrected. - /// Defaults to pow(1.0 - 0.1, 60.0) meaning that it will - /// correct 10% of the error every 1/60th of a second. - cpFloat errorBias; - /// The maximum rate at which joint error is corrected. - /// Defaults to infinity. - cpFloat maxBias; - - /// Function called before the solver runs. - /// Animate your joint anchors, update your motor torque, etc. - cpConstraintPreSolveFunc preSolve; - - /// Function called after the solver runs. - /// Use the applied impulse to perform effects like breakable joints. - cpConstraintPostSolveFunc postSolve; - - /// User definable data pointer. - /// Generally this points to your the game object class so you can access it - /// when given a cpConstraint reference in a callback. - cpDataPointer data; -}; - -/// Destroy a constraint. -void cpConstraintDestroy(cpConstraint *constraint); -/// Destroy and free a constraint. -void cpConstraintFree(cpConstraint *constraint); - -/// @private -static inline void cpConstraintActivateBodies(cpConstraint *constraint) -{ - cpBody *a = constraint->a; if(a) cpBodyActivate(a); - cpBody *b = constraint->b; if(b) cpBodyActivate(b); -} - -/// @private -#define CP_DefineConstraintStructGetter(type, member, name) \ -static inline type cpConstraint##Get##name(const cpConstraint *constraint){return constraint->member;} - -/// @private -#define CP_DefineConstraintStructSetter(type, member, name) \ -static inline void cpConstraint##Set##name(cpConstraint *constraint, type value){ \ - cpConstraintActivateBodies(constraint); \ - constraint->member = value; \ -} - -/// @private -#define CP_DefineConstraintStructProperty(type, member, name) \ -CP_DefineConstraintStructGetter(type, member, name) \ -CP_DefineConstraintStructSetter(type, member, name) - -CP_DefineConstraintStructGetter(cpSpace*, CP_PRIVATE(space), Space) - -CP_DefineConstraintStructGetter(cpBody*, a, A) -CP_DefineConstraintStructGetter(cpBody*, b, B) -CP_DefineConstraintStructProperty(cpFloat, maxForce, MaxForce) -CP_DefineConstraintStructProperty(cpFloat, errorBias, ErrorBias) -CP_DefineConstraintStructProperty(cpFloat, maxBias, MaxBias) -CP_DefineConstraintStructProperty(cpConstraintPreSolveFunc, preSolve, PreSolveFunc) -CP_DefineConstraintStructProperty(cpConstraintPostSolveFunc, postSolve, PostSolveFunc) -CP_DefineConstraintStructProperty(cpDataPointer, data, UserData) - -// Get the last impulse applied by this constraint. -static inline cpFloat cpConstraintGetImpulse(cpConstraint *constraint) -{ - return constraint->CP_PRIVATE(klass)->getImpulse(constraint); -} - -/// @} - -#define cpConstraintCheckCast(constraint, struct) \ - cpAssertHard(constraint->CP_PRIVATE(klass) == struct##GetClass(), "Constraint is not a "#struct) - -#define CP_DefineConstraintGetter(struct, type, member, name) \ -static inline type struct##Get##name(const cpConstraint *constraint){ \ - cpConstraintCheckCast(constraint, struct); \ - return ((struct *)constraint)->member; \ -} - -#define CP_DefineConstraintSetter(struct, type, member, name) \ -static inline void struct##Set##name(cpConstraint *constraint, type value){ \ - cpConstraintCheckCast(constraint, struct); \ - cpConstraintActivateBodies(constraint); \ - ((struct *)constraint)->member = value; \ -} - -#define CP_DefineConstraintProperty(struct, type, member, name) \ -CP_DefineConstraintGetter(struct, type, member, name) \ -CP_DefineConstraintSetter(struct, type, member, name) - -#include "cpPinJoint.h" -#include "cpSlideJoint.h" -#include "cpPivotJoint.h" -#include "cpGrooveJoint.h" -#include "cpDampedSpring.h" -#include "cpDampedRotarySpring.h" -#include "cpRotaryLimitJoint.h" -#include "cpRatchetJoint.h" -#include "cpGearJoint.h" -#include "cpSimpleMotor.h" diff --git a/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h b/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h deleted file mode 100644 index 86cf915b2d..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpDampedRotarySpring cpDampedRotarySpring -/// @{ - -typedef cpFloat (*cpDampedRotarySpringTorqueFunc)(struct cpConstraint *spring, cpFloat relativeAngle); - -const cpConstraintClass *cpDampedRotarySpringGetClass(void); - -/// @private -typedef struct cpDampedRotarySpring { - cpConstraint constraint; - cpFloat restAngle; - cpFloat stiffness; - cpFloat damping; - cpDampedRotarySpringTorqueFunc springTorqueFunc; - - cpFloat target_wrn; - cpFloat w_coef; - - cpFloat iSum; - cpFloat jAcc; -} cpDampedRotarySpring; - -/// Allocate a damped rotary spring. -cpDampedRotarySpring* cpDampedRotarySpringAlloc(void); -/// Initialize a damped rotary spring. -cpDampedRotarySpring* cpDampedRotarySpringInit(cpDampedRotarySpring *joint, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); -/// Allocate and initialize a damped rotary spring. -cpConstraint* cpDampedRotarySpringNew(cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, restAngle, RestAngle) -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, stiffness, Stiffness) -CP_DefineConstraintProperty(cpDampedRotarySpring, cpFloat, damping, Damping) -CP_DefineConstraintProperty(cpDampedRotarySpring, cpDampedRotarySpringTorqueFunc, springTorqueFunc, SpringTorqueFunc) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h b/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h deleted file mode 100644 index f5120647f9..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpDampedSpring cpDampedSpring -/// @{ - -typedef struct cpDampedSpring cpDampedSpring; - -typedef cpFloat (*cpDampedSpringForceFunc)(cpConstraint *spring, cpFloat dist); - -const cpConstraintClass *cpDampedSpringGetClass(void); - -/// @private -struct cpDampedSpring { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat restLength; - cpFloat stiffness; - cpFloat damping; - cpDampedSpringForceFunc springForceFunc; - - cpFloat target_vrn; - cpFloat v_coef; - - cpVect r1, r2; - cpFloat nMass; - cpVect n; - - cpFloat jAcc; -}; - -/// Allocate a damped spring. -cpDampedSpring* cpDampedSpringAlloc(void); -/// Initialize a damped spring. -cpDampedSpring* cpDampedSpringInit(cpDampedSpring *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); -/// Allocate and initialize a damped spring. -cpConstraint* cpDampedSpringNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat restLength, cpFloat stiffness, cpFloat damping); - -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr1, Anchr1) -CP_DefineConstraintProperty(cpDampedSpring, cpVect, anchr2, Anchr2) -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, restLength, RestLength) -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, stiffness, Stiffness) -CP_DefineConstraintProperty(cpDampedSpring, cpFloat, damping, Damping) -CP_DefineConstraintProperty(cpDampedSpring, cpDampedSpringForceFunc, springForceFunc, SpringForceFunc) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h b/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h deleted file mode 100644 index c9ebf94220..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpGearJoint cpGearJoint -/// @{ - -const cpConstraintClass *cpGearJointGetClass(void); - -/// @private -typedef struct cpGearJoint { - cpConstraint constraint; - cpFloat phase, ratio; - cpFloat ratio_inv; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc; -} cpGearJoint; - -/// Allocate a gear joint. -cpGearJoint* cpGearJointAlloc(void); -/// Initialize a gear joint. -cpGearJoint* cpGearJointInit(cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); -/// Allocate and initialize a gear joint. -cpConstraint* cpGearJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio); - -CP_DefineConstraintProperty(cpGearJoint, cpFloat, phase, Phase) -CP_DefineConstraintGetter(cpGearJoint, cpFloat, ratio, Ratio) -/// Set the ratio of a gear joint. -void cpGearJointSetRatio(cpConstraint *constraint, cpFloat value); - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h b/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h deleted file mode 100644 index b260218f47..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpGrooveJoint cpGrooveJoint -/// @{ - -const cpConstraintClass *cpGrooveJointGetClass(void); - -/// @private -typedef struct cpGrooveJoint { - cpConstraint constraint; - cpVect grv_n, grv_a, grv_b; - cpVect anchr2; - - cpVect grv_tn; - cpFloat clamp; - cpVect r1, r2; - cpMat2x2 k; - - cpVect jAcc; - cpVect bias; -} cpGrooveJoint; - -/// Allocate a groove joint. -cpGrooveJoint* cpGrooveJointAlloc(void); -/// Initialize a groove joint. -cpGrooveJoint* cpGrooveJointInit(cpGrooveJoint *joint, cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); -/// Allocate and initialize a groove joint. -cpConstraint* cpGrooveJointNew(cpBody *a, cpBody *b, cpVect groove_a, cpVect groove_b, cpVect anchr2); - -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_a, GrooveA) -/// Set endpoint a of a groove joint's groove -void cpGrooveJointSetGrooveA(cpConstraint *constraint, cpVect value); -CP_DefineConstraintGetter(cpGrooveJoint, cpVect, grv_b, GrooveB) -/// Set endpoint b of a groove joint's groove -void cpGrooveJointSetGrooveB(cpConstraint *constraint, cpVect value); -CP_DefineConstraintProperty(cpGrooveJoint, cpVect, anchr2, Anchr2) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpPinJoint.h b/external/chipmunk/include/chipmunk/constraints/cpPinJoint.h deleted file mode 100644 index 2413e84a1d..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpPinJoint.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpPinJoint cpPinJoint -/// @{ - -const cpConstraintClass *cpPinJointGetClass(void); - -/// @private -typedef struct cpPinJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat dist; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc; - cpFloat bias; -} cpPinJoint; - -/// Allocate a pin joint. -cpPinJoint* cpPinJointAlloc(void); -/// Initialize a pin joint. -cpPinJoint* cpPinJointInit(cpPinJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -/// Allocate and initialize a pin joint. -cpConstraint* cpPinJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr1, Anchr1) -CP_DefineConstraintProperty(cpPinJoint, cpVect, anchr2, Anchr2) -CP_DefineConstraintProperty(cpPinJoint, cpFloat, dist, Dist) - -///@} diff --git a/external/chipmunk/include/chipmunk/constraints/cpPivotJoint.h b/external/chipmunk/include/chipmunk/constraints/cpPivotJoint.h deleted file mode 100644 index a5d33174fc..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpPivotJoint.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpPivotJoint cpPivotJoint -/// @{ - -const cpConstraintClass *cpPivotJointGetClass(void); - -/// @private -typedef struct cpPivotJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - - cpVect r1, r2; - cpMat2x2 k; - - cpVect jAcc; - cpVect bias; -} cpPivotJoint; - -/// Allocate a pivot joint -cpPivotJoint* cpPivotJointAlloc(void); -/// Initialize a pivot joint. -cpPivotJoint* cpPivotJointInit(cpPivotJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); -/// Allocate and initialize a pivot joint. -cpConstraint* cpPivotJointNew(cpBody *a, cpBody *b, cpVect pivot); -/// Allocate and initialize a pivot joint with specific anchors. -cpConstraint* cpPivotJointNew2(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2); - -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr1, Anchr1) -CP_DefineConstraintProperty(cpPivotJoint, cpVect, anchr2, Anchr2) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h b/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h deleted file mode 100644 index e371b10881..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpRatchetJoint cpRatchetJoint -/// @{ - -const cpConstraintClass *cpRatchetJointGetClass(void); - -/// @private -typedef struct cpRatchetJoint { - cpConstraint constraint; - cpFloat angle, phase, ratchet; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc; -} cpRatchetJoint; - -/// Allocate a ratchet joint. -cpRatchetJoint* cpRatchetJointAlloc(void); -/// Initialize a ratched joint. -cpRatchetJoint* cpRatchetJointInit(cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); -/// Allocate and initialize a ratchet joint. -cpConstraint* cpRatchetJointNew(cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet); - -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, angle, Angle) -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, phase, Phase) -CP_DefineConstraintProperty(cpRatchetJoint, cpFloat, ratchet, Ratchet) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h b/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h deleted file mode 100644 index 2277e40f58..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpRotaryLimitJoint cpRotaryLimitJoint -/// @{ - -const cpConstraintClass *cpRotaryLimitJointGetClass(void); - -/// @private -typedef struct cpRotaryLimitJoint { - cpConstraint constraint; - cpFloat min, max; - - cpFloat iSum; - - cpFloat bias; - cpFloat jAcc; -} cpRotaryLimitJoint; - -/// Allocate a damped rotary limit joint. -cpRotaryLimitJoint* cpRotaryLimitJointAlloc(void); -/// Initialize a damped rotary limit joint. -cpRotaryLimitJoint* cpRotaryLimitJointInit(cpRotaryLimitJoint *joint, cpBody *a, cpBody *b, cpFloat min, cpFloat max); -/// Allocate and initialize a damped rotary limit joint. -cpConstraint* cpRotaryLimitJointNew(cpBody *a, cpBody *b, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, min, Min) -CP_DefineConstraintProperty(cpRotaryLimitJoint, cpFloat, max, Max) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h b/external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h deleted file mode 100644 index 37d28c5de5..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpSimpleMotor cpSimpleMotor -/// @{ - -const cpConstraintClass *cpSimpleMotorGetClass(void); - -/// @private -typedef struct cpSimpleMotor { - cpConstraint constraint; - cpFloat rate; - - cpFloat iSum; - - cpFloat jAcc; -} cpSimpleMotor; - -/// Allocate a simple motor. -cpSimpleMotor* cpSimpleMotorAlloc(void); -/// initialize a simple motor. -cpSimpleMotor* cpSimpleMotorInit(cpSimpleMotor *joint, cpBody *a, cpBody *b, cpFloat rate); -/// Allocate and initialize a simple motor. -cpConstraint* cpSimpleMotorNew(cpBody *a, cpBody *b, cpFloat rate); - -CP_DefineConstraintProperty(cpSimpleMotor, cpFloat, rate, Rate) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h b/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h deleted file mode 100644 index 40db8bba2b..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpSlideJoint cpSlideJoint -/// @{ - -const cpConstraintClass *cpSlideJointGetClass(void); - -/// @private -typedef struct cpSlideJoint { - cpConstraint constraint; - cpVect anchr1, anchr2; - cpFloat min, max; - - cpVect r1, r2; - cpVect n; - cpFloat nMass; - - cpFloat jnAcc; - cpFloat bias; -} cpSlideJoint; - -/// Allocate a slide joint. -cpSlideJoint* cpSlideJointAlloc(void); -/// Initialize a slide joint. -cpSlideJoint* cpSlideJointInit(cpSlideJoint *joint, cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); -/// Allocate and initialize a slide joint. -cpConstraint* cpSlideJointNew(cpBody *a, cpBody *b, cpVect anchr1, cpVect anchr2, cpFloat min, cpFloat max); - -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr1, Anchr1) -CP_DefineConstraintProperty(cpSlideJoint, cpVect, anchr2, Anchr2) -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, min, Min) -CP_DefineConstraintProperty(cpSlideJoint, cpFloat, max, Max) - -/// @} diff --git a/external/chipmunk/include/chipmunk/constraints/util.h b/external/chipmunk/include/chipmunk/constraints/util.h deleted file mode 100644 index 0a6204758a..0000000000 --- a/external/chipmunk/include/chipmunk/constraints/util.h +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -// These are utility routines to use when creating custom constraints. -// I'm not sure if this should be part of the private API or not. -// I should probably clean up the naming conventions if it is... - -#define CP_DefineClassGetter(t) const cpConstraintClass * t##GetClass(void){return (cpConstraintClass *)&klass;} - -void cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b); - -static inline cpVect -relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2){ - cpVect v1_sum = cpvadd(a->v, cpvmult(cpvperp(r1), a->w)); - cpVect v2_sum = cpvadd(b->v, cpvmult(cpvperp(r2), b->w)); - - return cpvsub(v2_sum, v1_sum); -} - -static inline cpFloat -normal_relative_velocity(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n){ - return cpvdot(relative_velocity(a, b, r1, r2), n); -} - -static inline void -apply_impulse(cpBody *body, cpVect j, cpVect r){ - body->v = cpvadd(body->v, cpvmult(j, body->m_inv)); - body->w += body->i_inv*cpvcross(r, j); -} - -static inline void -apply_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - apply_impulse(a, cpvneg(j), r1); - apply_impulse(b, j, r2); -} - -static inline void -apply_bias_impulse(cpBody *body, cpVect j, cpVect r) -{ - body->CP_PRIVATE(v_bias) = cpvadd(body->CP_PRIVATE(v_bias), cpvmult(j, body->m_inv)); - body->CP_PRIVATE(w_bias) += body->i_inv*cpvcross(r, j); -} - -static inline void -apply_bias_impulses(cpBody *a , cpBody *b, cpVect r1, cpVect r2, cpVect j) -{ - apply_bias_impulse(a, cpvneg(j), r1); - apply_bias_impulse(b, j, r2); -} - -static inline cpFloat -k_scalar_body(cpBody *body, cpVect r, cpVect n) -{ - cpFloat rcn = cpvcross(r, n); - return body->m_inv + body->i_inv*rcn*rcn; -} - -static inline cpFloat -k_scalar(cpBody *a, cpBody *b, cpVect r1, cpVect r2, cpVect n) -{ - cpFloat value = k_scalar_body(a, r1, n) + k_scalar_body(b, r2, n); - cpAssertSoft(value != 0.0, "Unsolvable collision or constraint."); - - return value; -} - -static inline cpMat2x2 -k_tensor(cpBody *a, cpBody *b, cpVect r1, cpVect r2) -{ - cpFloat m_sum = a->m_inv + b->m_inv; - - // start with Identity*m_sum - cpFloat k11 = m_sum, k12 = 0.0f; - cpFloat k21 = 0.0f, k22 = m_sum; - - // add the influence from r1 - cpFloat a_i_inv = a->i_inv; - cpFloat r1xsq = r1.x * r1.x * a_i_inv; - cpFloat r1ysq = r1.y * r1.y * a_i_inv; - cpFloat r1nxy = -r1.x * r1.y * a_i_inv; - k11 += r1ysq; k12 += r1nxy; - k21 += r1nxy; k22 += r1xsq; - - // add the influnce from r2 - cpFloat b_i_inv = b->i_inv; - cpFloat r2xsq = r2.x * r2.x * b_i_inv; - cpFloat r2ysq = r2.y * r2.y * b_i_inv; - cpFloat r2nxy = -r2.x * r2.y * b_i_inv; - k11 += r2ysq; k12 += r2nxy; - k21 += r2nxy; k22 += r2xsq; - - // invert - cpFloat det = k11*k22 - k12*k21; - cpAssertSoft(det != 0.0, "Unsolvable constraint."); - - cpFloat det_inv = 1.0f/det; - return cpMat2x2New( - k22*det_inv, -k12*det_inv, - -k21*det_inv, k11*det_inv - ); -} - -static inline cpFloat -bias_coef(cpFloat errorBias, cpFloat dt) -{ - return 1.0f - cpfpow(errorBias, dt); -} diff --git a/external/chipmunk/include/chipmunk/cpArbiter.h b/external/chipmunk/include/chipmunk/cpArbiter.h deleted file mode 100644 index 1ccb693d3a..0000000000 --- a/external/chipmunk/include/chipmunk/cpArbiter.h +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpArbiter cpArbiter -/// The cpArbiter struct controls pairs of colliding shapes. -/// They are also used in conjuction with collision handler callbacks -/// allowing you to retrieve information on the collision and control it. -/// @{ - -/// Collision begin event function callback type. -/// Returning false from a begin callback causes the collision to be ignored until -/// the the separate callback is called when the objects stop colliding. -typedef cpBool (*cpCollisionBeginFunc)(cpArbiter *arb, cpSpace *space, void *data); -/// Collision pre-solve event function callback type. -/// Returning false from a pre-step callback causes the collision to be ignored until the next step. -typedef cpBool (*cpCollisionPreSolveFunc)(cpArbiter *arb, cpSpace *space, void *data); -/// Collision post-solve event function callback type. -typedef void (*cpCollisionPostSolveFunc)(cpArbiter *arb, cpSpace *space, void *data); -/// Collision separate event function callback type. -typedef void (*cpCollisionSeparateFunc)(cpArbiter *arb, cpSpace *space, void *data); - -/// @private -struct cpCollisionHandler { - cpCollisionType a; - cpCollisionType b; - cpCollisionBeginFunc begin; - cpCollisionPreSolveFunc preSolve; - cpCollisionPostSolveFunc postSolve; - cpCollisionSeparateFunc separate; - void *data; -}; - -typedef struct cpContact cpContact; - -#define CP_MAX_CONTACTS_PER_ARBITER 2 - -/// @private -typedef enum cpArbiterState { - // Arbiter is active and its the first collision. - cpArbiterStateFirstColl, - // Arbiter is active and its not the first collision. - cpArbiterStateNormal, - // Collision has been explicitly ignored. - // Either by returning false from a begin collision handler or calling cpArbiterIgnore(). - cpArbiterStateIgnore, - // Collison is no longer active. A space will cache an arbiter for up to cpSpace.collisionPersistence more steps. - cpArbiterStateCached, -} cpArbiterState; - -/// @private -struct cpArbiterThread { - // Links to next and previous arbiters in the contact graph. - struct cpArbiter *next, *prev; -}; - -/// A colliding pair of shapes. -struct cpArbiter { - /// Calculated value to use for the elasticity coefficient. - /// Override in a pre-solve collision handler for custom behavior. - cpFloat e; - /// Calculated value to use for the friction coefficient. - /// Override in a pre-solve collision handler for custom behavior. - cpFloat u; - /// Calculated value to use for applying surface velocities. - /// Override in a pre-solve collision handler for custom behavior. - cpVect surface_vr; - - /// User definable data pointer. - /// The value will persist for the pair of shapes until the separate() callback is called. - /// NOTE: If you need to clean up this pointer, you should implement the separate() callback to do it. - cpDataPointer data; - - CP_PRIVATE(cpShape *a); - CP_PRIVATE(cpShape *b); - CP_PRIVATE(cpBody *body_a); - CP_PRIVATE(cpBody *body_b); - - CP_PRIVATE(struct cpArbiterThread thread_a); - CP_PRIVATE(struct cpArbiterThread thread_b); - - CP_PRIVATE(int numContacts); - CP_PRIVATE(cpContact *contacts); - - CP_PRIVATE(cpTimestamp stamp); - CP_PRIVATE(cpCollisionHandler *handler); - CP_PRIVATE(cpBool swappedColl); - CP_PRIVATE(cpArbiterState state); -}; - -#define CP_DefineArbiterStructGetter(type, member, name) \ -static inline type cpArbiterGet##name(const cpArbiter *arb){return arb->member;} - -#define CP_DefineArbiterStructSetter(type, member, name) \ -static inline void cpArbiterSet##name(cpArbiter *arb, type value){arb->member = value;} - -#define CP_DefineArbiterStructProperty(type, member, name) \ -CP_DefineArbiterStructGetter(type, member, name) \ -CP_DefineArbiterStructSetter(type, member, name) - -CP_DefineArbiterStructProperty(cpFloat, e, Elasticity) -CP_DefineArbiterStructProperty(cpFloat, u, Friction) - -// Get the relative surface velocity of the two shapes in contact. -cpVect cpArbiterGetSurfaceVelocity(cpArbiter *arb); - -// Override the relative surface velocity of the two shapes in contact. -// By default this is calculated to be the difference of the two -// surface velocities clamped to the tangent plane. -void cpArbiterSetSurfaceVelocity(cpArbiter *arb, cpVect vr); - -CP_DefineArbiterStructProperty(cpDataPointer, data, UserData) - -/// Calculate the total impulse that was applied by this arbiter. -/// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. -cpVect cpArbiterTotalImpulse(const cpArbiter *arb); -/// Calculate the total impulse including the friction that was applied by this arbiter. -/// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. -cpVect cpArbiterTotalImpulseWithFriction(const cpArbiter *arb); -/// Calculate the amount of energy lost in a collision including static, but not dynamic friction. -/// This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback. -cpFloat cpArbiterTotalKE(const cpArbiter *arb); - - -/// Causes a collision pair to be ignored as if you returned false from a begin callback. -/// If called from a pre-step callback, you will still need to return false -/// if you want it to be ignored in the current step. -void cpArbiterIgnore(cpArbiter *arb); - -/// Return the colliding shapes involved for this arbiter. -/// The order of their cpSpace.collision_type values will match -/// the order set when the collision handler was registered. -static inline void cpArbiterGetShapes(const cpArbiter *arb, cpShape **a, cpShape **b) -{ - if(arb->CP_PRIVATE(swappedColl)){ - (*a) = arb->CP_PRIVATE(b), (*b) = arb->CP_PRIVATE(a); - } else { - (*a) = arb->CP_PRIVATE(a), (*b) = arb->CP_PRIVATE(b); - } -} -/// A macro shortcut for defining and retrieving the shapes from an arbiter. -#define CP_ARBITER_GET_SHAPES(__arb__, __a__, __b__) cpShape *__a__, *__b__; cpArbiterGetShapes(__arb__, &__a__, &__b__); - -/// Return the colliding bodies involved for this arbiter. -/// The order of the cpSpace.collision_type the bodies are associated with values will match -/// the order set when the collision handler was registered. -static inline void cpArbiterGetBodies(const cpArbiter *arb, cpBody **a, cpBody **b) -{ - CP_ARBITER_GET_SHAPES(arb, shape_a, shape_b); - (*a) = shape_a->body; - (*b) = shape_b->body; -} -/// A macro shortcut for defining and retrieving the bodies from an arbiter. -#define CP_ARBITER_GET_BODIES(__arb__, __a__, __b__) cpBody *__a__, *__b__; cpArbiterGetBodies(__arb__, &__a__, &__b__); - -/// A struct that wraps up the important collision data for an arbiter. -typedef struct cpContactPointSet { - /// The number of contact points in the set. - int count; - - /// The array of contact points. - struct { - /// The position of the contact point. - cpVect point; - /// The normal of the contact point. - cpVect normal; - /// The depth of the contact point. - cpFloat dist; - } points[CP_MAX_CONTACTS_PER_ARBITER]; -} cpContactPointSet; - -/// Return a contact set from an arbiter. -cpContactPointSet cpArbiterGetContactPointSet(const cpArbiter *arb); - -/// Replace the contact point set for an arbiter. -/// This can be a very powerful feature, but use it with caution! -void cpArbiterSetContactPointSet(cpArbiter *arb, cpContactPointSet *set); - -/// Returns true if this is the first step a pair of objects started colliding. -cpBool cpArbiterIsFirstContact(const cpArbiter *arb); -/// Get the number of contact points for this arbiter. -int cpArbiterGetCount(const cpArbiter *arb); -/// Get the normal of the @c ith contact point. -cpVect cpArbiterGetNormal(const cpArbiter *arb, int i); -/// Get the position of the @c ith contact point. -cpVect cpArbiterGetPoint(const cpArbiter *arb, int i); -/// Get the depth of the @c ith contact point. -cpFloat cpArbiterGetDepth(const cpArbiter *arb, int i); - -/// @} diff --git a/external/chipmunk/include/chipmunk/cpBB.h b/external/chipmunk/include/chipmunk/cpBB.h deleted file mode 100644 index 4e59c2d495..0000000000 --- a/external/chipmunk/include/chipmunk/cpBB.h +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpBBB cpBB -/// Chipmunk's axis-aligned 2D bounding box type along with a few handy routines. -/// @{ - -/// Chipmunk's axis-aligned 2D bounding box type. (left, bottom, right, top) -typedef struct cpBB{ - cpFloat l, b, r ,t; -} cpBB; - -/// Convenience constructor for cpBB structs. -static inline cpBB cpBBNew(const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t) -{ - cpBB bb = {l, b, r, t}; - return bb; -} - -/// Constructs a cpBB for a circle with the given position and radius. -static inline cpBB cpBBNewForCircle(const cpVect p, const cpFloat r) -{ - return cpBBNew(p.x - r, p.y - r, p.x + r, p.y + r); -} - -/// Returns true if @c a and @c b intersect. -static inline cpBool cpBBIntersects(const cpBB a, const cpBB b) -{ - return (a.l <= b.r && b.l <= a.r && a.b <= b.t && b.b <= a.t); -} - -/// Returns true if @c other lies completely within @c bb. -static inline cpBool cpBBContainsBB(const cpBB bb, const cpBB other) -{ - return (bb.l <= other.l && bb.r >= other.r && bb.b <= other.b && bb.t >= other.t); -} - -/// Returns true if @c bb contains @c v. -static inline cpBool cpBBContainsVect(const cpBB bb, const cpVect v) -{ - return (bb.l <= v.x && bb.r >= v.x && bb.b <= v.y && bb.t >= v.y); -} - -/// Returns a bounding box that holds both bounding boxes. -static inline cpBB cpBBMerge(const cpBB a, const cpBB b){ - return cpBBNew( - cpfmin(a.l, b.l), - cpfmin(a.b, b.b), - cpfmax(a.r, b.r), - cpfmax(a.t, b.t) - ); -} - -/// Returns a bounding box that holds both @c bb and @c v. -static inline cpBB cpBBExpand(const cpBB bb, const cpVect v){ - return cpBBNew( - cpfmin(bb.l, v.x), - cpfmin(bb.b, v.y), - cpfmax(bb.r, v.x), - cpfmax(bb.t, v.y) - ); -} - -/// Returns the center of a bounding box. -static inline cpVect -cpBBCenter(cpBB bb) -{ - return cpvlerp(cpv(bb.l, bb.b), cpv(bb.r, bb.t), 0.5f); -} - -/// Returns the area of the bounding box. -static inline cpFloat cpBBArea(cpBB bb) -{ - return (bb.r - bb.l)*(bb.t - bb.b); -} - -/// Merges @c a and @c b and returns the area of the merged bounding box. -static inline cpFloat cpBBMergedArea(cpBB a, cpBB b) -{ - return (cpfmax(a.r, b.r) - cpfmin(a.l, b.l))*(cpfmax(a.t, b.t) - cpfmin(a.b, b.b)); -} - -/// Returns the fraction along the segment query the cpBB is hit. Returns INFINITY if it doesn't hit. -static inline cpFloat cpBBSegmentQuery(cpBB bb, cpVect a, cpVect b) -{ - cpFloat idx = 1.0f/(b.x - a.x); - cpFloat tx1 = (bb.l == a.x ? -INFINITY : (bb.l - a.x)*idx); - cpFloat tx2 = (bb.r == a.x ? INFINITY : (bb.r - a.x)*idx); - cpFloat txmin = cpfmin(tx1, tx2); - cpFloat txmax = cpfmax(tx1, tx2); - - cpFloat idy = 1.0f/(b.y - a.y); - cpFloat ty1 = (bb.b == a.y ? -INFINITY : (bb.b - a.y)*idy); - cpFloat ty2 = (bb.t == a.y ? INFINITY : (bb.t - a.y)*idy); - cpFloat tymin = cpfmin(ty1, ty2); - cpFloat tymax = cpfmax(ty1, ty2); - - if(tymin <= txmax && txmin <= tymax){ - cpFloat min = cpfmax(txmin, tymin); - cpFloat max = cpfmin(txmax, tymax); - - if(0.0 <= max && min <= 1.0) return cpfmax(min, 0.0); - } - - return INFINITY; -} - -/// Return true if the bounding box intersects the line segment with ends @c a and @c b. -static inline cpBool cpBBIntersectsSegment(cpBB bb, cpVect a, cpVect b) -{ - return (cpBBSegmentQuery(bb, a, b) != INFINITY); -} - -/// Clamp a vector to a bounding box. -static inline cpVect -cpBBClampVect(const cpBB bb, const cpVect v) -{ - return cpv(cpfclamp(v.x, bb.l, bb.r), cpfclamp(v.y, bb.b, bb.t)); -} - -// TODO edge case issue -/// Wrap a vector to a bounding box. -cpVect cpBBWrapVect(const cpBB bb, const cpVect v); // wrap a vector to a bbox - -///@} diff --git a/external/chipmunk/include/chipmunk/cpBody.h b/external/chipmunk/include/chipmunk/cpBody.h deleted file mode 100644 index 6168b0fe67..0000000000 --- a/external/chipmunk/include/chipmunk/cpBody.h +++ /dev/null @@ -1,251 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpBody cpBody -/// Chipmunk's rigid body type. Rigid bodies hold the physical properties of an object like -/// it's mass, and position and velocity of it's center of gravity. They don't have an shape on their own. -/// They are given a shape by creating collision shapes (cpShape) that point to the body. -/// @{ - -/// Rigid body velocity update function type. -typedef void (*cpBodyVelocityFunc)(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -/// Rigid body position update function type. -typedef void (*cpBodyPositionFunc)(cpBody *body, cpFloat dt); - -/// Used internally to track information on the collision graph. -/// @private -typedef struct cpComponentNode { - cpBody *root; - cpBody *next; - cpFloat idleTime; -} cpComponentNode; - -/// Chipmunk's rigid body struct. -struct cpBody { - /// Function that is called to integrate the body's velocity. (Defaults to cpBodyUpdateVelocity) - cpBodyVelocityFunc velocity_func; - - /// Function that is called to integrate the body's position. (Defaults to cpBodyUpdatePosition) - cpBodyPositionFunc position_func; - - /// Mass of the body. - /// Must agree with cpBody.m_inv! Use cpBodySetMass() when changing the mass for this reason. - cpFloat m; - /// Mass inverse. - cpFloat m_inv; - - /// Moment of inertia of the body. - /// Must agree with cpBody.i_inv! Use cpBodySetMoment() when changing the moment for this reason. - cpFloat i; - /// Moment of inertia inverse. - cpFloat i_inv; - - /// Position of the rigid body's center of gravity. - cpVect p; - /// Velocity of the rigid body's center of gravity. - cpVect v; - /// Force acting on the rigid body's center of gravity. - cpVect f; - - /// Rotation of the body around it's center of gravity in radians. - /// Must agree with cpBody.rot! Use cpBodySetAngle() when changing the angle for this reason. - cpFloat a; - /// Angular velocity of the body around it's center of gravity in radians/second. - cpFloat w; - /// Torque applied to the body around it's center of gravity. - cpFloat t; - - /// Cached unit length vector representing the angle of the body. - /// Used for fast rotations using cpvrotate(). - cpVect rot; - - /// User definable data pointer. - /// Generally this points to your the game object class so you can access it - /// when given a cpBody reference in a callback. - cpDataPointer data; - - /// Maximum velocity allowed when updating the velocity. - cpFloat v_limit; - /// Maximum rotational rate (in radians/second) allowed when updating the angular velocity. - cpFloat w_limit; - - CP_PRIVATE(cpVect v_bias); - CP_PRIVATE(cpFloat w_bias); - - CP_PRIVATE(cpSpace *space); - - CP_PRIVATE(cpShape *shapeList); - CP_PRIVATE(cpArbiter *arbiterList); - CP_PRIVATE(cpConstraint *constraintList); - - CP_PRIVATE(cpComponentNode node); -}; - -/// Allocate a cpBody. -cpBody* cpBodyAlloc(void); -/// Initialize a cpBody. -cpBody* cpBodyInit(cpBody *body, cpFloat m, cpFloat i); -/// Allocate and initialize a cpBody. -cpBody* cpBodyNew(cpFloat m, cpFloat i); - -/// Initialize a static cpBody. -cpBody* cpBodyInitStatic(cpBody *body); -/// Allocate and initialize a static cpBody. -cpBody* cpBodyNewStatic(void); - -/// Destroy a cpBody. -void cpBodyDestroy(cpBody *body); -/// Destroy and free a cpBody. -void cpBodyFree(cpBody *body); - -/// Check that the properties of a body is sane. (Only in debug mode) -#ifdef NDEBUG - #define cpBodyAssertSane(body) -#else - void cpBodySanityCheck(cpBody *body); - #define cpBodyAssertSane(body) cpBodySanityCheck(body) -#endif - -// Defined in cpSpace.c -/// Wake up a sleeping or idle body. -void cpBodyActivate(cpBody *body); -/// Wake up any sleeping or idle bodies touching a static body. -void cpBodyActivateStatic(cpBody *body, cpShape *filter); - -/// Force a body to fall asleep immediately. -void cpBodySleep(cpBody *body); -/// Force a body to fall asleep immediately along with other bodies in a group. -void cpBodySleepWithGroup(cpBody *body, cpBody *group); - -/// Returns true if the body is sleeping. -static inline cpBool cpBodyIsSleeping(const cpBody *body) -{ - return (CP_PRIVATE(body->node).root != ((cpBody*)0)); -} - -/// Returns true if the body is static. -static inline cpBool cpBodyIsStatic(const cpBody *body) -{ - return CP_PRIVATE(body->node).idleTime == INFINITY; -} - -/// Returns true if the body has not been added to a space. -/// Note: Static bodies are a subtype of rogue bodies. -static inline cpBool cpBodyIsRogue(const cpBody *body) -{ - return (body->CP_PRIVATE(space) == ((cpSpace*)0)); -} - - -#define CP_DefineBodyStructGetter(type, member, name) \ -static inline type cpBodyGet##name(const cpBody *body){return body->member;} - -#define CP_DefineBodyStructSetter(type, member, name) \ -static inline void cpBodySet##name(cpBody *body, const type value){ \ - cpBodyActivate(body); \ - body->member = value; \ - cpBodyAssertSane(body); \ -} - -#define CP_DefineBodyStructProperty(type, member, name) \ -CP_DefineBodyStructGetter(type, member, name) \ -CP_DefineBodyStructSetter(type, member, name) - -// TODO add to docs -CP_DefineBodyStructGetter(cpSpace*, CP_PRIVATE(space), Space) - -CP_DefineBodyStructGetter(cpFloat, m, Mass) -/// Set the mass of a body. -void cpBodySetMass(cpBody *body, cpFloat m); - -CP_DefineBodyStructGetter(cpFloat, i, Moment) -/// Set the moment of a body. -void cpBodySetMoment(cpBody *body, cpFloat i); - -CP_DefineBodyStructGetter(cpVect, p, Pos) -/// Set the position of a body. -void cpBodySetPos(cpBody *body, cpVect pos); -CP_DefineBodyStructProperty(cpVect, v, Vel) -CP_DefineBodyStructProperty(cpVect, f, Force) -CP_DefineBodyStructGetter(cpFloat, a, Angle) -/// Set the angle of a body. -void cpBodySetAngle(cpBody *body, cpFloat a); -CP_DefineBodyStructProperty(cpFloat, w, AngVel) -CP_DefineBodyStructProperty(cpFloat, t, Torque) -CP_DefineBodyStructGetter(cpVect, rot, Rot) -CP_DefineBodyStructProperty(cpFloat, v_limit, VelLimit) -CP_DefineBodyStructProperty(cpFloat, w_limit, AngVelLimit) -CP_DefineBodyStructProperty(cpDataPointer, data, UserData) - -/// Default Integration functions. -void cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt); -void cpBodyUpdatePosition(cpBody *body, cpFloat dt); - -/// Convert body relative/local coordinates to absolute/world coordinates. -static inline cpVect cpBodyLocal2World(const cpBody *body, const cpVect v) -{ - return cpvadd(body->p, cpvrotate(v, body->rot)); -} - -/// Convert body absolute/world coordinates to relative/local coordinates. -static inline cpVect cpBodyWorld2Local(const cpBody *body, const cpVect v) -{ - return cpvunrotate(cpvsub(v, body->p), body->rot); -} - -/// Set the forces and torque or a body to zero. -void cpBodyResetForces(cpBody *body); -/// Apply an force (in world coordinates) to the body at a point relative to the center of gravity (also in world coordinates). -void cpBodyApplyForce(cpBody *body, const cpVect f, const cpVect r); -/// Apply an impulse (in world coordinates) to the body at a point relative to the center of gravity (also in world coordinates). -void cpBodyApplyImpulse(cpBody *body, const cpVect j, const cpVect r); - -/// Get the velocity on a body (in world units) at a point on the body in world coordinates. -cpVect cpBodyGetVelAtWorldPoint(cpBody *body, cpVect point); -/// Get the velocity on a body (in world units) at a point on the body in local coordinates. -cpVect cpBodyGetVelAtLocalPoint(cpBody *body, cpVect point); - - -/// Get the kinetic energy of a body. -static inline cpFloat cpBodyKineticEnergy(const cpBody *body) -{ - // Need to do some fudging to avoid NaNs - cpFloat vsq = cpvdot(body->v, body->v); - cpFloat wsq = body->w*body->w; - return (vsq ? vsq*body->m : 0.0f) + (wsq ? wsq*body->i : 0.0f); -} - -/// Body/shape iterator callback function type. -typedef void (*cpBodyShapeIteratorFunc)(cpBody *body, cpShape *shape, void *data); -/// Call @c func once for each shape attached to @c body and added to the space. -void cpBodyEachShape(cpBody *body, cpBodyShapeIteratorFunc func, void *data); - -/// Body/constraint iterator callback function type. -typedef void (*cpBodyConstraintIteratorFunc)(cpBody *body, cpConstraint *constraint, void *data); -/// Call @c func once for each constraint attached to @c body and added to the space. -void cpBodyEachConstraint(cpBody *body, cpBodyConstraintIteratorFunc func, void *data); - -/// Body/arbiter iterator callback function type. -typedef void (*cpBodyArbiterIteratorFunc)(cpBody *body, cpArbiter *arbiter, void *data); -/// Call @c func once for each arbiter that is currently active on the body. -void cpBodyEachArbiter(cpBody *body, cpBodyArbiterIteratorFunc func, void *data); - -///@} diff --git a/external/chipmunk/include/chipmunk/cpPolyShape.h b/external/chipmunk/include/chipmunk/cpPolyShape.h deleted file mode 100644 index a5587ba250..0000000000 --- a/external/chipmunk/include/chipmunk/cpPolyShape.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpPolyShape cpPolyShape -/// @{ - -/// @private -typedef struct cpSplittingPlane { - cpVect n; - cpFloat d; -} cpSplittingPlane; - -/// @private -typedef struct cpPolyShape { - cpShape shape; - - int numVerts; - cpVect *verts, *tVerts; - cpSplittingPlane *planes, *tPlanes; - - cpFloat r; -} cpPolyShape; - -/// Allocate a polygon shape. -cpPolyShape* cpPolyShapeAlloc(void); -/// Initialize a polygon shape. -/// A convex hull will be created from the vertexes. -cpPolyShape* cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, const cpVect *verts, cpVect offset); -/// Initialize a polygon shape. -/// A convex hull will be created from the vertexes. -cpPolyShape* cpPolyShapeInit2(cpPolyShape *poly, cpBody *body, int numVerts, const cpVect *verts, cpVect offset, cpFloat radius); -/// Allocate and initialize a polygon shape. -/// A convex hull will be created from the vertexes. -cpShape* cpPolyShapeNew(cpBody *body, int numVerts, const cpVect *verts, cpVect offset); -/// Allocate and initialize a polygon shape. -/// A convex hull will be created from the vertexes. -cpShape* cpPolyShapeNew2(cpBody *body, int numVerts, const cpVect *verts, cpVect offset, cpFloat radius); - -/// Initialize a box shaped polygon shape. -cpPolyShape* cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height); -/// Initialize an offset box shaped polygon shape. -cpPolyShape* cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box); -/// Initialize an offset box shaped polygon shape. -cpPolyShape* cpBoxShapeInit3(cpPolyShape *poly, cpBody *body, cpBB box, cpFloat radius); -/// Allocate and initialize a box shaped polygon shape. -cpShape* cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height); -/// Allocate and initialize an offset box shaped polygon shape. -cpShape* cpBoxShapeNew2(cpBody *body, cpBB box); -/// Allocate and initialize an offset box shaped polygon shape. -cpShape* cpBoxShapeNew3(cpBody *body, cpBB box, cpFloat radius); - -/// Check that a set of vertexes is convex and has a clockwise winding. -/// NOTE: Due to floating point precision issues, hulls created with cpQuickHull() are not guaranteed to validate! -cpBool cpPolyValidate(const cpVect *verts, const int numVerts); - -/// Get the number of verts in a polygon shape. -int cpPolyShapeGetNumVerts(const cpShape *shape); -/// Get the @c ith vertex of a polygon shape. -cpVect cpPolyShapeGetVert(const cpShape *shape, int idx); -/// Get the radius of a polygon shape. -cpFloat cpPolyShapeGetRadius(const cpShape *shape); - -/// @} diff --git a/external/chipmunk/include/chipmunk/cpShape.h b/external/chipmunk/include/chipmunk/cpShape.h deleted file mode 100644 index 62920c371c..0000000000 --- a/external/chipmunk/include/chipmunk/cpShape.h +++ /dev/null @@ -1,232 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpShape cpShape -/// The cpShape struct defines the shape of a rigid body. -/// @{ - -typedef struct cpShapeClass cpShapeClass; - -/// Nearest point query info struct. -typedef struct cpNearestPointQueryInfo { - /// The nearest shape, NULL if no shape was within range. - cpShape *shape; - /// The closest point on the shape's surface. (in world space coordinates) - cpVect p; - /// The distance to the point. The distance is negative if the point is inside the shape. - cpFloat d; - /// The gradient of the signed distance function. - /// The same as info.p/info.d, but accurate even for very small values of info.d. - cpVect g; -} cpNearestPointQueryInfo; - -/// Segment query info struct. -typedef struct cpSegmentQueryInfo { - /// The shape that was hit, NULL if no collision occured. - cpShape *shape; - /// The normalized distance along the query segment in the range [0, 1]. - cpFloat t; - /// The normal of the surface hit. - cpVect n; -} cpSegmentQueryInfo; - -/// @private -typedef enum cpShapeType{ - CP_CIRCLE_SHAPE, - CP_SEGMENT_SHAPE, - CP_POLY_SHAPE, - CP_NUM_SHAPES -} cpShapeType; - -typedef cpBB (*cpShapeCacheDataImpl)(cpShape *shape, cpVect p, cpVect rot); -typedef void (*cpShapeDestroyImpl)(cpShape *shape); -typedef void (*cpShapeNearestPointQueryImpl)(cpShape *shape, cpVect p, cpNearestPointQueryInfo *info); -typedef void (*cpShapeSegmentQueryImpl)(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); - -/// @private -struct cpShapeClass { - cpShapeType type; - - cpShapeCacheDataImpl cacheData; - cpShapeDestroyImpl destroy; - cpShapeNearestPointQueryImpl nearestPointQuery; - cpShapeSegmentQueryImpl segmentQuery; -}; - -/// Opaque collision shape struct. -struct cpShape { - CP_PRIVATE(const cpShapeClass *klass); - - /// The rigid body this collision shape is attached to. - cpBody *body; - - /// The current bounding box of the shape. - cpBB bb; - - /// Sensor flag. - /// Sensor shapes call collision callbacks but don't produce collisions. - cpBool sensor; - - /// Coefficient of restitution. (elasticity) - cpFloat e; - /// Coefficient of friction. - cpFloat u; - /// Surface velocity used when solving for friction. - cpVect surface_v; - - /// User definable data pointer. - /// Generally this points to your the game object class so you can access it - /// when given a cpShape reference in a callback. - cpDataPointer data; - - /// Collision type of this shape used when picking collision handlers. - cpCollisionType collision_type; - /// Group of this shape. Shapes in the same group don't collide. - cpGroup group; - // Layer bitmask for this shape. Shapes only collide if the bitwise and of their layers is non-zero. - cpLayers layers; - - CP_PRIVATE(cpSpace *space); - - CP_PRIVATE(cpShape *next); - CP_PRIVATE(cpShape *prev); - - CP_PRIVATE(cpHashValue hashid); -}; - -/// Destroy a shape. -void cpShapeDestroy(cpShape *shape); -/// Destroy and Free a shape. -void cpShapeFree(cpShape *shape); - -/// Update, cache and return the bounding box of a shape based on the body it's attached to. -cpBB cpShapeCacheBB(cpShape *shape); -/// Update, cache and return the bounding box of a shape with an explicit transformation. -cpBB cpShapeUpdate(cpShape *shape, cpVect pos, cpVect rot); - -/// Test if a point lies within a shape. -cpBool cpShapePointQuery(cpShape *shape, cpVect p); - -/// Perform a nearest point query. It finds the closest point on the surface of shape to a specific point. -/// The value returned is the distance between the points. A negative distance means the point is inside the shape. -cpFloat cpShapeNearestPointQuery(cpShape *shape, cpVect p, cpNearestPointQueryInfo *out); - -/// Perform a segment query against a shape. @c info must be a pointer to a valid cpSegmentQueryInfo structure. -cpBool cpShapeSegmentQuery(cpShape *shape, cpVect a, cpVect b, cpSegmentQueryInfo *info); - -/// Get the hit point for a segment query. -static inline cpVect cpSegmentQueryHitPoint(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvlerp(start, end, info.t); -} - -/// Get the hit distance for a segment query. -static inline cpFloat cpSegmentQueryHitDist(const cpVect start, const cpVect end, const cpSegmentQueryInfo info) -{ - return cpvdist(start, end)*info.t; -} - -#define CP_DefineShapeStructGetter(type, member, name) \ -static inline type cpShapeGet##name(const cpShape *shape){return shape->member;} - -#define CP_DefineShapeStructSetter(type, member, name, activates) \ -static inline void cpShapeSet##name(cpShape *shape, type value){ \ - if(activates && shape->body) cpBodyActivate(shape->body); \ - shape->member = value; \ -} - -#define CP_DefineShapeStructProperty(type, member, name, activates) \ -CP_DefineShapeStructGetter(type, member, name) \ -CP_DefineShapeStructSetter(type, member, name, activates) - -CP_DefineShapeStructGetter(cpSpace*, CP_PRIVATE(space), Space) - -CP_DefineShapeStructGetter(cpBody*, body, Body) -void cpShapeSetBody(cpShape *shape, cpBody *body); - -CP_DefineShapeStructGetter(cpBB, bb, BB) -CP_DefineShapeStructProperty(cpBool, sensor, Sensor, cpTrue) -CP_DefineShapeStructProperty(cpFloat, e, Elasticity, cpFalse) -CP_DefineShapeStructProperty(cpFloat, u, Friction, cpTrue) -CP_DefineShapeStructProperty(cpVect, surface_v, SurfaceVelocity, cpTrue) -CP_DefineShapeStructProperty(cpDataPointer, data, UserData, cpFalse) -CP_DefineShapeStructProperty(cpCollisionType, collision_type, CollisionType, cpTrue) -CP_DefineShapeStructProperty(cpGroup, group, Group, cpTrue) -CP_DefineShapeStructProperty(cpLayers, layers, Layers, cpTrue) - -/// When initializing a shape, it's hash value comes from a counter. -/// Because the hash value may affect iteration order, you can reset the shape ID counter -/// when recreating a space. This will make the simulation be deterministic. -void cpResetShapeIdCounter(void); - -#define CP_DeclareShapeGetter(struct, type, name) type struct##Get##name(const cpShape *shape) - -/// @} -/// @defgroup cpCircleShape cpCircleShape - -/// @private -typedef struct cpCircleShape { - cpShape shape; - - cpVect c, tc; - cpFloat r; -} cpCircleShape; - -/// Allocate a circle shape. -cpCircleShape* cpCircleShapeAlloc(void); -/// Initialize a circle shape. -cpCircleShape* cpCircleShapeInit(cpCircleShape *circle, cpBody *body, cpFloat radius, cpVect offset); -/// Allocate and initialize a circle shape. -cpShape* cpCircleShapeNew(cpBody *body, cpFloat radius, cpVect offset); - -CP_DeclareShapeGetter(cpCircleShape, cpVect, Offset); -CP_DeclareShapeGetter(cpCircleShape, cpFloat, Radius); - -/// @} -/// @defgroup cpSegmentShape cpSegmentShape - -/// @private -typedef struct cpSegmentShape { - cpShape shape; - - cpVect a, b, n; - cpVect ta, tb, tn; - cpFloat r; - - cpVect a_tangent, b_tangent; -} cpSegmentShape; - -/// Allocate a segment shape. -cpSegmentShape* cpSegmentShapeAlloc(void); -/// Initialize a segment shape. -cpSegmentShape* cpSegmentShapeInit(cpSegmentShape *seg, cpBody *body, cpVect a, cpVect b, cpFloat radius); -/// Allocate and initialize a segment shape. -cpShape* cpSegmentShapeNew(cpBody *body, cpVect a, cpVect b, cpFloat radius); - -/// Let Chipmunk know about the geometry of adjacent segments to avoid colliding with endcaps. -void cpSegmentShapeSetNeighbors(cpShape *shape, cpVect prev, cpVect next); - -CP_DeclareShapeGetter(cpSegmentShape, cpVect, A); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, B); -CP_DeclareShapeGetter(cpSegmentShape, cpVect, Normal); -CP_DeclareShapeGetter(cpSegmentShape, cpFloat, Radius); - -/// @} diff --git a/external/chipmunk/include/chipmunk/cpSpace.h b/external/chipmunk/include/chipmunk/cpSpace.h deleted file mode 100644 index 26439f76c3..0000000000 --- a/external/chipmunk/include/chipmunk/cpSpace.h +++ /dev/null @@ -1,283 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpSpace cpSpace -/// @{ - -typedef struct cpContactBufferHeader cpContactBufferHeader; -typedef void (*cpSpaceArbiterApplyImpulseFunc)(cpArbiter *arb); - -/// Basic Unit of Simulation in Chipmunk -struct cpSpace { - /// Number of iterations to use in the impulse solver to solve contacts. - int iterations; - - /// Gravity to pass to rigid bodies when integrating velocity. - cpVect gravity; - - /// Damping rate expressed as the fraction of velocity bodies retain each second. - /// A value of 0.9 would mean that each body's velocity will drop 10% per second. - /// The default value is 1.0, meaning no damping is applied. - /// @note This damping value is different than those of cpDampedSpring and cpDampedRotarySpring. - cpFloat damping; - - /// Speed threshold for a body to be considered idle. - /// The default value of 0 means to let the space guess a good threshold based on gravity. - cpFloat idleSpeedThreshold; - - /// Time a group of bodies must remain idle in order to fall asleep. - /// Enabling sleeping also implicitly enables the the contact graph. - /// The default value of INFINITY disables the sleeping algorithm. - cpFloat sleepTimeThreshold; - - /// Amount of encouraged penetration between colliding shapes. - /// Used to reduce oscillating contacts and keep the collision cache warm. - /// Defaults to 0.1. If you have poor simulation quality, - /// increase this number as much as possible without allowing visible amounts of overlap. - cpFloat collisionSlop; - - /// Determines how fast overlapping shapes are pushed apart. - /// Expressed as a fraction of the error remaining after each second. - /// Defaults to pow(1.0 - 0.1, 60.0) meaning that Chipmunk fixes 10% of overlap each frame at 60Hz. - cpFloat collisionBias; - - /// Number of frames that contact information should persist. - /// Defaults to 3. There is probably never a reason to change this value. - cpTimestamp collisionPersistence; - - /// Rebuild the contact graph during each step. Must be enabled to use the cpBodyEachArbiter() function. - /// Disabled by default for a small performance boost. Enabled implicitly when the sleeping feature is enabled. - cpBool enableContactGraph; - - /// User definable data pointer. - /// Generally this points to your game's controller or game state - /// class so you can access it when given a cpSpace reference in a callback. - cpDataPointer data; - - /// The designated static body for this space. - /// You can modify this body, or replace it with your own static body. - /// By default it points to a statically allocated cpBody in the cpSpace struct. - cpBody *staticBody; - - CP_PRIVATE(cpTimestamp stamp); - CP_PRIVATE(cpFloat curr_dt); - - CP_PRIVATE(cpArray *bodies); - CP_PRIVATE(cpArray *rousedBodies); - CP_PRIVATE(cpArray *sleepingComponents); - - CP_PRIVATE(cpSpatialIndex *staticShapes); - CP_PRIVATE(cpSpatialIndex *activeShapes); - - CP_PRIVATE(cpArray *arbiters); - CP_PRIVATE(cpContactBufferHeader *contactBuffersHead); - CP_PRIVATE(cpHashSet *cachedArbiters); - CP_PRIVATE(cpArray *pooledArbiters); - CP_PRIVATE(cpArray *constraints); - - CP_PRIVATE(cpArray *allocatedBuffers); - CP_PRIVATE(int locked); - - CP_PRIVATE(cpHashSet *collisionHandlers); - CP_PRIVATE(cpCollisionHandler defaultHandler); - - CP_PRIVATE(cpBool skipPostStep); - CP_PRIVATE(cpArray *postStepCallbacks); - - CP_PRIVATE(cpBody _staticBody); -}; - -/// Allocate a cpSpace. -cpSpace* cpSpaceAlloc(void); -/// Initialize a cpSpace. -cpSpace* cpSpaceInit(cpSpace *space); -/// Allocate and initialize a cpSpace. -cpSpace* cpSpaceNew(void); - -/// Destroy a cpSpace. -void cpSpaceDestroy(cpSpace *space); -/// Destroy and free a cpSpace. -void cpSpaceFree(cpSpace *space); - -#define CP_DefineSpaceStructGetter(type, member, name) \ -static inline type cpSpaceGet##name(const cpSpace *space){return space->member;} - -#define CP_DefineSpaceStructSetter(type, member, name) \ -static inline void cpSpaceSet##name(cpSpace *space, type value){space->member = value;} - -#define CP_DefineSpaceStructProperty(type, member, name) \ -CP_DefineSpaceStructGetter(type, member, name) \ -CP_DefineSpaceStructSetter(type, member, name) - -CP_DefineSpaceStructProperty(int, iterations, Iterations) -CP_DefineSpaceStructProperty(cpVect, gravity, Gravity) -CP_DefineSpaceStructProperty(cpFloat, damping, Damping) -CP_DefineSpaceStructProperty(cpFloat, idleSpeedThreshold, IdleSpeedThreshold) -CP_DefineSpaceStructProperty(cpFloat, sleepTimeThreshold, SleepTimeThreshold) -CP_DefineSpaceStructProperty(cpFloat, collisionSlop, CollisionSlop) -CP_DefineSpaceStructProperty(cpFloat, collisionBias, CollisionBias) -CP_DefineSpaceStructProperty(cpTimestamp, collisionPersistence, CollisionPersistence) -CP_DefineSpaceStructProperty(cpBool, enableContactGraph, EnableContactGraph) -CP_DefineSpaceStructProperty(cpDataPointer, data, UserData) -CP_DefineSpaceStructGetter(cpBody*, staticBody, StaticBody) -CP_DefineSpaceStructGetter(cpFloat, CP_PRIVATE(curr_dt), CurrentTimeStep) - -/// returns true from inside a callback and objects cannot be added/removed. -static inline cpBool -cpSpaceIsLocked(cpSpace *space) -{ - return space->CP_PRIVATE(locked); -} - -/// Set a default collision handler for this space. -/// The default collision handler is invoked for each colliding pair of shapes -/// that isn't explicitly handled by a specific collision handler. -/// You can pass NULL for any function you don't want to implement. -void cpSpaceSetDefaultCollisionHandler( - cpSpace *space, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); - -/// Set a collision handler to be used whenever the two shapes with the given collision types collide. -/// You can pass NULL for any function you don't want to implement. -void cpSpaceAddCollisionHandler( - cpSpace *space, - cpCollisionType a, cpCollisionType b, - cpCollisionBeginFunc begin, - cpCollisionPreSolveFunc preSolve, - cpCollisionPostSolveFunc postSolve, - cpCollisionSeparateFunc separate, - void *data -); - -/// Unset a collision handler. -void cpSpaceRemoveCollisionHandler(cpSpace *space, cpCollisionType a, cpCollisionType b); - -/// Add a collision shape to the simulation. -/// If the shape is attached to a static body, it will be added as a static shape. -cpShape* cpSpaceAddShape(cpSpace *space, cpShape *shape); -/// Explicity add a shape as a static shape to the simulation. -cpShape* cpSpaceAddStaticShape(cpSpace *space, cpShape *shape); -/// Add a rigid body to the simulation. -cpBody* cpSpaceAddBody(cpSpace *space, cpBody *body); -/// Add a constraint to the simulation. -cpConstraint* cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint); - -/// Remove a collision shape from the simulation. -void cpSpaceRemoveShape(cpSpace *space, cpShape *shape); -/// Remove a collision shape added using cpSpaceAddStaticShape() from the simulation. -void cpSpaceRemoveStaticShape(cpSpace *space, cpShape *shape); -/// Remove a rigid body from the simulation. -void cpSpaceRemoveBody(cpSpace *space, cpBody *body); -/// Remove a constraint from the simulation. -void cpSpaceRemoveConstraint(cpSpace *space, cpConstraint *constraint); - -/// Test if a collision shape has been added to the space. -cpBool cpSpaceContainsShape(cpSpace *space, cpShape *shape); -/// Test if a rigid body has been added to the space. -cpBool cpSpaceContainsBody(cpSpace *space, cpBody *body); -/// Test if a constraint has been added to the space. -cpBool cpSpaceContainsConstraint(cpSpace *space, cpConstraint *constraint); - -/// Convert a dynamic rogue body to a static one. -/// If the body is active, you must remove it from the space first. -void cpSpaceConvertBodyToStatic(cpSpace *space, cpBody *body); -/// Convert a body to a dynamic rogue body. -/// If you want the body to be active after the transition, you must add it to the space also. -void cpSpaceConvertBodyToDynamic(cpSpace *space, cpBody *body, cpFloat mass, cpFloat moment); - -/// Post Step callback function type. -typedef void (*cpPostStepFunc)(cpSpace *space, void *key, void *data); -/// Schedule a post-step callback to be called when cpSpaceStep() finishes. -/// You can only register one callback per unique value for @c key. -/// Returns true only if @c key has never been scheduled before. -/// It's possible to pass @c NULL for @c func if you only want to mark @c key as being used. -cpBool cpSpaceAddPostStepCallback(cpSpace *space, cpPostStepFunc func, void *key, void *data); - -/// Point query callback function type. -typedef void (*cpSpacePointQueryFunc)(cpShape *shape, void *data); -/// Query the space at a point and call @c func for each shape found. -void cpSpacePointQuery(cpSpace *space, cpVect point, cpLayers layers, cpGroup group, cpSpacePointQueryFunc func, void *data); -/// Query the space at a point and return the first shape found. Returns NULL if no shapes were found. -cpShape *cpSpacePointQueryFirst(cpSpace *space, cpVect point, cpLayers layers, cpGroup group); - -/// Nearest point query callback function type. -typedef void (*cpSpaceNearestPointQueryFunc)(cpShape *shape, cpFloat distance, cpVect point, void *data); -/// Query the space at a point and call @c func for each shape found. -void cpSpaceNearestPointQuery(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpSpaceNearestPointQueryFunc func, void *data); -/// Query the space at a point and return the nearest shape found. Returns NULL if no shapes were found. -cpShape *cpSpaceNearestPointQueryNearest(cpSpace *space, cpVect point, cpFloat maxDistance, cpLayers layers, cpGroup group, cpNearestPointQueryInfo *out); - -/// Segment query callback function type. -typedef void (*cpSpaceSegmentQueryFunc)(cpShape *shape, cpFloat t, cpVect n, void *data); -/// Perform a directed line segment query (like a raycast) against the space calling @c func for each shape intersected. -void cpSpaceSegmentQuery(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSpaceSegmentQueryFunc func, void *data); -/// Perform a directed line segment query (like a raycast) against the space and return the first shape hit. Returns NULL if no shapes were hit. -cpShape *cpSpaceSegmentQueryFirst(cpSpace *space, cpVect start, cpVect end, cpLayers layers, cpGroup group, cpSegmentQueryInfo *out); - -/// Rectangle Query callback function type. -typedef void (*cpSpaceBBQueryFunc)(cpShape *shape, void *data); -/// Perform a fast rectangle query on the space calling @c func for each shape found. -/// Only the shape's bounding boxes are checked for overlap, not their full shape. -void cpSpaceBBQuery(cpSpace *space, cpBB bb, cpLayers layers, cpGroup group, cpSpaceBBQueryFunc func, void *data); - -/// Shape query callback function type. -typedef void (*cpSpaceShapeQueryFunc)(cpShape *shape, cpContactPointSet *points, void *data); -/// Query a space for any shapes overlapping the given shape and call @c func for each shape found. -cpBool cpSpaceShapeQuery(cpSpace *space, cpShape *shape, cpSpaceShapeQueryFunc func, void *data); - -/// Call cpBodyActivate() for any shape that is overlaps the given shape. -void cpSpaceActivateShapesTouchingShape(cpSpace *space, cpShape *shape); - - -/// Space/body iterator callback function type. -typedef void (*cpSpaceBodyIteratorFunc)(cpBody *body, void *data); -/// Call @c func for each body in the space. -void cpSpaceEachBody(cpSpace *space, cpSpaceBodyIteratorFunc func, void *data); - -/// Space/body iterator callback function type. -typedef void (*cpSpaceShapeIteratorFunc)(cpShape *shape, void *data); -/// Call @c func for each shape in the space. -void cpSpaceEachShape(cpSpace *space, cpSpaceShapeIteratorFunc func, void *data); - -/// Space/constraint iterator callback function type. -typedef void (*cpSpaceConstraintIteratorFunc)(cpConstraint *constraint, void *data); -/// Call @c func for each shape in the space. -void cpSpaceEachConstraint(cpSpace *space, cpSpaceConstraintIteratorFunc func, void *data); - -/// Update the collision detection info for the static shapes in the space. -void cpSpaceReindexStatic(cpSpace *space); -/// Update the collision detection data for a specific shape in the space. -void cpSpaceReindexShape(cpSpace *space, cpShape *shape); -/// Update the collision detection data for all shapes attached to a body. -void cpSpaceReindexShapesForBody(cpSpace *space, cpBody *body); - -/// Switch the space to use a spatial has as it's spatial index. -void cpSpaceUseSpatialHash(cpSpace *space, cpFloat dim, int count); - -/// Step the space forward in time by @c dt. -void cpSpaceStep(cpSpace *space, cpFloat dt); - -/// @} diff --git a/external/chipmunk/include/chipmunk/cpSpatialIndex.h b/external/chipmunk/include/chipmunk/cpSpatialIndex.h deleted file mode 100644 index c279cad063..0000000000 --- a/external/chipmunk/include/chipmunk/cpSpatialIndex.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (c) 2010 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/** - @defgroup cpSpatialIndex cpSpatialIndex - - Spatial indexes are data structures that are used to accelerate collision detection - and spatial queries. Chipmunk provides a number of spatial index algorithms to pick from - and they are programmed in a generic way so that you can use them for holding more than - just cpShape structs. - - It works by using @c void pointers to the objects you add and using a callback to ask your code - for bounding boxes when it needs them. Several types of queries can be performed an index as well - as reindexing and full collision information. All communication to the spatial indexes is performed - through callback functions. - - Spatial indexes should be treated as opaque structs. - This meanns you shouldn't be reading any of the struct fields. - @{ -*/ - -//MARK: Spatial Index - -/// Spatial index bounding box callback function type. -/// The spatial index calls this function and passes you a pointer to an object you added -/// when it needs to get the bounding box associated with that object. -typedef cpBB (*cpSpatialIndexBBFunc)(void *obj); -/// Spatial index/object iterator callback function type. -typedef void (*cpSpatialIndexIteratorFunc)(void *obj, void *data); -/// Spatial query callback function type. -typedef cpCollisionID (*cpSpatialIndexQueryFunc)(void *obj1, void *obj2, cpCollisionID id, void *data); -/// Spatial segment query callback function type. -typedef cpFloat (*cpSpatialIndexSegmentQueryFunc)(void *obj1, void *obj2, void *data); - - -typedef struct cpSpatialIndexClass cpSpatialIndexClass; -typedef struct cpSpatialIndex cpSpatialIndex; - -/// @private -struct cpSpatialIndex { - cpSpatialIndexClass *klass; - - cpSpatialIndexBBFunc bbfunc; - - cpSpatialIndex *staticIndex, *dynamicIndex; -}; - - -//MARK: Spatial Hash - -typedef struct cpSpaceHash cpSpaceHash; - -/// Allocate a spatial hash. -cpSpaceHash* cpSpaceHashAlloc(void); -/// Initialize a spatial hash. -cpSpatialIndex* cpSpaceHashInit(cpSpaceHash *hash, cpFloat celldim, int numcells, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); -/// Allocate and initialize a spatial hash. -cpSpatialIndex* cpSpaceHashNew(cpFloat celldim, int cells, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); - -/// Change the cell dimensions and table size of the spatial hash to tune it. -/// The cell dimensions should roughly match the average size of your objects -/// and the table size should be ~10 larger than the number of objects inserted. -/// Some trial and error is required to find the optimum numbers for efficiency. -void cpSpaceHashResize(cpSpaceHash *hash, cpFloat celldim, int numcells); - -//MARK: AABB Tree - -typedef struct cpBBTree cpBBTree; - -/// Allocate a bounding box tree. -cpBBTree* cpBBTreeAlloc(void); -/// Initialize a bounding box tree. -cpSpatialIndex* cpBBTreeInit(cpBBTree *tree, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); -/// Allocate and initialize a bounding box tree. -cpSpatialIndex* cpBBTreeNew(cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); - -/// Perform a static top down optimization of the tree. -void cpBBTreeOptimize(cpSpatialIndex *index); - -/// Bounding box tree velocity callback function. -/// This function should return an estimate for the object's velocity. -typedef cpVect (*cpBBTreeVelocityFunc)(void *obj); -/// Set the velocity function for the bounding box tree to enable temporal coherence. -void cpBBTreeSetVelocityFunc(cpSpatialIndex *index, cpBBTreeVelocityFunc func); - -//MARK: Single Axis Sweep - -typedef struct cpSweep1D cpSweep1D; - -/// Allocate a 1D sort and sweep broadphase. -cpSweep1D* cpSweep1DAlloc(void); -/// Initialize a 1D sort and sweep broadphase. -cpSpatialIndex* cpSweep1DInit(cpSweep1D *sweep, cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); -/// Allocate and initialize a 1D sort and sweep broadphase. -cpSpatialIndex* cpSweep1DNew(cpSpatialIndexBBFunc bbfunc, cpSpatialIndex *staticIndex); - -//MARK: Spatial Index Implementation - -typedef void (*cpSpatialIndexDestroyImpl)(cpSpatialIndex *index); - -typedef int (*cpSpatialIndexCountImpl)(cpSpatialIndex *index); -typedef void (*cpSpatialIndexEachImpl)(cpSpatialIndex *index, cpSpatialIndexIteratorFunc func, void *data); - -typedef cpBool (*cpSpatialIndexContainsImpl)(cpSpatialIndex *index, void *obj, cpHashValue hashid); -typedef void (*cpSpatialIndexInsertImpl)(cpSpatialIndex *index, void *obj, cpHashValue hashid); -typedef void (*cpSpatialIndexRemoveImpl)(cpSpatialIndex *index, void *obj, cpHashValue hashid); - -typedef void (*cpSpatialIndexReindexImpl)(cpSpatialIndex *index); -typedef void (*cpSpatialIndexReindexObjectImpl)(cpSpatialIndex *index, void *obj, cpHashValue hashid); -typedef void (*cpSpatialIndexReindexQueryImpl)(cpSpatialIndex *index, cpSpatialIndexQueryFunc func, void *data); - -typedef void (*cpSpatialIndexQueryImpl)(cpSpatialIndex *index, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data); -typedef void (*cpSpatialIndexSegmentQueryImpl)(cpSpatialIndex *index, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpatialIndexSegmentQueryFunc func, void *data); - -struct cpSpatialIndexClass { - cpSpatialIndexDestroyImpl destroy; - - cpSpatialIndexCountImpl count; - cpSpatialIndexEachImpl each; - - cpSpatialIndexContainsImpl contains; - cpSpatialIndexInsertImpl insert; - cpSpatialIndexRemoveImpl remove; - - cpSpatialIndexReindexImpl reindex; - cpSpatialIndexReindexObjectImpl reindexObject; - cpSpatialIndexReindexQueryImpl reindexQuery; - - cpSpatialIndexQueryImpl query; - cpSpatialIndexSegmentQueryImpl segmentQuery; -}; - -/// Destroy and free a spatial index. -void cpSpatialIndexFree(cpSpatialIndex *index); -/// Collide the objects in @c dynamicIndex against the objects in @c staticIndex using the query callback function. -void cpSpatialIndexCollideStatic(cpSpatialIndex *dynamicIndex, cpSpatialIndex *staticIndex, cpSpatialIndexQueryFunc func, void *data); - -/// Destroy a spatial index. -static inline void cpSpatialIndexDestroy(cpSpatialIndex *index) -{ - if(index->klass) index->klass->destroy(index); -} - -/// Get the number of objects in the spatial index. -static inline int cpSpatialIndexCount(cpSpatialIndex *index) -{ - return index->klass->count(index); -} - -/// Iterate the objects in the spatial index. @c func will be called once for each object. -static inline void cpSpatialIndexEach(cpSpatialIndex *index, cpSpatialIndexIteratorFunc func, void *data) -{ - index->klass->each(index, func, data); -} - -/// Returns true if the spatial index contains the given object. -/// Most spatial indexes use hashed storage, so you must provide a hash value too. -static inline cpBool cpSpatialIndexContains(cpSpatialIndex *index, void *obj, cpHashValue hashid) -{ - return index->klass->contains(index, obj, hashid); -} - -/// Add an object to a spatial index. -/// Most spatial indexes use hashed storage, so you must provide a hash value too. -static inline void cpSpatialIndexInsert(cpSpatialIndex *index, void *obj, cpHashValue hashid) -{ - index->klass->insert(index, obj, hashid); -} - -/// Remove an object from a spatial index. -/// Most spatial indexes use hashed storage, so you must provide a hash value too. -static inline void cpSpatialIndexRemove(cpSpatialIndex *index, void *obj, cpHashValue hashid) -{ - index->klass->remove(index, obj, hashid); -} - -/// Perform a full reindex of a spatial index. -static inline void cpSpatialIndexReindex(cpSpatialIndex *index) -{ - index->klass->reindex(index); -} - -/// Reindex a single object in the spatial index. -static inline void cpSpatialIndexReindexObject(cpSpatialIndex *index, void *obj, cpHashValue hashid) -{ - index->klass->reindexObject(index, obj, hashid); -} - -/// Perform a rectangle query against the spatial index, calling @c func for each potential match. -static inline void cpSpatialIndexQuery(cpSpatialIndex *index, void *obj, cpBB bb, cpSpatialIndexQueryFunc func, void *data) -{ - index->klass->query(index, obj, bb, func, data); -} - -/// Perform a segment query against the spatial index, calling @c func for each potential match. -static inline void cpSpatialIndexSegmentQuery(cpSpatialIndex *index, void *obj, cpVect a, cpVect b, cpFloat t_exit, cpSpatialIndexSegmentQueryFunc func, void *data) -{ - index->klass->segmentQuery(index, obj, a, b, t_exit, func, data); -} - -/// Simultaneously reindex and find all colliding objects. -/// @c func will be called once for each potentially overlapping pair of objects found. -/// If the spatial index was initialized with a static index, it will collide it's objects against that as well. -static inline void cpSpatialIndexReindexQuery(cpSpatialIndex *index, cpSpatialIndexQueryFunc func, void *data) -{ - index->klass->reindexQuery(index, func, data); -} - -///@} diff --git a/external/chipmunk/include/chipmunk/cpVect.h b/external/chipmunk/include/chipmunk/cpVect.h deleted file mode 100644 index 90855e56e2..0000000000 --- a/external/chipmunk/include/chipmunk/cpVect.h +++ /dev/null @@ -1,213 +0,0 @@ -/* Copyright (c) 2007 Scott Lembcke - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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. - */ - -/// @defgroup cpVect cpVect -/// Chipmunk's 2D vector type along with a handy 2D vector math lib. -/// @{ - -/// Constant for the zero vector. -static const cpVect cpvzero = {0.0f,0.0f}; - -/// Convenience constructor for cpVect structs. -static inline cpVect cpv(const cpFloat x, const cpFloat y) -{ - cpVect v = {x, y}; - return v; -} - -/// Spherical linearly interpolate between v1 and v2. -cpVect cpvslerp(const cpVect v1, const cpVect v2, const cpFloat t); - -/// Spherical linearly interpolate between v1 towards v2 by no more than angle a radians -cpVect cpvslerpconst(const cpVect v1, const cpVect v2, const cpFloat a); - -/// Returns a string representation of v. Intended mostly for debugging purposes and not production use. -/// @attention The string points to a static local and is reset every time the function is called. -/// If you want to print more than one vector you will have to split up your printing onto separate lines. -char* cpvstr(const cpVect v); - -/// Check if two vectors are equal. (Be careful when comparing floating point numbers!) -static inline cpBool cpveql(const cpVect v1, const cpVect v2) -{ - return (v1.x == v2.x && v1.y == v2.y); -} - -/// Add two vectors -static inline cpVect cpvadd(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x + v2.x, v1.y + v2.y); -} - -/// Subtract two vectors. -static inline cpVect cpvsub(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x - v2.x, v1.y - v2.y); -} - -/// Negate a vector. -static inline cpVect cpvneg(const cpVect v) -{ - return cpv(-v.x, -v.y); -} - -/// Scalar multiplication. -static inline cpVect cpvmult(const cpVect v, const cpFloat s) -{ - return cpv(v.x*s, v.y*s); -} - -/// Vector dot product. -static inline cpFloat cpvdot(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.x + v1.y*v2.y; -} - -/// 2D vector cross product analog. -/// The cross product of 2D vectors results in a 3D vector with only a z component. -/// This function returns the magnitude of the z value. -static inline cpFloat cpvcross(const cpVect v1, const cpVect v2) -{ - return v1.x*v2.y - v1.y*v2.x; -} - -/// Returns a perpendicular vector. (90 degree rotation) -static inline cpVect cpvperp(const cpVect v) -{ - return cpv(-v.y, v.x); -} - -/// Returns a perpendicular vector. (-90 degree rotation) -static inline cpVect cpvrperp(const cpVect v) -{ - return cpv(v.y, -v.x); -} - -/// Returns the vector projection of v1 onto v2. -static inline cpVect cpvproject(const cpVect v1, const cpVect v2) -{ - return cpvmult(v2, cpvdot(v1, v2)/cpvdot(v2, v2)); -} - -/// Returns the unit length vector for the given angle (in radians). -static inline cpVect cpvforangle(const cpFloat a) -{ - return cpv(cpfcos(a), cpfsin(a)); -} - -/// Returns the angular direction v is pointing in (in radians). -static inline cpFloat cpvtoangle(const cpVect v) -{ - return cpfatan2(v.y, v.x); -} - -/// Uses complex number multiplication to rotate v1 by v2. Scaling will occur if v1 is not a unit vector. -static inline cpVect cpvrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x - v1.y*v2.y, v1.x*v2.y + v1.y*v2.x); -} - -/// Inverse of cpvrotate(). -static inline cpVect cpvunrotate(const cpVect v1, const cpVect v2) -{ - return cpv(v1.x*v2.x + v1.y*v2.y, v1.y*v2.x - v1.x*v2.y); -} - -/// Returns the squared length of v. Faster than cpvlength() when you only need to compare lengths. -static inline cpFloat cpvlengthsq(const cpVect v) -{ - return cpvdot(v, v); -} - -/// Returns the length of v. -static inline cpFloat cpvlength(const cpVect v) -{ - return cpfsqrt(cpvdot(v, v)); -} - -/// Linearly interpolate between v1 and v2. -static inline cpVect cpvlerp(const cpVect v1, const cpVect v2, const cpFloat t) -{ - return cpvadd(cpvmult(v1, 1.0f - t), cpvmult(v2, t)); -} - -/// Returns a normalized copy of v. -static inline cpVect cpvnormalize(const cpVect v) -{ - // Neat trick I saw somewhere to avoid div/0. - return cpvmult(v, 1.0f/(cpvlength(v) + CPFLOAT_MIN)); -} - -/// @deprecated Just an alias for cpvnormalize() now. -static inline cpVect cpvnormalize_safe(const cpVect v) -{ - return cpvnormalize(v); -} - -/// Clamp v to length len. -static inline cpVect cpvclamp(const cpVect v, const cpFloat len) -{ - return (cpvdot(v,v) > len*len) ? cpvmult(cpvnormalize(v), len) : v; -} - -/// Linearly interpolate between v1 towards v2 by distance d. -static inline cpVect cpvlerpconst(cpVect v1, cpVect v2, cpFloat d) -{ - return cpvadd(v1, cpvclamp(cpvsub(v2, v1), d)); -} - -/// Returns the distance between v1 and v2. -static inline cpFloat cpvdist(const cpVect v1, const cpVect v2) -{ - return cpvlength(cpvsub(v1, v2)); -} - -/// Returns the squared distance between v1 and v2. Faster than cpvdist() when you only need to compare distances. -static inline cpFloat cpvdistsq(const cpVect v1, const cpVect v2) -{ - return cpvlengthsq(cpvsub(v1, v2)); -} - -/// Returns true if the distance between v1 and v2 is less than dist. -static inline cpBool cpvnear(const cpVect v1, const cpVect v2, const cpFloat dist) -{ - return cpvdistsq(v1, v2) < dist*dist; -} - -/// @} - -/// @defgroup cpMat2x2 cpMat2x2 -/// 2x2 matrix type used for tensors and such. -/// @{ - -static inline cpMat2x2 -cpMat2x2New(cpFloat a, cpFloat b, cpFloat c, cpFloat d) -{ - cpMat2x2 m = {a, b, c, d}; - return m; -} - -static inline cpVect -cpMat2x2Transform(cpMat2x2 m, cpVect v) -{ - return cpv(v.x*m.a + v.y*m.b, v.x*m.c + v.y*m.d); -} - -///@} From 3743f02c7eab41e579af71305dfd40f8c7cdd22f Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 5 Sep 2014 11:39:11 +0800 Subject: [PATCH 16/61] finish ios/mac/android --- .gitignore | 1 + build/cocos2d_libs.xcodeproj/project.pbxproj | 412 ++----------------- cocos/Android.mk | 7 +- external/chipmunk/Android.mk | 45 -- 4 files changed, 39 insertions(+), 426 deletions(-) delete mode 100644 external/chipmunk/Android.mk diff --git a/.gitignore b/.gitignore index 9d95296627..8816560e93 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,4 @@ project.properties /v*-deps-*.zip /v*-lua-runtime-*.zip /tools/fbx-conv/ +external/chipmunk diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 6f0291e781..b25e6a160c 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -711,116 +711,6 @@ 15AE1AD919AAD41000C27E9E /* b2Rope.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169331807AF9C005B8026 /* b2Rope.h */; }; 15AE1ADA19AAD41000C27E9E /* b2Rope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A169321807AF9C005B8026 /* b2Rope.cpp */; }; 15AE1ADB19AAD41000C27E9E /* b2Rope.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169331807AF9C005B8026 /* b2Rope.h */; }; - 15AE1ADC19AAD42500C27E9E /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169401807AFD6005B8026 /* chipmunk.h */; }; - 15AE1ADD19AAD42500C27E9E /* chipmunk_ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169411807AFD6005B8026 /* chipmunk_ffi.h */; }; - 15AE1ADE19AAD42500C27E9E /* chipmunk_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169421807AFD6005B8026 /* chipmunk_private.h */; }; - 15AE1ADF19AAD42500C27E9E /* chipmunk_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169431807AFD6005B8026 /* chipmunk_types.h */; }; - 15AE1AE019AAD42500C27E9E /* chipmunk_unsafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */; }; - 15AE1AE119AAD42500C27E9E /* cpConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169461807AFD6005B8026 /* cpConstraint.h */; }; - 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */; }; - 15AE1AE319AAD42500C27E9E /* cpDampedSpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169481807AFD6005B8026 /* cpDampedSpring.h */; }; - 15AE1AE419AAD42500C27E9E /* cpGearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169491807AFD6005B8026 /* cpGearJoint.h */; }; - 15AE1AE519AAD42500C27E9E /* cpGrooveJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */; }; - 15AE1AE619AAD42500C27E9E /* cpPinJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694B1807AFD6005B8026 /* cpPinJoint.h */; }; - 15AE1AE719AAD42500C27E9E /* cpPivotJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */; }; - 15AE1AE819AAD42500C27E9E /* cpRatchetJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */; }; - 15AE1AE919AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */; }; - 15AE1AEA19AAD42500C27E9E /* cpSimpleMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */; }; - 15AE1AEB19AAD42500C27E9E /* cpSlideJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169501807AFD6005B8026 /* cpSlideJoint.h */; }; - 15AE1AEC19AAD42500C27E9E /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169511807AFD6005B8026 /* util.h */; }; - 15AE1AED19AAD42500C27E9E /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169521807AFD6005B8026 /* cpArbiter.h */; }; - 15AE1AEE19AAD42500C27E9E /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169531807AFD6005B8026 /* cpBB.h */; }; - 15AE1AEF19AAD42500C27E9E /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169541807AFD6005B8026 /* cpBody.h */; }; - 15AE1AF019AAD42500C27E9E /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169551807AFD6005B8026 /* cpPolyShape.h */; }; - 15AE1AF119AAD42500C27E9E /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169561807AFD6005B8026 /* cpShape.h */; }; - 15AE1AF219AAD42500C27E9E /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169571807AFD6005B8026 /* cpSpace.h */; }; - 15AE1AF319AAD42500C27E9E /* cpSpatialIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169581807AFD6005B8026 /* cpSpatialIndex.h */; }; - 15AE1AF419AAD42500C27E9E /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169591807AFD6005B8026 /* cpVect.h */; }; - 15AE1AF519AAD42500C27E9E /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169401807AFD6005B8026 /* chipmunk.h */; }; - 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169411807AFD6005B8026 /* chipmunk_ffi.h */; }; - 15AE1AF719AAD42500C27E9E /* chipmunk_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169421807AFD6005B8026 /* chipmunk_private.h */; }; - 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169431807AFD6005B8026 /* chipmunk_types.h */; }; - 15AE1AF919AAD42500C27E9E /* chipmunk_unsafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */; }; - 15AE1AFA19AAD42500C27E9E /* cpConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169461807AFD6005B8026 /* cpConstraint.h */; }; - 15AE1AFB19AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */; }; - 15AE1AFC19AAD42500C27E9E /* cpDampedSpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169481807AFD6005B8026 /* cpDampedSpring.h */; }; - 15AE1AFD19AAD42500C27E9E /* cpGearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169491807AFD6005B8026 /* cpGearJoint.h */; }; - 15AE1AFE19AAD42500C27E9E /* cpGrooveJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */; }; - 15AE1AFF19AAD42500C27E9E /* cpPinJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694B1807AFD6005B8026 /* cpPinJoint.h */; }; - 15AE1B0019AAD42500C27E9E /* cpPivotJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */; }; - 15AE1B0119AAD42500C27E9E /* cpRatchetJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */; }; - 15AE1B0219AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */; }; - 15AE1B0319AAD42500C27E9E /* cpSimpleMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */; }; - 15AE1B0419AAD42500C27E9E /* cpSlideJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169501807AFD6005B8026 /* cpSlideJoint.h */; }; - 15AE1B0519AAD42500C27E9E /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169511807AFD6005B8026 /* util.h */; }; - 15AE1B0619AAD42500C27E9E /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169521807AFD6005B8026 /* cpArbiter.h */; }; - 15AE1B0719AAD42500C27E9E /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169531807AFD6005B8026 /* cpBB.h */; }; - 15AE1B0819AAD42500C27E9E /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169541807AFD6005B8026 /* cpBody.h */; }; - 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169551807AFD6005B8026 /* cpPolyShape.h */; }; - 15AE1B0A19AAD42500C27E9E /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169561807AFD6005B8026 /* cpShape.h */; }; - 15AE1B0B19AAD42500C27E9E /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169571807AFD6005B8026 /* cpSpace.h */; }; - 15AE1B0C19AAD42500C27E9E /* cpSpatialIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169581807AFD6005B8026 /* cpSpatialIndex.h */; }; - 15AE1B0D19AAD42500C27E9E /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169591807AFD6005B8026 /* cpVect.h */; }; - 15AE1B0E19AAD43700C27E9E /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697B1807AFD6005B8026 /* chipmunk.c */; }; - 15AE1B0F19AAD43700C27E9E /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697E1807AFD6005B8026 /* cpConstraint.c */; }; - 15AE1B1019AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */; }; - 15AE1B1119AAD43700C27E9E /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169801807AFD6005B8026 /* cpDampedSpring.c */; }; - 15AE1B1219AAD43700C27E9E /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169811807AFD6005B8026 /* cpGearJoint.c */; }; - 15AE1B1319AAD43700C27E9E /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169821807AFD6005B8026 /* cpGrooveJoint.c */; }; - 15AE1B1419AAD43700C27E9E /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169831807AFD6005B8026 /* cpPinJoint.c */; }; - 15AE1B1519AAD43700C27E9E /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169841807AFD6005B8026 /* cpPivotJoint.c */; }; - 15AE1B1619AAD43700C27E9E /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169851807AFD6005B8026 /* cpRatchetJoint.c */; }; - 15AE1B1719AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */; }; - 15AE1B1819AAD43700C27E9E /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169871807AFD6005B8026 /* cpSimpleMotor.c */; }; - 15AE1B1919AAD43700C27E9E /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169881807AFD6005B8026 /* cpSlideJoint.c */; }; - 15AE1B1A19AAD43700C27E9E /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169891807AFD6005B8026 /* cpArbiter.c */; }; - 15AE1B1B19AAD43700C27E9E /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698A1807AFD6005B8026 /* cpArray.c */; }; - 15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698B1807AFD6005B8026 /* cpBB.c */; }; - 15AE1B1D19AAD43700C27E9E /* cpBBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698C1807AFD6005B8026 /* cpBBTree.c */; }; - 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698D1807AFD6005B8026 /* cpBody.c */; }; - 15AE1B1F19AAD43700C27E9E /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698E1807AFD6005B8026 /* cpCollision.c */; }; - 15AE1B2019AAD43700C27E9E /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698F1807AFD6005B8026 /* cpHashSet.c */; }; - 15AE1B2119AAD43700C27E9E /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169901807AFD6005B8026 /* cpPolyShape.c */; }; - 15AE1B2219AAD43700C27E9E /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169911807AFD6005B8026 /* cpShape.c */; }; - 15AE1B2319AAD43700C27E9E /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169921807AFD6005B8026 /* cpSpace.c */; }; - 15AE1B2419AAD43700C27E9E /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169931807AFD6005B8026 /* cpSpaceComponent.c */; }; - 15AE1B2519AAD43700C27E9E /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169941807AFD6005B8026 /* cpSpaceHash.c */; }; - 15AE1B2619AAD43700C27E9E /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169951807AFD6005B8026 /* cpSpaceQuery.c */; }; - 15AE1B2719AAD43700C27E9E /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169961807AFD6005B8026 /* cpSpaceStep.c */; }; - 15AE1B2819AAD43700C27E9E /* cpSpatialIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169971807AFD6005B8026 /* cpSpatialIndex.c */; }; - 15AE1B2919AAD43700C27E9E /* cpSweep1D.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169981807AFD6005B8026 /* cpSweep1D.c */; }; - 15AE1B2A19AAD43700C27E9E /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169991807AFD6005B8026 /* cpVect.c */; }; - 15AE1B2B19AAD43700C27E9E /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1699A1807AFD6005B8026 /* prime.h */; }; - 15AE1B2C19AAD43700C27E9E /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697B1807AFD6005B8026 /* chipmunk.c */; }; - 15AE1B2D19AAD43700C27E9E /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697E1807AFD6005B8026 /* cpConstraint.c */; }; - 15AE1B2E19AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */; }; - 15AE1B2F19AAD43700C27E9E /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169801807AFD6005B8026 /* cpDampedSpring.c */; }; - 15AE1B3019AAD43700C27E9E /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169811807AFD6005B8026 /* cpGearJoint.c */; }; - 15AE1B3119AAD43700C27E9E /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169821807AFD6005B8026 /* cpGrooveJoint.c */; }; - 15AE1B3219AAD43700C27E9E /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169831807AFD6005B8026 /* cpPinJoint.c */; }; - 15AE1B3319AAD43700C27E9E /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169841807AFD6005B8026 /* cpPivotJoint.c */; }; - 15AE1B3419AAD43700C27E9E /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169851807AFD6005B8026 /* cpRatchetJoint.c */; }; - 15AE1B3519AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */; }; - 15AE1B3619AAD43700C27E9E /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169871807AFD6005B8026 /* cpSimpleMotor.c */; }; - 15AE1B3719AAD43700C27E9E /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169881807AFD6005B8026 /* cpSlideJoint.c */; }; - 15AE1B3819AAD43700C27E9E /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169891807AFD6005B8026 /* cpArbiter.c */; }; - 15AE1B3919AAD43700C27E9E /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698A1807AFD6005B8026 /* cpArray.c */; }; - 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698B1807AFD6005B8026 /* cpBB.c */; }; - 15AE1B3B19AAD43700C27E9E /* cpBBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698C1807AFD6005B8026 /* cpBBTree.c */; }; - 15AE1B3C19AAD43700C27E9E /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698D1807AFD6005B8026 /* cpBody.c */; }; - 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698E1807AFD6005B8026 /* cpCollision.c */; }; - 15AE1B3E19AAD43700C27E9E /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698F1807AFD6005B8026 /* cpHashSet.c */; }; - 15AE1B3F19AAD43700C27E9E /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169901807AFD6005B8026 /* cpPolyShape.c */; }; - 15AE1B4019AAD43700C27E9E /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169911807AFD6005B8026 /* cpShape.c */; }; - 15AE1B4119AAD43700C27E9E /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169921807AFD6005B8026 /* cpSpace.c */; }; - 15AE1B4219AAD43700C27E9E /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169931807AFD6005B8026 /* cpSpaceComponent.c */; }; - 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169941807AFD6005B8026 /* cpSpaceHash.c */; }; - 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169951807AFD6005B8026 /* cpSpaceQuery.c */; }; - 15AE1B4519AAD43700C27E9E /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169961807AFD6005B8026 /* cpSpaceStep.c */; }; - 15AE1B4619AAD43700C27E9E /* cpSpatialIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169971807AFD6005B8026 /* cpSpatialIndex.c */; }; - 15AE1B4719AAD43700C27E9E /* cpSweep1D.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169981807AFD6005B8026 /* cpSweep1D.c */; }; - 15AE1B4819AAD43700C27E9E /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169991807AFD6005B8026 /* cpVect.c */; }; - 15AE1B4919AAD43700C27E9E /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1699A1807AFD6005B8026 /* prime.h */; }; 15AE1B4A19AAD49000C27E9E /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF541C180E3B6A000584C8 /* libcurl.a */; }; 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FE18CF08D000240AA3 /* UIListView.cpp */; }; 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FF18CF08D000240AA3 /* UIListView.h */; }; @@ -1377,6 +1267,10 @@ 299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299CF1F919A434BC00C378C1 /* ccRandom.cpp */; }; 299CF1FD19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; }; 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 299CF1FA19A434BC00C378C1 /* ccRandom.h */; }; + 29B2FE9B19B95B650007833A /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B2FE9A19B95B650007833A /* libchipmunk.a */; }; + 29B2FE9C19B95B650007833A /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B2FE9A19B95B650007833A /* libchipmunk.a */; }; + 29B2FE9E19B95B6D0007833A /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B2FE9D19B95B6D0007833A /* libchipmunk.a */; }; + 29B2FE9F19B95B6D0007833A /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B2FE9D19B95B6D0007833A /* libchipmunk.a */; }; 3E6176681960F89B00DE83F5 /* CCController-iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176551960F89B00DE83F5 /* CCController-iOS.mm */; }; 3E6176691960F89B00DE83F5 /* CCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E6176561960F89B00DE83F5 /* CCController.h */; }; 3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176611960F89B00DE83F5 /* CCEventController.cpp */; }; @@ -2342,6 +2236,8 @@ 299754F3193EC95400A54AC3 /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFactory.h; path = ../base/ObjectFactory.h; sourceTree = ""; }; 299CF1F919A434BC00C378C1 /* ccRandom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccRandom.cpp; path = ../base/ccRandom.cpp; sourceTree = ""; }; 299CF1FA19A434BC00C378C1 /* ccRandom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccRandom.h; path = ../base/ccRandom.h; sourceTree = ""; }; + 29B2FE9A19B95B650007833A /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/mac/libchipmunk.a; sourceTree = ""; }; + 29B2FE9D19B95B6D0007833A /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/ios/libchipmunk.a; sourceTree = ""; }; 29BDBA52195D597A003225C9 /* UIDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIDeprecated.cpp; sourceTree = ""; }; 29CB8F4A1929D1BB00C841D6 /* UILayoutManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutManager.cpp; sourceTree = ""; }; 29CB8F4B1929D1BB00C841D6 /* UILayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutManager.h; sourceTree = ""; }; @@ -2529,62 +2425,6 @@ 46A169121807AF9C005B8026 /* b2WheelJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = b2WheelJoint.h; sourceTree = ""; }; 46A169321807AF9C005B8026 /* b2Rope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = b2Rope.cpp; sourceTree = ""; }; 46A169331807AF9C005B8026 /* b2Rope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = b2Rope.h; sourceTree = ""; }; - 46A169401807AFD6005B8026 /* chipmunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; }; - 46A169411807AFD6005B8026 /* chipmunk_ffi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; }; - 46A169421807AFD6005B8026 /* chipmunk_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = ""; }; - 46A169431807AFD6005B8026 /* chipmunk_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_types.h; sourceTree = ""; }; - 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_unsafe.h; sourceTree = ""; }; - 46A169461807AFD6005B8026 /* cpConstraint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpConstraint.h; sourceTree = ""; }; - 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpDampedRotarySpring.h; sourceTree = ""; }; - 46A169481807AFD6005B8026 /* cpDampedSpring.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpDampedSpring.h; sourceTree = ""; }; - 46A169491807AFD6005B8026 /* cpGearJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpGearJoint.h; sourceTree = ""; }; - 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpGrooveJoint.h; sourceTree = ""; }; - 46A1694B1807AFD6005B8026 /* cpPinJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPinJoint.h; sourceTree = ""; }; - 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPivotJoint.h; sourceTree = ""; }; - 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpRatchetJoint.h; sourceTree = ""; }; - 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpRotaryLimitJoint.h; sourceTree = ""; }; - 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSimpleMotor.h; sourceTree = ""; }; - 46A169501807AFD6005B8026 /* cpSlideJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSlideJoint.h; sourceTree = ""; }; - 46A169511807AFD6005B8026 /* util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; }; - 46A169521807AFD6005B8026 /* cpArbiter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpArbiter.h; sourceTree = ""; }; - 46A169531807AFD6005B8026 /* cpBB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpBB.h; sourceTree = ""; }; - 46A169541807AFD6005B8026 /* cpBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpBody.h; sourceTree = ""; }; - 46A169551807AFD6005B8026 /* cpPolyShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPolyShape.h; sourceTree = ""; }; - 46A169561807AFD6005B8026 /* cpShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpShape.h; sourceTree = ""; }; - 46A169571807AFD6005B8026 /* cpSpace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSpace.h; sourceTree = ""; }; - 46A169581807AFD6005B8026 /* cpSpatialIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSpatialIndex.h; sourceTree = ""; }; - 46A169591807AFD6005B8026 /* cpVect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = ""; }; - 46A1697B1807AFD6005B8026 /* chipmunk.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = chipmunk.c; sourceTree = ""; }; - 46A1697C1807AFD6005B8026 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - 46A1697E1807AFD6005B8026 /* cpConstraint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpConstraint.c; sourceTree = ""; }; - 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpDampedRotarySpring.c; sourceTree = ""; }; - 46A169801807AFD6005B8026 /* cpDampedSpring.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpDampedSpring.c; sourceTree = ""; }; - 46A169811807AFD6005B8026 /* cpGearJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpGearJoint.c; sourceTree = ""; }; - 46A169821807AFD6005B8026 /* cpGrooveJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpGrooveJoint.c; sourceTree = ""; }; - 46A169831807AFD6005B8026 /* cpPinJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPinJoint.c; sourceTree = ""; }; - 46A169841807AFD6005B8026 /* cpPivotJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPivotJoint.c; sourceTree = ""; }; - 46A169851807AFD6005B8026 /* cpRatchetJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpRatchetJoint.c; sourceTree = ""; }; - 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpRotaryLimitJoint.c; sourceTree = ""; }; - 46A169871807AFD6005B8026 /* cpSimpleMotor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSimpleMotor.c; sourceTree = ""; }; - 46A169881807AFD6005B8026 /* cpSlideJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSlideJoint.c; sourceTree = ""; }; - 46A169891807AFD6005B8026 /* cpArbiter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpArbiter.c; sourceTree = ""; }; - 46A1698A1807AFD6005B8026 /* cpArray.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = ""; }; - 46A1698B1807AFD6005B8026 /* cpBB.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBB.c; sourceTree = ""; }; - 46A1698C1807AFD6005B8026 /* cpBBTree.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBBTree.c; sourceTree = ""; }; - 46A1698D1807AFD6005B8026 /* cpBody.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBody.c; sourceTree = ""; }; - 46A1698E1807AFD6005B8026 /* cpCollision.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpCollision.c; sourceTree = ""; }; - 46A1698F1807AFD6005B8026 /* cpHashSet.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpHashSet.c; sourceTree = ""; }; - 46A169901807AFD6005B8026 /* cpPolyShape.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPolyShape.c; sourceTree = ""; }; - 46A169911807AFD6005B8026 /* cpShape.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpShape.c; sourceTree = ""; }; - 46A169921807AFD6005B8026 /* cpSpace.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpace.c; sourceTree = ""; }; - 46A169931807AFD6005B8026 /* cpSpaceComponent.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceComponent.c; sourceTree = ""; }; - 46A169941807AFD6005B8026 /* cpSpaceHash.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = ""; }; - 46A169951807AFD6005B8026 /* cpSpaceQuery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceQuery.c; sourceTree = ""; }; - 46A169961807AFD6005B8026 /* cpSpaceStep.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceStep.c; sourceTree = ""; }; - 46A169971807AFD6005B8026 /* cpSpatialIndex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpatialIndex.c; sourceTree = ""; }; - 46A169981807AFD6005B8026 /* cpSweep1D.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSweep1D.c; sourceTree = ""; }; - 46A169991807AFD6005B8026 /* cpVect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = ""; }; - 46A1699A1807AFD6005B8026 /* prime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = ""; }; 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsBody.cpp; sourceTree = ""; }; 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsBody.h; sourceTree = ""; }; 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContact.cpp; sourceTree = ""; }; @@ -2910,7 +2750,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 29B2FE9B19B95B650007833A /* libchipmunk.a in Frameworks */, 15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */, + 29B2FE9E19B95B6D0007833A /* libchipmunk.a in Frameworks */, B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */, B21770491977ED4C009EE11B /* libz.dylib in Frameworks */, B21770471977ED34009EE11B /* QuartzCore.framework in Frameworks */, @@ -2931,12 +2773,14 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 29B2FE9F19B95B6D0007833A /* libchipmunk.a in Frameworks */, 15AE1C1919AAE30900C27E9E /* libwebsockets.a in Frameworks */, 15AE1B4A19AAD49000C27E9E /* libcurl.a in Frameworks */, A07A4CAF1783777C0073F6A7 /* Foundation.framework in Frameworks */, 1A570364180BD1120088DEC7 /* libpng.a in Frameworks */, 1A570378180BD1B40088DEC7 /* libjpeg.a in Frameworks */, 1A5703A4180BD2350088DEC7 /* libtiff.a in Frameworks */, + 29B2FE9C19B95B650007833A /* libchipmunk.a in Frameworks */, 1A5703BB180BD2800088DEC7 /* libwebp.a in Frameworks */, 1A57052E180BD3280088DEC7 /* libfreetype.a in Frameworks */, ); @@ -4010,6 +3854,22 @@ path = UIEditBox; sourceTree = ""; }; + 29B2FE9219B95AFF0007833A /* ios */ = { + isa = PBXGroup; + children = ( + 29B2FE9D19B95B6D0007833A /* libchipmunk.a */, + ); + name = ios; + sourceTree = ""; + }; + 29B2FE9319B95B040007833A /* mac */ = { + isa = PBXGroup; + children = ( + 29B2FE9A19B95B650007833A /* libchipmunk.a */, + ); + name = mac; + sourceTree = ""; + }; 29CB8F501929D63600C841D6 /* layout */ = { isa = PBXGroup; children = ( @@ -4386,107 +4246,13 @@ 46A1693A1807AFD6005B8026 /* chipmunk */ = { isa = PBXGroup; children = ( - 46A1693E1807AFD6005B8026 /* include */, - 46A1697A1807AFD6005B8026 /* src */, + 29B2FE9319B95B040007833A /* mac */, + 29B2FE9219B95AFF0007833A /* ios */, ); name = chipmunk; path = ../external/chipmunk; sourceTree = ""; }; - 46A1693E1807AFD6005B8026 /* include */ = { - isa = PBXGroup; - children = ( - 46A1693F1807AFD6005B8026 /* chipmunk */, - ); - path = include; - sourceTree = ""; - }; - 46A1693F1807AFD6005B8026 /* chipmunk */ = { - isa = PBXGroup; - children = ( - 46A169401807AFD6005B8026 /* chipmunk.h */, - 46A169411807AFD6005B8026 /* chipmunk_ffi.h */, - 46A169421807AFD6005B8026 /* chipmunk_private.h */, - 46A169431807AFD6005B8026 /* chipmunk_types.h */, - 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */, - 46A169451807AFD6005B8026 /* constraints */, - 46A169521807AFD6005B8026 /* cpArbiter.h */, - 46A169531807AFD6005B8026 /* cpBB.h */, - 46A169541807AFD6005B8026 /* cpBody.h */, - 46A169551807AFD6005B8026 /* cpPolyShape.h */, - 46A169561807AFD6005B8026 /* cpShape.h */, - 46A169571807AFD6005B8026 /* cpSpace.h */, - 46A169581807AFD6005B8026 /* cpSpatialIndex.h */, - 46A169591807AFD6005B8026 /* cpVect.h */, - ); - path = chipmunk; - sourceTree = ""; - }; - 46A169451807AFD6005B8026 /* constraints */ = { - isa = PBXGroup; - children = ( - 46A169461807AFD6005B8026 /* cpConstraint.h */, - 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */, - 46A169481807AFD6005B8026 /* cpDampedSpring.h */, - 46A169491807AFD6005B8026 /* cpGearJoint.h */, - 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */, - 46A1694B1807AFD6005B8026 /* cpPinJoint.h */, - 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */, - 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */, - 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */, - 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */, - 46A169501807AFD6005B8026 /* cpSlideJoint.h */, - 46A169511807AFD6005B8026 /* util.h */, - ); - path = constraints; - sourceTree = ""; - }; - 46A1697A1807AFD6005B8026 /* src */ = { - isa = PBXGroup; - children = ( - 46A1697B1807AFD6005B8026 /* chipmunk.c */, - 46A1697C1807AFD6005B8026 /* CMakeLists.txt */, - 46A1697D1807AFD6005B8026 /* constraints */, - 46A169891807AFD6005B8026 /* cpArbiter.c */, - 46A1698A1807AFD6005B8026 /* cpArray.c */, - 46A1698B1807AFD6005B8026 /* cpBB.c */, - 46A1698C1807AFD6005B8026 /* cpBBTree.c */, - 46A1698D1807AFD6005B8026 /* cpBody.c */, - 46A1698E1807AFD6005B8026 /* cpCollision.c */, - 46A1698F1807AFD6005B8026 /* cpHashSet.c */, - 46A169901807AFD6005B8026 /* cpPolyShape.c */, - 46A169911807AFD6005B8026 /* cpShape.c */, - 46A169921807AFD6005B8026 /* cpSpace.c */, - 46A169931807AFD6005B8026 /* cpSpaceComponent.c */, - 46A169941807AFD6005B8026 /* cpSpaceHash.c */, - 46A169951807AFD6005B8026 /* cpSpaceQuery.c */, - 46A169961807AFD6005B8026 /* cpSpaceStep.c */, - 46A169971807AFD6005B8026 /* cpSpatialIndex.c */, - 46A169981807AFD6005B8026 /* cpSweep1D.c */, - 46A169991807AFD6005B8026 /* cpVect.c */, - 46A1699A1807AFD6005B8026 /* prime.h */, - ); - path = src; - sourceTree = ""; - }; - 46A1697D1807AFD6005B8026 /* constraints */ = { - isa = PBXGroup; - children = ( - 46A1697E1807AFD6005B8026 /* cpConstraint.c */, - 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */, - 46A169801807AFD6005B8026 /* cpDampedSpring.c */, - 46A169811807AFD6005B8026 /* cpGearJoint.c */, - 46A169821807AFD6005B8026 /* cpGrooveJoint.c */, - 46A169831807AFD6005B8026 /* cpPinJoint.c */, - 46A169841807AFD6005B8026 /* cpPivotJoint.c */, - 46A169851807AFD6005B8026 /* cpRatchetJoint.c */, - 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */, - 46A169871807AFD6005B8026 /* cpSimpleMotor.c */, - 46A169881807AFD6005B8026 /* cpSlideJoint.c */, - ); - path = constraints; - sourceTree = ""; - }; 46A169A11807B037005B8026 /* 2d */ = { isa = PBXGroup; children = ( @@ -4999,7 +4765,6 @@ 15AE19E919AAD3A700C27E9E /* Slot.h in Headers */, B375107B1823AC9F00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */, 15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, - 15AE1AE919AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */, 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */, 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */, 50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */, @@ -5064,7 +4829,6 @@ 15AE1A6B19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, 1A570110180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, B37510791823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */, - 15AE1AF419AAD42500C27E9E /* cpVect.h in Headers */, 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, 15AE1A6019AAD40300C27E9E /* b2ContactManager.h in Headers */, 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, @@ -5075,16 +4839,13 @@ 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */, 15AE1A7119AAD40300C27E9E /* b2Contact.h in Headers */, - 15AE1AF019AAD42500C27E9E /* cpPolyShape.h in Headers */, 50ABBED11925AB6F00A911A9 /* TGAlib.h in Headers */, 15AE19D319AAD3A700C27E9E /* Bone.h in Headers */, - 15AE1AE819AAD42500C27E9E /* cpRatchetJoint.h in Headers */, 1A57019F180BCB590088DEC7 /* CCFont.h in Headers */, 1A5701A3180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE18E919AAD35000C27E9E /* CCActionManagerEx.h in Headers */, 1A01C68618F57BE800EFE3A6 /* CCArray.h in Headers */, 1A5701A7180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, - 15AE1ADD19AAD42500C27E9E /* chipmunk_ffi.h in Headers */, 15AE1A7D19AAD40300C27E9E /* b2MotorJoint.h in Headers */, 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */, 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, @@ -5104,13 +4865,10 @@ 1A5701BB180BCB5A0088DEC7 /* CCLabel.h in Headers */, 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */, 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */, - 15AE1ADC19AAD42500C27E9E /* chipmunk.h in Headers */, 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */, 15AE19D519AAD3A700C27E9E /* BoneData.h in Headers */, 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, - 15AE1AEF19AAD42500C27E9E /* cpBody.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, - 15AE1AF119AAD42500C27E9E /* cpShape.h in Headers */, 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, 50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */, 15AE197519AAD35700C27E9E /* CCTimeLine.h in Headers */, @@ -5127,21 +4885,17 @@ 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */, 50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */, 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */, - 15AE1AE519AAD42500C27E9E /* cpGrooveJoint.h in Headers */, 15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */, 15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, 15AE1B5E19AADA9900C27E9E /* UITextBMFont.h in Headers */, 15AE18E719AAD35000C27E9E /* CCActionFrameEasing.h in Headers */, 1A5701E8180BCB8C0088DEC7 /* CCTransition.h in Headers */, - 15AE1AE119AAD42500C27E9E /* cpConstraint.h in Headers */, 1A5701EC180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, - 15AE1AF319AAD42500C27E9E /* cpSpatialIndex.h in Headers */, 15AE19DB19AAD3A700C27E9E /* extension.h in Headers */, 1A5701F0180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, 1A5701F9180BCBAD0088DEC7 /* CCMenu.h in Headers */, 50ABBD401925AB0000A911A9 /* CCMath.h in Headers */, - 15AE1AE419AAD42500C27E9E /* cpGearJoint.h in Headers */, 15AE1A9319AAD40300C27E9E /* b2WheelJoint.h in Headers */, 15AE1A3119AAD3D500C27E9E /* b2ChainShape.h in Headers */, 1A5701FD180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, @@ -5178,8 +4932,6 @@ 15AE191C19AAD35000C27E9E /* CCTransformHelp.h in Headers */, 5034CA2F191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */, 15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */, - 15AE1AE619AAD42500C27E9E /* cpPinJoint.h in Headers */, - 15AE1AEE19AAD42500C27E9E /* cpBB.h in Headers */, 50ABBE951925AB6F00A911A9 /* CCProfiling.h in Headers */, 5034CA4B191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, 50ABBE4F1925AB6F00A911A9 /* CCEventCustom.h in Headers */, @@ -5188,7 +4940,6 @@ 15AE18F119AAD35000C27E9E /* CCArmatureAnimation.h in Headers */, 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, - 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, @@ -5208,7 +4959,6 @@ 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, 1A570288180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, 15AE189519AAD33D00C27E9E /* CCLayerLoader.h in Headers */, - 15AE1AEB19AAD42500C27E9E /* cpSlideJoint.h in Headers */, 1A57028C180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */, 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */, @@ -5289,7 +5039,6 @@ 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */, 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, 15AE19C319AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */, - 15AE1AF219AAD42500C27E9E /* cpSpace.h in Headers */, 15AE19C919AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */, @@ -5304,11 +5053,9 @@ 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, B37510741823AC9F00B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, - 15AE1ADF19AAD42500C27E9E /* chipmunk_types.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */, 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */, - 15AE1AEA19AAD42500C27E9E /* cpSimpleMotor.h in Headers */, 50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE1A5619AAD40300C27E9E /* b2Math.h in Headers */, 50ABBE9D1925AB6F00A911A9 /* CCRefPtr.h in Headers */, @@ -5361,7 +5108,6 @@ 50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */, 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */, 50ABC0231926664800A911A9 /* CCGLViewImpl.h in Headers */, - 15AE1AE319AAD42500C27E9E /* cpDampedSpring.h in Headers */, 15AE188D19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, 50ABBFFD1926664800A911A9 /* CCFileUtilsApple.h in Headers */, @@ -5369,7 +5115,6 @@ 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, 1A01C69E18F57BE800EFE3A6 /* CCString.h in Headers */, - 15AE1AE019AAD42500C27E9E /* chipmunk_unsafe.h in Headers */, 50ABC00F1926664800A911A9 /* CCFileUtils.h in Headers */, 15AE1A3719AAD3D500C27E9E /* b2PolygonShape.h in Headers */, 15AE1B5419AADA9900C27E9E /* UIRichText.h in Headers */, @@ -5379,17 +5124,14 @@ 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */, 50ABBD9D1925AB4100A911A9 /* ccGLStateCache.h in Headers */, 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */, - 15AE1AEC19AAD42500C27E9E /* util.h in Headers */, 15AE19DD19AAD3A700C27E9E /* Json.h in Headers */, 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, - 15AE1B2B19AAD43700C27E9E /* prime.h in Headers */, 15AE19ED19AAD3A700C27E9E /* spine-cocos2dx.h in Headers */, 50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */, 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - 15AE1AE719AAD42500C27E9E /* cpPivotJoint.h in Headers */, 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */, 15AE19CB19AAD3A700C27E9E /* Atlas.h in Headers */, 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, @@ -5425,7 +5167,6 @@ 50ABBE971925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABC0691926664800A911A9 /* CCStdC.h in Headers */, 15AE1A2B19AAD3D500C27E9E /* b2Distance.h in Headers */, - 15AE1ADE19AAD42500C27E9E /* chipmunk_private.h in Headers */, 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */, 15AE190219AAD35000C27E9E /* CCComController.h in Headers */, 15AE18DE19AAD35000C27E9E /* TriggerObj.h in Headers */, @@ -5435,7 +5176,6 @@ 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, - 15AE1AED19AAD42500C27E9E /* cpArbiter.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, 50ABC0091926664800A911A9 /* CCCommon.h in Headers */, @@ -5464,7 +5204,6 @@ 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - 15AE1AFA19AAD42500C27E9E /* cpConstraint.h in Headers */, 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 15AE1A0A19AAD3A700C27E9E /* CCSkeleton.h in Headers */, @@ -5495,13 +5234,11 @@ 15AE1AA919AAD40300C27E9E /* b2TimeStep.h in Headers */, 15AE197A19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */, - 15AE1AF919AAD42500C27E9E /* chipmunk_unsafe.h in Headers */, 15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */, 50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */, 50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */, B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, - 15AE1B0D19AAD42500C27E9E /* cpVect.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, 15AE1A0E19AAD3A700C27E9E /* extension.h in Headers */, 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, @@ -5511,14 +5248,12 @@ 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */, 503DD8EC1926736A00CD74DD /* CCGLViewImpl.h in Headers */, 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, - 15AE1B0719AAD42500C27E9E /* cpBB.h in Headers */, 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */, 15AE1ACD19AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, 15AE1A1219AAD3A700C27E9E /* RegionAttachment.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, - 15AE1B0219AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */, 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, 15AE195C19AAD35100C27E9E /* CCSGUIReader.h in Headers */, @@ -5531,7 +5266,6 @@ 15AE194A19AAD35100C27E9E /* CCComController.h in Headers */, B37510841823ACA100B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */, 5034CA46191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, - 15AE1B0019AAD42500C27E9E /* cpPivotJoint.h in Headers */, 1A570078180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */, 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */, @@ -5581,7 +5315,6 @@ 503DD8E61926736A00CD74DD /* CCEAGLView.h in Headers */, 50ABBE4C1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, - 15AE1B0419AAD42500C27E9E /* cpSlideJoint.h in Headers */, 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */, 1A570122180BC90D0088DEC7 /* CCGrid.h in Headers */, @@ -5608,7 +5341,6 @@ 15AE1AAD19AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */, - 15AE1AFF19AAD42500C27E9E /* cpPinJoint.h in Headers */, 1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, 15AE1A4C19AAD3D500C27E9E /* b2EdgeShape.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, @@ -5626,7 +5358,6 @@ 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, 292DB14619B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */, - 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */, 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, 5034CA42191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, @@ -5635,8 +5366,6 @@ 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */, 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */, 15AE1BBC19AADFF000C27E9E /* HttpResponse.h in Headers */, - 15AE1B0319AAD42500C27E9E /* cpSimpleMotor.h in Headers */, - 15AE1AFE19AAD42500C27E9E /* cpGrooveJoint.h in Headers */, 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */, 50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */, 15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */, @@ -5645,7 +5374,6 @@ 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */, 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, - 15AE1B0B19AAD42500C27E9E /* cpSpace.h in Headers */, 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, 15AE1A3919AAD3D500C27E9E /* Box2D.h in Headers */, @@ -5681,13 +5409,11 @@ 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */, 50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */, 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, - 15AE1B4919AAD43700C27E9E /* prime.h in Headers */, 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, 15AE1A0419AAD3A700C27E9E /* AttachmentLoader.h in Headers */, 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, 15AE1ABD19AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, - 15AE1B0119AAD42500C27E9E /* cpRatchetJoint.h in Headers */, 15AE1AA819AAD40300C27E9E /* b2Island.h in Headers */, 1A570213180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, B37510821823ACA100B3BA6A /* CCPhysicsJointInfo_chipmunk.h in Headers */, @@ -5703,14 +5429,12 @@ 1A57022C180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, - 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */, 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, 15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */, 15AE192A19AAD35100C27E9E /* TriggerMng.h in Headers */, - 15AE1B0819AAD42500C27E9E /* cpBody.h in Headers */, 5034CA2C191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, 50ABBE981925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABBD431925AB0000A911A9 /* CCMathBase.h in Headers */, @@ -5747,7 +5471,6 @@ 15AE18C819AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 15AE1AC319AAD40300C27E9E /* b2DistanceJoint.h in Headers */, - 15AE1AF719AAD42500C27E9E /* chipmunk_private.h in Headers */, 50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, 1A5702CB180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, @@ -5775,7 +5498,6 @@ 15AE1AD519AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE18B019AAD33D00C27E9E /* CCBKeyframe.h in Headers */, 15AE18C419AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, - 15AE1AFB19AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, 1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */, 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, B375107F1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, @@ -5784,7 +5506,6 @@ 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */, - 15AE1AFC19AAD42500C27E9E /* cpDampedSpring.h in Headers */, 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */, 1A57034E180BD09B0088DEC7 /* tinyxml2.h in Headers */, 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, @@ -5820,12 +5541,10 @@ 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, - 15AE1AFD19AAD42500C27E9E /* cpGearJoint.h in Headers */, 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */, B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */, 3E6176771960F89B00DE83F5 /* CCEventListenerController.h in Headers */, 50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */, - 15AE1B0A19AAD42500C27E9E /* cpShape.h in Headers */, 15AE18CA19AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, 50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */, 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */, @@ -5866,7 +5585,6 @@ 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, 15AE1AD119AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, 15AE1A2119AAD3A700C27E9E /* spine.h in Headers */, - 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, @@ -5899,7 +5617,6 @@ 15AE1BF619AAE01E00C27E9E /* CCControlSlider.h in Headers */, 1A01C68718F57BE800EFE3A6 /* CCArray.h in Headers */, 1A01C6A718F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, - 15AE1AF519AAD42500C27E9E /* chipmunk.h in Headers */, 50ABBEDA1925AB6F00A911A9 /* ZipUtils.h in Headers */, 50ABBDC01925AB4100A911A9 /* CCTextureCache.h in Headers */, B276EF641988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, @@ -5920,19 +5637,16 @@ 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, - 15AE1B0C19AAD42500C27E9E /* cpSpatialIndex.h in Headers */, 503DD8EA1926736A00CD74DD /* CCESRenderer.h in Headers */, 50ABBE581925AB6F00A911A9 /* CCEventFocus.h in Headers */, 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, 15AE1AAF19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, - 15AE1B0619AAD42500C27E9E /* cpArbiter.h in Headers */, 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */, 15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 50ABC00A1926664800A911A9 /* CCCommon.h in Headers */, 15AE19AD19AAD39700C27E9E /* LoadingBarReader.h in Headers */, 50ABBE5C1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, B375107D1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, - 15AE1B0519AAD42500C27E9E /* util.h in Headers */, 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, 503DD8F11926736A00CD74DD /* OpenGL_Internal.h in Headers */, B37510801823ACA100B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */, @@ -6019,7 +5733,6 @@ files = ( 15AE1A9019AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 50ABBE2B1925AB6F00A911A9 /* ccCArray.cpp in Sources */, - 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */, 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */, @@ -6034,25 +5747,20 @@ 15AE1A5D19AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, 15AE19D619AAD3A700C27E9E /* CCSkeleton.cpp in Sources */, - 15AE1B1F19AAD43700C27E9E /* cpCollision.c in Sources */, 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */, 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */, 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */, 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, - 15AE1B2719AAD43700C27E9E /* cpSpaceStep.c in Sources */, 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */, 50ABC0611926664800A911A9 /* CCCommon.mm in Sources */, - 15AE1B2519AAD43700C27E9E /* cpSpaceHash.c in Sources */, 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */, 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */, 46A170EF1807CECA005B8026 /* CCPhysicsWorld.cpp in Sources */, 15AE18E419AAD35000C27E9E /* CCActionFrame.cpp in Sources */, 15AE18FD19AAD35000C27E9E /* CCComAttribute.cpp in Sources */, 46A170ED1807CECA005B8026 /* CCPhysicsShape.cpp in Sources */, - 15AE1B0F19AAD43700C27E9E /* cpConstraint.c in Sources */, 50ABBE991925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */, - 15AE1B2219AAD43700C27E9E /* cpShape.c in Sources */, ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */, 15AE1A2C19AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, @@ -6068,10 +5776,8 @@ 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */, 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */, - 15AE1B2119AAD43700C27E9E /* cpPolyShape.c in Sources */, 15AE189819AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */, 15AE1A5719AAD40300C27E9E /* b2Settings.cpp in Sources */, - 15AE1B1819AAD43700C27E9E /* cpSimpleMotor.c in Sources */, 50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, 15AE197419AAD35700C27E9E /* CCTimeLine.cpp in Sources */, 15AE188E19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, @@ -6086,7 +5792,6 @@ 1A570065180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - 15AE1B2A19AAD43700C27E9E /* cpVect.c in Sources */, 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 15AE19E619AAD3A700C27E9E /* Skin.cpp in Sources */, 1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, @@ -6102,10 +5807,8 @@ B37510761823AC9F00B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */, 50ABBFFF1926664800A911A9 /* CCFileUtilsApple.mm in Sources */, 1A570075180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, - 15AE1B2019AAD43700C27E9E /* cpHashSet.c in Sources */, 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */, B375107A1823AC9F00B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, - 15AE1B1A19AAD43700C27E9E /* cpArbiter.c in Sources */, 15AE1A5F19AAD40300C27E9E /* b2ContactManager.cpp in Sources */, 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, @@ -6128,14 +5831,12 @@ 50ABBEBF1925AB6F00A911A9 /* CCValue.cpp in Sources */, 1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, 1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */, - 15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */, 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, 15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, - 15AE1B0E19AAD43700C27E9E /* chipmunk.c in Sources */, 15AE183819AAD2F700C27E9E /* CCRay.cpp in Sources */, B37510781823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.cpp in Sources */, 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, @@ -6171,13 +5872,11 @@ 1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */, 15AE19DC19AAD3A700C27E9E /* Json.cpp in Sources */, - 15AE1B2419AAD43700C27E9E /* cpSpaceComponent.c in Sources */, 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 15AE1A8819AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, 1A5701C1180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */, - 15AE1B2819AAD43700C27E9E /* cpSpatialIndex.c in Sources */, 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, 15AE1A8C19AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, 50ABBD4C1925AB0000A911A9 /* MathUtil.cpp in Sources */, @@ -6190,7 +5889,6 @@ 1A5701C7180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 15AE18A819AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, 1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, - 15AE1B2619AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */, @@ -6242,7 +5940,6 @@ B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, - 15AE1B1419AAD43700C27E9E /* cpPinJoint.c in Sources */, 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */, 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, @@ -6284,14 +5981,12 @@ B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, 1A5702F2180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, 15AE1A5B19AAD40300C27E9E /* b2Timer.cpp in Sources */, - 15AE1B1219AAD43700C27E9E /* cpGearJoint.c in Sources */, 15AE189419AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 15AE197219AAD35700C27E9E /* CCNodeReader.cpp in Sources */, 1A5702F6180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 1A5702FA180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */, 15AE19E219AAD3A700C27E9E /* SkeletonData.cpp in Sources */, - 15AE1B1119AAD43700C27E9E /* cpDampedSpring.c in Sources */, 15AE1A7219AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBD5C1925AB0000A911A9 /* Vec3.cpp in Sources */, @@ -6370,14 +6065,11 @@ 50ABBEA31925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, 15AE190519AAD35000C27E9E /* CCDataReaderHelper.cpp in Sources */, 15AE19A019AAD39600C27E9E /* TextAtlasReader.cpp in Sources */, - 15AE1B1D19AAD43700C27E9E /* cpBBTree.c in Sources */, 15AE1A2A19AAD3D500C27E9E /* b2Distance.cpp in Sources */, 50ABBE6D1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, 1AAF5853180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */, - 15AE1B1B19AAD43700C27E9E /* cpArray.c in Sources */, 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */, 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - 15AE1B1919AAD43700C27E9E /* cpSlideJoint.c in Sources */, 50ABBD541925AB0000A911A9 /* TransformUtils.cpp in Sources */, 15AE1A3619AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, @@ -6385,7 +6077,6 @@ 15AE19E019AAD3A700C27E9E /* Skeleton.cpp in Sources */, 50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */, - 15AE1B1519AAD43700C27E9E /* cpPivotJoint.c in Sources */, 15AE1A3219AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, 15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */, 15AE197019AAD35700C27E9E /* CCFrame.cpp in Sources */, @@ -6398,7 +6089,6 @@ 15AE1A8E19AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, 15AE19BC19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */, 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, - 15AE1B2319AAD43700C27E9E /* cpSpace.c in Sources */, 50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, 15AE1B4F19AADA9900C27E9E /* UILoadingBar.cpp in Sources */, @@ -6410,7 +6100,6 @@ 50ABC0211926664800A911A9 /* CCGLViewImpl.cpp in Sources */, 50ABC00D1926664800A911A9 /* CCFileUtils.cpp in Sources */, 50ABBE4D1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, - 15AE1B1319AAD43700C27E9E /* cpGrooveJoint.c in Sources */, 15AE1A6819AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, 50ABBE9F1925AB6F00A911A9 /* CCScheduler.cpp in Sources */, 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */, @@ -6430,7 +6119,6 @@ 50ABC05F1926664800A911A9 /* CCApplication.mm in Sources */, 15AE1A9219AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, - 15AE1B1619AAD43700C27E9E /* cpRatchetJoint.c in Sources */, 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, @@ -6442,10 +6130,7 @@ 15AE1B6B19AADA9900C27E9E /* UIWidget.cpp in Sources */, 50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */, 15AE188819AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, - 15AE1B1719AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */, - 15AE1B1019AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */, 15AE18A419AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, - 15AE1B2919AAD43700C27E9E /* cpSweep1D.c in Sources */, 15AE1B5719AADA9900C27E9E /* UISlider.cpp in Sources */, 1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, ); @@ -6457,19 +6142,14 @@ files = ( 15AE1B9819AADAA100C27E9E /* UIVideoPlayerIOS.mm in Sources */, 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, - 15AE1B4019AAD43700C27E9E /* cpShape.c in Sources */, 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */, 15AE18D019AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, 15AE192C19AAD35100C27E9E /* CCActionFrame.cpp in Sources */, - 15AE1B2D19AAD43700C27E9E /* cpConstraint.c in Sources */, 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */, 15AE199219AAD37300C27E9E /* ImageViewReader.cpp in Sources */, - 15AE1B3B19AAD43700C27E9E /* cpBBTree.c in Sources */, 15AE197D19AAD35700C27E9E /* CCNodeReader.cpp in Sources */, 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */, - 15AE1B3119AAD43700C27E9E /* cpGrooveJoint.c in Sources */, - 15AE1B3919AAD43700C27E9E /* cpArray.c in Sources */, 46A171051807CECB005B8026 /* CCPhysicsWorld.cpp in Sources */, 50ABBDA01925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, @@ -6483,7 +6163,6 @@ 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, B276EF621988D1D500CD400F /* CCVertexIndexData.cpp in Sources */, 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, - 15AE1B3419AAD43700C27E9E /* cpRatchetJoint.c in Sources */, 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, @@ -6511,7 +6190,6 @@ 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */, - 15AE1B3519AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */, 15AE1A9B19AAD40300C27E9E /* b2Settings.cpp in Sources */, 1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, @@ -6568,10 +6246,8 @@ 15AE1AB219AAD40300C27E9E /* b2CircleContact.cpp in Sources */, 15AE1A1919AAD3A700C27E9E /* Skin.cpp in Sources */, 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, - 15AE1B2C19AAD43700C27E9E /* chipmunk.c in Sources */, B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, 15AE1BB919AADFF000C27E9E /* HttpClient.cpp in Sources */, - 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */, 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, 292DB14419B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, @@ -6584,7 +6260,6 @@ 15AE1AD019AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, 15AE192419AAD35100C27E9E /* CocoLoader.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, - 15AE1B4119AAD43700C27E9E /* cpSpace.c in Sources */, 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */, 15AE1A1B19AAD3A700C27E9E /* Slot.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, @@ -6598,14 +6273,11 @@ 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, 15AE1A0119AAD3A700C27E9E /* Attachment.cpp in Sources */, - 15AE1B4819AAD43700C27E9E /* cpVect.c in Sources */, - 15AE1B3E19AAD43700C27E9E /* cpHashSet.c in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */, 15AE1AA119AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1ABA19AAD40300C27E9E /* b2EdgeAndPolygonContact.cpp in Sources */, 15AE181B19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, - 15AE1B3719AAD43700C27E9E /* cpSlideJoint.c in Sources */, 1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, 1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, 1A570099180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, @@ -6625,7 +6297,6 @@ 503DD8E21926736A00CD74DD /* CCCommon.mm in Sources */, 292DB14A19B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, - 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */, @@ -6676,14 +6347,11 @@ 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, - 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */, 1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, 15AE1A9D19AAD40300C27E9E /* b2StackAllocator.cpp in Sources */, 1A5701EF180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, 1A5701F8180BCBAD0088DEC7 /* CCMenu.cpp in Sources */, 50ABBD511925AB0000A911A9 /* Quaternion.cpp in Sources */, - 15AE1B2F19AAD43700C27E9E /* cpDampedSpring.c in Sources */, - 15AE1B3619AAD43700C27E9E /* cpSimpleMotor.c in Sources */, 1A5701FC180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, 15AE195119AAD35100C27E9E /* CCDecorativeDisplay.cpp in Sources */, 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */, @@ -6693,7 +6361,6 @@ 1A570209180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 1A570211180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */, - 15AE1B3819AAD43700C27E9E /* cpArbiter.c in Sources */, 503DD8ED1926736A00CD74DD /* CCGLViewImpl.mm in Sources */, 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 15AE1A0F19AAD3A700C27E9E /* Json.cpp in Sources */, @@ -6737,7 +6404,6 @@ 15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */, 1A57028B180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 1A570293180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, - 15AE1B3319AAD43700C27E9E /* cpPivotJoint.c in Sources */, 15AE1AAE19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE194D19AAD35100C27E9E /* CCDataReaderHelper.cpp in Sources */, 15AE1B8C19AADA9A00C27E9E /* UIScale9Sprite.cpp in Sources */, @@ -6749,14 +6415,12 @@ 15AE1AD419AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */, - 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */, 15AE19F519AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */, 1A5702F3180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, - 15AE1B3219AAD43700C27E9E /* cpPinJoint.c in Sources */, 15AE1BAF19AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, 15AE182119AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, 50ABBD3D1925AB0000A911A9 /* CCGeometry.cpp in Sources */, @@ -6816,23 +6480,18 @@ 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, 50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */, - 15AE1B4619AAD43700C27E9E /* cpSpatialIndex.c in Sources */, 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */, 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - 15AE1B3C19AAD43700C27E9E /* cpBody.c in Sources */, 15AE196319AAD35100C27E9E /* CCTransformHelp.cpp in Sources */, 15AE19A819AAD39700C27E9E /* LayoutReader.cpp in Sources */, - 15AE1B3F19AAD43700C27E9E /* cpPolyShape.c in Sources */, 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */, 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */, 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, 15AE1C1519AAE2C700C27E9E /* CCPhysicsDebugNode.cpp in Sources */, - 15AE1B4219AAD43700C27E9E /* cpSpaceComponent.c in Sources */, 50ABBD841925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, 50ABBDA81925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */, - 15AE1B2E19AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */, 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 15AE1AC219AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, @@ -6847,12 +6506,9 @@ 1AAF5854180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */, 15AE1ACE19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - 15AE1B4719AAD43700C27E9E /* cpSweep1D.c in Sources */, 15AE1BF919AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, 15AE196719AAD35100C27E9E /* CCUtilMath.cpp in Sources */, 50ABBE201925AB6F00A911A9 /* atitc.cpp in Sources */, - 15AE1B4519AAD43700C27E9E /* cpSpaceStep.c in Sources */, - 15AE1B3019AAD43700C27E9E /* cpGearJoint.c in Sources */, 50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */, @@ -7000,9 +6656,10 @@ "\"$(SRCROOT)/../external/webp/prebuilt/mac\"", "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"", ); MACH_O_TYPE = staticlib; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Debug; }; @@ -7034,9 +6691,10 @@ "\"$(SRCROOT)/../external/webp/prebuilt/mac\"", "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"", ); MACH_O_TYPE = staticlib; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Release; }; @@ -7064,10 +6722,11 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/ios\"", "\"$(SRCROOT)/../external/curl/prebuilt/ios\"", "\"$(SRCROOT)/../external/websockets/prebuilt/ios\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/ios\"", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Debug; }; @@ -7096,10 +6755,11 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/ios\"", "\"$(SRCROOT)/../external/curl/prebuilt/ios\"", "\"$(SRCROOT)/../external/websockets/prebuilt/ios\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/ios\"", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Release; }; diff --git a/cocos/Android.mk b/cocos/Android.mk index 87573c5ce1..1bd26acda6 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -217,7 +217,7 @@ LOCAL_STATIC_LIBRARIES += cocos_png_static LOCAL_STATIC_LIBRARIES += cocos_jpeg_static LOCAL_STATIC_LIBRARIES += cocos_tiff_static LOCAL_STATIC_LIBRARIES += cocos_webp_static -LOCAL_STATIC_LIBRARIES += chipmunk_static +LOCAL_STATIC_LIBRARIES += cocos_chipmunk_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static @@ -243,19 +243,16 @@ LOCAL_STATIC_LIBRARIES += cocosbuilder_static LOCAL_STATIC_LIBRARIES += spine_static LOCAL_STATIC_LIBRARIES += cocos_network_static LOCAL_STATIC_LIBRARIES += box2d_static -LOCAL_STATIC_LIBRARIES += chipmunk_static include $(BUILD_STATIC_LIBRARY) #============================================================== $(call import-module,freetype2/prebuilt/android) -$(call import-module,chipmunk) $(call import-module,platform/android) $(call import-module,png/prebuilt/android) $(call import-module,jpeg/prebuilt/android) $(call import-module,tiff/prebuilt/android) $(call import-module,webp/prebuilt/android) -$(call import-module,webp/prebuilt/android) -$(call import-module,webp/prebuilt/android) +$(call import-module,chipmunk/prebuilt/android) $(call import-module,3d) $(call import-module,audio/android) $(call import-module,editor-support/cocosbuilder) diff --git a/external/chipmunk/Android.mk b/external/chipmunk/Android.mk deleted file mode 100644 index e8441cd0d7..0000000000 --- a/external/chipmunk/Android.mk +++ /dev/null @@ -1,45 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := chipmunk_static - -LOCAL_MODULE_FILENAME := libchipmunk - -LOCAL_SRC_FILES := \ -src/chipmunk.c \ -src/cpArbiter.c \ -src/cpArray.c \ -src/cpBB.c \ -src/cpBBTree.c \ -src/cpBody.c \ -src/cpCollision.c \ -src/cpHashSet.c \ -src/cpPolyShape.c \ -src/cpShape.c \ -src/cpSpace.c \ -src/cpSpaceComponent.c \ -src/cpSpaceHash.c \ -src/cpSpaceQuery.c \ -src/cpSpaceStep.c \ -src/cpSpatialIndex.c \ -src/cpSweep1D.c \ -src/cpVect.c \ -src/constraints/cpConstraint.c \ -src/constraints/cpDampedRotarySpring.c \ -src/constraints/cpDampedSpring.c \ -src/constraints/cpGearJoint.c \ -src/constraints/cpGrooveJoint.c \ -src/constraints/cpPinJoint.c \ -src/constraints/cpPivotJoint.c \ -src/constraints/cpRatchetJoint.c \ -src/constraints/cpRotaryLimitJoint.c \ -src/constraints/cpSimpleMotor.c \ -src/constraints/cpSlideJoint.c - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk -LOCAL_CFLAGS := -std=c99 - -include $(BUILD_STATIC_LIBRARY) From aa929fe106da75fec5b93d9f8cf6dace4b993900 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 03:51:41 -0700 Subject: [PATCH 17/61] add chipmunk prebuilt lib for linux --- CMakeLists.txt | 1 + cocos/CMakeLists.txt | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77aa76b333..2f1100a5f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,7 @@ link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR} ) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index ac588ab6a9..1cdde7566d 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -70,8 +70,6 @@ file(GLOB core_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../external/tinyxml2/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/../external/unzip/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/constraints/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/../external/edtaa3func/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.c" @@ -79,7 +77,7 @@ file(GLOB core_source_files file(GLOB_RECURSE cocostudio_source_files "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/*.cpp") file(GLOB_RECURSE extensions_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/*.cpp") file(GLOB_RECURSE box2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../external/Box2D/*.cpp") -set(cocos2d_source_files ${chipmunk_source_files} ${box2d_source_files} ${core_source_files} ${cocostudio_source_files} ${extensions_source_files}) +set(cocos2d_source_files ${box2d_source_files} ${core_source_files} ${cocostudio_source_files} ${extensions_source_files}) # exclude files specific for other platforms list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" @@ -100,7 +98,8 @@ if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) else() set(FMOD_LIB "fmodex") endif() -target_link_libraries(cocos2d jpeg webp tiff freetype fontconfig png pthread glfw GLEW GL X11 rt z ${FMOD_LIB} curl) +target_link_libraries(cocos2d jpeg webp tiff freetype fontconfig png pthread +glfw GLEW GL X11 rt z chipmunk ${FMOD_LIB} curl) set_target_properties(cocos2d PROPERTIES From f59f43251a6dbc8ed14b230ce5120f7fd32c99a4 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Wed, 3 Sep 2014 10:38:21 +0800 Subject: [PATCH 18/61] failed to export Sequence3D::create --- tools/tolua/cocos2dx_3d.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index a043f994f9..46bfd02ebb 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -44,7 +44,8 @@ skip = Mesh::[create getAABB], Bone3D::[*], Ray::[*], AABB::[*], - OBB::[*] + OBB::[*], + Sequence3D::[create] rename_functions = From cb96458878fd03f21fd01de9988173c63e1061f0 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Wed, 3 Sep 2014 11:06:38 +0800 Subject: [PATCH 19/61] not export Sequence3D --- tools/tolua/cocos2dx_3d.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index 46bfd02ebb..84acecf4af 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -45,7 +45,7 @@ skip = Mesh::[create getAABB], Ray::[*], AABB::[*], OBB::[*], - Sequence3D::[create] + Sequence3D::[*] rename_functions = From 6e55a508de25e188ac807dd569451326144de9c8 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Wed, 3 Sep 2014 12:08:58 +0800 Subject: [PATCH 20/61] not export Sequence3D::create --- tools/tolua/cocos2dx.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 2d59d96980..3bf763b0d6 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -136,7 +136,8 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS Animation3DCache::[*], Sprite3DMaterialCache::[*], Sprite3DCache::[*], - Bone3D::[*] + Bone3D::[*], + Sequence3D::[create] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], From 5fc57412859e01b20213c3c2d86e88d43658a39f Mon Sep 17 00:00:00 2001 From: yangxiao Date: Wed, 3 Sep 2014 12:44:54 +0800 Subject: [PATCH 21/61] not export Sequence3D --- tools/tolua/cocos2dx.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 3bf763b0d6..f0a652fd88 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -137,7 +137,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS Sprite3DMaterialCache::[*], Sprite3DCache::[*], Bone3D::[*], - Sequence3D::[create] + Sequence3D::[*] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], From 5cca8cc87d25a747fc90489f27461d2667c50c3a Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 3 Sep 2014 17:26:50 +0800 Subject: [PATCH 22/61] remove Node::_setLocalZOrder() --- cocos/2d/CCNode.cpp | 12 ++---------- cocos/2d/CCNode.h | 4 +--- cocos/2d/CCParticleBatchNode.cpp | 4 ++-- cocos/2d/CCProtectedNode.cpp | 4 ++-- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index cbd4b97f31..08f5d779e3 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -280,14 +280,6 @@ void Node::setSkewY(float skewY) _transformUpdated = _transformDirty = _inverseDirty = true; } - -/// zOrder setter : private method -/// used internally to alter the zOrder variable. DON'T call this method manually -void Node::_setLocalZOrder(int z) -{ - _localZOrder = z; -} - void Node::setLocalZOrder(int z) { if (_localZOrder == z) @@ -1170,7 +1162,7 @@ void Node::insertChild(Node* child, int z) _transformUpdated = true; _reorderChildDirty = true; _children.pushBack(child); - child->_setLocalZOrder(z); + child->_localZOrder = z; } void Node::reorderChild(Node *child, int zOrder) @@ -1178,7 +1170,7 @@ void Node::reorderChild(Node *child, int zOrder) CCASSERT( child != nullptr, "Child must be non-nil"); _reorderChildDirty = true; child->setOrderOfArrival(s_globalOrderOfArrival++); - child->_setLocalZOrder(zOrder); + child->_localZOrder = zOrder; } void Node::sortAllChildren() diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 8f24f2d09d..efa3ff5fc4 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -150,9 +150,7 @@ public: virtual void setLocalZOrder(int localZOrder); CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(int localZOrder) { setLocalZOrder(localZOrder); } - /* Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing. - */ - virtual void _setLocalZOrder(int z); + /** * Gets the local Z order of this node. * diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 58097d529d..dee4af61df 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -218,7 +218,7 @@ int ParticleBatchNode::addChildHelper(ParticleSystem* child, int z, int aTag, co else child->setName(name); - child->_setLocalZOrder(z); + child->setLocalZOrder(z); child->setParent(this); @@ -285,7 +285,7 @@ void ParticleBatchNode::reorderChild(Node * aChild, int zOrder) } } - child->_setLocalZOrder(zOrder); + child->setLocalZOrder(zOrder); } void ParticleBatchNode::getCurrentIndex(int* oldIndex, int* newIndex, Node* child, int z) diff --git a/cocos/2d/CCProtectedNode.cpp b/cocos/2d/CCProtectedNode.cpp index 38382b03f6..d65ca6a7b5 100644 --- a/cocos/2d/CCProtectedNode.cpp +++ b/cocos/2d/CCProtectedNode.cpp @@ -249,7 +249,7 @@ void ProtectedNode::insertProtectedChild(cocos2d::Node *child, int z) { _reorderProtectedChildDirty = true; _protectedChildren.pushBack(child); - child->_setLocalZOrder(z); + child->setLocalZOrder(z); } void ProtectedNode::sortAllProtectedChildren() @@ -265,7 +265,7 @@ void ProtectedNode::reorderProtectedChild(cocos2d::Node *child, int localZOrder) CCASSERT( child != nullptr, "Child must be non-nil"); _reorderProtectedChildDirty = true; child->setOrderOfArrival(s_globalOrderOfArrival++); - child->_setLocalZOrder(localZOrder); + child->setLocalZOrder(localZOrder); } void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t parentFlags) From 08c7f326270ff313ccf796fa3dd36b468e9440c5 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 5 Sep 2014 15:38:12 +0800 Subject: [PATCH 23/61] add chipmunk static library for win32 --- cocos/2d/libcocos2d.vcxproj | 4 ++-- external/chipmunk/.gitignore | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 external/chipmunk/.gitignore diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 8c7eaf7504..c4a6adeb71 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -104,7 +104,7 @@ 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)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\debug-lib\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\debug-lib\*.*" "$(OutDir)" $(OutDir)$(ProjectName).dll @@ -155,7 +155,7 @@ 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)" -xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\release-lib\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*" "$(OutDir)" diff --git a/external/chipmunk/.gitignore b/external/chipmunk/.gitignore deleted file mode 100644 index d9f94512e8..0000000000 --- a/external/chipmunk/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.DS_Store -doc/index.html -xcode/Chipmunk6.xcodeproj/*.pbxuser -xcode/Chipmunk6.xcodeproj/*.perspectivev3 -xcode/Chipmunk6.xcodeproj/xcuserdata -xcode/Chipmunk6.xcodeproj/project.xcworkspace -xcode/DerivedData -build -msvc From f100dac9b835375494a9422a92a6e5e540cab585 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 5 Sep 2014 09:39:43 +0800 Subject: [PATCH 24/61] Fix the error that number of params was judged wrong for lua bindings of EventListenerMouse::create --- .../lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp index 4bb4578991..ba320b61eb 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_manual.cpp @@ -5163,7 +5163,7 @@ static int tolua_cocos2dx_EventListenerMouse_create(lua_State* tolua_S) argc = lua_gettop(tolua_S) - 1; - if (argc == 1) + if (argc == 0) { cocos2d::EventListenerMouse* tolua_ret = cocos2d::EventListenerMouse::create(); if(nullptr == tolua_ret) @@ -5176,7 +5176,7 @@ static int tolua_cocos2dx_EventListenerMouse_create(lua_State* tolua_S) return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n", "cc.EventListenerMouse:create",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n", "cc.EventListenerMouse:create",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 From 01358f0b62e246507e6734a677680b601b17e1f7 Mon Sep 17 00:00:00 2001 From: huangshiwu Date: Fri, 5 Sep 2014 11:21:08 +0800 Subject: [PATCH 25/61] fix wp8 compile error and modify default resource path --- cocos/2d/cocos2d_wp8.vcxproj | 4 ++++ cocos/2d/cocos2d_wp8.vcxproj.filters | 12 ++++++++++ cocos/platform/winrt/CCFileUtilsWinRT.cpp | 2 +- extensions/proj.wp8/libExtensions.vcxproj | 7 ------ .../proj.wp8/libExtensions.vcxproj.filters | 24 ------------------- .../proj.wp8-xaml/App/HelloCpp.csproj | 24 +++++++++++-------- .../cpp-testsComponent.vcxproj | 4 ---- .../cpp-testsComponent.vcxproj.filters | 20 ++-------------- 8 files changed, 33 insertions(+), 64 deletions(-) diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/cocos2d_wp8.vcxproj index bd9eafacf0..58078bb03d 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/cocos2d_wp8.vcxproj @@ -230,6 +230,7 @@ + @@ -367,6 +368,7 @@ + @@ -453,6 +455,7 @@ + @@ -596,6 +599,7 @@ + diff --git a/cocos/2d/cocos2d_wp8.vcxproj.filters b/cocos/2d/cocos2d_wp8.vcxproj.filters index 154b65da34..0634b1b385 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj.filters +++ b/cocos/2d/cocos2d_wp8.vcxproj.filters @@ -653,6 +653,12 @@ 3d + + renderer + + + 3d +
@@ -1334,6 +1340,12 @@ 3d + + renderer + + + 3d + diff --git a/cocos/platform/winrt/CCFileUtilsWinRT.cpp b/cocos/platform/winrt/CCFileUtilsWinRT.cpp index a5b0e7214c..736a597504 100644 --- a/cocos/platform/winrt/CCFileUtilsWinRT.cpp +++ b/cocos/platform/winrt/CCFileUtilsWinRT.cpp @@ -53,7 +53,7 @@ static void _checkPath() if (s_pszResourcePath.empty()) { // TODO: needs to be tested - s_pszResourcePath = convertPathFormatToUnixStyle(CCFileUtilsWinRT::getAppPath() + '\\' + "Assets\\res" + '\\'); + s_pszResourcePath = convertPathFormatToUnixStyle(CCFileUtilsWinRT::getAppPath() + '\\' + "Assets\\Resources" + '\\'); } } diff --git a/extensions/proj.wp8/libExtensions.vcxproj b/extensions/proj.wp8/libExtensions.vcxproj index 451b0d11ef..72380f216e 100644 --- a/extensions/proj.wp8/libExtensions.vcxproj +++ b/extensions/proj.wp8/libExtensions.vcxproj @@ -176,9 +176,6 @@ - - - @@ -208,10 +205,6 @@ - - - - diff --git a/extensions/proj.wp8/libExtensions.vcxproj.filters b/extensions/proj.wp8/libExtensions.vcxproj.filters index 57969f624b..2a3c131354 100644 --- a/extensions/proj.wp8/libExtensions.vcxproj.filters +++ b/extensions/proj.wp8/libExtensions.vcxproj.filters @@ -13,9 +13,6 @@ {d5806151-7ae1-4fef-af5a-2fa1d1c7377b} - - {5d186e3d-0aaf-4904-a5d8-e5cb0f35f4cc} - {49487dbe-5758-436a-b014-8e2edc6b33ae} @@ -57,27 +54,18 @@ GUI\CCControlExtension - - GUI\CCControlExtension - GUI\CCControlExtension GUI\CCControlExtension - - GUI\CCEditBox - physics_nodes physics_nodes - - GUI\CCEditBox - @@ -125,27 +113,15 @@ GUI\CCControlExtension - - GUI\CCControlExtension - GUI\CCControlExtension - - GUI\CCEditBox - - - GUI\CCEditBox - physics_nodes physics_nodes - - GUI\CCEditBox - \ No newline at end of file diff --git a/templates/cpp-template-default/proj.wp8-xaml/App/HelloCpp.csproj b/templates/cpp-template-default/proj.wp8-xaml/App/HelloCpp.csproj index 19d93505a5..2f4cec563c 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/App/HelloCpp.csproj +++ b/templates/cpp-template-default/proj.wp8-xaml/App/HelloCpp.csproj @@ -102,12 +102,24 @@ + + Assets\Resources\fonts\Marker Felt.ttf + Designer + + Assets\Resources\CloseNormal.png + + + Assets\Resources\CloseSelected.png + + + Assets\Resources\HelloWorld.png + PreserveNewest @@ -154,14 +166,7 @@ Designer - - - - Assets\res\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - - - + - - + \ No newline at end of file diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj index 60ea821193..b1c32cce74 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj @@ -207,11 +207,9 @@ - - @@ -411,11 +409,9 @@ - - diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters index 44d9ce5bea..3a2638f4ef 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters @@ -199,9 +199,6 @@ {a4c2111f-cf9f-492c-884d-3de24715adce} - - {18a69e7e-8ca7-475a-bfbb-7296baab16ce} - {0ef55f53-411a-4661-b5d5-13930da52e68} @@ -217,9 +214,6 @@ {81ec2355-7efd-49e0-b6cb-b1bba23fbbc8} - - {3d73aa04-d66e-43d3-921f-b867a753c113} - {a6e7d28e-46a3-46c4-9735-b39e96f776f0} @@ -582,9 +576,6 @@ Classes\FileUtilsTest - - Classes\ExtensionsTest\EditBoxTest - Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest @@ -600,9 +591,6 @@ Classes - - Classes\ExtensionsTest\Scale9SpriteTest - Classes\LabelTest @@ -867,6 +855,7 @@ Classes\Camera3DTest + @@ -1298,9 +1287,6 @@ Classes\FileUtilsTest - - Classes\ExtensionsTest\EditBoxTest - Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest @@ -1322,9 +1308,6 @@ Classes - - Classes\ExtensionsTest\Scale9SpriteTest - Classes\LabelTest @@ -1605,6 +1588,7 @@ Classes\Camera3DTest + From 59dc56bfcb3734c290d19bd38a2477929c5cfeff Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 5 Sep 2014 21:59:30 +0800 Subject: [PATCH 26/61] remove chipmunk dependency --- build/cocos2d-wp8.vc2012.sln | 26 +++---------------- .../cpp-empty-testComponent.vcxproj | 3 --- .../cpp-testsComponent.vcxproj | 3 --- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/build/cocos2d-wp8.vc2012.sln b/build/cocos2d-wp8.vc2012.sln index bd66958f7e..8a9fce10df 100644 --- a/build/cocos2d-wp8.vc2012.sln +++ b/build/cocos2d-wp8.vc2012.sln @@ -1,5 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d_wp8.vcxproj", "{B5AF91B3-64EA-44E1-84B0-D759E93758FB}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.wp8\libSpine.vcxproj", "{7D4FC6EB-9497-4804-98F3-3EAEDC896154}" @@ -24,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Box2D", "..\external\Box2D\proj.wp8\Box2D.vcxproj", "{C55734A3-702C-4FA1-B950-32C8E169302F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "..\external\chipmunk\proj.wp8\chipmunk.vcxproj", "{BA568A33-98F9-4D2A-BFFF-C065ADCB447A}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos\storage\local-storage\proj.wp8\libLocalStorage.vcxproj", "{88982C27-5A7B-40A8-86E7-B3187B44B322}" ProjectSection(ProjectDependencies) = postProject {B5AF91B3-64EA-44E1-84B0-D759E93758FB} = {B5AF91B3-64EA-44E1-84B0-D759E93758FB} @@ -208,26 +208,6 @@ Global {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x64.ActiveCfg = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.ActiveCfg = Release|Win32 {C55734A3-702C-4FA1-B950-32C8E169302F}.Release|x86.Build.0 = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.ActiveCfg = Debug|ARM - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|ARM.Build.0 = Debug|ARM - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.ActiveCfg = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|Win32.Build.0 = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x64.ActiveCfg = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.ActiveCfg = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Debug|x86.Build.0 = Debug|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Any CPU.ActiveCfg = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.ActiveCfg = Release|ARM - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|ARM.Build.0 = Release|ARM - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Mixed Platforms.Build.0 = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.ActiveCfg = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|Win32.Build.0 = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x64.ActiveCfg = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.ActiveCfg = Release|Win32 - {BA568A33-98F9-4D2A-BFFF-C065ADCB447A}.Release|x86.Build.0 = Release|Win32 {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|Any CPU.ActiveCfg = Debug|Win32 {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.ActiveCfg = Debug|ARM {88982C27-5A7B-40A8-86E7-B3187B44B322}.Debug|ARM.Build.0 = Debug|ARM diff --git a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj index e9f9f58996..a709f22c62 100644 --- a/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj +++ b/tests/cpp-empty-test/proj-wp8-xaml/cpp-empty-testComponent/cpp-empty-testComponent.vcxproj @@ -233,9 +233,6 @@ {c55734a3-702c-4fa1-b950-32c8e169302f} - - {ba568a33-98f9-4d2a-bfff-c065adcb447a} - diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj index b1c32cce74..22ae303431 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj @@ -652,9 +652,6 @@ {c55734a3-702c-4fa1-b950-32c8e169302f} - - {ba568a33-98f9-4d2a-bfff-c065adcb447a} - From d6b96d1e4682d4a0618892394630c43161c3f9e6 Mon Sep 17 00:00:00 2001 From: andyque Date: Sat, 6 Sep 2014 13:28:00 +0800 Subject: [PATCH 27/61] add chipmunk to wp project --- cocos/2d/cocos2d_wp8.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/cocos2d_wp8.vcxproj index 58078bb03d..236aa7ae85 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/cocos2d_wp8.vcxproj @@ -93,8 +93,8 @@ /IGNORE:4264 %(AdditionalOptions) - zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;%(AdditionalDependencies) - $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) + zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype.lib;ws2_32.lib;libchipmunk.lib;%(AdditionalDependencies) + $(EngineRoot)external\wp8-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\wp8\$(Platform);$(EngineRoot)external\jpeg\prebuilt\wp8\$(Platform);$(EngineRoot)external\tiff\prebuilt\wp8\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\wp8\$(Platform);$(EngineRoot)external\freetype2\prebuilt\wp8\$(Platform);%(AdditionalLibraryDirectories) From af6b6bb7b99de503117bece98fe6ef54d606bfd7 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 9 Sep 2014 02:32:49 +0000 Subject: [PATCH 28/61] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/PhysicsWorld.lua | 16 +++- .../auto/lua_cocos2dx_physics_auto.cpp | 92 +++++++++++++++++++ .../auto/lua_cocos2dx_physics_auto.hpp | 2 + 3 files changed, 109 insertions(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua index 7a15ac9d59..fbf878bc96 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua @@ -21,10 +21,18 @@ -- @param self -- @return int#int ret (return value: int) +-------------------------------- +-- set the number of substeps in an update of the physics world.
+-- One physics update will be divided into several substeps to increase its accuracy.
+-- default value is 1 +-- @function [parent=#PhysicsWorld] setSubsteps +-- @param self +-- @param #int steps + -------------------------------- -- To control the step of physics, if you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
-- Defaut value is true.
--- Note: if you set auto step to false, setSpeed and setUpdateRate won't work, you need to control the time step by yourself. +-- Note: if you set auto step to false, setSpeed setSubsteps and setUpdateRate won't work, you need to control the time step by yourself. -- @function [parent=#PhysicsWorld] setAutoStep -- @param self -- @param #bool autoStep @@ -95,6 +103,12 @@ -- @param self -- @param #int rate +-------------------------------- +-- get the number of substeps +-- @function [parent=#PhysicsWorld] getSubsteps +-- @param self +-- @return int#int ret (return value: int) + -------------------------------- -- get the speed of physics world -- @function [parent=#PhysicsWorld] getSpeed diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp index ae36e585ea..4327b294ab 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp @@ -10183,6 +10183,52 @@ int lua_cocos2dx_physics_PhysicsWorld_getDebugDrawMask(lua_State* tolua_S) return 0; } +int lua_cocos2dx_physics_PhysicsWorld_setSubsteps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsWorld* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.PhysicsWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsWorld_setSubsteps'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.PhysicsWorld:setSubsteps"); + if(!ok) + return 0; + cobj->setSubsteps(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsWorld:setSubsteps",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsWorld_setSubsteps'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_physics_PhysicsWorld_setAutoStep(lua_State* tolua_S) { int argc = 0; @@ -10713,6 +10759,50 @@ int lua_cocos2dx_physics_PhysicsWorld_setUpdateRate(lua_State* tolua_S) return 0; } +int lua_cocos2dx_physics_PhysicsWorld_getSubsteps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::PhysicsWorld* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.PhysicsWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::PhysicsWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsWorld_getSubsteps'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getSubsteps(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsWorld:getSubsteps",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsWorld_getSubsteps'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_physics_PhysicsWorld_getSpeed(lua_State* tolua_S) { int argc = 0; @@ -10999,6 +11089,7 @@ int lua_register_cocos2dx_physics_PhysicsWorld(lua_State* tolua_S) tolua_function(tolua_S,"setGravity",lua_cocos2dx_physics_PhysicsWorld_setGravity); tolua_function(tolua_S,"getAllBodies",lua_cocos2dx_physics_PhysicsWorld_getAllBodies); tolua_function(tolua_S,"getDebugDrawMask",lua_cocos2dx_physics_PhysicsWorld_getDebugDrawMask); + tolua_function(tolua_S,"setSubsteps",lua_cocos2dx_physics_PhysicsWorld_setSubsteps); tolua_function(tolua_S,"setAutoStep",lua_cocos2dx_physics_PhysicsWorld_setAutoStep); tolua_function(tolua_S,"addJoint",lua_cocos2dx_physics_PhysicsWorld_addJoint); tolua_function(tolua_S,"removeAllJoints",lua_cocos2dx_physics_PhysicsWorld_removeAllJoints); @@ -11010,6 +11101,7 @@ int lua_register_cocos2dx_physics_PhysicsWorld(lua_State* tolua_S) tolua_function(tolua_S,"setDebugDrawMask",lua_cocos2dx_physics_PhysicsWorld_setDebugDrawMask); tolua_function(tolua_S,"getGravity",lua_cocos2dx_physics_PhysicsWorld_getGravity); tolua_function(tolua_S,"setUpdateRate",lua_cocos2dx_physics_PhysicsWorld_setUpdateRate); + tolua_function(tolua_S,"getSubsteps",lua_cocos2dx_physics_PhysicsWorld_getSubsteps); tolua_function(tolua_S,"getSpeed",lua_cocos2dx_physics_PhysicsWorld_getSpeed); tolua_function(tolua_S,"getUpdateRate",lua_cocos2dx_physics_PhysicsWorld_getUpdateRate); tolua_function(tolua_S,"removeAllBodies",lua_cocos2dx_physics_PhysicsWorld_removeAllBodies); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp index 42884debc5..4a61023ad2 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp @@ -263,6 +263,8 @@ int register_all_cocos2dx_physics(lua_State* tolua_S); + + From 511ee30b6e4f9f73ea5a614fd3e484a6c4f46196 Mon Sep 17 00:00:00 2001 From: oleg-akatsuki Date: Tue, 9 Sep 2014 11:34:48 +0900 Subject: [PATCH 29/61] Move constructor from private to public In my project I want to add extra functionality to FileUtils. For security reasons I make FileUtils function that can extract encoded data directly to memory without storing it on disk. So I am trying to use FileUtilsAndroid as base class, but it is impossible as constructor is hidden as private member. I offer to move constructor to either public or protected to make it possible to use FileUtilsAndroid as base class. Another way to solve the problem is to remove constructor as FileUtilsApple does not have a constructor. --- cocos/platform/android/CCFileUtilsAndroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/platform/android/CCFileUtilsAndroid.h b/cocos/platform/android/CCFileUtilsAndroid.h index a9bb766b92..2b461d49b4 100644 --- a/cocos/platform/android/CCFileUtilsAndroid.h +++ b/cocos/platform/android/CCFileUtilsAndroid.h @@ -47,8 +47,8 @@ NS_CC_BEGIN class CC_DLL FileUtilsAndroid : public FileUtils { friend class FileUtils; - FileUtilsAndroid(); public: + FileUtilsAndroid(); /** * @js NA * @lua NA From a2dcb71a24150673fe9e34e500ea17fce417d355 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 9 Sep 2014 02:53:20 +0000 Subject: [PATCH 30/61] [AUTO]: updating luabinding automatically --- .../scripting/lua-bindings/auto/api/Node.lua | 34 ++-- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 159 ++++++------------ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 - 3 files changed, 70 insertions(+), 124 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 3fc9d7d51d..c26db8b953 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -181,9 +181,9 @@ -------------------------------- -- --- @function [parent=#Node] _setLocalZOrder +-- @function [parent=#Node] getOpacity -- @param self --- @param #int z +-- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- -- @@ -275,12 +275,6 @@ -- @param self -- @param #function callback --------------------------------- --- --- @function [parent=#Node] getOpacity --- @param self --- @return unsigned char#unsigned char ret (return value: unsigned char) - -------------------------------- -- Sets the position (x,y) using values between 0 and 1.
-- The positions in pixels is calculated like the following:
@@ -486,18 +480,6 @@ -- @function [parent=#Node] updateTransform -- @param self --------------------------------- --- Sets the shader program for this node
--- Since v2.0, each rendering node must set its shader program.
--- It should be set in initialize phase.
--- code
--- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
--- endcode
--- param shaderProgram The shader program --- @function [parent=#Node] setGLProgram --- @param self --- @param #cc.GLProgram glprogram - -------------------------------- -- Determines if the node is visible
-- see `setVisible(bool)`
@@ -977,6 +959,18 @@ -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) +-------------------------------- +-- Sets the shader program for this node
+-- Since v2.0, each rendering node must set its shader program.
+-- It should be set in initialize phase.
+-- code
+-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
+-- endcode
+-- param shaderProgram The shader program +-- @function [parent=#Node] setGLProgram +-- @param self +-- @param #cc.GLProgram glprogram + -------------------------------- -- Gets the scale factor of the node, when X and Y have the same scale factor.
-- warning Assert when `_scaleX != _scaleY`
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 74a9ae1232..ed6dccab3a 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -3683,7 +3683,7 @@ int lua_cocos2dx_Node_removeAllComponents(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) +int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) { int argc = 0; cocos2d::Node* cobj = nullptr; @@ -3703,28 +3703,26 @@ int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node__setLocalZOrder'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:_setLocalZOrder"); if(!ok) return 0; - cobj->_setLocalZOrder(arg0); - return 0; + uint16_t ret = cobj->getOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); #endif return 0; @@ -4300,50 +4298,6 @@ int lua_cocos2dx_Node_setOnEnterCallback(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S) { int argc = 0; @@ -5542,52 +5496,6 @@ int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_isVisible(lua_State* tolua_S) { int argc = 0; @@ -8498,6 +8406,52 @@ int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_getScale(lua_State* tolua_S) { int argc = 0; @@ -8922,7 +8876,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); - tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); + tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); @@ -8935,7 +8889,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); - tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); @@ -8962,7 +8915,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); @@ -9026,6 +8978,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 4d85878dfc..e75f438ea3 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1560,7 +1560,6 @@ int register_all_cocos2dx(lua_State* tolua_S); - #endif // __cocos2dx_h__ From 31c508ef6de537a55ae73cffc52077f5436dc584 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 9 Sep 2014 10:55:27 +0800 Subject: [PATCH 31/61] deprecated Node::_setZOrder() --- cocos/2d/CCNode.cpp | 7 +++++++ cocos/2d/CCNode.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index e668f456ad..1dbf638b41 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -295,6 +295,13 @@ void Node::setLocalZOrder(int z) _eventDispatcher->setDirtyForNode(this); } +/// zOrder setter : private method +/// used internally to alter the zOrder variable. DON'T call this method manually +void Node::_setLocalZOrder(int z) +{ + _localZOrder = z; +} + void Node::setGlobalZOrder(float globalZOrder) { if (_globalZOrder != globalZOrder) diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 5ea115ea45..9560fec164 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -150,6 +150,10 @@ public: virtual void setLocalZOrder(int localZOrder); CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(int localZOrder) { setLocalZOrder(localZOrder); } + + /* Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing. + - */ + CC_DEPRECATED_ATTRIBUTE virtual void _setLocalZOrder(int z); /** * Gets the local Z order of this node. From 905c429ff54a228f2856d71c4159351fa5176539 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 9 Sep 2014 10:58:07 +0800 Subject: [PATCH 32/61] remove unneeded code --- cocos/2d/CCNode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 9560fec164..d2a6034633 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -152,7 +152,7 @@ public: CC_DEPRECATED_ATTRIBUTE virtual void setZOrder(int localZOrder) { setLocalZOrder(localZOrder); } /* Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing. - - */ + */ CC_DEPRECATED_ATTRIBUTE virtual void _setLocalZOrder(int z); /** From b88c462c8fdc4e0b9405efd462627802dabff944 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 9 Sep 2014 11:34:17 +0800 Subject: [PATCH 33/61] remove Sequence3D --- build/cocos2d_libs.xcodeproj/project.pbxproj | 12 -- cocos/3d/Android.mk | 3 +- cocos/3d/CCSequence3D.cpp | 201 ------------------- cocos/3d/CCSequence3D.h | 102 ---------- cocos/3d/CMakeLists.txt | 1 - cocos/3d/cocos3d.h | 1 - tools/tolua/cocos2dx.ini | 3 +- tools/tolua/cocos2dx_3d.ini | 3 +- 8 files changed, 3 insertions(+), 323 deletions(-) delete mode 100644 cocos/3d/CCSequence3D.cpp delete mode 100644 cocos/3d/CCSequence3D.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 2cd2d62c36..6f0291e781 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1880,10 +1880,6 @@ B37510841823ACA100B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B375104D1823AC7B00B3BA6A /* CCPhysicsShapeInfo_chipmunk.h */; }; B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B375104E1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp */; }; B37510861823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */; }; - B6F7149419AEF7C8009061BD /* CCSequence3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */; }; - B6F7149519AEF7C8009061BD /* CCSequence3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */; }; - B6F7149619AEF7C8009061BD /* CCSequence3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6F7149319AEF7C8009061BD /* CCSequence3D.h */; }; - B6F7149719AEF7C8009061BD /* CCSequence3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B6F7149319AEF7C8009061BD /* CCSequence3D.h */; }; ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */; }; ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */; }; @@ -2905,8 +2901,6 @@ B375104F1823AC7B00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorldInfo_chipmunk.h; sourceTree = ""; }; B3AF019E1842FBA400A98B85 /* b2MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MotorJoint.cpp; sourceTree = ""; }; B3AF019F1842FBA400A98B85 /* b2MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MotorJoint.h; sourceTree = ""; }; - B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSequence3D.cpp; sourceTree = ""; }; - B6F7149319AEF7C8009061BD /* CCSequence3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSequence3D.h; sourceTree = ""; }; ED9C6A9218599AD8000A5232 /* CCNodeGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCNodeGrid.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; ED9C6A9318599AD8000A5232 /* CCNodeGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeGrid.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -4912,8 +4906,6 @@ B29594B81926D61F003EEF37 /* 3d */ = { isa = PBXGroup; children = ( - B6F7149219AEF7C8009061BD /* CCSequence3D.cpp */, - B6F7149319AEF7C8009061BD /* CCSequence3D.h */, 15AE17E319AAD2F700C27E9E /* 3dExport.h */, 15AE17E419AAD2F700C27E9E /* CCAABB.cpp */, 15AE17E519AAD2F700C27E9E /* CCAABB.h */, @@ -5406,7 +5398,6 @@ 50ABC0031926664800A911A9 /* CCLock.h in Headers */, B37510721823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, - B6F7149619AEF7C8009061BD /* CCSequence3D.h in Headers */, 50ABBD5E1925AB0000A911A9 /* Vec3.h in Headers */, 15AE188919AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */, 15AE19EE19AAD3A700C27E9E /* spine.h in Headers */, @@ -5748,7 +5739,6 @@ 15AE1AAB19AAD40300C27E9E /* b2World.h in Headers */, 15AE19FC19AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE180F19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, - B6F7149719AEF7C8009061BD /* CCSequence3D.h in Headers */, 50ABBE341925AB6F00A911A9 /* CCConfiguration.h in Headers */, 1A570299180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, 15AE1ABF19AAD40300C27E9E /* b2PolygonContact.h in Headers */, @@ -6214,7 +6204,6 @@ 1A5701E6180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE19D819AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, 15AE19E819AAD3A700C27E9E /* Slot.cpp in Sources */, - B6F7149419AEF7C8009061BD /* CCSequence3D.cpp in Sources */, B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 15AE1A6A19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE19BE19AAD3A700C27E9E /* Event.cpp in Sources */, @@ -6674,7 +6663,6 @@ 1A5701C8180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 1A5701CC180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, 15AE193419AAD35100C27E9E /* CCActionObject.cpp in Sources */, - B6F7149519AEF7C8009061BD /* CCSequence3D.cpp in Sources */, 15AE1AD619AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */, 1A5701DF180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk index ae72c67f4d..0a9d859a27 100644 --- a/cocos/3d/Android.mk +++ b/cocos/3d/Android.mk @@ -20,8 +20,7 @@ CCMeshVertexIndexData.cpp \ CCSprite3DMaterial.cpp \ CCObjLoader.cpp \ CCSkeleton3D.cpp \ -CCSprite3D.cpp \ -CCSequence3D.cpp +CCSprite3D.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. diff --git a/cocos/3d/CCSequence3D.cpp b/cocos/3d/CCSequence3D.cpp deleted file mode 100644 index 620b76ee28..0000000000 --- a/cocos/3d/CCSequence3D.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - 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 "3d/CCSequence3D.h" - -NS_CC_BEGIN - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Sequence3D* Sequence3D::variadicCreate(Animate3D *action1, ...) -{ - va_list params; - va_start(params, action1); - - Sequence3D *ret = Sequence3D::createWithVariableList(action1, params); - - va_end(params); - - return ret; -} -#else -Sequence3D* Sequence3D::create(Animate3D *action1, ...) -{ - va_list params; - va_start(params, action1); - - Sequence3D *ret = Sequence3D::createWithVariableList(action1, params); - - va_end(params); - - return ret; -} -#endif - -Sequence3D* Sequence3D::createWithVariableList(Animate3D *action1, va_list args) -{ - Animate3D *now; - - Vector actions; - while (action1) - { - now = va_arg(args, Animate3D*); - if (now) - { - actions.pushBack(now); - } - else - break; - } - - return create(actions); -} - -Sequence3D* Sequence3D::create(const Vector& arrayOfActions) -{ - Sequence3D* ret = nullptr; - - ret = new (std::nothrow) Sequence3D(); - if (ret->initWithActions(arrayOfActions)) - { - ret->autorelease(); - return ret; - } - - CC_SAFE_RELEASE(ret); - return ret; -} - -bool Sequence3D::initWithActions(const Vector& arrayOfActions) -{ - if (arrayOfActions.size() == 0) - return false; - - _actions.clear(); - _startTime.clear(); - _endTime.clear(); - - Animate3D* preAction = nullptr; - float duration = 0.f, dur = 0.f; - _startTime.push_back(duration); - for (auto& it : arrayOfActions) { - float d1 = 0.f; - if (preAction) - d1 = preAction->getDuration(); - - float d2 = it->getDuration(); - if (d1 < Animate3D::getTransitionTime() || d2 < Animate3D::getTransitionTime()) - dur = d1 > d2 ? d1 : d2; - else - dur = d1 + d2 - Animate3D::getTransitionTime(); - - preAction = it; - _actions.pushBack(it); - _startTime.push_back(dur); - _endTime.push_back(dur); - duration += dur; - } - _startTime.erase(_startTime.end() - 1); - for (ssize_t i = 0; i < _startTime.size(); i++) { - _startTime[i] /= duration; - _endTime[i] /= duration; - } - setDuration(duration); - _curActionIdx = -1; - return true; -} - -Sequence3D* Sequence3D::clone() const -{ - // no copy constructor - auto seq3d = new (std::nothrow) Sequence3D(); - seq3d->initWithActions(_actions); - seq3d->autorelease(); - return seq3d; -} - -Sequence3D::Sequence3D() -: _curActionIdx(-1) -{ - -} - -Sequence3D::~Sequence3D(void) -{ - _actions.clear(); -} - -void Sequence3D::startWithTarget(Node *target) -{ - ActionInterval::startWithTarget(target); - _curActionIdx = -1; -} - -void Sequence3D::stop(void) -{ - for (auto& action : _actions) { - action->stop(); - } - - ActionInterval::stop(); -} - -Sequence3D* Sequence3D::reverse() const -{ - Vector actions; - for (auto it = _actions.rbegin(); it != _actions.rend(); ++it) { - actions.pushBack(*it); - } - - return create(actions); -} - -void Sequence3D::update(float t) -{ - if (_target) - { - int nextIdx = _curActionIdx + 1; - if (nextIdx < _actions.size()) - { - if (t >= _startTime[nextIdx]) - { - _actions.at(nextIdx)->startWithTarget(_target); - _curActionIdx = nextIdx; - } - } - //update action - int preActionIdx = _curActionIdx - 1; - if (preActionIdx >= 0 && _endTime[preActionIdx] > t) - { - float newt = (t - _startTime[preActionIdx]) / (_endTime[preActionIdx] - _startTime[preActionIdx]); - _actions.at(preActionIdx)->update(newt); - } - if (_curActionIdx >= 0 && _curActionIdx < _actions.size()) - { - float newt = (t - _startTime[_curActionIdx]) / (_endTime[_curActionIdx] - _startTime[_curActionIdx]); - _actions.at(_curActionIdx)->update(newt); - } - } -} - -NS_CC_END diff --git a/cocos/3d/CCSequence3D.h b/cocos/3d/CCSequence3D.h deleted file mode 100644 index 0e72d00391..0000000000 --- a/cocos/3d/CCSequence3D.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - 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. - ****************************************************************************/ - -#ifndef __CCSEQUECE3D_H__ -#define __CCSEQUECE3D_H__ - -#include "2d/CCActionInterval.h" -#include "3d/CCAnimate3D.h" - -NS_CC_BEGIN - -/** - * It is similar to Sequence in 2D action - * But it is only used to sequence Animate3D - * The difference between Sequence and Sequence3D is that Sequence3D play animation one by one and with some overlap time. We use the overlap time to make the transition between one action to another. The comming action fades in and the previous one fades out. - */ -class CC_3D_DLL Sequence3D : public ActionInterval -{ -public: - /** helper constructor to create an array of sequenceable actions */ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - // WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported - typedef Animate3D* M; - static Sequence3D* create(M m1, std::nullptr_t listEnd) { return variadicCreate(m1, NULL); } - static Sequence3D* create(M m1, M m2, std::nullptr_t listEnd) { return variadicCreate(m1, m2, NULL); } - static Sequence3D* create(M m1, M m2, M m3, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); } - static Sequence3D* create(M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return variadicCreate(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); } - - // On WP8 for variable argument lists longer than 10 items, use the other create functions or variadicCreate with NULL as the last argument - static Sequence3D* variadicCreate(Animate3D* item, ...); -#else - static Sequence3D* create(Animate3D *action1, ...) CC_REQUIRES_NULL_TERMINATION; -#endif - - /** helper constructor to create an array of sequenceable actions given an array - * @code - * When this funtion bound to the js or lua,the input params changed - * in js :var create(var object1,var object2, ...) - * in lua :local create(local object1,local object2, ...) - * @endcode - */ - static Sequence3D* create(const Vector& arrayOfActions); - /** helper constructor to create an array of sequence-able actions */ - static Sequence3D* createWithVariableList(Animate3D *action1, va_list args); - - // - // Overrides - // - virtual Sequence3D* clone() const override; - virtual Sequence3D* reverse() const override; - virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; - virtual void update(float t) override; - -CC_CONSTRUCTOR_ACCESS: - Sequence3D(); - virtual ~Sequence3D(void); - - /** initializes the action */ - bool initWithActions(const Vector& arrayOfActions); - -protected: - Vector _actions; - int _curActionIdx; - std::vector _startTime; - std::vector _endTime; - -private: - CC_DISALLOW_COPY_AND_ASSIGN(Sequence3D); - -}; - -NS_CC_END - -#endif // __CCSEQUECE3D_H__ diff --git a/cocos/3d/CMakeLists.txt b/cocos/3d/CMakeLists.txt index 5d56e92278..70e3560efd 100644 --- a/cocos/3d/CMakeLists.txt +++ b/cocos/3d/CMakeLists.txt @@ -14,7 +14,6 @@ CCSprite3DMaterial.cpp CCObjLoader.cpp CCSkeleton3D.cpp CCSprite3D.cpp -CCSequence3D.cpp ) diff --git a/cocos/3d/cocos3d.h b/cocos/3d/cocos3d.h index b97df23784..dbd2760feb 100755 --- a/cocos/3d/cocos3d.h +++ b/cocos/3d/cocos3d.h @@ -37,7 +37,6 @@ #include "3d/CCSprite3DMaterial.h" #include "3d/CCAttachNode.h" #include "3d/CCMeshVertexIndexData.h" -#include "3d/CCSequence3D.h" #include "3d/CCSkeleton3D.h" #endif diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 832fe14fa1..d6894e123b 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -136,8 +136,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS Animation3DCache::[*], Sprite3DMaterialCache::[*], Sprite3DCache::[*], - Bone3D::[*], - Sequence3D::[*] + Bone3D::[*] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index 84acecf4af..a043f994f9 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -44,8 +44,7 @@ skip = Mesh::[create getAABB], Bone3D::[*], Ray::[*], AABB::[*], - OBB::[*], - Sequence3D::[*] + OBB::[*] rename_functions = From a6337a3c56cde21f4fa070f287ab08b13d8548d4 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Tue, 9 Sep 2014 13:20:33 +0800 Subject: [PATCH 34/61] remove sequence3d --- templates/cocos2dx_files.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index cbadcebbae..8371a753c1 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -220,8 +220,6 @@ "cocos/3d/CCObjLoader.h", "cocos/3d/CCRay.cpp", "cocos/3d/CCRay.h", - "cocos/3d/CCSequence3D.cpp", - "cocos/3d/CCSequence3D.h", "cocos/3d/CCSkeleton3D.cpp", "cocos/3d/CCSkeleton3D.h", "cocos/3d/CCSprite3D.cpp", From 83e14259adabefa8b7fb01e2e4e3036e64571ef8 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 9 Sep 2014 13:59:35 +0800 Subject: [PATCH 35/61] deprecated ui::TextField getStringValue and setText, use getString and setString instead --- .../lua-bindings/script/ui/DeprecatedUIFunc.lua | 12 ++++++++++++ cocos/ui/UITextField.cpp | 14 +++++++------- cocos/ui/UITextField.h | 7 +++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua index c6900ea23a..203f417d6d 100644 --- a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua +++ b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua @@ -137,6 +137,18 @@ function UITextFieldDeprecated.addEventListenerTextField(self,handler) return self:addEventListener(handler) end rawset(ccui.TextField,"addEventListenerTextField", UITextFieldDeprecated.addEventListenerTextField) + +function UITextFieldDeprecated.setText(self, str) + deprecatedTip("ccui.TextField:setText","ccui.TextField:setString") + return self:setString(str) +end +rawset(ccui.TextField,"setText", UITextFieldDeprecated.setText) + +function UITextFieldDeprecated.getStringValue(self) + deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString") + return self:getString() +end +rawset(ccui.TextField,"getStringValue", UITextFieldDeprecated.getStringValue) --functions of ccui.TextField will be deprecated end --functions of ccui.PageView will be deprecated begin diff --git a/cocos/ui/UITextField.cpp b/cocos/ui/UITextField.cpp index d3e25693c9..f1a4fad012 100644 --- a/cocos/ui/UITextField.cpp +++ b/cocos/ui/UITextField.cpp @@ -404,7 +404,7 @@ Size TextField::getTouchSize()const return Size(_touchWidth, _touchHeight); } -void TextField::setText(const std::string& text) +void TextField::setString(const std::string& text) { std::string strText(text); @@ -412,7 +412,7 @@ void TextField::setText(const std::string& text) { int max = _textFieldRenderer->getMaxLength(); long text_count = StringUtils::getCharacterCountInUTF8String(text); - long total = text_count + StringUtils::getCharacterCountInUTF8String(getStringValue()); + long total = text_count + StringUtils::getCharacterCountInUTF8String(getString()); if (total > max) { strText = Helper::getSubStringOfUTF8String(strText, 0, max); @@ -513,7 +513,7 @@ void TextField::didNotSelectSelf() _textFieldRenderer->detachWithIME(); } -const std::string& TextField::getStringValue()const +const std::string& TextField::getString()const { return _textFieldRenderer->getString(); } @@ -549,7 +549,7 @@ void TextField::setMaxLength(int length) { _textFieldRenderer->setMaxLength(length); - setText(getStringValue()); + setString(getString()); } int TextField::getMaxLength()const @@ -572,7 +572,7 @@ void TextField::setPasswordStyleText(const char *styleText) _textFieldRenderer->setPasswordStyleText(styleText); _passwordStyleText = styleText; - setText(getStringValue()); + setString(getString()); } const char* TextField::getPasswordStyleText()const @@ -767,8 +767,8 @@ void TextField::copySpecialProperties(Widget *widget) TextField* textField = dynamic_cast(widget); if (textField) { - setText(textField->_textFieldRenderer->getString()); - setPlaceHolder(textField->getStringValue()); + setString(textField->_textFieldRenderer->getString()); + setPlaceHolder(textField->getString()); setFontSize(textField->_fontSize); setFontName(textField->_fontName); setMaxLengthEnabled(textField->isMaxLengthEnabled()); diff --git a/cocos/ui/UITextField.h b/cocos/ui/UITextField.h index 6738ef2685..0717ca8dc3 100644 --- a/cocos/ui/UITextField.h +++ b/cocos/ui/UITextField.h @@ -147,8 +147,11 @@ public: virtual void didNotSelectSelf(); - void setText(const std::string& text); - const std::string& getStringValue()const; + CC_DEPRECATED_ATTRIBUTE void setText(const std::string& text){this->setString(text);} + CC_DEPRECATED_ATTRIBUTE const std::string& getStringValue()const{return this->getString();} + + void setString(const std::string& text); + const std::string& getString()const; virtual bool onTouchBegan(Touch *touch, Event *unusedEvent) override; From be72d5730ce4fd2b4d82f492b06e7522f13be29b Mon Sep 17 00:00:00 2001 From: liuliang Date: Tue, 9 Sep 2014 14:03:27 +0800 Subject: [PATCH 36/61] Modify the environment configuration --- cocos/2d/libcocos2d.vcxproj | 2 -- cocos/2d/libcocos2d.vcxproj.filters | 6 ------ 2 files changed, 8 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 9a32708130..8c7eaf7504 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -213,7 +213,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - @@ -550,7 +549,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 7f9653ac6f..71ff22990a 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -1123,9 +1123,6 @@ cocosbuilder\Source Files - - 3d - ui\UIWidgets\EditBox @@ -2245,9 +2242,6 @@ cocosbuilder\Header Files - - 3d - ui\UIWidgets\EditBox From ed8835d2625a0a9c35497cf931c554006cff2e33 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 9 Sep 2014 06:43:49 +0000 Subject: [PATCH 37/61] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Animate3D.lua | 35 ++++-- .../lua-bindings/auto/api/TextField.lua | 14 +-- .../auto/lua_cocos2dx_3d_auto.cpp | 32 ++++++ .../auto/lua_cocos2dx_3d_auto.hpp | 1 + .../auto/lua_cocos2dx_ui_auto.cpp | 106 +++++++++--------- 5 files changed, 116 insertions(+), 72 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua index 7d8635c012..fb9c86d96c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua @@ -38,34 +38,45 @@ -- @param #float duration -- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D) +-------------------------------- +-- animate transistion time +-- @function [parent=#Animate3D] getTransitionTime +-- @param self +-- @return float#float ret (return value: float) + -------------------------------- -- -- @function [parent=#Animate3D] startWithTarget -- @param self -- @param #cc.Node target --------------------------------- --- --- @function [parent=#Animate3D] step --- @param self --- @param #float dt - --------------------------------- --- --- @function [parent=#Animate3D] clone --- @param self --- @return Animate3D#Animate3D ret (return value: cc.Animate3D) - -------------------------------- -- -- @function [parent=#Animate3D] reverse -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) +-------------------------------- +-- +-- @function [parent=#Animate3D] clone +-- @param self +-- @return Animate3D#Animate3D ret (return value: cc.Animate3D) + +-------------------------------- +-- +-- @function [parent=#Animate3D] stop +-- @param self + -------------------------------- -- -- @function [parent=#Animate3D] update -- @param self -- @param #float t +-------------------------------- +-- +-- @function [parent=#Animate3D] step +-- @param self +-- @param #float dt + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index eb5014b7c7..990bf1a9dd 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -18,7 +18,7 @@ -------------------------------- -- --- @function [parent=#TextField] getStringValue +-- @function [parent=#TextField] getString -- @param self -- @return string#string ret (return value: string) @@ -64,6 +64,12 @@ -- @param self -- @param #bool insertText +-------------------------------- +-- +-- @function [parent=#TextField] setString +-- @param self +-- @param #string text + -------------------------------- -- -- @function [parent=#TextField] getDetachWithIME @@ -195,12 +201,6 @@ -- @param self -- @param #bool detach --------------------------------- --- --- @function [parent=#TextField] setText --- @param self --- @param #string text - -------------------------------- -- -- @function [parent=#TextField] setTouchAreaEnabled diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 312a5dfe3e..364a15ead1 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -2225,6 +2225,37 @@ int lua_cocos2dx_3d_Animate3D_create(lua_State* tolua_S) #endif return 0; } +int lua_cocos2dx_3d_Animate3D_getTransitionTime(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + double ret = cocos2d::Animate3D::getTransitionTime(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Animate3D:getTransitionTime",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_getTransitionTime'.",&tolua_err); +#endif + return 0; +} static int lua_cocos2dx_3d_Animate3D_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (Animate3D)"); @@ -2242,6 +2273,7 @@ int lua_register_cocos2dx_3d_Animate3D(lua_State* tolua_S) tolua_function(tolua_S,"getSpeed",lua_cocos2dx_3d_Animate3D_getSpeed); tolua_function(tolua_S,"getWeight",lua_cocos2dx_3d_Animate3D_getWeight); tolua_function(tolua_S,"create", lua_cocos2dx_3d_Animate3D_create); + tolua_function(tolua_S,"getTransitionTime", lua_cocos2dx_3d_Animate3D_getTransitionTime); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Animate3D).name(); g_luaType[typeName] = "cc.Animate3D"; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index 305bde0d61..caf32f6118 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -63,6 +63,7 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); + #endif // __cocos2dx_3d_h__ diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp index 17f730a66e..59762ae2f1 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -13516,7 +13516,7 @@ int lua_cocos2dx_ui_TextField_getFontSize(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_TextField_getStringValue(lua_State* tolua_S) +int lua_cocos2dx_ui_TextField_getString(lua_State* tolua_S) { int argc = 0; cocos2d::ui::TextField* cobj = nullptr; @@ -13536,7 +13536,7 @@ int lua_cocos2dx_ui_TextField_getStringValue(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getStringValue'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_getString'", nullptr); return 0; } #endif @@ -13546,16 +13546,16 @@ int lua_cocos2dx_ui_TextField_getStringValue(lua_State* tolua_S) { if(!ok) return 0; - const std::string& ret = cobj->getStringValue(); + const std::string& ret = cobj->getString(); tolua_pushcppstring(tolua_S,ret); return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getStringValue",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:getString",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getStringValue'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_getString'.",&tolua_err); #endif return 0; @@ -13874,6 +13874,52 @@ int lua_cocos2dx_ui_TextField_setInsertText(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_TextField_setString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::TextField* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_setString'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.TextField:setString"); + if(!ok) + return 0; + cobj->setString(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:setString",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_setString'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_TextField_getDetachWithIME(lua_State* tolua_S) { int argc = 0; @@ -14875,52 +14921,6 @@ int lua_cocos2dx_ui_TextField_setDetachWithIME(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ui_TextField_setText(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ui::TextField* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ui::TextField*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_TextField_setText'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.TextField:setText"); - if(!ok) - return 0; - cobj->setText(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "ccui.TextField:setText",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_TextField_setText'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_ui_TextField_setTouchAreaEnabled(lua_State* tolua_S) { int argc = 0; @@ -15281,7 +15281,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"new",lua_cocos2dx_ui_TextField_constructor); tolua_function(tolua_S,"setAttachWithIME",lua_cocos2dx_ui_TextField_setAttachWithIME); tolua_function(tolua_S,"getFontSize",lua_cocos2dx_ui_TextField_getFontSize); - tolua_function(tolua_S,"getStringValue",lua_cocos2dx_ui_TextField_getStringValue); + tolua_function(tolua_S,"getString",lua_cocos2dx_ui_TextField_getString); tolua_function(tolua_S,"setPasswordStyleText",lua_cocos2dx_ui_TextField_setPasswordStyleText); tolua_function(tolua_S,"getDeleteBackward",lua_cocos2dx_ui_TextField_getDeleteBackward); tolua_function(tolua_S,"getPlaceHolder",lua_cocos2dx_ui_TextField_getPlaceHolder); @@ -15289,6 +15289,7 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"setFontName",lua_cocos2dx_ui_TextField_setFontName); tolua_function(tolua_S,"getInsertText",lua_cocos2dx_ui_TextField_getInsertText); tolua_function(tolua_S,"setInsertText",lua_cocos2dx_ui_TextField_setInsertText); + tolua_function(tolua_S,"setString",lua_cocos2dx_ui_TextField_setString); tolua_function(tolua_S,"getDetachWithIME",lua_cocos2dx_ui_TextField_getDetachWithIME); tolua_function(tolua_S,"setTextVerticalAlignment",lua_cocos2dx_ui_TextField_setTextVerticalAlignment); tolua_function(tolua_S,"addEventListener",lua_cocos2dx_ui_TextField_addEventListener); @@ -15311,7 +15312,6 @@ int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S) tolua_function(tolua_S,"getMaxLength",lua_cocos2dx_ui_TextField_getMaxLength); tolua_function(tolua_S,"isMaxLengthEnabled",lua_cocos2dx_ui_TextField_isMaxLengthEnabled); tolua_function(tolua_S,"setDetachWithIME",lua_cocos2dx_ui_TextField_setDetachWithIME); - tolua_function(tolua_S,"setText",lua_cocos2dx_ui_TextField_setText); tolua_function(tolua_S,"setTouchAreaEnabled",lua_cocos2dx_ui_TextField_setTouchAreaEnabled); tolua_function(tolua_S,"hitTest",lua_cocos2dx_ui_TextField_hitTest); tolua_function(tolua_S,"setMaxLength",lua_cocos2dx_ui_TextField_setMaxLength); From b280a02b5d36762205ca16048b6710bc1114c65f Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 9 Sep 2014 13:41:06 +0800 Subject: [PATCH 38/61] modify external version --- external/config.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/external/config.json b/external/config.json index f8d5cd12a3..bae2b8bada 100644 --- a/external/config.json +++ b/external/config.json @@ -1,9 +1,10 @@ { - "version":"v3-deps-9", - "zip_file_size":"73295462", + "version":"v3-deps-10", + "zip_file_size":"72683180", "repo_name":"cocos2d-x-3rd-party-libs-bin", "repo_parent":"https://github.com/cocos2d/", "move_dirs":{ - "fbx-conv":"tools" + "fbx-conv":"tools", + "audio": "tests/cpp-tests/Resources" } } From 6a4397a3eb38e4177c503eaa076a5230c0526e60 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 9 Sep 2014 15:57:21 +0800 Subject: [PATCH 39/61] change toolset from 12.0 to 4.0 --- cocos/2d/libcocos2d.vcxproj | 6 +++--- .../scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj | 6 +++--- tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj | 6 +++--- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 6 +++--- .../project/proj.win32/lua-empty-test.vcxproj | 6 +++--- tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 8c7eaf7504..3942ace1ee 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -895,4 +895,4 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - \ No newline at end of file + diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj index 774b9914ec..d5ddaf47ac 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -318,4 +318,4 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$ - \ No newline at end of file + diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index 22c42ff781..35f7ae309f 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -144,4 +144,4 @@ - \ No newline at end of file + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 9d6c17fcfe..f99a6c4cc7 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -567,4 +567,4 @@ - \ No newline at end of file + diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj index a9dbfd77e9..e089f85d8c 100644 --- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -185,4 +185,4 @@ xcopy "$(ProjectDir)..\..\..\..\external\lua\luasocket\*.lua" "$(ProjectDir)..\. - \ No newline at end of file + diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index 547770c554..897aaa6864 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -1,5 +1,5 @@ - - + + Debug @@ -198,4 +198,4 @@ xcopy "$(ProjectDir)..\..\..\cpp-tests\Resources" "$(ProjectDir)..\..\res" /e /Y - \ No newline at end of file + From 117c38f8061f6ea2453cf6bed231ade2dc46cae4 Mon Sep 17 00:00:00 2001 From: songchengjiang Date: Tue, 9 Sep 2014 17:05:33 +0800 Subject: [PATCH 40/61] Sprite3DHitTest use AABB testing --- .../cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 6fdebe0823..30ed0e7da8 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -241,7 +241,6 @@ Sprite3DHitTest::Sprite3DHitTest() sprite1->setScale(4.f); sprite1->setTexture("Sprite3DTest/boss.png"); sprite1->setPosition( Vec2(s.width/2, s.height/2) ); - sprite1->setContentSize(Size(20, 20)); //add to scene addChild( sprite1 ); @@ -266,14 +265,11 @@ Sprite3DHitTest::Sprite3DHitTest() listener1->onTouchBegan = [](Touch* touch, Event* event){ auto target = static_cast(event->getCurrentTarget()); - - Vec2 locationInNode = target->convertToNodeSpace(touch->getLocation()); - Size s = target->getContentSize(); - Rect rect = Rect(-s.width/2, -s.height/2, s.width, s.height); - - if (rect.containsPoint(locationInNode)) + + Rect rect = target->getBoundingBox(); + if (rect.containsPoint(touch->getLocation())) { - log("sprite3d began... x = %f, y = %f", locationInNode.x, locationInNode.y); + log("sprite3d began... x = %f, y = %f", touch->getLocation().x, touch->getLocation().y); target->setOpacity(100); return true; } From 4099015421b16adf82043d7348de69f9486d2afe Mon Sep 17 00:00:00 2001 From: songchengjiang Date: Tue, 9 Sep 2014 17:47:34 +0800 Subject: [PATCH 41/61] Sprite3D set default _contentSize by AABB --- cocos/3d/CCSprite3D.cpp | 1 + tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index ed9a3baf89..d351398eca 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -53,6 +53,7 @@ Sprite3D* Sprite3D::create(const std::string &modelPath) auto sprite = new (std::nothrow) Sprite3D(); if (sprite && sprite->initWithFile(modelPath)) { + sprite->_contentSize = sprite->getBoundingBox().size; sprite->autorelease(); return sprite; } diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index 30ed0e7da8..fdda2d5d75 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -251,7 +251,6 @@ Sprite3DHitTest::Sprite3DHitTest() sprite2->setScale(4.f); sprite2->setTexture("Sprite3DTest/boss.png"); sprite2->setPosition( Vec2(s.width/2, s.height/2) ); - sprite2->setContentSize(Size(20, 20)); sprite2->setAnchorPoint(Vec2(0.5, 0.5)); //add to scene From 0ead7b63075380ccf31a6df4768cd79c9bfe7cd6 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 12:18:31 -0700 Subject: [PATCH 42/61] Squashed commit of the following: commit b9181ae92541d11119bedd766773ddb01f0bb486 Author: Ricardo Quesada Date: Tue Sep 9 09:34:40 2014 -0700 Compiles luasocket on Mac commit 91fc79aa2101867fedfbcd7d846e9508009894e6 Author: Ricardo Quesada Date: Tue Sep 9 09:12:30 2014 -0700 disables luasockets commit 31f2ee462708ab7b604b9399eaabd275e2da9e02 Merge: 19099fd 0abe4cb Author: Ricardo Quesada Date: Tue Sep 9 08:10:48 2014 -0700 Merge remote-tracking branch 'cocos2d/v3' into cmakefile_mac_osx Conflicts: cocos/3d/cocos3d.h commit 19099fd021b4ecf1f2eebd73ea14e84572d1ee33 Author: Ricardo Quesada Date: Mon Sep 8 23:21:03 2014 -0700 compiles on Linux commit eec7b92817ac9208123468bb882612aad89f94bf Author: Ricardo Quesada Date: Mon Sep 8 23:16:46 2014 -0700 all projecs compiles with CMake commit 40fcc8325b409a580fdbf26d2ee27aa2d1db0109 Author: Ricardo Quesada Date: Mon Sep 8 21:47:27 2014 -0700 CCUserDefualt.mm better includes commit 30709ec8243562858498cb118240bb45bf9b33b0 Author: Ricardo Quesada Date: Mon Sep 8 21:26:36 2014 -0700 cpp-tests compiles and works on Mac using CMake commit 67f0fc8df887d08d3d7a27c5fdadd335d6841676 Author: Ricardo Quesada Date: Mon Sep 8 20:12:09 2014 -0700 Adds missing files to CMakeLists.txt commit 36f939ea7f157ca851aee138300c13d9888c0078 Author: Ricardo Quesada Date: Mon Sep 8 19:52:34 2014 -0700 Adds more box2d missing files commit 00f81e3b5ec97150974cc6022e86c394ff488ccb Author: Ricardo Quesada Date: Mon Sep 8 19:39:54 2014 -0700 Adds missing box2d files commit 9673227b4d7d0e6d9eced49bdd69b98cb519968a Author: Ricardo Quesada Date: Mon Sep 8 18:44:15 2014 -0700 Initial CMake support for Mac --- CMakeLists.txt | 66 +- build/cocos2d_libs.xcodeproj/project.pbxproj | 30 + cocos/3d/CMakeLists.txt | 36 - cocos/3d/cocos3d.h | 15 +- cocos/CMakeLists.txt | 633 ++++++++++++++++-- cocos/audio/mac/SimpleAudioEngine.mm | 2 +- cocos/base/CCEvent.h | 2 - cocos/base/CCEventListener.h | 2 - cocos/base/CCUserDefault.mm | 13 +- cocos/cocos2d.h | 18 +- cocos/math/CMakeLists.txt | 13 - cocos/platform/apple/CCFileUtilsApple.h | 3 +- cocos/platform/apple/CCFileUtilsApple.mm | 12 +- cocos/platform/apple/CCThread.mm | 6 +- cocos/scripting/lua-bindings/CMakeLists.txt | 120 +++- .../auto/lua_cocos2dx_3d_auto.cpp | 1 - .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 1 - .../auto/lua_cocos2dx_controller_auto.cpp | 2 +- .../lua-bindings/manual/LuaBasicConversions.h | 1 - .../lua_cocos2dx_controller_manual.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImplAndroid.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImplIOS.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImplMac.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImplWin.cpp | 1 + cocos/ui/UIEditBox/UIEditBoxImplWin.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp | 5 + cocos/ui/UIEditBox/UIEditBoxImplWp8.h | 5 + cocos/ui/UIWebView.cpp | 2 + cocos/ui/UIWebView.mm | 4 +- cocos/ui/UIWebViewImpl_android.cpp | 3 + cocos/ui/UIWebViewImpl_android.h | 4 + tests/cpp-empty-test/CMakeLists.txt | 11 +- tests/cpp-empty-test/proj.mac/main.cpp | 2 +- tests/cpp-tests/CMakeLists.txt | 39 +- .../Classes/Camera3DTest/Camera3DTest.cpp | 3 - tests/cpp-tests/Classes/testBasic.h | 1 - tests/lua-empty-test/project/CMakeLists.txt | 13 +- tests/lua-tests/project/CMakeLists.txt | 16 +- 38 files changed, 893 insertions(+), 202 deletions(-) delete mode 100644 cocos/3d/CMakeLists.txt delete mode 100644 cocos/math/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 77aa76b333..033d9ac19a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ cmake_minimum_required(VERSION 2.8) project (Cocos2dx) # The version number -set(Cocos2dxSamples_VERSION_MAJOR 3) -set(Cocos2dxSamples_VERSION_MINOR 1) +set(COCOS2D_X_VERSION 3.3.0) +#set(CMAKE_C_COMPILER_INIT g++) include(build/BuildHelpers.CMakeLists.txt) @@ -58,10 +58,14 @@ if(WINDOWS) ADD_DEFINITIONS (-D_USRDLL -DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32) set(PLATFORM_FOLDER win32) elseif(MACOSX) + ADD_DEFINITIONS (-DCC_TARGET_OS_MAC) + ADD_DEFINITIONS (-DUSE_FILE32API) set(PLATFORM_FOLDER mac) -else(LINUX) +elseif(LINUX) ADD_DEFINITIONS(-DLINUX) set(PLATFORM_FOLDER linux) +else() + message( FATAL_ERROR "Unsupported platform, CMake will exit" ) endif() if(MINGW) @@ -78,15 +82,28 @@ endif() # architecture if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) -set(ARCH_DIR "64-bit") + set(ARCH_DIR "64-bit") +elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 ) + set(ARCH_DIR "32-bit") else() -set(ARCH_DIR "32-bit") + message( FATAL_ERROR "Unsupported architecture, CMake will exit" ) +endif() + +# Specific Include Directories +if(LINUX) + set(PLATFORM_INCLUDE_DIR + /usr/include + /usr/include/GLFW + /usr/local/include/GLFW + ) +else() + set(PLATFORM_INCLUDE_DIR + ${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/include/${PLATFORM_FOLDER} + ) endif() include_directories( - /usr/include - /usr/include/GLFW - /usr/local/include/GLFW + ${PLATFORM_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cocos ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform/${PLATFORM_FOLDER} @@ -94,15 +111,32 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/external ) +# Specific Link Directories +if(LINUX) + set(PLATFORM_LINK_DIR + /usr/local/lib + ${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR} + ) + set(PLATFORM_FOLDER_ARCH + ${PLATFORM_FOLDER}/${ARCH_DIR} + ) +else() + set(PLATFORM_FOLDER_ARCH + ${PLATFORM_FOLDER} + ) + set(PLATFORM_LINK_DIR + ${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/prebuilt/${PLATFORM_FOLDER_ARCH} + ) +endif() + link_directories( - /usr/local/lib - ${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR} + ${PLATFORM_LINK_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/external/jpeg/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/tiff/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER_ARCH} ) # libcocos2d.a diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 6f0291e781..4b84128ccd 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1818,6 +1818,17 @@ 50ABC0651926664800A911A9 /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF531926664700A911A9 /* CCGL.h */; }; 50ABC0671926664800A911A9 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF541926664700A911A9 /* CCPlatformDefine.h */; }; 50ABC0691926664800A911A9 /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF551926664700A911A9 /* CCStdC.h */; }; + 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176631960F89B00DE83F5 /* CCEventListenerController.cpp */; }; + 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; + 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */; }; + 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; }; + 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; }; + 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; }; + 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; }; + 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; }; + 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; }; + 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; }; + 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; }; A07A4CAF1783777C0073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551A342158F2AB200E66CFE /* Foundation.framework */; }; B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; }; B217703C1977ECB4009EE11B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B217703B1977ECB4009EE11B /* IOKit.framework */; }; @@ -2830,6 +2841,10 @@ 50E6D33118E174130051CA34 /* UIRelativeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRelativeBox.h; sourceTree = ""; }; 50E6D33218E174130051CA34 /* UIVBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVBox.cpp; sourceTree = ""; }; 50E6D33318E174130051CA34 /* UIVBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVBox.h; sourceTree = ""; }; + 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWin.h; sourceTree = ""; }; + 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWp8.h; sourceTree = ""; }; + 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWin.cpp; sourceTree = ""; }; + 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWp8.cpp; sourceTree = ""; }; 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonReader.cpp; sourceTree = ""; }; 50FCEB6B18C72017004AD434 /* ButtonReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonReader.h; sourceTree = ""; }; 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckBoxReader.cpp; sourceTree = ""; }; @@ -3996,6 +4011,10 @@ 292DB12E19B4574100A80320 /* UIEditBox */ = { isa = PBXGroup; children = ( + 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */, + 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */, + 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */, + 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */, 292DB12F19B4574100A80320 /* UIEditBox.cpp */, 292DB13019B4574100A80320 /* UIEditBox.h */, 292DB13119B4574100A80320 /* UIEditBoxImpl.h */, @@ -5034,6 +5053,7 @@ 1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 50ABBD911925AB4100A911A9 /* CCGLProgramCache.h in Headers */, 15AE180619AAD2F700C27E9E /* 3dExport.h in Headers */, + 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */, 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */, 15AE1A8F19AAD40300C27E9E /* b2RopeJoint.h in Headers */, 15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */, @@ -5070,6 +5090,7 @@ 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */, 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */, + 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */, 15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */, 1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */, 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, @@ -5095,6 +5116,7 @@ 5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, 15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */, 15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, + 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */, 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */, 15AE1A6519AAD40300C27E9E /* b2TimeStep.h in Headers */, 15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, @@ -5600,6 +5622,7 @@ 15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */, B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, 15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */, + 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */, 15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */, 50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */, 3EA3EDBF1991CDFA00645534 /* CCCamera.h in Headers */, @@ -5800,6 +5823,7 @@ 15AE1A9519AAD40300C27E9E /* b2BlockAllocator.h in Headers */, 5034CA48191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, 15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, + 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */, 50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */, 15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */, 503DD8E81926736A00CD74DD /* CCES2Renderer.h in Headers */, @@ -6129,8 +6153,10 @@ 1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, 1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */, 15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */, + 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, + 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */, 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */, 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, @@ -6363,6 +6389,7 @@ 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, 292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, 15AE1A5219AAD40300C27E9E /* b2Draw.cpp in Sources */, + 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */, @@ -6435,6 +6462,7 @@ 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, 15AE19EA19AAD3A700C27E9E /* SlotData.cpp in Sources */, + 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */, 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */, 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, @@ -6657,6 +6685,7 @@ 15AE1A0B19AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, 15AE1AA519AAD40300C27E9E /* b2Fixture.cpp in Sources */, + 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */, 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, B375107E1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp in Sources */, 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, @@ -6841,6 +6870,7 @@ 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */, + 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */, 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */, 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */, 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, diff --git a/cocos/3d/CMakeLists.txt b/cocos/3d/CMakeLists.txt deleted file mode 100644 index 70e3560efd..0000000000 --- a/cocos/3d/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -set(COCOS_3D_SRC -CCRay.cpp -CCAABB.cpp -CCOBB.cpp -CCAnimate3D.cpp -CCAnimation3D.cpp -CCAttachNode.cpp -CCBundle3D.cpp -CCBundleReader.cpp -CCMesh.cpp -CCMeshSkin.cpp -CCMeshVertexIndexData.cpp -CCSprite3DMaterial.cpp -CCObjLoader.cpp -CCSkeleton3D.cpp -CCSprite3D.cpp -) - - -include_directories( - 3d -) - -add_library(cocos3d STATIC - ${COCOS_3D_SRC} -) - -target_link_libraries(cocos3d - cocos2d -) - -set_target_properties(cocos3d - PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" -) diff --git a/cocos/3d/cocos3d.h b/cocos/3d/cocos3d.h index dbd2760feb..87b4575980 100755 --- a/cocos/3d/cocos3d.h +++ b/cocos/3d/cocos3d.h @@ -25,18 +25,7 @@ #ifndef __COCOS_3D_COCOS3D_H__ #define __COCOS_3D_COCOS3D_H__ -//3d -#include "3d/CCAABB.h" -#include "3d/CCOBB.h" -#include "3d/CCRay.h" -#include "3d/CCSprite3D.h" -#include "3d/CCMesh.h" -#include "3d/CCMeshSkin.h" -#include "3d/CCAnimate3D.h" -#include "3d/CCAnimation3D.h" -#include "3d/CCSprite3DMaterial.h" -#include "3d/CCAttachNode.h" -#include "3d/CCMeshVertexIndexData.h" -#include "3d/CCSkeleton3D.h" +// DON'T ADD FILES HERE +// ADD THEM IN THE COCOS2D.H HEADER FILE #endif diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index ac588ab6a9..8d3960a6b6 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -42,69 +42,604 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../external/websockets/include/${PLATFORM_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash ${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF - ${CMAKE_CURRENT_SOURCE_DIR}/../external/linux-specific/fmod/include/${ARCH_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../external/${PLATFORM_FOLDER}-specific/fmod/include/${ARCH_DIR} ) +# # cocos2d source files and header files -file(GLOB core_source_files - "${CMAKE_CURRENT_SOURCE_DIR}/cocos2d.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/base/ccFPSImages.c" - "${CMAKE_CURRENT_SOURCE_DIR}/2d/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/3d/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/audio/linux/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/base/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/deprecated/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocosbuilder/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/spine/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/math/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/network/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/physics/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/physics/chipmunk/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/platform/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/platform/linux/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/platform/desktop/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/renderer/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/tinyxml2/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/unzip/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/src/constraints/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/edtaa3func/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF/*.c" - ) -file(GLOB_RECURSE cocostudio_source_files "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/*.cpp") -file(GLOB_RECURSE extensions_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/*.cpp") -file(GLOB_RECURSE box2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../external/Box2D/*.cpp") -set(cocos2d_source_files ${chipmunk_source_files} ${box2d_source_files} ${core_source_files} ${cocostudio_source_files} ${extensions_source_files}) -# exclude files specific for other platforms -list(REMOVE_ITEM cocos2d_source_files - "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebView.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebViewImpl_android.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/proj.wp8/pch.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/proj.wp8/pch.cpp") +# +# From CMake page: +# We do not recommend using GLOB to collect a list of source files from your source tree. +# If no CMakeLists.txt file changes when a source is added or removed then the generated +# build system cannot know when to ask CMake to regenerate.) -add_library(cocos2d STATIC ${cocos2d_source_files}) +set(COCOS2D_BASE_SRC + + cocos2d.cpp + + base/ccFPSImages.c + base/CCAutoreleasePool.cpp + base/CCCamera.cpp + base/CCConfiguration.cpp + base/CCConsole.cpp + base/CCController-android.cpp + base/CCController.cpp + base/CCData.cpp + base/CCDataVisitor.cpp + base/CCDirector.cpp + base/CCEvent.cpp + base/CCEventAcceleration.cpp + base/CCEventController.cpp + base/CCEventCustom.cpp + base/CCEventDispatcher.cpp + base/CCEventFocus.cpp + base/CCEventKeyboard.cpp + base/CCEventListener.cpp + base/CCEventListenerAcceleration.cpp + base/CCEventListenerController.cpp + base/CCEventListenerCustom.cpp + base/CCEventListenerFocus.cpp + base/CCEventListenerKeyboard.cpp + base/CCEventListenerMouse.cpp + base/CCEventListenerTouch.cpp + base/CCEventMouse.cpp + base/CCEventTouch.cpp + base/CCIMEDispatcher.cpp + base/CCNS.cpp + base/CCProfiling.cpp + base/CCRef.cpp + base/CCScheduler.cpp + base/CCScriptSupport.cpp + base/CCTouch.cpp + base/CCUserDefault.cpp + base/CCUserDefaultAndroid.cpp + base/CCValue.cpp + base/ObjectFactory.cpp + base/TGAlib.cpp + base/ZipUtils.cpp + base/atitc.cpp + base/base64.cpp + base/ccCArray.cpp + base/ccRandom.cpp + base/ccTypes.cpp + base/ccUTF8.cpp + base/ccUtils.cpp + base/etc1.cpp + base/pvr.cpp + base/s3tc.cpp + + 2d/CCAction.cpp + 2d/CCActionCamera.cpp + 2d/CCActionCatmullRom.cpp + 2d/CCActionEase.cpp + 2d/CCActionGrid.cpp + 2d/CCActionGrid3D.cpp + 2d/CCActionInstant.cpp + 2d/CCActionInterval.cpp + 2d/CCActionManager.cpp + 2d/CCActionPageTurn3D.cpp + 2d/CCActionProgressTimer.cpp + 2d/CCActionTiledGrid.cpp + 2d/CCActionTween.cpp + 2d/CCAnimation.cpp + 2d/CCAnimationCache.cpp + 2d/CCAtlasNode.cpp + 2d/CCClippingNode.cpp + 2d/CCComponent.cpp + 2d/CCComponentContainer.cpp + 2d/CCDrawNode.cpp + 2d/CCDrawingPrimitives.cpp + 2d/CCFastTMXLayer.cpp + 2d/CCFastTMXTiledMap.cpp + 2d/CCFont.cpp + 2d/CCFontAtlas.cpp + 2d/CCFontAtlasCache.cpp + 2d/CCFontCharMap.cpp + 2d/CCFontFNT.cpp + 2d/CCFontFreeType.cpp + 2d/CCGLBufferedNode.cpp + 2d/CCGrabber.cpp + 2d/CCGrid.cpp + 2d/CCLabel.cpp + 2d/CCLabelAtlas.cpp + 2d/CCLabelBMFont.cpp + 2d/CCLabelTTF.cpp + 2d/CCLabelTextFormatter.cpp + 2d/CCLayer.cpp + 2d/CCMenu.cpp + 2d/CCMenuItem.cpp + 2d/CCMotionStreak.cpp + 2d/CCNode.cpp + 2d/CCNodeGrid.cpp + 2d/CCParallaxNode.cpp + 2d/CCParticleBatchNode.cpp + 2d/CCParticleExamples.cpp + 2d/CCParticleSystem.cpp + 2d/CCParticleSystemQuad.cpp + 2d/CCProgressTimer.cpp + 2d/CCProtectedNode.cpp + 2d/CCRenderTexture.cpp + 2d/CCScene.cpp + 2d/CCSprite.cpp + 2d/CCSpriteBatchNode.cpp + 2d/CCSpriteFrame.cpp + 2d/CCSpriteFrameCache.cpp + 2d/CCTMXLayer.cpp + 2d/CCTMXObjectGroup.cpp + 2d/CCTMXTiledMap.cpp + 2d/CCTMXXMLParser.cpp + 2d/CCTextFieldTTF.cpp + 2d/CCTileMapAtlas.cpp + 2d/CCTransition.cpp + 2d/CCTransitionPageTurn.cpp + 2d/CCTransitionProgress.cpp + 2d/CCTweenFunction.cpp + + 3d/CCAABB.cpp + 3d/CCAnimate3D.cpp + 3d/CCAnimation3D.cpp + 3d/CCAttachNode.cpp + 3d/CCBundle3D.cpp + 3d/CCBundleReader.cpp + 3d/CCMesh.cpp + 3d/CCMeshSkin.cpp + 3d/CCMeshVertexIndexData.cpp + 3d/CCOBB.cpp + 3d/CCObjLoader.cpp + 3d/CCRay.cpp + 3d/CCSkeleton3D.cpp + 3d/CCSprite3D.cpp + 3d/CCSprite3DMaterial.cpp + + network/HttpClient.cpp + network/SocketIO.cpp + network/WebSocket.cpp + + ui/CocosGUI.cpp + ui/UIButton.cpp + ui/UICheckBox.cpp + ui/UIDeprecated.cpp + ui/UIHBox.cpp + ui/UIHelper.cpp + ui/UIImageView.cpp + ui/UILayout.cpp + ui/UILayoutManager.cpp + ui/UILayoutParameter.cpp + ui/UIListView.cpp + ui/UILoadingBar.cpp + ui/UIPageView.cpp + ui/UIRelativeBox.cpp + ui/UIRichText.cpp + ui/UIScale9Sprite.cpp + ui/UIScrollView.cpp + ui/UISlider.cpp + ui/UIText.cpp + ui/UITextAtlas.cpp + ui/UITextBMFont.cpp + ui/UITextField.cpp + ui/UIVBox.cpp + ui/UIVideoPlayerAndroid.cpp + ui/UIWebView.cpp + ui/UIWebViewImpl_android.cpp + ui/UIWidget.cpp + ui/UIEditBox/UIEditBox.cpp + ui/UIEditBox/UIEditBoxImplAndroid.cpp + ui/UIEditBox/UIEditBoxImplNone.cpp + ui/UIEditBox/UIEditBoxImplWin.cpp + ui/UIEditBox/UIEditBoxImplWp8.cpp + + math/CCAffineTransform.cpp + math/CCGeometry.cpp + math/CCVertex.cpp + math/Mat4.cpp + math/MathUtil.cpp + math/Quaternion.cpp + math/TransformUtils.cpp + math/Vec2.cpp + math/Vec3.cpp + math/Vec4.cpp + + renderer/CCBatchCommand.cpp + renderer/CCCustomCommand.cpp + renderer/CCGLProgram.cpp + renderer/CCGLProgramCache.cpp + renderer/CCGLProgramState.cpp + renderer/CCGLProgramStateCache.cpp + renderer/CCGroupCommand.cpp + renderer/CCMeshCommand.cpp + renderer/CCPrimitive.cpp + renderer/CCPrimitiveCommand.cpp + renderer/CCQuadCommand.cpp + renderer/CCRenderCommand.cpp + renderer/CCRenderer.cpp + renderer/CCTexture2D.cpp + renderer/CCTextureAtlas.cpp + renderer/CCTextureCache.cpp + renderer/CCTrianglesCommand.cpp + renderer/CCVertexIndexBuffer.cpp + renderer/CCVertexIndexData.cpp + renderer/ccGLStateCache.cpp + renderer/ccShaders.cpp + + deprecated/CCArray.cpp + deprecated/CCDeprecated.cpp + deprecated/CCDictionary.cpp + deprecated/CCNotificationCenter.cpp + deprecated/CCSet.cpp + deprecated/CCString.cpp + + physics/CCPhysicsBody.cpp + physics/CCPhysicsContact.cpp + physics/CCPhysicsJoint.cpp + physics/CCPhysicsShape.cpp + physics/CCPhysicsWorld.cpp + physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp + physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp + physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp + physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp + physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp + + platform/CCFileUtils.cpp + platform/CCGLView.cpp + platform/CCImage.cpp + platform/CCSAXParser.cpp + platform/CCThread.cpp + + storage/local-storage/LocalStorage.cpp + storage/local-storage/LocalStorageAndroid.cpp + ) + +if(MACOSX) + set(COCOS2D_BASE_SRC + ${COCOS2D_BASE_SRC} + ui/UIEditBox/UIEditBoxImplIOS.mm + ui/UIEditBox/UIEditBoxImplMac.mm + base/CCUserDefault.mm + ) +endif() + +set(COCOS2D_EDITOR_SUPPORT_SRC + editor-support/cocosbuilder/CCBAnimationManager.cpp + editor-support/cocosbuilder/CCBFileLoader.cpp + editor-support/cocosbuilder/CCBKeyframe.cpp + editor-support/cocosbuilder/CCBReader.cpp + editor-support/cocosbuilder/CCBSequence.cpp + editor-support/cocosbuilder/CCBSequenceProperty.cpp + editor-support/cocosbuilder/CCControlButtonLoader.cpp + editor-support/cocosbuilder/CCControlLoader.cpp + editor-support/cocosbuilder/CCLabelBMFontLoader.cpp + editor-support/cocosbuilder/CCLabelTTFLoader.cpp + editor-support/cocosbuilder/CCLayerColorLoader.cpp + editor-support/cocosbuilder/CCLayerGradientLoader.cpp + editor-support/cocosbuilder/CCLayerLoader.cpp + editor-support/cocosbuilder/CCMenuItemImageLoader.cpp + editor-support/cocosbuilder/CCMenuItemLoader.cpp + editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp + editor-support/cocosbuilder/CCNodeLoader.cpp + editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp + editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp + editor-support/cocosbuilder/CCScale9SpriteLoader.cpp + editor-support/cocosbuilder/CCScrollViewLoader.cpp + editor-support/cocosbuilder/CCSpriteLoader.cpp + + editor-support/spine/Animation.cpp + editor-support/spine/AnimationState.cpp + editor-support/spine/AnimationStateData.cpp + editor-support/spine/Atlas.cpp + editor-support/spine/AtlasAttachmentLoader.cpp + editor-support/spine/Attachment.cpp + editor-support/spine/AttachmentLoader.cpp + editor-support/spine/Bone.cpp + editor-support/spine/BoneData.cpp + editor-support/spine/BoundingBoxAttachment.cpp + editor-support/spine/CCSkeleton.cpp + editor-support/spine/CCSkeletonAnimation.cpp + editor-support/spine/Event.cpp + editor-support/spine/EventData.cpp + editor-support/spine/Json.cpp + editor-support/spine/RegionAttachment.cpp + editor-support/spine/Skeleton.cpp + editor-support/spine/SkeletonBounds.cpp + editor-support/spine/SkeletonData.cpp + editor-support/spine/SkeletonJson.cpp + editor-support/spine/Skin.cpp + editor-support/spine/Slot.cpp + editor-support/spine/SlotData.cpp + editor-support/spine/extension.cpp + editor-support/spine/spine-cocos2dx.cpp + + editor-support/cocostudio/CCActionFrame.cpp + editor-support/cocostudio/CCActionFrameEasing.cpp + editor-support/cocostudio/CCActionManagerEx.cpp + editor-support/cocostudio/CCActionNode.cpp + editor-support/cocostudio/CCActionObject.cpp + editor-support/cocostudio/CCArmature.cpp + editor-support/cocostudio/CCArmatureAnimation.cpp + editor-support/cocostudio/CCArmatureDataManager.cpp + editor-support/cocostudio/CCArmatureDefine.cpp + editor-support/cocostudio/CCBatchNode.cpp + editor-support/cocostudio/CCBone.cpp + editor-support/cocostudio/CCColliderDetector.cpp + editor-support/cocostudio/CCComAttribute.cpp + editor-support/cocostudio/CCComAudio.cpp + editor-support/cocostudio/CCComController.cpp + editor-support/cocostudio/CCComRender.cpp + editor-support/cocostudio/CCDataReaderHelper.cpp + editor-support/cocostudio/CCDatas.cpp + editor-support/cocostudio/CCDecorativeDisplay.cpp + editor-support/cocostudio/CCDisplayFactory.cpp + editor-support/cocostudio/CCDisplayManager.cpp + editor-support/cocostudio/CCInputDelegate.cpp + editor-support/cocostudio/CCProcessBase.cpp + editor-support/cocostudio/CCSGUIReader.cpp + editor-support/cocostudio/CCSSceneReader.cpp + editor-support/cocostudio/CCSkin.cpp + editor-support/cocostudio/CCSpriteFrameCacheHelper.cpp + editor-support/cocostudio/CCTransformHelp.cpp + editor-support/cocostudio/CCTween.cpp + editor-support/cocostudio/CCUtilMath.cpp + editor-support/cocostudio/CocoLoader.cpp + editor-support/cocostudio/DictionaryHelper.cpp + editor-support/cocostudio/TriggerBase.cpp + editor-support/cocostudio/TriggerMng.cpp + editor-support/cocostudio/TriggerObj.cpp + editor-support/cocostudio/WidgetReader/WidgetReader.cpp + editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp + editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp + editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp + editor-support/cocostudio/WidgetReader/WidgetReader.cpp + editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp + editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp + editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp + editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp + editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp + editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp + editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp + editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp + editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp + editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp + editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp + editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp + editor-support/cocostudio/ActionTimeline/CCFrame.cpp + editor-support/cocostudio/ActionTimeline/CCNodeReader.cpp + editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp + ) + +if(LINUX) + set(COCOS2D_AUDIO_SRC + audio/linux/FmodAudioPlayer.cpp + audio/linux/SimpleAudioEngineFMOD.cpp + ) +elseif(MACOSX) + # split it in _C and non C + # because C files needs to be compiled with C compiler and not C++ + # compiler + set(COCOS2D_AUDIO_SRC_C + audio/mac/CDAudioManager.m + audio/mac/CDOpenALSupport.m + audio/mac/CocosDenshion.m + audio/mac/SimpleAudioEngine_objc.m + ) + set(COCOS2D_AUDIO_SRC + ${COCOS2D_AUDIO_SRC_C} + audio/mac/SimpleAudioEngine.mm + audio/mac/CDXMacOSXSupport.mm + ) + SET_SOURCE_FILES_PROPERTIES( + ${COCOS2D_AUDIO_SRC_C} + PROPERTIES LANGUAGE C + ) +else() + message( FATAL_ERROR "Unsupported platform, CMake will exit" ) +endif() + +# For external projects, leave one empty line +# between projects +set(COCOS2D_EXTERNAL_SRC + ../external/tinyxml2/tinyxml2.cpp + + ../external/xxhash/xxhash.c + + ../external/unzip/ioapi.cpp + ../external/unzip/unzip.cpp + + ../external/edtaa3func/edtaa3func.cpp + + ../external/ConvertUTF/ConvertUTF.c + ../external/ConvertUTF/ConvertUTFWrapper.cpp + ) + +set(COCOS2D_DESKTOP_SRC + platform/desktop/CCGLViewImpl.cpp + ) + +if(LINUX) + set(COCOS2D_PLATFORM_SRC + ${COCOS2D_DESKTOP_SRC} + platform/linux/CCApplication.cpp + platform/linux/CCCommon.cpp + platform/linux/CCDevice.cpp + platform/linux/CCFileUtilsLinux.cpp + platform/linux/CCStdC.cpp + ) +elseif(MACOSX) + set(COCOS2D_PLATFORM_SRC + ${COCOS2D_DESKTOP_SRC} + platform/mac/CCApplication.mm + platform/mac/CCCommon.mm + platform/mac/CCDevice.mm + platform/apple/CCLock.cpp + platform/apple/CCFileUtilsApple.mm + platform/apple/CCThread.mm + ) +else() + message( FATAL_ERROR "Unsupported architecture, CMake will exit" ) +endif() + +set(COCOS2D_SRC + ${COCOS2D_BASE_SRC} + ${COCOS2D_PLATFORM_SRC} + ${COCOS2D_EXTERNAL_SRC} + ${COCOS2D_AUDIO_SRC} + ${COCOS2D_EDITOR_SUPPORT_SRC} + ) + +set(COCOS2D_EXTENSIONS_SRC + ../extensions/ExtensionDeprecated.cpp + ../extensions/GUI/CCControlExtension/CCControlButton.cpp + ../extensions/GUI/CCControlExtension/CCControlColourPicker.cpp + ../extensions/GUI/CCControlExtension/CCControl.cpp + ../extensions/GUI/CCControlExtension/CCControlHuePicker.cpp + ../extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp + ../extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp + ../extensions/GUI/CCControlExtension/CCControlSlider.cpp + ../extensions/GUI/CCControlExtension/CCControlStepper.cpp + ../extensions/GUI/CCControlExtension/CCControlSwitch.cpp + ../extensions/GUI/CCControlExtension/CCControlUtils.cpp + ../extensions/GUI/CCControlExtension/CCInvocation.cpp + ../extensions/GUI/CCScrollView/CCScrollView.cpp + ../extensions/GUI/CCScrollView/CCTableViewCell.cpp + ../extensions/GUI/CCScrollView/CCTableView.cpp + ../extensions/assets-manager/AssetsManager.cpp + ../extensions/physics-nodes/CCPhysicsDebugNode.cpp + ../extensions/physics-nodes/CCPhysicsSprite.cpp + ) + +set(CHIPMUNK_SRC + ../external/chipmunk/src/chipmunk.c + ../external/chipmunk/src/cpArbiter.c + ../external/chipmunk/src/cpArray.c + ../external/chipmunk/src/cpBB.c + ../external/chipmunk/src/cpBBTree.c + ../external/chipmunk/src/cpBody.c + ../external/chipmunk/src/cpCollision.c + ../external/chipmunk/src/cpHashSet.c + ../external/chipmunk/src/cpPolyShape.c + ../external/chipmunk/src/cpShape.c + ../external/chipmunk/src/cpSpace.c + ../external/chipmunk/src/cpSpaceComponent.c + ../external/chipmunk/src/cpSpaceHash.c + ../external/chipmunk/src/cpSpaceQuery.c + ../external/chipmunk/src/cpSpaceStep.c + ../external/chipmunk/src/cpSpatialIndex.c + ../external/chipmunk/src/cpSweep1D.c + ../external/chipmunk/src/cpVect.c + ../external/chipmunk/src/constraints/cpConstraint.c + ../external/chipmunk/src/constraints/cpDampedRotarySpring.c + ../external/chipmunk/src/constraints/cpDampedSpring.c + ../external/chipmunk/src/constraints/cpGearJoint.c + ../external/chipmunk/src/constraints/cpGrooveJoint.c + ../external/chipmunk/src/constraints/cpPinJoint.c + ../external/chipmunk/src/constraints/cpPivotJoint.c + ../external/chipmunk/src/constraints/cpRatchetJoint.c + ../external/chipmunk/src/constraints/cpRotaryLimitJoint.c + ../external/chipmunk/src/constraints/cpSimpleMotor.c + ../external/chipmunk/src/constraints/cpSlideJoint.c + ) + +set(BOX2D_SRC + ../external/Box2D/Collision/b2BroadPhase.cpp + ../external/Box2D/Collision/b2CollideCircle.cpp + ../external/Box2D/Collision/b2CollideEdge.cpp + ../external/Box2D/Collision/b2CollidePolygon.cpp + ../external/Box2D/Collision/b2Collision.cpp + ../external/Box2D/Collision/b2Distance.cpp + ../external/Box2D/Collision/b2DynamicTree.cpp + ../external/Box2D/Collision/b2TimeOfImpact.cpp + ../external/Box2D/Collision/Shapes/b2ChainShape.cpp + ../external/Box2D/Collision/Shapes/b2CircleShape.cpp + ../external/Box2D/Collision/Shapes/b2EdgeShape.cpp + ../external/Box2D/Collision/Shapes/b2PolygonShape.cpp + ../external/Box2D/Common/b2BlockAllocator.cpp + ../external/Box2D/Common/b2Draw.cpp + ../external/Box2D/Common/b2Math.cpp + ../external/Box2D/Common/b2Settings.cpp + ../external/Box2D/Common/b2StackAllocator.cpp + ../external/Box2D/Common/b2Timer.cpp + ../external/Box2D/Dynamics/b2Body.cpp + ../external/Box2D/Dynamics/b2ContactManager.cpp + ../external/Box2D/Dynamics/b2Fixture.cpp + ../external/Box2D/Dynamics/b2Island.cpp + ../external/Box2D/Dynamics/b2World.cpp + ../external/Box2D/Dynamics/b2WorldCallbacks.cpp + ../external/Box2D/Dynamics/Joints/b2DistanceJoint.cpp + ../external/Box2D/Dynamics/Joints/b2FrictionJoint.cpp + ../external/Box2D/Dynamics/Joints/b2GearJoint.cpp + ../external/Box2D/Dynamics/Joints/b2Joint.cpp + ../external/Box2D/Dynamics/Joints/b2MotorJoint.cpp + ../external/Box2D/Dynamics/Joints/b2MouseJoint.cpp + ../external/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp + ../external/Box2D/Dynamics/Joints/b2PulleyJoint.cpp + ../external/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp + ../external/Box2D/Dynamics/Joints/b2RopeJoint.cpp + ../external/Box2D/Dynamics/Joints/b2WeldJoint.cpp + ../external/Box2D/Dynamics/Joints/b2WheelJoint.cpp + ../external/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp + ../external/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp + ../external/Box2D/Dynamics/Contacts/b2CircleContact.cpp + ../external/Box2D/Dynamics/Contacts/b2Contact.cpp + ../external/Box2D/Dynamics/Contacts/b2ContactSolver.cpp + ../external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp + ../external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp + ../external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp + ../external/Box2D/Dynamics/Contacts/b2PolygonContact.cpp + ../external/Box2D/Rope/b2Rope.cpp + ) + +add_library(cocos2d STATIC ${COCOS2D_SRC} ${COCOS2D_EXTENSIONS_SRC} ${BOX2D_SRC} ${CHIPMUNK_SRC}) if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) set(FMOD_LIB "fmodex64") -else() +elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 ) set(FMOD_LIB "fmodex") +else() + message( FATAL_ERROR "Unsupported architecture, CMake will exit" ) endif() -target_link_libraries(cocos2d jpeg webp tiff freetype fontconfig png pthread glfw GLEW GL X11 rt z ${FMOD_LIB} curl) + +if(LINUX) + set(PLATFORM_SPECIFIC_LIBS + pthread + fontconfig + GLEW + X11 + rt + glfw + GL + ${FMOD_LIB} + ) +elseif(MACOSX) + INCLUDE_DIRECTORIES ( /System/Library/Frameworks ) + FIND_LIBRARY(COCOA_LIBRARY Cocoa) + FIND_LIBRARY(OPENGL_LIBRARY OpenGL ) + FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox) + FIND_LIBRARY(OPENAL_LIBRARY OpenAL ) + FIND_LIBRARY(QUARTZCORE_LIBRARY QuartzCore ) + FIND_LIBRARY(APPLICATIONSERVICES_LIBRARY ApplicationServices) + FIND_LIBRARY(IOKIT_LIBRARY IOKit) + FIND_LIBRARY(FOUNDATION_LIBRARY Foundation) + set(PLATFORM_SPECIFIC_LIBS + glfw3 + websockets + ${COCOA_LIBRARY} + ${OPENGL_LIBRARY} + ${OPENAL_LIBRARY} + ${AUDIOTOOLBOX_LIBRARY} + ${QUARTZCORE_LIBRARY} + ${APPLICATIONSERVICES_LIBRARY} + ${IOKIT_LIBRARY} + ${FOUNDATION_LIBRARY} + ) +else() + message( FATAL_ERROR "Unsupported platform, CMake will exit" ) +endif() + +target_link_libraries(cocos2d jpeg webp tiff freetype png z curl ${PLATFORM_SPECIFIC_LIBS}) set_target_properties(cocos2d PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + VERSION ${COCOS2D_X_VERSION} ) diff --git a/cocos/audio/mac/SimpleAudioEngine.mm b/cocos/audio/mac/SimpleAudioEngine.mm index f810509aa5..c6eeb1cd72 100644 --- a/cocos/audio/mac/SimpleAudioEngine.mm +++ b/cocos/audio/mac/SimpleAudioEngine.mm @@ -26,7 +26,7 @@ THE SOFTWARE. #include "SimpleAudioEngine_objc.h" #include -#include "CCFileUtils.h" +#include "platform/CCFileUtils.h" using namespace cocos2d; static void static_end() diff --git a/cocos/base/CCEvent.h b/cocos/base/CCEvent.h index 14e13b5c3a..8280a6c2af 100644 --- a/cocos/base/CCEvent.h +++ b/cocos/base/CCEvent.h @@ -46,9 +46,7 @@ public: ACCELERATION, MOUSE, FOCUS, -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) GAME_CONTROLLER, -#endif CUSTOM }; diff --git a/cocos/base/CCEventListener.h b/cocos/base/CCEventListener.h index b316e335e9..321b16f57a 100644 --- a/cocos/base/CCEventListener.h +++ b/cocos/base/CCEventListener.h @@ -54,9 +54,7 @@ public: MOUSE, ACCELERATION, FOCUS, -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) GAME_CONTROLLER, -#endif CUSTOM }; diff --git a/cocos/base/CCUserDefault.mm b/cocos/base/CCUserDefault.mm index 3d7dd6f14e..6492d8cd77 100644 --- a/cocos/base/CCUserDefault.mm +++ b/cocos/base/CCUserDefault.mm @@ -23,16 +23,19 @@ THE SOFTWARE. ****************************************************************************/ +#include "base/CCPlatformConfig.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + +#import + +#include + #import "CCUserDefault.h" -#import -#import "platform/CCFileUtils.h" #import "tinyxml2.h" #import "CCPlatformConfig.h" #import "CCPlatformMacros.h" #import "base64.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - +#import "platform/CCFileUtils.h" #define XML_FILE_NAME "UserDefault.xml" diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 4f06a692d7..dd6fbb70a2 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -108,6 +108,7 @@ THE SOFTWARE. // 2d nodes #include "2d/CCNode.h" +#include "2d/CCProtectedNode.h" #include "2d/CCAtlasNode.h" #include "2d/CCDrawingPrimitives.h" #include "2d/CCDrawNode.h" @@ -266,6 +267,20 @@ THE SOFTWARE. #include "2d/CCComponent.h" #include "2d/CCComponentContainer.h" +//3d +#include "3d/CCAABB.h" +#include "3d/CCOBB.h" +#include "3d/CCRay.h" +#include "3d/CCSprite3D.h" +#include "3d/CCMesh.h" +#include "3d/CCMeshSkin.h" +#include "3d/CCAnimate3D.h" +#include "3d/CCAnimation3D.h" +#include "3d/CCSprite3DMaterial.h" +#include "3d/CCAttachNode.h" +#include "3d/CCMeshVertexIndexData.h" +#include "3d/CCSkeleton3D.h" + // Deprecated include #include "deprecated/CCDictionary.h" #include "deprecated/CCArray.h" @@ -279,9 +294,6 @@ THE SOFTWARE. // CCDeprecated.h must be included at the end #include "deprecated/CCDeprecated.h" -//3d -#include "3d/cocos3d.h" - NS_CC_BEGIN diff --git a/cocos/math/CMakeLists.txt b/cocos/math/CMakeLists.txt deleted file mode 100644 index e7f2a0012b..0000000000 --- a/cocos/math/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -set(COCOS_MATH_SRC - math/CCAffineTransform.cpp - math/CCGeometry.cpp - math/CCVertex.cpp - math/Mat4.cpp - math/MathUtil.cpp - math/Quaternion.cpp - math/TransformUtils.cpp - math/Vec2.cpp - math/Vec3.cpp - math/Vec4.cpp -) - diff --git a/cocos/platform/apple/CCFileUtilsApple.h b/cocos/platform/apple/CCFileUtilsApple.h index 4a0e16fd96..6245ef8bd9 100644 --- a/cocos/platform/apple/CCFileUtilsApple.h +++ b/cocos/platform/apple/CCFileUtilsApple.h @@ -26,9 +26,10 @@ #ifndef __CC_FILEUTILS_APPLE_H__ #define __CC_FILEUTILS_APPLE_H__ -#include "CCFileUtils.h" #include #include + +#include "platform/CCFileUtils.h" #include "base/CCPlatformMacros.h" #include "base/ccTypes.h" diff --git a/cocos/platform/apple/CCFileUtilsApple.mm b/cocos/platform/apple/CCFileUtilsApple.mm index 35a1124122..b70a53bafe 100644 --- a/cocos/platform/apple/CCFileUtilsApple.mm +++ b/cocos/platform/apple/CCFileUtilsApple.mm @@ -25,16 +25,18 @@ THE SOFTWARE. ****************************************************************************/ #import +#include "CCFileUtilsApple.h" + #include #include -#include "deprecated/CCString.h" -#include "CCFileUtils.h" + #include "base/CCDirector.h" -#include "CCSAXParser.h" -#include "CCDictionary.h" +#include "deprecated/CCString.h" +#include "deprecated/CCDictionary.h" +#include "platform/CCFileUtils.h" +#include "platform/CCSAXParser.h" #include "unzip.h" -#include "CCFileUtilsApple.h" NS_CC_BEGIN diff --git a/cocos/platform/apple/CCThread.mm b/cocos/platform/apple/CCThread.mm index a69398d013..c695cc953f 100644 --- a/cocos/platform/apple/CCThread.mm +++ b/cocos/platform/apple/CCThread.mm @@ -22,8 +22,10 @@ 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. ****************************************************************************/ -//#import -#include "CCThread.h" + +#import + +#include "platform/CCThread.h" NS_CC_BEGIN diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 79ac5ed3fe..4fa9a9f766 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -1,48 +1,118 @@ set(cocos_root ${CMAKE_CURRENT_SOURCE_DIR}/../../..) include_directories( - ${cocos_root}/external/lua/tolua/ + ${cocos_root}/external/lua/tolua ${cocos_root}/external/lua/lua + ${cocos_root}/external/lua ${cocos_root}/external/xxtea - ${cocos_root}/external - ${cocos_root}/cocos - ${cocos_root}/cocos/base - ${cocos_root}/cocos/physics - ${cocos_root}/cocos/audio/include + ${cocos_root}/external + ${cocos_root}/cocos + ${cocos_root}/cocos/ui ${cocos_root}/cocos/2d ${cocos_root}/cocos/3d - ${cocos_root}/cocos/editor-support/spine - ${cocos_root}/cocos/editor-support/cocostudio + ${cocos_root}/cocos/editor-support/spine + ${cocos_root}/cocos/editor-support/cocostudio ${cocos_root}/cocos/editor-support/cocosbuilder - ${cocos_root}/cocos/ui - ${cocos_root}/cocos/network - ${cocos_root}/cocos/storage - ${cocos_root}/cocos/editor-support - ${cocos_root}/cocos/platform + ${cocos_root}/cocos/editor-support + ${cocos_root}/cocos/platform + ${cocos_root}/cocos/audio/include ${CMAKE_CURRENT_SOURCE_DIR}/manual ${CMAKE_CURRENT_SOURCE_DIR}/manual/extension ${CMAKE_CURRENT_SOURCE_DIR}/manual/cocostudio ${CMAKE_CURRENT_SOURCE_DIR}/manual/ui ${CMAKE_CURRENT_SOURCE_DIR}/ui - ${CMAKE_CURRENT_SOURCE_DIR}/manual/cocos2d - ${CMAKE_CURRENT_SOURCE_DIR}/auto + ${CMAKE_CURRENT_SOURCE_DIR}/manual/cocos2d + ${CMAKE_CURRENT_SOURCE_DIR}/auto ) -file(GLOB lua_cocos2d_source_files +file(GLOB lua_cocos2d_source_files "${cocos_root}/external/lua/lua/*.c" "${cocos_root}/external/lua/tolua/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/auto/*.cpp" "${cocos_root}/external/xxtea/xxtea.cpp" ) -file(GLOB_RECURSE lua_binding_manual_files "${CMAKE_CURRENT_SOURCE_DIR}/manual/*.cpp") -set(lua_cocos2d_source_files ${lua_cocos2d_source_files} ${lua_binding_manual_files}) -# exclude files for other platforms -list(REMOVE_ITEM lua_cocos2d_source_files - "${CMAKE_CURRENT_SOURCE_DIR}/manual/platform/android/CCLuaJavaBridge.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp" -) -add_library(luacocos2d STATIC ${lua_cocos2d_source_files}) +# luasockets are needed in Linux too, +# but Linux have them disabled for some reason +if(MACOSX) + set(lua_cocos2d_source_files + ${lua_cocos2d_source_files} + ${cocos_root}/external/lua/luasocket/auxiliar.c + ${cocos_root}/external/lua/luasocket/buffer.c + ${cocos_root}/external/lua/luasocket/except.c + ${cocos_root}/external/lua/luasocket/inet.c + ${cocos_root}/external/lua/luasocket/io.c + ${cocos_root}/external/lua/luasocket/luasocket.c + ${cocos_root}/external/lua/luasocket/mime.c + ${cocos_root}/external/lua/luasocket/options.c + ${cocos_root}/external/lua/luasocket/select.c + ${cocos_root}/external/lua/luasocket/serial.c + ${cocos_root}/external/lua/luasocket/tcp.c + ${cocos_root}/external/lua/luasocket/timeout.c + ${cocos_root}/external/lua/luasocket/udp.c + ${cocos_root}/external/lua/luasocket/unix.c + ${cocos_root}/external/lua/luasocket/usocket.c + ) +endif() + +set(lua_bindings_manual_files + manual/CCLuaBridge.cpp + manual/CCLuaEngine.cpp + manual/CCLuaStack.cpp + manual/CCLuaValue.cpp + manual/Cocos2dxLuaLoader.cpp + manual/LuaBasicConversions.cpp + manual/tolua_fix.cpp + manual/cocos2d/LuaOpengl.cpp + manual/cocos2d/LuaScriptHandlerMgr.cpp + manual/cocos2d/lua_cocos2dx_deprecated.cpp + manual/cocos2d/lua_cocos2dx_experimental_manual.cpp + manual/cocos2d/lua_cocos2dx_manual.cpp + manual/cocos2d/lua_cocos2dx_physics_manual.cpp + manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp + manual/3d/lua_cocos2dx_3d_manual.cpp + manual/cocosbuilder/CCBProxy.cpp + manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp + manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp + manual/cocostudio/CustomGUIReader.cpp + manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp + manual/controller/lua_cocos2dx_controller_manual.cpp + manual/extension/lua_cocos2dx_extension_manual.cpp + manual/network/lua_extensions.c + manual/network/lua_cocos2dx_network_manual.cpp + manual/network/Lua_web_socket.cpp + manual/network/lua_xml_http_request.cpp + manual/spine/lua_cocos2dx_spine_manual.cpp + manual/spine/LuaSkeletonAnimation.cpp + manual/ui/lua_cocos2dx_experimental_video_manual.cpp + manual/ui/lua_cocos2dx_ui_manual.cpp + manual/video/lua_cocos2dx_experimental_video_manual.cpp + ) + +set(lua_bindings_auto_files + auto/lua_cocos2dx_3d_auto.cpp + auto/lua_cocos2dx_auto.cpp + auto/lua_cocos2dx_cocosbuilder_auto.cpp + auto/lua_cocos2dx_cocosdenshion_auto.cpp + auto/lua_cocos2dx_controller_auto.cpp + auto/lua_cocos2dx_experimental_auto.cpp + auto/lua_cocos2dx_experimental_video_auto.cpp + auto/lua_cocos2dx_extension_auto.cpp + auto/lua_cocos2dx_physics_auto.cpp + auto/lua_cocos2dx_spine_auto.cpp + auto/lua_cocos2dx_studio_auto.cpp + auto/lua_cocos2dx_ui_auto.cpp + ) + +if(MACOSX) + set(lua_bindings_manual_files + ${lua_bindings_manual_files} + manual/platform/ios/CCLuaObjcBridge.mm + ) +endif() + +set(lua_bindings_files ${lua_cocos2d_source_files} ${lua_bindings_manual_files} ${lua_bindings_auto_files}) + +add_library(luacocos2d STATIC ${lua_bindings_files}) target_link_libraries(luacocos2d cocos2d) set_target_properties(luacocos2d PROPERTIES diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 364a15ead1..24f4d06e03 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1,5 +1,4 @@ #include "lua_cocos2dx_3d_auto.hpp" -#include "cocos3d.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index ed6dccab3a..7b2faf6b78 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -1,6 +1,5 @@ #include "lua_cocos2dx_auto.hpp" #include "cocos2d.h" -#include "CCProtectedNode.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp index 30a5370bd9..38e7a29476 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp @@ -1,6 +1,6 @@ #include "lua_cocos2dx_controller_auto.hpp" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "CCGameController.h" +#include "base/CCGameController.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index 6626ecad1c..3efe1d9a36 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -30,7 +30,6 @@ extern "C" { } #include "tolua_fix.h" #include "cocos2d.h" -#include "3d/cocos3d.h" using namespace cocos2d; diff --git a/cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp b/cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp index f6b4895a67..8ed24cfc60 100644 --- a/cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp @@ -31,7 +31,7 @@ #include "cocos2d/LuaScriptHandlerMgr.h" #include "CCLuaValue.h" #include "CCLuaEngine.h" -#include "CCGameController.h" +#include "base/CCGameController.h" static void cloneEventListenerControllerHandler(const cocos2d::EventListenerController* src,cocos2d::EventListenerController* dst, ScriptHandlerMgr::HandlerType type) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h index 2b38934752..a4adb68944 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h +++ b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h @@ -26,7 +26,7 @@ #ifndef __UIEDITBOXIMPLANDROID_H__ #define __UIEDITBOXIMPLANDROID_H__ -#include "cocos2d.h" +#include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.h b/cocos/ui/UIEditBox/UIEditBoxImplIOS.h index b78ce96da6..453166ff47 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplIOS.h +++ b/cocos/ui/UIEditBox/UIEditBoxImplIOS.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLIOS_H__ #define __UIEditBoxIMPLIOS_H__ -#include "cocos2d.h" +#include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplMac.h b/cocos/ui/UIEditBox/UIEditBoxImplMac.h index ffb53d29ef..326187a689 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplMac.h +++ b/cocos/ui/UIEditBox/UIEditBoxImplMac.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLMAC_H__ #define __UIEditBoxIMPLMAC_H__ -#include "cocos2d.h" +#include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp b/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp index af5e9f8213..46cd7e825d 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "UIEditBoxImplWin.h" +#include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "UIEditBox.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.h b/cocos/ui/UIEditBox/UIEditBoxImplWin.h index b4c9cf9f47..61ff89bd81 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWin.h +++ b/cocos/ui/UIEditBox/UIEditBoxImplWin.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLWIN_H__ #define __UIEditBoxIMPLWIN_H__ -#include "cocos2d.h" +#include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp b/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp index b8a2f23050..4675c1005a 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp @@ -22,6 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#include "base/CCPlatformConfig.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) + #include "UIEditBoxImplWp8.h" #include "UIEditBox.h" #include "CCGLViewImpl.h" @@ -305,3 +308,5 @@ std::string UIEditBoxImplWp8::PlatformStringTostring( Platform::String^ strSrc ) } NS_CC_END + +#endif // WP8 diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.h b/cocos/ui/UIEditBox/UIEditBoxImplWp8.h index 09d78167cd..c4164d67a1 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWp8.h +++ b/cocos/ui/UIEditBox/UIEditBoxImplWp8.h @@ -24,6 +24,9 @@ THE SOFTWARE. #ifndef __UIEditBoxIMPLWP8_H__ #define __UIEditBoxIMPLWP8_H__ +#include "base/CCPlatformConfig.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) + #include "UIEditBoxImpl.h" NS_CC_BEGIN @@ -85,4 +88,6 @@ namespace ui { NS_CC_END +#endif //WP8 + #endif diff --git a/cocos/ui/UIWebView.cpp b/cocos/ui/UIWebView.cpp index 07bb327b0f..bf09a92c73 100644 --- a/cocos/ui/UIWebView.cpp +++ b/cocos/ui/UIWebView.cpp @@ -21,6 +21,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#include "base/CCPlatformConfig.h" + #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIWebViewImpl_android.h" diff --git a/cocos/ui/UIWebView.mm b/cocos/ui/UIWebView.mm index 455fbb43e5..9958d6a4d1 100644 --- a/cocos/ui/UIWebView.mm +++ b/cocos/ui/UIWebView.mm @@ -21,10 +21,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ + +#include "base/CCPlatformConfig.h" + #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIWebViewImpl_iOS.h" #include "UIWebView-inl.h" - #endif diff --git a/cocos/ui/UIWebViewImpl_android.cpp b/cocos/ui/UIWebViewImpl_android.cpp index 53abeb2aaa..30e1313068 100644 --- a/cocos/ui/UIWebViewImpl_android.cpp +++ b/cocos/ui/UIWebViewImpl_android.cpp @@ -22,6 +22,8 @@ THE SOFTWARE. ****************************************************************************/ +#ifdef __ANDROID__ + #include "UIWebViewImpl_android.h" #include @@ -433,3 +435,4 @@ namespace cocos2d { } // namespace experimental } //namespace cocos2d +#endif // __ANDROID__ diff --git a/cocos/ui/UIWebViewImpl_android.h b/cocos/ui/UIWebViewImpl_android.h index 01a3fd86ef..f3e53e2b30 100644 --- a/cocos/ui/UIWebViewImpl_android.h +++ b/cocos/ui/UIWebViewImpl_android.h @@ -25,6 +25,8 @@ #ifndef __cocos2d_plugin_WebViewImpl_android_H_ #define __cocos2d_plugin_WebViewImpl_android_H_ +#ifdef __ANDROID__ + #include namespace cocos2d { @@ -93,4 +95,6 @@ namespace cocos2d { } // namespace experimental } //cocos2d +#endif // __ANDROID__ + #endif //__cocos2d_plugin_WebViewImpl_android_H_ diff --git a/tests/cpp-empty-test/CMakeLists.txt b/tests/cpp-empty-test/CMakeLists.txt index e0fe6dc2cb..f449149947 100644 --- a/tests/cpp-empty-test/CMakeLists.txt +++ b/tests/cpp-empty-test/CMakeLists.txt @@ -1,19 +1,16 @@ set(APP_NAME cpp-empty-test) if(ANDROID) - set(PLATFORM_SRC proj.android/jni/hellocpp/main.cpp ) elseif(WINDOWS) - set(PLATFORM_SRC proj.win32/main.cpp ) elseif(IOS) - set(PLATFORM_SRC proj.ios/main.m proj.ios/AppController.mm @@ -21,17 +18,18 @@ elseif(IOS) ) elseif(MACOSX) - set(PLATFORM_SRC - proj.mac/main.m + proj.mac/main.cpp ) elseif(LINUX) - set(PLATFORM_SRC proj.linux/main.cpp ) +else() + message( FATAL_ERROR "Unsupported platform, CMake will exit" ) + endif() set(SAMPLE_SRC @@ -76,6 +74,7 @@ else() COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources ) + endif() target_link_libraries(${APP_NAME} cocos2d) diff --git a/tests/cpp-empty-test/proj.mac/main.cpp b/tests/cpp-empty-test/proj.mac/main.cpp index f2bc5c2a4e..f4d30d24d8 100644 --- a/tests/cpp-empty-test/proj.mac/main.cpp +++ b/tests/cpp-empty-test/proj.mac/main.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "AppDelegate.h" +#include "../Classes/AppDelegate.h" USING_NS_CC; diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 815cfb7e43..c536fa9ed1 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -2,17 +2,21 @@ set(APP_NAME cpp-tests) if(WIN32) set(PLATFORM_SRC - Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp - Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp proj.win32/main.cpp ) -else() +elseif(MACOSX) + set(PLATFORM_SRC + proj.mac/main.cpp + ) +elseif(LINUX) set(PLATFORM_SRC proj.linux/main.cpp ) +else() + message( FATAL_ERROR "Unsupported platform, CMake will exit" ) endif() -set(SAMPLE_SRC +set(TESTS_SRC Classes/ActionManagerTest/ActionManagerTest.cpp Classes/ActionsEaseTest/ActionsEaseTest.cpp Classes/ActionsProgressTest/ActionsProgressTest.cpp @@ -189,6 +193,30 @@ set(SAMPLE_SRC ${PLATFORM_SRC} ) +if(LINUX) + set(EXTENDED_TESTS_SRC + ) +else() + set(EXTENDED_TESTS_SRC + Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp + Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp + Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp + + Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp + Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp + Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp + Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp + Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp + Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp + Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp + Classes/UITest/CocoStudioGUITest/UIScene.cpp + Classes/UITest/CocoStudioGUITest/UISceneManager.cpp + Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp + ) +endif() + + include_directories( Classes ${CMAKE_SOURCE_DIR}/external/chipmunk/include/chipmunk @@ -197,7 +225,8 @@ include_directories( # add the executable add_executable(${APP_NAME} - ${SAMPLE_SRC} + ${TESTS_SRC} + ${EXTENDED_TESTS_SRC} ) target_link_libraries(${APP_NAME} diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index 11210d1867..7975072fd3 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -27,9 +27,6 @@ THE SOFTWARE. #include #include "../testResource.h" -#include "3d/CCAttachNode.h" -#include "3d/cocos3d.h" - ////////////DrawLine///////////////////// class DrawLine3D: public Node diff --git a/tests/cpp-tests/Classes/testBasic.h b/tests/cpp-tests/Classes/testBasic.h index 02fb9f32ad..5da3ba1a11 100644 --- a/tests/cpp-tests/Classes/testBasic.h +++ b/tests/cpp-tests/Classes/testBasic.h @@ -2,7 +2,6 @@ #define _TEST_BASIC_H_ #include "cocos2d.h" -#include "3d/cocos3d.h" #include "audio/include/SimpleAudioEngine.h" #include "VisibleRect.h" diff --git a/tests/lua-empty-test/project/CMakeLists.txt b/tests/lua-empty-test/project/CMakeLists.txt index c1996afea1..57e893c682 100644 --- a/tests/lua-empty-test/project/CMakeLists.txt +++ b/tests/lua-empty-test/project/CMakeLists.txt @@ -1,10 +1,21 @@ set(APP_NAME lua-empty-test) set(SAMPLE_SRC - proj.linux/main.cpp Classes/AppDelegate.cpp ) +if(LINUX) + set(SAMPLE_SRC + ${SAMPLE_SRC} + proj.linux/main.cpp + ) +elseif(MACOSX) + set(SAMPLE_SRC + ${SAMPLE_SRC} + proj.mac/main.cpp + ) +endif() + include_directories( Classes ../../../cocos/scripting/lua-bindings/manual diff --git a/tests/lua-tests/project/CMakeLists.txt b/tests/lua-tests/project/CMakeLists.txt index acd3284052..89a1a1f15b 100644 --- a/tests/lua-tests/project/CMakeLists.txt +++ b/tests/lua-tests/project/CMakeLists.txt @@ -1,10 +1,22 @@ set(APP_NAME lua-tests) set(SAMPLE_SRC - proj.linux/main.cpp - Classes/AppDelegate.cpp + Classes/AppDelegate.cpp + Classes/lua_assetsmanager_test_sample.cpp ) +if(LINUX) + set(SAMPLE_SRC + ${SAMPLE_SRC} + proj.linux/main.cpp + ) +elseif(MACOSX) + set(SAMPLE_SRC + ${SAMPLE_SRC} + proj.ios_mac/mac/main.cpp + ) +endif() + include_directories( Classes ../../../cocos/scripting/lua-bindings/manual From 9082ca18c394793cb14d0fbb996bd32b5cb7dca6 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 16:50:02 -0700 Subject: [PATCH 43/61] Platform fixed --- build/cocos2d_libs.xcodeproj/project.pbxproj | 492 +++++++++--------- cocos/2d/CCActionCamera.cpp | 2 +- cocos/2d/CCActionInterval.cpp | 7 +- cocos/2d/CCClippingNode.h | 2 +- cocos/2d/CCDrawNode.cpp | 2 +- cocos/2d/CCDrawingPrimitives.cpp | 4 +- cocos/2d/CCFontAtlas.h | 7 +- cocos/2d/CCGLBufferedNode.h | 2 +- cocos/2d/CCGrabber.h | 2 +- cocos/2d/CCGrid.cpp | 2 +- cocos/2d/CCMenu.cpp | 2 +- cocos/Android.mk | 2 +- cocos/base/CCConfiguration.h | 7 +- cocos/base/CCData.h | 2 +- cocos/base/CCDirector.cpp | 5 +- cocos/base/CCDirector.h | 6 +- cocos/base/CCEventDispatcher.h | 2 +- cocos/base/CCPlatformConfig.h | 4 +- cocos/base/CCPlatformMacros.h | 2 +- ...tAndroid.cpp => CCUserDefault-android.cpp} | 0 ...CUserDefault.mm => CCUserDefault-apple.mm} | 0 cocos/base/ZipUtils.h | 6 +- cocos/base/atitc.h | 2 +- cocos/base/ccMacros.h | 2 +- cocos/base/ccTypes.h | 4 +- cocos/base/s3tc.h | 2 +- cocos/cocos2d.h | 42 +- .../cocostudio/CCActionFrameEasing.cpp | 2 +- cocos/math/TransformUtils.h | 2 +- cocos/network/WebSocket.h | 5 +- cocos/platform/CCApplication.h | 45 ++ cocos/platform/CCGL.h | 45 ++ cocos/platform/CCImage.cpp | 2 +- cocos/platform/CCPlatformDefine.h | 45 ++ cocos/platform/CCStdC.h | 45 ++ cocos/platform/android/Android.mk | 12 +- ...lication.cpp => CCApplication-android.cpp} | 0 ...CApplication.h => CCApplication-android.h} | 0 .../{CCCommon.cpp => CCCommon-android.cpp} | 0 .../{CCDevice.cpp => CCDevice-android.cpp} | 0 ...ilsAndroid.cpp => CCFileUtils-android.cpp} | 4 +- ...leUtilsAndroid.h => CCFileUtils-android.h} | 0 .../android/{CCGL.h => CCGL-android.h} | 0 ...LViewImpl.cpp => CCGLViewImpl-android.cpp} | 2 +- ...{CCGLViewImpl.h => CCGLViewImpl-android.h} | 0 ...ormDefine.h => CCPlatformDefine-android.h} | 0 .../android/{CCStdC.h => CCStdC-android.h} | 0 .../platform/android/java/project.properties | 2 +- ...aactivity.cpp => javaactivity-android.cpp} | 4 +- .../Java_org_cocos2dx_lib_Cocos2dxHelper.cpp | 2 +- cocos/platform/android/jni/TouchesJni.cpp | 2 +- ...CCFileUtilsApple.h => CCFileUtils-apple.h} | 0 ...FileUtilsApple.mm => CCFileUtils-apple.mm} | 2 +- .../apple/{CCLock.cpp => CCLock-apple.cpp} | 3 +- .../apple/{CCLock.h => CCLock-apple.h} | 0 .../apple/{CCThread.mm => CCThread-apple.mm} | 0 ...LViewImpl.cpp => CCGLViewImpl-desktop.cpp} | 8 +- ...{CCGLViewImpl.h => CCGLViewImpl-desktop.h} | 0 .../{CCApplication.h => CCApplication-ios.h} | 0 ...{CCApplication.mm => CCApplication-ios.mm} | 4 +- .../ios/{CCCommon.mm => CCCommon-ios.mm} | 0 .../ios/{CCDevice.mm => CCDevice-ios.mm} | 0 ...irectorCaller.h => CCDirectorCaller-ios.h} | 0 ...ectorCaller.mm => CCDirectorCaller-ios.mm} | 8 +- .../ios/{CCEAGLView.h => CCEAGLView-ios.h} | 2 +- .../ios/{CCEAGLView.mm => CCEAGLView-ios.mm} | 19 +- .../{CCES2Renderer.h => CCES2Renderer-ios.h} | 6 +- .../{CCES2Renderer.m => CCES2Renderer-ios.m} | 7 +- .../{CCESRenderer.h => CCESRenderer-ios.h} | 0 cocos/platform/ios/{CCGL.h => CCGL-ios.h} | 0 .../{CCGLViewImpl.h => CCGLViewImpl-ios.h} | 0 .../{CCGLViewImpl.mm => CCGLViewImpl-ios.mm} | 6 +- .../ios/{CCImage.mm => CCImage-ios.mm} | 0 ...latformDefine.h => CCPlatformDefine-ios.h} | 0 cocos/platform/ios/{CCStdC.h => CCStdC-ios.h} | 0 ...penGL_Internal.h => OpenGL_Internal-ios.h} | 0 ...pplication.cpp => CCApplication-linux.cpp} | 0 ...{CCApplication.h => CCApplication-linux.h} | 0 .../{CCCommon.cpp => CCCommon-linux.cpp} | 0 .../{CCDevice.cpp => CCDevice-linux.cpp} | 0 ...leUtilsLinux.cpp => CCFileUtils-linux.cpp} | 0 ...CCFileUtilsLinux.h => CCFileUtils-linux.h} | 0 cocos/platform/linux/{CCGL.h => CCGL-linux.h} | 0 ...tformDefine.h => CCPlatformDefine-linux.h} | 0 .../linux/{CCStdC.cpp => CCStdC-linux.cpp} | 0 .../linux/{CCStdC.h => CCStdC-linux.h} | 0 .../{CCApplication.h => CCApplication-mac.h} | 0 ...{CCApplication.mm => CCApplication-mac.mm} | 0 .../mac/{CCCommon.mm => CCCommon-mac.mm} | 0 .../mac/{CCDevice.mm => CCDevice-mac.mm} | 0 cocos/platform/mac/{CCGL.h => CCGL-mac.h} | 0 ...latformDefine.h => CCPlatformDefine-mac.h} | 0 cocos/platform/mac/{CCStdC.h => CCStdC-mac.h} | 0 ...pplication.cpp => CCApplication-win32.cpp} | 0 ...{CCApplication.h => CCApplication-win32.h} | 0 .../{CCCommon.cpp => CCCommon-win32.cpp} | 0 .../{CCDevice.cpp => CCDevice-win32.cpp} | 0 ...leUtilsWin32.cpp => CCFileUtils-win32.cpp} | 0 ...CCFileUtilsWin32.h => CCFileUtils-win32.h} | 0 cocos/platform/win32/{CCGL.h => CCGL-win32.h} | 0 ...tformDefine.h => CCPlatformDefine-win32.h} | 0 .../win32/{CCStdC.cpp => CCStdC-win32.cpp} | 0 .../win32/{CCStdC.h => CCStdC-win32.h} | 0 ...{CCGLViewImpl.cpp => CCGLViewImpl-wp8.cpp} | 0 .../{CCGLViewImpl.h => CCGLViewImpl-wp8.h} | 0 cocos/renderer/CCGLProgram.h | 2 +- cocos/renderer/CCRenderer.h | 2 +- cocos/renderer/CCTexture2D.cpp | 2 +- cocos/renderer/CCTextureAtlas.cpp | 2 +- cocos/renderer/CCVertexIndexBuffer.h | 2 +- cocos/renderer/ccGLStateCache.h | 2 +- cocos/renderer/ccShaders.h | 2 +- cocos/ui/Android.mk | 6 +- ...lAndroid.cpp => UIEditBoxImpl-android.cpp} | 5 +- ...xImplAndroid.h => UIEditBoxImpl-android.h} | 2 + ...UIEditBoxImplIOS.h => UIEditBoxImpl-ios.h} | 0 ...EditBoxImplIOS.mm => UIEditBoxImpl-ios.mm} | 4 +- ...UIEditBoxImplMac.h => UIEditBoxImpl-mac.h} | 0 ...EditBoxImplMac.mm => UIEditBoxImpl-mac.mm} | 4 +- ...BoxImplNone.cpp => UIEditBoxImpl-stub.cpp} | 0 ...BoxImplWin.cpp => UIEditBoxImpl-win32.cpp} | 2 +- ...EditBoxImplWin.h => UIEditBoxImpl-win32.h} | 0 ...itBoxImplWp8.cpp => UIEditBoxImpl-wp8.cpp} | 2 +- ...UIEditBoxImplWp8.h => UIEditBoxImpl-wp8.h} | 0 ...rAndroid.cpp => UIVideoPlayer-android.cpp} | 0 ...VideoPlayerIOS.mm => UIVideoPlayer-ios.mm} | 7 +- cocos/ui/UIWebView.cpp | 2 +- cocos/ui/UIWebView.mm | 2 +- ..._android.cpp => UIWebViewImpl-android.cpp} | 2 +- ...Impl_android.h => UIWebViewImpl-android.h} | 0 ...IWebViewImpl_iOS.h => UIWebViewImpl-ios.h} | 0 ...ebViewImpl_iOS.mm => UIWebViewImpl-ios.mm} | 8 +- .../proj.android/project.properties | 2 +- .../cpp-empty-test/proj.ios/AppController.mm | 2 +- .../Classes/Sprite3DTest/DrawNode3D.cpp | 10 - .../Classes/Sprite3DTest/DrawNode3D.h | 4 +- .../proj.ios/Classes/testsAppDelegate.mm | 2 +- .../project/Classes/AppDelegate.h | 2 +- .../project/proj.ios/AppController.mm | 2 +- .../project/proj.ios_mac/ios/AppController.mm | 2 +- 140 files changed, 597 insertions(+), 385 deletions(-) rename cocos/base/{CCUserDefaultAndroid.cpp => CCUserDefault-android.cpp} (100%) rename cocos/base/{CCUserDefault.mm => CCUserDefault-apple.mm} (100%) create mode 100644 cocos/platform/CCApplication.h create mode 100644 cocos/platform/CCGL.h create mode 100644 cocos/platform/CCPlatformDefine.h create mode 100644 cocos/platform/CCStdC.h rename cocos/platform/android/{CCApplication.cpp => CCApplication-android.cpp} (100%) rename cocos/platform/android/{CCApplication.h => CCApplication-android.h} (100%) rename cocos/platform/android/{CCCommon.cpp => CCCommon-android.cpp} (100%) rename cocos/platform/android/{CCDevice.cpp => CCDevice-android.cpp} (100%) rename cocos/platform/android/{CCFileUtilsAndroid.cpp => CCFileUtils-android.cpp} (99%) rename cocos/platform/android/{CCFileUtilsAndroid.h => CCFileUtils-android.h} (100%) rename cocos/platform/android/{CCGL.h => CCGL-android.h} (100%) rename cocos/platform/android/{CCGLViewImpl.cpp => CCGLViewImpl-android.cpp} (99%) rename cocos/platform/android/{CCGLViewImpl.h => CCGLViewImpl-android.h} (100%) rename cocos/platform/android/{CCPlatformDefine.h => CCPlatformDefine-android.h} (100%) rename cocos/platform/android/{CCStdC.h => CCStdC-android.h} (100%) rename cocos/platform/android/{javaactivity.cpp => javaactivity-android.cpp} (98%) rename cocos/platform/apple/{CCFileUtilsApple.h => CCFileUtils-apple.h} (100%) rename cocos/platform/apple/{CCFileUtilsApple.mm => CCFileUtils-apple.mm} (99%) rename cocos/platform/apple/{CCLock.cpp => CCLock-apple.cpp} (98%) rename cocos/platform/apple/{CCLock.h => CCLock-apple.h} (100%) rename cocos/platform/apple/{CCThread.mm => CCThread-apple.mm} (100%) rename cocos/platform/desktop/{CCGLViewImpl.cpp => CCGLViewImpl-desktop.cpp} (99%) rename cocos/platform/desktop/{CCGLViewImpl.h => CCGLViewImpl-desktop.h} (100%) rename cocos/platform/ios/{CCApplication.h => CCApplication-ios.h} (100%) rename cocos/platform/ios/{CCApplication.mm => CCApplication-ios.mm} (98%) rename cocos/platform/ios/{CCCommon.mm => CCCommon-ios.mm} (100%) rename cocos/platform/ios/{CCDevice.mm => CCDevice-ios.mm} (100%) rename cocos/platform/ios/{CCDirectorCaller.h => CCDirectorCaller-ios.h} (100%) rename cocos/platform/ios/{CCDirectorCaller.mm => CCDirectorCaller-ios.mm} (97%) rename cocos/platform/ios/{CCEAGLView.h => CCEAGLView-ios.h} (99%) rename cocos/platform/ios/{CCEAGLView.mm => CCEAGLView-ios.mm} (99%) rename cocos/platform/ios/{CCES2Renderer.h => CCES2Renderer-ios.h} (98%) rename cocos/platform/ios/{CCES2Renderer.m => CCES2Renderer-ios.m} (98%) rename cocos/platform/ios/{CCESRenderer.h => CCESRenderer-ios.h} (100%) rename cocos/platform/ios/{CCGL.h => CCGL-ios.h} (100%) rename cocos/platform/ios/{CCGLViewImpl.h => CCGLViewImpl-ios.h} (100%) rename cocos/platform/ios/{CCGLViewImpl.mm => CCGLViewImpl-ios.mm} (98%) rename cocos/platform/ios/{CCImage.mm => CCImage-ios.mm} (100%) rename cocos/platform/ios/{CCPlatformDefine.h => CCPlatformDefine-ios.h} (100%) rename cocos/platform/ios/{CCStdC.h => CCStdC-ios.h} (100%) rename cocos/platform/ios/{OpenGL_Internal.h => OpenGL_Internal-ios.h} (100%) rename cocos/platform/linux/{CCApplication.cpp => CCApplication-linux.cpp} (100%) rename cocos/platform/linux/{CCApplication.h => CCApplication-linux.h} (100%) rename cocos/platform/linux/{CCCommon.cpp => CCCommon-linux.cpp} (100%) rename cocos/platform/linux/{CCDevice.cpp => CCDevice-linux.cpp} (100%) rename cocos/platform/linux/{CCFileUtilsLinux.cpp => CCFileUtils-linux.cpp} (100%) rename cocos/platform/linux/{CCFileUtilsLinux.h => CCFileUtils-linux.h} (100%) rename cocos/platform/linux/{CCGL.h => CCGL-linux.h} (100%) rename cocos/platform/linux/{CCPlatformDefine.h => CCPlatformDefine-linux.h} (100%) rename cocos/platform/linux/{CCStdC.cpp => CCStdC-linux.cpp} (100%) rename cocos/platform/linux/{CCStdC.h => CCStdC-linux.h} (100%) rename cocos/platform/mac/{CCApplication.h => CCApplication-mac.h} (100%) rename cocos/platform/mac/{CCApplication.mm => CCApplication-mac.mm} (100%) rename cocos/platform/mac/{CCCommon.mm => CCCommon-mac.mm} (100%) rename cocos/platform/mac/{CCDevice.mm => CCDevice-mac.mm} (100%) rename cocos/platform/mac/{CCGL.h => CCGL-mac.h} (100%) rename cocos/platform/mac/{CCPlatformDefine.h => CCPlatformDefine-mac.h} (100%) rename cocos/platform/mac/{CCStdC.h => CCStdC-mac.h} (100%) rename cocos/platform/win32/{CCApplication.cpp => CCApplication-win32.cpp} (100%) rename cocos/platform/win32/{CCApplication.h => CCApplication-win32.h} (100%) rename cocos/platform/win32/{CCCommon.cpp => CCCommon-win32.cpp} (100%) rename cocos/platform/win32/{CCDevice.cpp => CCDevice-win32.cpp} (100%) rename cocos/platform/win32/{CCFileUtilsWin32.cpp => CCFileUtils-win32.cpp} (100%) rename cocos/platform/win32/{CCFileUtilsWin32.h => CCFileUtils-win32.h} (100%) rename cocos/platform/win32/{CCGL.h => CCGL-win32.h} (100%) rename cocos/platform/win32/{CCPlatformDefine.h => CCPlatformDefine-win32.h} (100%) rename cocos/platform/win32/{CCStdC.cpp => CCStdC-win32.cpp} (100%) rename cocos/platform/win32/{CCStdC.h => CCStdC-win32.h} (100%) rename cocos/platform/wp8/{CCGLViewImpl.cpp => CCGLViewImpl-wp8.cpp} (100%) rename cocos/platform/wp8/{CCGLViewImpl.h => CCGLViewImpl-wp8.h} (100%) rename cocos/ui/UIEditBox/{UIEditBoxImplAndroid.cpp => UIEditBoxImpl-android.cpp} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplAndroid.h => UIEditBoxImpl-android.h} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplIOS.h => UIEditBoxImpl-ios.h} (100%) rename cocos/ui/UIEditBox/{UIEditBoxImplIOS.mm => UIEditBoxImpl-ios.mm} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplMac.h => UIEditBoxImpl-mac.h} (100%) rename cocos/ui/UIEditBox/{UIEditBoxImplMac.mm => UIEditBoxImpl-mac.mm} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplNone.cpp => UIEditBoxImpl-stub.cpp} (100%) rename cocos/ui/UIEditBox/{UIEditBoxImplWin.cpp => UIEditBoxImpl-win32.cpp} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplWin.h => UIEditBoxImpl-win32.h} (100%) rename cocos/ui/UIEditBox/{UIEditBoxImplWp8.cpp => UIEditBoxImpl-wp8.cpp} (99%) rename cocos/ui/UIEditBox/{UIEditBoxImplWp8.h => UIEditBoxImpl-wp8.h} (100%) rename cocos/ui/{UIVideoPlayerAndroid.cpp => UIVideoPlayer-android.cpp} (100%) rename cocos/ui/{UIVideoPlayerIOS.mm => UIVideoPlayer-ios.mm} (99%) rename cocos/ui/{UIWebViewImpl_android.cpp => UIWebViewImpl-android.cpp} (99%) rename cocos/ui/{UIWebViewImpl_android.h => UIWebViewImpl-android.h} (100%) rename cocos/ui/{UIWebViewImpl_iOS.h => UIWebViewImpl-ios.h} (100%) rename cocos/ui/{UIWebViewImpl_iOS.mm => UIWebViewImpl-ios.mm} (98%) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 4b84128ccd..4f12f69323 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -897,7 +897,7 @@ 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */; }; 15AE1B9619AADA9A00C27E9E /* CocosGUI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9EA18CF08D000240AA3 /* CocosGUI.h */; }; 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; - 15AE1B9819AADAA100C27E9E /* UIVideoPlayerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */; }; + 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */; }; 15AE1B9919AADFDF00C27E9E /* UIHBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D32E18E174130051CA34 /* UIHBox.cpp */; }; 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 50E6D32F18E174130051CA34 /* UIHBox.h */; }; 15AE1B9B19AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50E6D33018E174130051CA34 /* UIRelativeBox.cpp */; }; @@ -1342,20 +1342,20 @@ 292DB14019B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; - 292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */; }; - 292DB14419B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */; }; - 292DB14519B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */; }; - 292DB14619B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */; }; - 292DB14719B4574100A80320 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */; }; - 292DB14819B4574100A80320 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */; }; - 292DB14919B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */; }; - 292DB14A19B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */; }; - 292DB14B19B4574100A80320 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */; }; - 292DB14C19B4574100A80320 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */; }; - 292DB14D19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */; }; - 292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */; }; - 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; - 292DB15019B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; + 292DB14319B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */; }; + 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */; }; + 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */; }; + 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */; }; + 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */; }; + 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */; }; + 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */; }; + 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */; }; + 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */; }; + 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */; }; + 292DB14D19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */; }; + 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */; }; + 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */; }; + 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */; }; 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; @@ -1364,10 +1364,10 @@ 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; - 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; - 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; - 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; - 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */; }; + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */; }; + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */; }; + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; @@ -1455,30 +1455,38 @@ 5034CA4A191D591100CE6051 /* ccShader_Label_df.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA0F191D591000CE6051 /* ccShader_Label_df.frag */; }; 5034CA4B191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */; }; 5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */ = {isa = PBXBuildFile; fileRef = 5034CA10191D591000CE6051 /* ccShader_Label_df_glow.frag */; }; - 503DD8E01926736A00CD74DD /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8CE1926736A00CD74DD /* CCApplication.h */; }; - 503DD8E11926736A00CD74DD /* CCApplication.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8CF1926736A00CD74DD /* CCApplication.mm */; }; - 503DD8E21926736A00CD74DD /* CCCommon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D01926736A00CD74DD /* CCCommon.mm */; }; - 503DD8E31926736A00CD74DD /* CCDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D11926736A00CD74DD /* CCDevice.mm */; }; - 503DD8E41926736A00CD74DD /* CCDirectorCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D21926736A00CD74DD /* CCDirectorCaller.h */; }; - 503DD8E51926736A00CD74DD /* CCDirectorCaller.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D31926736A00CD74DD /* CCDirectorCaller.mm */; }; - 503DD8E61926736A00CD74DD /* CCEAGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D41926736A00CD74DD /* CCEAGLView.h */; }; - 503DD8E71926736A00CD74DD /* CCEAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D51926736A00CD74DD /* CCEAGLView.mm */; }; - 503DD8E81926736A00CD74DD /* CCES2Renderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D61926736A00CD74DD /* CCES2Renderer.h */; }; - 503DD8E91926736A00CD74DD /* CCES2Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D71926736A00CD74DD /* CCES2Renderer.m */; }; - 503DD8EA1926736A00CD74DD /* CCESRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D81926736A00CD74DD /* CCESRenderer.h */; }; - 503DD8EB1926736A00CD74DD /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D91926736A00CD74DD /* CCGL.h */; }; - 503DD8EC1926736A00CD74DD /* CCGLViewImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DA1926736A00CD74DD /* CCGLViewImpl.h */; }; - 503DD8ED1926736A00CD74DD /* CCGLViewImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DB1926736A00CD74DD /* CCGLViewImpl.mm */; }; - 503DD8EE1926736A00CD74DD /* CCImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DC1926736A00CD74DD /* CCImage.mm */; }; - 503DD8EF1926736A00CD74DD /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DD1926736A00CD74DD /* CCPlatformDefine.h */; }; - 503DD8F01926736A00CD74DD /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DE1926736A00CD74DD /* CCStdC.h */; }; - 503DD8F11926736A00CD74DD /* OpenGL_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DF1926736A00CD74DD /* OpenGL_Internal.h */; }; + 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */; }; + 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */; }; + 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */; }; + 503DD8E31926736A00CD74DD /* CCDevice-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D11926736A00CD74DD /* CCDevice-ios.mm */; }; + 503DD8E41926736A00CD74DD /* CCDirectorCaller-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D21926736A00CD74DD /* CCDirectorCaller-ios.h */; }; + 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */; }; + 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */; }; + 503DD8E71926736A00CD74DD /* CCEAGLView-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */; }; + 503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */; }; + 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */; }; + 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */; }; + 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8D91926736A00CD74DD /* CCGL-ios.h */; }; + 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */; }; + 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */; }; + 503DD8EE1926736A00CD74DD /* CCImage-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8DC1926736A00CD74DD /* CCImage-ios.mm */; }; + 503DD8EF1926736A00CD74DD /* CCPlatformDefine-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DD1926736A00CD74DD /* CCPlatformDefine-ios.h */; }; + 503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DE1926736A00CD74DD /* CCStdC-ios.h */; }; + 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8DF1926736A00CD74DD /* OpenGL_Internal-ios.h */; }; 503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F21926B0DB00CD74DD /* CCIMEDelegate.h */; }; 503DD8F61926B0DB00CD74DD /* CCIMEDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F21926B0DB00CD74DD /* CCIMEDelegate.h */; }; 503DD8F71926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */; }; 503DD8F81926B0DB00CD74DD /* CCIMEDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */; }; 503DD8F91926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */; }; 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */; }; + 50643BD419BFAECF00EF68ED /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD319BFAECF00EF68ED /* CCGL.h */; }; + 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD319BFAECF00EF68ED /* CCGL.h */; }; + 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; + 50643BD919BFAF4400EF68ED /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD719BFAF4400EF68ED /* CCApplication.h */; }; + 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD719BFAF4400EF68ED /* CCApplication.h */; }; + 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; + 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; + 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; 50ABBD3A1925AB0000A911A9 /* CCAffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */; }; @@ -1733,10 +1741,10 @@ 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE091925AB6E00A911A9 /* CCUserDefault.cpp */; }; 50ABBEB11925AB6F00A911A9 /* CCUserDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE0A1925AB6E00A911A9 /* CCUserDefault.h */; }; 50ABBEB21925AB6F00A911A9 /* CCUserDefault.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE0A1925AB6E00A911A9 /* CCUserDefault.h */; }; - 50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0B1925AB6F00A911A9 /* CCUserDefault.mm */; }; - 50ABBEB41925AB6F00A911A9 /* CCUserDefault.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0B1925AB6F00A911A9 /* CCUserDefault.mm */; }; - 50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0C1925AB6F00A911A9 /* CCUserDefaultAndroid.cpp */; }; - 50ABBEB61925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0C1925AB6F00A911A9 /* CCUserDefaultAndroid.cpp */; }; + 50ABBEB31925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0B1925AB6F00A911A9 /* CCUserDefault-apple.mm */; }; + 50ABBEB41925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0B1925AB6F00A911A9 /* CCUserDefault-apple.mm */; }; + 50ABBEB51925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0C1925AB6F00A911A9 /* CCUserDefault-android.cpp */; }; + 50ABBEB61925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0C1925AB6F00A911A9 /* CCUserDefault-android.cpp */; }; 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0D1925AB6F00A911A9 /* ccUTF8.cpp */; }; 50ABBEB81925AB6F00A911A9 /* ccUTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE0D1925AB6F00A911A9 /* ccUTF8.cpp */; }; 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE0E1925AB6F00A911A9 /* ccUTF8.h */; }; @@ -1773,16 +1781,16 @@ 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBE1D1925AB6F00A911A9 /* ZipUtils.cpp */; }; 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1E1925AB6F00A911A9 /* ZipUtils.h */; }; 50ABBEDA1925AB6F00A911A9 /* ZipUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBE1E1925AB6F00A911A9 /* ZipUtils.h */; }; - 50ABBFFD1926664800A911A9 /* CCFileUtilsApple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1B1926664700A911A9 /* CCFileUtilsApple.h */; }; - 50ABBFFE1926664800A911A9 /* CCFileUtilsApple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1B1926664700A911A9 /* CCFileUtilsApple.h */; }; - 50ABBFFF1926664800A911A9 /* CCFileUtilsApple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1C1926664700A911A9 /* CCFileUtilsApple.mm */; }; - 50ABC0001926664800A911A9 /* CCFileUtilsApple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1C1926664700A911A9 /* CCFileUtilsApple.mm */; }; - 50ABC0011926664800A911A9 /* CCLock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock.cpp */; }; - 50ABC0021926664800A911A9 /* CCLock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock.cpp */; }; - 50ABC0031926664800A911A9 /* CCLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock.h */; }; - 50ABC0041926664800A911A9 /* CCLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock.h */; }; - 50ABC0051926664800A911A9 /* CCThread.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread.mm */; }; - 50ABC0061926664800A911A9 /* CCThread.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread.mm */; }; + 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1B1926664700A911A9 /* CCFileUtils-apple.h */; }; + 50ABBFFE1926664800A911A9 /* CCFileUtils-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1B1926664700A911A9 /* CCFileUtils-apple.h */; }; + 50ABBFFF1926664800A911A9 /* CCFileUtils-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */; }; + 50ABC0001926664800A911A9 /* CCFileUtils-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */; }; + 50ABC0011926664800A911A9 /* CCLock-apple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */; }; + 50ABC0021926664800A911A9 /* CCLock-apple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */; }; + 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock-apple.h */; }; + 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF1E1926664700A911A9 /* CCLock-apple.h */; }; + 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */; }; + 50ABC0061926664800A911A9 /* CCThread-apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */; }; 50ABC0071926664800A911A9 /* CCApplicationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */; }; 50ABC0081926664800A911A9 /* CCApplicationProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */; }; 50ABC0091926664800A911A9 /* CCCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF211926664700A911A9 /* CCCommon.h */; }; @@ -1809,26 +1817,26 @@ 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2B1926664700A911A9 /* CCThread.cpp */; }; 50ABC01F1926664800A911A9 /* CCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2C1926664700A911A9 /* CCThread.h */; }; 50ABC0201926664800A911A9 /* CCThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2C1926664700A911A9 /* CCThread.h */; }; - 50ABC0211926664800A911A9 /* CCGLViewImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2E1926664700A911A9 /* CCGLViewImpl.cpp */; }; - 50ABC0231926664800A911A9 /* CCGLViewImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2F1926664700A911A9 /* CCGLViewImpl.h */; }; - 50ABC05D1926664800A911A9 /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF4F1926664700A911A9 /* CCApplication.h */; }; - 50ABC05F1926664800A911A9 /* CCApplication.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF501926664700A911A9 /* CCApplication.mm */; }; - 50ABC0611926664800A911A9 /* CCCommon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF511926664700A911A9 /* CCCommon.mm */; }; - 50ABC0631926664800A911A9 /* CCDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF521926664700A911A9 /* CCDevice.mm */; }; - 50ABC0651926664800A911A9 /* CCGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF531926664700A911A9 /* CCGL.h */; }; - 50ABC0671926664800A911A9 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF541926664700A911A9 /* CCPlatformDefine.h */; }; - 50ABC0691926664800A911A9 /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF551926664700A911A9 /* CCStdC.h */; }; + 50ABC0211926664800A911A9 /* CCGLViewImpl-desktop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */; }; + 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */; }; + 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */; }; + 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF501926664700A911A9 /* CCApplication-mac.mm */; }; + 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF511926664700A911A9 /* CCCommon-mac.mm */; }; + 50ABC0631926664800A911A9 /* CCDevice-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBF521926664700A911A9 /* CCDevice-mac.mm */; }; + 50ABC0651926664800A911A9 /* CCGL-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF531926664700A911A9 /* CCGL-mac.h */; }; + 50ABC0671926664800A911A9 /* CCPlatformDefine-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF541926664700A911A9 /* CCPlatformDefine-mac.h */; }; + 50ABC0691926664800A911A9 /* CCStdC-mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBF551926664700A911A9 /* CCStdC-mac.h */; }; 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E6176631960F89B00DE83F5 /* CCEventListenerController.cpp */; }; 50ED2BDA19BE76D300A0AB90 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; }; - 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */; }; - 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; }; - 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */; }; - 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; }; - 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */; }; - 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; }; - 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */; }; - 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; }; - 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */; }; + 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */; }; + 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */; }; + 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */; }; + 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h */; }; + 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h */; }; + 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */; }; + 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */; }; + 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp */; }; + 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp */; }; A07A4CAF1783777C0073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1551A342158F2AB200E66CFE /* Foundation.framework */; }; B2165EEA19921124000BE3E6 /* CCPrimitiveCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B257B45E198A353E00D9A687 /* CCPrimitiveCommand.cpp */; }; B217703C1977ECB4009EE11B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B217703B1977ECB4009EE11B /* IOKit.framework */; }; @@ -2332,19 +2340,19 @@ 292DB12F19B4574100A80320 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; 292DB13019B4574100A80320 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; 292DB13119B4574100A80320 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; - 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplAndroid.cpp; sourceTree = ""; }; - 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplAndroid.h; sourceTree = ""; }; - 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplIOS.h; sourceTree = ""; }; - 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplIOS.mm; sourceTree = ""; }; - 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplMac.h; sourceTree = ""; }; - 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplMac.mm; sourceTree = ""; }; - 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplNone.cpp; sourceTree = ""; }; + 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-android.cpp"; sourceTree = ""; }; + 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-android.h"; sourceTree = ""; }; + 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-ios.h"; sourceTree = ""; }; + 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-ios.mm"; sourceTree = ""; }; + 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-mac.h"; sourceTree = ""; }; + 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIEditBoxImpl-mac.mm"; sourceTree = ""; }; + 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-stub.cpp"; sourceTree = ""; }; 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionDeprecated.cpp; sourceTree = ""; }; 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionDeprecated.h; sourceTree = ""; }; 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; - 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = ""; }; - 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewImpl_iOS.mm; sourceTree = ""; }; + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebViewImpl-ios.h"; sourceTree = ""; }; + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIWebViewImpl-ios.mm"; sourceTree = ""; }; 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; @@ -2386,7 +2394,7 @@ 3E6176651960F89B00DE83F5 /* CCGameController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCGameController.h; path = ../base/CCGameController.h; sourceTree = ""; }; 3E61781C1966A5A300DE83F5 /* CCController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCController.cpp; path = ../base/CCController.cpp; sourceTree = ""; }; 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoPlayer.h; sourceTree = ""; }; - 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIVideoPlayerIOS.mm; sourceTree = ""; }; + 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIVideoPlayer-ios.mm"; sourceTree = ""; }; 3EA3EDBA1991CDFA00645534 /* CCCamera.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCCamera.cpp; path = ../base/CCCamera.cpp; sourceTree = ""; }; 3EA3EDBB1991CDFA00645534 /* CCCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCCamera.h; path = ../base/CCCamera.h; sourceTree = ""; }; 464AD6E3197EBB1400E502D8 /* pvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pvr.cpp; path = ../base/pvr.cpp; sourceTree = ""; }; @@ -2632,27 +2640,31 @@ 5034CA61191D91CF00CE6051 /* ccShader_PositionTextureColor.frag */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor.frag; sourceTree = ""; }; 5034CA62191D91CF00CE6051 /* ccShader_PositionTextureColor_noMVP.vert */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor_noMVP.vert; sourceTree = ""; }; 5034CA63191D91CF00CE6051 /* ccShader_PositionTextureColor_noMVP.frag */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = ccShader_PositionTextureColor_noMVP.frag; sourceTree = ""; }; - 503DD8CE1926736A00CD74DD /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; - 503DD8CF1926736A00CD74DD /* CCApplication.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCApplication.mm; sourceTree = ""; }; - 503DD8D01926736A00CD74DD /* CCCommon.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCCommon.mm; sourceTree = ""; }; - 503DD8D11926736A00CD74DD /* CCDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCDevice.mm; sourceTree = ""; }; - 503DD8D21926736A00CD74DD /* CCDirectorCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDirectorCaller.h; sourceTree = ""; }; - 503DD8D31926736A00CD74DD /* CCDirectorCaller.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCDirectorCaller.mm; sourceTree = ""; }; - 503DD8D41926736A00CD74DD /* CCEAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEAGLView.h; sourceTree = ""; }; - 503DD8D51926736A00CD74DD /* CCEAGLView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEAGLView.mm; sourceTree = ""; }; - 503DD8D61926736A00CD74DD /* CCES2Renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCES2Renderer.h; sourceTree = ""; }; - 503DD8D71926736A00CD74DD /* CCES2Renderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCES2Renderer.m; sourceTree = ""; }; - 503DD8D81926736A00CD74DD /* CCESRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCESRenderer.h; sourceTree = ""; }; - 503DD8D91926736A00CD74DD /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; - 503DD8DA1926736A00CD74DD /* CCGLViewImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGLViewImpl.h; sourceTree = ""; }; - 503DD8DB1926736A00CD74DD /* CCGLViewImpl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCGLViewImpl.mm; sourceTree = ""; }; - 503DD8DC1926736A00CD74DD /* CCImage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCImage.mm; sourceTree = ""; }; - 503DD8DD1926736A00CD74DD /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = ""; }; - 503DD8DE1926736A00CD74DD /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; - 503DD8DF1926736A00CD74DD /* OpenGL_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGL_Internal.h; sourceTree = ""; }; + 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCApplication-ios.h"; sourceTree = ""; }; + 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCApplication-ios.mm"; sourceTree = ""; }; + 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCCommon-ios.mm"; sourceTree = ""; }; + 503DD8D11926736A00CD74DD /* CCDevice-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDevice-ios.mm"; sourceTree = ""; }; + 503DD8D21926736A00CD74DD /* CCDirectorCaller-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCDirectorCaller-ios.h"; sourceTree = ""; }; + 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDirectorCaller-ios.mm"; sourceTree = ""; }; + 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCEAGLView-ios.h"; sourceTree = ""; }; + 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCEAGLView-ios.mm"; sourceTree = ""; }; + 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCES2Renderer-ios.h"; sourceTree = ""; }; + 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CCES2Renderer-ios.m"; sourceTree = ""; }; + 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCESRenderer-ios.h"; sourceTree = ""; }; + 503DD8D91926736A00CD74DD /* CCGL-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGL-ios.h"; sourceTree = ""; }; + 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGLViewImpl-ios.h"; sourceTree = ""; }; + 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCGLViewImpl-ios.mm"; sourceTree = ""; }; + 503DD8DC1926736A00CD74DD /* CCImage-ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCImage-ios.mm"; sourceTree = ""; }; + 503DD8DD1926736A00CD74DD /* CCPlatformDefine-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCPlatformDefine-ios.h"; sourceTree = ""; }; + 503DD8DE1926736A00CD74DD /* CCStdC-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCStdC-ios.h"; sourceTree = ""; }; + 503DD8DF1926736A00CD74DD /* OpenGL_Internal-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OpenGL_Internal-ios.h"; sourceTree = ""; }; 503DD8F21926B0DB00CD74DD /* CCIMEDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCIMEDelegate.h; path = ../base/CCIMEDelegate.h; sourceTree = ""; }; 503DD8F31926B0DB00CD74DD /* CCIMEDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCIMEDispatcher.cpp; path = ../base/CCIMEDispatcher.cpp; sourceTree = ""; }; 503DD8F41926B0DB00CD74DD /* CCIMEDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCIMEDispatcher.h; path = ../base/CCIMEDispatcher.h; sourceTree = ""; }; + 50643BD319BFAECF00EF68ED /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; + 50643BD719BFAF4400EF68ED /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; + 50643BD819BFAF4400EF68ED /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; + 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = ""; }; 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAffineTransform.cpp; sourceTree = ""; }; 50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAffineTransform.h; sourceTree = ""; }; 50ABBD1D1925AB0000A911A9 /* CCGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGeometry.cpp; sourceTree = ""; }; @@ -2787,8 +2799,8 @@ 50ABBE081925AB6E00A911A9 /* ccTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccTypes.h; path = ../base/ccTypes.h; sourceTree = ""; }; 50ABBE091925AB6E00A911A9 /* CCUserDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCUserDefault.cpp; path = ../base/CCUserDefault.cpp; sourceTree = ""; }; 50ABBE0A1925AB6E00A911A9 /* CCUserDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCUserDefault.h; path = ../base/CCUserDefault.h; sourceTree = ""; }; - 50ABBE0B1925AB6F00A911A9 /* CCUserDefault.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CCUserDefault.mm; path = ../base/CCUserDefault.mm; sourceTree = ""; }; - 50ABBE0C1925AB6F00A911A9 /* CCUserDefaultAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCUserDefaultAndroid.cpp; path = ../base/CCUserDefaultAndroid.cpp; sourceTree = ""; }; + 50ABBE0B1925AB6F00A911A9 /* CCUserDefault-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "CCUserDefault-apple.mm"; path = "../base/CCUserDefault-apple.mm"; sourceTree = ""; }; + 50ABBE0C1925AB6F00A911A9 /* CCUserDefault-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "CCUserDefault-android.cpp"; path = "../base/CCUserDefault-android.cpp"; sourceTree = ""; }; 50ABBE0D1925AB6F00A911A9 /* ccUTF8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccUTF8.cpp; path = ../base/ccUTF8.cpp; sourceTree = ""; }; 50ABBE0E1925AB6F00A911A9 /* ccUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ccUTF8.h; path = ../base/ccUTF8.h; sourceTree = ""; }; 50ABBE0F1925AB6F00A911A9 /* ccUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccUtils.cpp; path = ../base/ccUtils.cpp; sourceTree = ""; }; @@ -2807,11 +2819,11 @@ 50ABBE1C1925AB6F00A911A9 /* utlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utlist.h; path = ../base/utlist.h; sourceTree = ""; }; 50ABBE1D1925AB6F00A911A9 /* ZipUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ZipUtils.cpp; path = ../base/ZipUtils.cpp; sourceTree = ""; }; 50ABBE1E1925AB6F00A911A9 /* ZipUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZipUtils.h; path = ../base/ZipUtils.h; sourceTree = ""; }; - 50ABBF1B1926664700A911A9 /* CCFileUtilsApple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFileUtilsApple.h; sourceTree = ""; }; - 50ABBF1C1926664700A911A9 /* CCFileUtilsApple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCFileUtilsApple.mm; sourceTree = ""; }; - 50ABBF1D1926664700A911A9 /* CCLock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLock.cpp; sourceTree = ""; }; - 50ABBF1E1926664700A911A9 /* CCLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLock.h; sourceTree = ""; }; - 50ABBF1F1926664700A911A9 /* CCThread.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCThread.mm; sourceTree = ""; }; + 50ABBF1B1926664700A911A9 /* CCFileUtils-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCFileUtils-apple.h"; sourceTree = ""; }; + 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCFileUtils-apple.mm"; sourceTree = ""; }; + 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCLock-apple.cpp"; sourceTree = ""; }; + 50ABBF1E1926664700A911A9 /* CCLock-apple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCLock-apple.h"; sourceTree = ""; }; + 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCThread-apple.mm"; sourceTree = ""; }; 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplicationProtocol.h; sourceTree = ""; }; 50ABBF211926664700A911A9 /* CCCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCommon.h; sourceTree = ""; }; 50ABBF221926664700A911A9 /* CCDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCDevice.h; sourceTree = ""; }; @@ -2825,15 +2837,15 @@ 50ABBF2A1926664700A911A9 /* CCSAXParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSAXParser.h; sourceTree = ""; }; 50ABBF2B1926664700A911A9 /* CCThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCThread.cpp; sourceTree = ""; }; 50ABBF2C1926664700A911A9 /* CCThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCThread.h; sourceTree = ""; }; - 50ABBF2E1926664700A911A9 /* CCGLViewImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGLViewImpl.cpp; sourceTree = ""; }; - 50ABBF2F1926664700A911A9 /* CCGLViewImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGLViewImpl.h; sourceTree = ""; }; - 50ABBF4F1926664700A911A9 /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; - 50ABBF501926664700A911A9 /* CCApplication.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCApplication.mm; sourceTree = ""; }; - 50ABBF511926664700A911A9 /* CCCommon.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCCommon.mm; sourceTree = ""; }; - 50ABBF521926664700A911A9 /* CCDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCDevice.mm; sourceTree = ""; }; - 50ABBF531926664700A911A9 /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; - 50ABBF541926664700A911A9 /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = ""; }; - 50ABBF551926664700A911A9 /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; + 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCGLViewImpl-desktop.cpp"; sourceTree = ""; }; + 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGLViewImpl-desktop.h"; sourceTree = ""; }; + 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCApplication-mac.h"; sourceTree = ""; }; + 50ABBF501926664700A911A9 /* CCApplication-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCApplication-mac.mm"; sourceTree = ""; }; + 50ABBF511926664700A911A9 /* CCCommon-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCCommon-mac.mm"; sourceTree = ""; }; + 50ABBF521926664700A911A9 /* CCDevice-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CCDevice-mac.mm"; sourceTree = ""; }; + 50ABBF531926664700A911A9 /* CCGL-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCGL-mac.h"; sourceTree = ""; }; + 50ABBF541926664700A911A9 /* CCPlatformDefine-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCPlatformDefine-mac.h"; sourceTree = ""; }; + 50ABBF551926664700A911A9 /* CCStdC-mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCStdC-mac.h"; sourceTree = ""; }; 50DC5180187B817900A9C23F /* RELEASE_NOTES.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = RELEASE_NOTES.md; path = ../docs/RELEASE_NOTES.md; sourceTree = ""; }; 50E6D32E18E174130051CA34 /* UIHBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIHBox.cpp; sourceTree = ""; }; 50E6D32F18E174130051CA34 /* UIHBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHBox.h; sourceTree = ""; }; @@ -2841,10 +2853,10 @@ 50E6D33118E174130051CA34 /* UIRelativeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRelativeBox.h; sourceTree = ""; }; 50E6D33218E174130051CA34 /* UIVBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVBox.cpp; sourceTree = ""; }; 50E6D33318E174130051CA34 /* UIVBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVBox.h; sourceTree = ""; }; - 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWin.h; sourceTree = ""; }; - 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWp8.h; sourceTree = ""; }; - 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWin.cpp; sourceTree = ""; }; - 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWp8.cpp; sourceTree = ""; }; + 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-win32.h"; sourceTree = ""; }; + 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIEditBoxImpl-wp8.h"; sourceTree = ""; }; + 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-win32.cpp"; sourceTree = ""; }; + 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "UIEditBoxImpl-wp8.cpp"; sourceTree = ""; }; 50FCEB6A18C72017004AD434 /* ButtonReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonReader.cpp; sourceTree = ""; }; 50FCEB6B18C72017004AD434 /* ButtonReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonReader.h; sourceTree = ""; }; 50FCEB6D18C72017004AD434 /* CheckBoxReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckBoxReader.cpp; sourceTree = ""; }; @@ -3211,8 +3223,8 @@ 50ABBE081925AB6E00A911A9 /* ccTypes.h */, 50ABBE091925AB6E00A911A9 /* CCUserDefault.cpp */, 50ABBE0A1925AB6E00A911A9 /* CCUserDefault.h */, - 50ABBE0B1925AB6F00A911A9 /* CCUserDefault.mm */, - 50ABBE0C1925AB6F00A911A9 /* CCUserDefaultAndroid.cpp */, + 50ABBE0B1925AB6F00A911A9 /* CCUserDefault-apple.mm */, + 50ABBE0C1925AB6F00A911A9 /* CCUserDefault-android.cpp */, 50ABBE0D1925AB6F00A911A9 /* ccUTF8.cpp */, 50ABBE0E1925AB6F00A911A9 /* ccUTF8.h */, 50ABBE0F1925AB6F00A911A9 /* ccUtils.cpp */, @@ -4011,20 +4023,20 @@ 292DB12E19B4574100A80320 /* UIEditBox */ = { isa = PBXGroup; children = ( - 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImplWin.h */, - 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImplWp8.h */, - 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImplWin.cpp */, - 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp */, + 50ED2BDC19BEAF7900A0AB90 /* UIEditBoxImpl-win32.h */, + 50ED2BDD19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h */, + 50ED2BDE19BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp */, + 50ED2BDF19BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp */, 292DB12F19B4574100A80320 /* UIEditBox.cpp */, 292DB13019B4574100A80320 /* UIEditBox.h */, 292DB13119B4574100A80320 /* UIEditBoxImpl.h */, - 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */, - 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */, - 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */, - 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */, - 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */, - 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */, - 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */, + 292DB13219B4574100A80320 /* UIEditBoxImpl-android.cpp */, + 292DB13319B4574100A80320 /* UIEditBoxImpl-android.h */, + 292DB13419B4574100A80320 /* UIEditBoxImpl-ios.h */, + 292DB13519B4574100A80320 /* UIEditBoxImpl-ios.mm */, + 292DB13619B4574100A80320 /* UIEditBoxImpl-mac.h */, + 292DB13719B4574100A80320 /* UIEditBoxImpl-mac.mm */, + 292DB13819B4574100A80320 /* UIEditBoxImpl-stub.cpp */, ); path = UIEditBox; sourceTree = ""; @@ -4069,10 +4081,10 @@ children = ( 29394CEC19B01DBA00D2DE1A /* UIWebView.h */, 29394CED19B01DBA00D2DE1A /* UIWebView.mm */, - 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */, - 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */, + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl-ios.h */, + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl-ios.mm */, 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, - 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */, + 3EA0FB6A191C841D00B170C8 /* UIVideoPlayer-ios.mm */, ); name = experimental; sourceTree = ""; @@ -4700,24 +4712,24 @@ 503DD8CD1926736A00CD74DD /* ios */ = { isa = PBXGroup; children = ( - 503DD8CE1926736A00CD74DD /* CCApplication.h */, - 503DD8CF1926736A00CD74DD /* CCApplication.mm */, - 503DD8D01926736A00CD74DD /* CCCommon.mm */, - 503DD8D11926736A00CD74DD /* CCDevice.mm */, - 503DD8D21926736A00CD74DD /* CCDirectorCaller.h */, - 503DD8D31926736A00CD74DD /* CCDirectorCaller.mm */, - 503DD8D41926736A00CD74DD /* CCEAGLView.h */, - 503DD8D51926736A00CD74DD /* CCEAGLView.mm */, - 503DD8D61926736A00CD74DD /* CCES2Renderer.h */, - 503DD8D71926736A00CD74DD /* CCES2Renderer.m */, - 503DD8D81926736A00CD74DD /* CCESRenderer.h */, - 503DD8D91926736A00CD74DD /* CCGL.h */, - 503DD8DA1926736A00CD74DD /* CCGLViewImpl.h */, - 503DD8DB1926736A00CD74DD /* CCGLViewImpl.mm */, - 503DD8DC1926736A00CD74DD /* CCImage.mm */, - 503DD8DD1926736A00CD74DD /* CCPlatformDefine.h */, - 503DD8DE1926736A00CD74DD /* CCStdC.h */, - 503DD8DF1926736A00CD74DD /* OpenGL_Internal.h */, + 503DD8CE1926736A00CD74DD /* CCApplication-ios.h */, + 503DD8CF1926736A00CD74DD /* CCApplication-ios.mm */, + 503DD8D01926736A00CD74DD /* CCCommon-ios.mm */, + 503DD8D11926736A00CD74DD /* CCDevice-ios.mm */, + 503DD8D21926736A00CD74DD /* CCDirectorCaller-ios.h */, + 503DD8D31926736A00CD74DD /* CCDirectorCaller-ios.mm */, + 503DD8D41926736A00CD74DD /* CCEAGLView-ios.h */, + 503DD8D51926736A00CD74DD /* CCEAGLView-ios.mm */, + 503DD8D61926736A00CD74DD /* CCES2Renderer-ios.h */, + 503DD8D71926736A00CD74DD /* CCES2Renderer-ios.m */, + 503DD8D81926736A00CD74DD /* CCESRenderer-ios.h */, + 503DD8D91926736A00CD74DD /* CCGL-ios.h */, + 503DD8DA1926736A00CD74DD /* CCGLViewImpl-ios.h */, + 503DD8DB1926736A00CD74DD /* CCGLViewImpl-ios.mm */, + 503DD8DC1926736A00CD74DD /* CCImage-ios.mm */, + 503DD8DD1926736A00CD74DD /* CCPlatformDefine-ios.h */, + 503DD8DE1926736A00CD74DD /* CCStdC-ios.h */, + 503DD8DF1926736A00CD74DD /* OpenGL_Internal-ios.h */, ); path = ios; sourceTree = ""; @@ -4729,6 +4741,10 @@ 50ABBF2D1926664700A911A9 /* desktop */, 50ABBF4E1926664700A911A9 /* mac */, 50ABBF1A1926664700A911A9 /* apple */, + 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */, + 50643BD319BFAECF00EF68ED /* CCGL.h */, + 50643BD719BFAF4400EF68ED /* CCApplication.h */, + 50643BD819BFAF4400EF68ED /* CCStdC.h */, 50ABBF201926664700A911A9 /* CCApplicationProtocol.h */, 50ABBF211926664700A911A9 /* CCCommon.h */, 50ABBF221926664700A911A9 /* CCDevice.h */, @@ -4750,11 +4766,11 @@ 50ABBF1A1926664700A911A9 /* apple */ = { isa = PBXGroup; children = ( - 50ABBF1B1926664700A911A9 /* CCFileUtilsApple.h */, - 50ABBF1C1926664700A911A9 /* CCFileUtilsApple.mm */, - 50ABBF1D1926664700A911A9 /* CCLock.cpp */, - 50ABBF1E1926664700A911A9 /* CCLock.h */, - 50ABBF1F1926664700A911A9 /* CCThread.mm */, + 50ABBF1B1926664700A911A9 /* CCFileUtils-apple.h */, + 50ABBF1C1926664700A911A9 /* CCFileUtils-apple.mm */, + 50ABBF1D1926664700A911A9 /* CCLock-apple.cpp */, + 50ABBF1E1926664700A911A9 /* CCLock-apple.h */, + 50ABBF1F1926664700A911A9 /* CCThread-apple.mm */, ); path = apple; sourceTree = ""; @@ -4762,8 +4778,8 @@ 50ABBF2D1926664700A911A9 /* desktop */ = { isa = PBXGroup; children = ( - 50ABBF2E1926664700A911A9 /* CCGLViewImpl.cpp */, - 50ABBF2F1926664700A911A9 /* CCGLViewImpl.h */, + 50ABBF2E1926664700A911A9 /* CCGLViewImpl-desktop.cpp */, + 50ABBF2F1926664700A911A9 /* CCGLViewImpl-desktop.h */, ); path = desktop; sourceTree = ""; @@ -4771,13 +4787,13 @@ 50ABBF4E1926664700A911A9 /* mac */ = { isa = PBXGroup; children = ( - 50ABBF4F1926664700A911A9 /* CCApplication.h */, - 50ABBF501926664700A911A9 /* CCApplication.mm */, - 50ABBF511926664700A911A9 /* CCCommon.mm */, - 50ABBF521926664700A911A9 /* CCDevice.mm */, - 50ABBF531926664700A911A9 /* CCGL.h */, - 50ABBF541926664700A911A9 /* CCPlatformDefine.h */, - 50ABBF551926664700A911A9 /* CCStdC.h */, + 50ABBF4F1926664700A911A9 /* CCApplication-mac.h */, + 50ABBF501926664700A911A9 /* CCApplication-mac.mm */, + 50ABBF511926664700A911A9 /* CCCommon-mac.mm */, + 50ABBF521926664700A911A9 /* CCDevice-mac.mm */, + 50ABBF531926664700A911A9 /* CCGL-mac.h */, + 50ABBF541926664700A911A9 /* CCPlatformDefine-mac.h */, + 50ABBF551926664700A911A9 /* CCStdC-mac.h */, ); path = mac; sourceTree = ""; @@ -4976,17 +4992,18 @@ 50ABBE851925AB6F00A911A9 /* ccFPSImages.h in Headers */, 15AE1A5319AAD40300C27E9E /* b2Draw.h in Headers */, 5034CA39191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, - 292DB14B19B4574100A80320 /* UIEditBoxImplMac.h in Headers */, + 292DB14B19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, 50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */, 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */, 50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */, - 292DB14519B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */, + 292DB14519B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */, 15AE18EB19AAD35000C27E9E /* CCActionNode.h in Headers */, 15AE1A3819AAD3D500C27E9E /* b2Shape.h in Headers */, 15AE18FC19AAD35000C27E9E /* CCComBase.h in Headers */, 1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */, 15AE1B5219AADA9900C27E9E /* UIPageView.h in Headers */, + 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */, 5034CA3F191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 50ABBD461925AB0000A911A9 /* CCVertex.h in Headers */, 15AE180A19AAD2F700C27E9E /* CCAABB.h in Headers */, @@ -5074,11 +5091,11 @@ 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, - 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, - 50ABC0671926664800A911A9 /* CCPlatformDefine.h in Headers */, + 50ABC0671926664800A911A9 /* CCPlatformDefine-mac.h in Headers */, 15AE189A19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, 46C02E0918E91123004B7456 /* xxhash.h in Headers */, 15AE1A6B19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, @@ -5090,7 +5107,7 @@ 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, 15AE1B5819AADA9900C27E9E /* UISlider.h in Headers */, 1A57011D180BC90D0088DEC7 /* CCGrabber.h in Headers */, - 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */, + 50ED2BE219BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h in Headers */, 15AE1B6819AADA9900C27E9E /* UIScale9Sprite.h in Headers */, 1A570121180BC90D0088DEC7 /* CCGrid.h in Headers */, 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, @@ -5116,7 +5133,7 @@ 5034CA47191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, 15AE182219AAD2F700C27E9E /* CCBundleReader.h in Headers */, 15AE18A519AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, - 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */, + 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */, 15AE1A6519AAD40300C27E9E /* b2TimeStep.h in Headers */, 15AE182E19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, @@ -5133,6 +5150,7 @@ 15AE1AEF19AAD42500C27E9E /* cpBody.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, 15AE1AF119AAD42500C27E9E /* cpShape.h in Headers */, + 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */, 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, 50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */, 15AE197519AAD35700C27E9E /* CCTimeLine.h in Headers */, @@ -5221,7 +5239,7 @@ 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */, 15AE19E119AAD3A700C27E9E /* Skeleton.h in Headers */, 1A570280180BCC900088DEC7 /* CCSprite.h in Headers */, - 292DB14719B4574100A80320 /* UIEditBoxImplIOS.h in Headers */, + 292DB14719B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, 15AE1A9119AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE1A5419AAD40300C27E9E /* b2GrowableStack.h in Headers */, 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */, @@ -5241,7 +5259,7 @@ 50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */, 1A570298180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, 50ABBE911925AB6F00A911A9 /* CCPlatformMacros.h in Headers */, - 50ABC05D1926664800A911A9 /* CCApplication.h in Headers */, + 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */, 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */, 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */, 15AE18AA19AAD33D00C27E9E /* CocosBuilder.h in Headers */, @@ -5295,7 +5313,8 @@ 50ABBD851925AB4100A911A9 /* CCBatchCommand.h in Headers */, 15AE1A6F19AAD40300C27E9E /* b2CircleContact.h in Headers */, 15AE191619AAD35000C27E9E /* CCSkin.h in Headers */, - 50ABC0651926664800A911A9 /* CCGL.h in Headers */, + 50ABC0651926664800A911A9 /* CCGL-mac.h in Headers */, + 50643BD419BFAECF00EF68ED /* CCGL.h in Headers */, 15AE190C19AAD35000C27E9E /* CCDisplayFactory.h in Headers */, B37510751823AC9F00B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */, 15AE1A8B19AAD40300C27E9E /* b2PulleyJoint.h in Headers */, @@ -5359,6 +5378,7 @@ 15AE197319AAD35700C27E9E /* CCNodeReader.h in Headers */, 15AE1BCF19AAE01E00C27E9E /* CCControlExtensions.h in Headers */, 15AE1A3519AAD3D500C27E9E /* b2EdgeShape.h in Headers */, + 50643BD919BFAF4400EF68ED /* CCApplication.h in Headers */, 15AE183619AAD2F700C27E9E /* CCObjLoader.h in Headers */, 15AE1BE719AAE01E00C27E9E /* CCTableViewCell.h in Headers */, 15AE1A8919AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, @@ -5382,11 +5402,11 @@ 15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */, 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */, - 50ABC0231926664800A911A9 /* CCGLViewImpl.h in Headers */, + 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */, 15AE1AE319AAD42500C27E9E /* cpDampedSpring.h in Headers */, 15AE188D19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, - 50ABBFFD1926664800A911A9 /* CCFileUtilsApple.h in Headers */, + 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */, 5034CA41191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, @@ -5417,7 +5437,7 @@ 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, 1A9DCA29180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, 15AE19C519AAD3A700C27E9E /* Animation.h in Headers */, - 50ABC0031926664800A911A9 /* CCLock.h in Headers */, + 50ABC0031926664800A911A9 /* CCLock-apple.h in Headers */, B37510721823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, 50ABBE2D1925AB6F00A911A9 /* ccCArray.h in Headers */, 50ABBD5E1925AB0000A911A9 /* Vec3.h in Headers */, @@ -5445,7 +5465,7 @@ 50ABBEA91925AB6F00A911A9 /* CCTouch.h in Headers */, 15AE1A5E19AAD40300C27E9E /* b2Body.h in Headers */, 50ABBE971925AB6F00A911A9 /* CCProtocols.h in Headers */, - 50ABC0691926664800A911A9 /* CCStdC.h in Headers */, + 50ABC0691926664800A911A9 /* CCStdC-mac.h in Headers */, 15AE1A2B19AAD3D500C27E9E /* b2Distance.h in Headers */, 15AE1ADE19AAD42500C27E9E /* chipmunk_private.h in Headers */, 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */, @@ -5472,15 +5492,16 @@ buildActionMask = 2147483647; files = ( 15AE197E19AAD35700C27E9E /* CCNodeReader.h in Headers */, - 503DD8F01926736A00CD74DD /* CCStdC.h in Headers */, + 503DD8F01926736A00CD74DD /* CCStdC-ios.h in Headers */, 15AE1A9A19AAD40300C27E9E /* b2Math.h in Headers */, 46A170FF1807CECB005B8026 /* CCPhysicsContact.h in Headers */, 15AE1AC719AAD40300C27E9E /* b2GearJoint.h in Headers */, 50ABBDA21925AB4100A911A9 /* CCGroupCommand.h in Headers */, 15AE1A1C19AAD3A700C27E9E /* Slot.h in Headers */, 15AE18C219AAD33D00C27E9E /* CCLayerColorLoader.h in Headers */, + 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */, 15AE181519AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, - 503DD8EF1926736A00CD74DD /* CCPlatformDefine.h in Headers */, + 503DD8EF1926736A00CD74DD /* CCPlatformDefine-ios.h in Headers */, 15AE19F219AAD3A700C27E9E /* Event.h in Headers */, 15AE196919AAD35100C27E9E /* CocoStudio.h in Headers */, 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, @@ -5508,7 +5529,7 @@ 50ABBE2E1925AB6F00A911A9 /* ccCArray.h in Headers */, 15AE1A0C19AAD3A700C27E9E /* CCSkeletonAnimation.h in Headers */, 15AE1B9119AADA9A00C27E9E /* UIWidget.h in Headers */, - 50ABC0041926664800A911A9 /* CCLock.h in Headers */, + 50ABC0041926664800A911A9 /* CCLock-apple.h in Headers */, 15AE1A4019AAD3D500C27E9E /* b2Collision.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, @@ -5531,12 +5552,13 @@ 15AE19B719AAD39700C27E9E /* TextBMFontReader.h in Headers */, 1A570064180BC5A10088DEC7 /* CCAction.h in Headers */, 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */, - 503DD8EC1926736A00CD74DD /* CCGLViewImpl.h in Headers */, + 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */, 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, 15AE1B0719AAD42500C27E9E /* cpBB.h in Headers */, 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */, 15AE1ACD19AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, + 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */, 15AE1A1219AAD3A700C27E9E /* RegionAttachment.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, @@ -5584,10 +5606,10 @@ 15AE19F819AAD3A700C27E9E /* Animation.h in Headers */, 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */, 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */, - 292DB14C19B4574100A80320 /* UIEditBoxImplMac.h in Headers */, + 292DB14C19B4574100A80320 /* UIEditBoxImpl-mac.h in Headers */, 15AE1BF019AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, - 503DD8E41926736A00CD74DD /* CCDirectorCaller.h in Headers */, + 503DD8E41926736A00CD74DD /* CCDirectorCaller-ios.h in Headers */, 15AE198119AAD35700C27E9E /* CCTimelineMacro.h in Headers */, 15AE1B7719AADA9A00C27E9E /* UIPageView.h in Headers */, 50ABBD8A1925AB4100A911A9 /* CCCustomCommand.h in Headers */, @@ -5600,7 +5622,7 @@ 1A570111180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, 50ABBE381925AB6F00A911A9 /* CCConsole.h in Headers */, 50ABBE8A1925AB6F00A911A9 /* CCMap.h in Headers */, - 503DD8E61926736A00CD74DD /* CCEAGLView.h in Headers */, + 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */, 50ABBE4C1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, 15AE1B0419AAD42500C27E9E /* cpSlideJoint.h in Headers */, @@ -5610,11 +5632,11 @@ 15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */, - 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl-ios.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, - 292DB14819B4574100A80320 /* UIEditBoxImplIOS.h in Headers */, + 292DB14819B4574100A80320 /* UIEditBoxImpl-ios.h in Headers */, 15AE1A0819AAD3A700C27E9E /* BoneData.h in Headers */, 50ABBD9A1925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, 15AE181D19AAD2F700C27E9E /* CCBundle3D.h in Headers */, @@ -5622,12 +5644,12 @@ 15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */, B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, 15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */, - 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImplWin.h in Headers */, + 50ED2BE119BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, 15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */, 50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */, 3EA3EDBF1991CDFA00645534 /* CCCamera.h in Headers */, 15AE1AD319AAD40300C27E9E /* b2RopeJoint.h in Headers */, - 50ABBFFE1926664800A911A9 /* CCFileUtilsApple.h in Headers */, + 50ABBFFE1926664800A911A9 /* CCFileUtils-apple.h in Headers */, 15AE1AAD19AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */, @@ -5648,7 +5670,7 @@ 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */, 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, - 292DB14619B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */, + 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */, 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, @@ -5669,6 +5691,7 @@ 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, 15AE1B0B19AAD42500C27E9E /* cpSpace.h in Headers */, + 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */, 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, 15AE1A3919AAD3D500C27E9E /* Box2D.h in Headers */, @@ -5823,10 +5846,10 @@ 15AE1A9519AAD40300C27E9E /* b2BlockAllocator.h in Headers */, 5034CA48191D591100CE6051 /* ccShader_Label_normal.frag in Headers */, 15AE183F19AAD2F700C27E9E /* CCSkeleton3D.h in Headers */, - 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImplWp8.h in Headers */, + 50ED2BE319BEAF7900A0AB90 /* UIEditBoxImpl-wp8.h in Headers */, 50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */, 15AE19B119AAD39700C27E9E /* ScrollViewReader.h in Headers */, - 503DD8E81926736A00CD74DD /* CCES2Renderer.h in Headers */, + 503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */, 50ABBE6C1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */, 5034CA3E191D591100CE6051 /* ccShader_PositionColor.frag in Headers */, 50ABBE301925AB6F00A911A9 /* ccConfig.h in Headers */, @@ -5840,7 +5863,7 @@ 50ABBEA61925AB6F00A911A9 /* CCScriptSupport.h in Headers */, 46C02E0A18E91123004B7456 /* xxhash.h in Headers */, 5034CA4C191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, - 503DD8EB1926736A00CD74DD /* CCGL.h in Headers */, + 503DD8EB1926736A00CD74DD /* CCGL-ios.h in Headers */, 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, @@ -5865,7 +5888,7 @@ 15AE18D619AAD33D00C27E9E /* CCScale9SpriteLoader.h in Headers */, 15AE182B19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, 15AE1B7D19AADA9A00C27E9E /* UISlider.h in Headers */, - 503DD8E01926736A00CD74DD /* CCApplication.h in Headers */, + 503DD8E01926736A00CD74DD /* CCApplication-ios.h in Headers */, 15AE1B8319AADA9A00C27E9E /* UITextBMFont.h in Headers */, 50ABBD8E1925AB4100A911A9 /* CCGLProgram.h in Headers */, 50ABC0081926664800A911A9 /* CCApplicationProtocol.h in Headers */, @@ -5889,6 +5912,7 @@ 15AE192819AAD35100C27E9E /* TriggerBase.h in Headers */, 15AE1BF419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */, 15AE1AD119AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, + 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */, 15AE1A2119AAD3A700C27E9E /* spine.h in Headers */, 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, @@ -5945,7 +5969,7 @@ 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, 15AE1B0C19AAD42500C27E9E /* cpSpatialIndex.h in Headers */, - 503DD8EA1926736A00CD74DD /* CCESRenderer.h in Headers */, + 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */, 50ABBE581925AB6F00A911A9 /* CCEventFocus.h in Headers */, 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, 15AE1AAF19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, @@ -5958,7 +5982,7 @@ B375107D1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, 15AE1B0519AAD42500C27E9E /* util.h in Headers */, 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, - 503DD8F11926736A00CD74DD /* OpenGL_Internal.h in Headers */, + 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */, B37510801823ACA100B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */, 50ABBDAA1925AB4100A911A9 /* CCRenderCommand.h in Headers */, 15AE1BE919AAE01E00C27E9E /* CCControl.h in Headers */, @@ -6046,7 +6070,7 @@ 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */, - 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */, + 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */, 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 1A1645B0191B726C008C7C7F /* ConvertUTF.c in Sources */, @@ -6065,7 +6089,7 @@ 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, 15AE1B2719AAD43700C27E9E /* cpSpaceStep.c in Sources */, 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */, - 50ABC0611926664800A911A9 /* CCCommon.mm in Sources */, + 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */, 15AE1B2519AAD43700C27E9E /* cpSpaceHash.c in Sources */, 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */, 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */, @@ -6124,7 +6148,7 @@ 15AE1A8219AAD40300C27E9E /* b2GearJoint.cpp in Sources */, 1A570071180BC5A10088DEC7 /* CCActionGrid.cpp in Sources */, B37510761823AC9F00B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */, - 50ABBFFF1926664800A911A9 /* CCFileUtilsApple.mm in Sources */, + 50ABBFFF1926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 1A570075180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, 15AE1B2019AAD43700C27E9E /* cpHashSet.c in Sources */, 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */, @@ -6156,7 +6180,7 @@ 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, - 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayerIOS.mm in Sources */, + 50ED2BDB19BE76D500A0AB90 /* UIVideoPlayer-ios.mm in Sources */, 15AE1B5F19AADA9900C27E9E /* UITextField.cpp in Sources */, 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, @@ -6167,7 +6191,7 @@ 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, 1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, 50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */, - 292DB14919B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */, + 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, @@ -6248,7 +6272,7 @@ 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 1A570210180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, - 292DB14D19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */, + 292DB14D19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, 50ABBDB51925AB4100A911A9 /* CCTexture2D.cpp in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, @@ -6337,7 +6361,7 @@ 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, 50ABBD3C1925AB0000A911A9 /* CCGeometry.cpp in Sources */, 15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */, - 50ABC0011926664800A911A9 /* CCLock.cpp in Sources */, + 50ABC0011926664800A911A9 /* CCLock-apple.cpp in Sources */, 15AE1A8019AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, 50ABBD931925AB4100A911A9 /* CCGLProgramState.cpp in Sources */, 15AE183419AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, @@ -6347,9 +6371,9 @@ 1A570358180BD0B00088DEC7 /* unzip.cpp in Sources */, 15AE19D219AAD3A700C27E9E /* Bone.cpp in Sources */, 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, - 50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */, - 50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */, - 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, + 50ABBEB31925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, + 50ABBEB51925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, @@ -6383,13 +6407,13 @@ 50ABBE751925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, 15AE18F019AAD35000C27E9E /* CCArmatureAnimation.cpp in Sources */, 50ABBE511925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, - 50ABC0051926664800A911A9 /* CCThread.mm in Sources */, - 50ABC0631926664800A911A9 /* CCDevice.mm in Sources */, + 50ABC0051926664800A911A9 /* CCThread-apple.mm in Sources */, + 50ABC0631926664800A911A9 /* CCDevice-mac.mm in Sources */, 15AE1A2819AAD3D500C27E9E /* b2Collision.cpp in Sources */, 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, - 292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, + 292DB14319B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, 15AE1A5219AAD40300C27E9E /* b2Draw.cpp in Sources */, - 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */, + 50ED2BE419BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1AAF584F180E40B9000584C8 /* LocalStorage.cpp in Sources */, @@ -6434,7 +6458,7 @@ 15AE190919AAD35000C27E9E /* CCDecorativeDisplay.cpp in Sources */, 15AE18E319AAD35000C27E9E /* TriggerObj.cpp in Sources */, 15AE1BA119AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, - 50ABC0211926664800A911A9 /* CCGLViewImpl.cpp in Sources */, + 50ABC0211926664800A911A9 /* CCGLViewImpl-desktop.cpp in Sources */, 50ABC00D1926664800A911A9 /* CCFileUtils.cpp in Sources */, 50ABBE4D1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, 15AE1B1319AAD43700C27E9E /* cpGrooveJoint.c in Sources */, @@ -6454,7 +6478,7 @@ 15AE1A6319AAD40300C27E9E /* b2Island.cpp in Sources */, 15AE1A8419AAD40300C27E9E /* b2Joint.cpp in Sources */, 50ABBD601925AB0000A911A9 /* Vec4.cpp in Sources */, - 50ABC05F1926664800A911A9 /* CCApplication.mm in Sources */, + 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */, 15AE1A9219AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, 15AE1B1619AAD43700C27E9E /* cpRatchetJoint.c in Sources */, @@ -6462,7 +6486,7 @@ 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, 15AE19EA19AAD3A700C27E9E /* SlotData.cpp in Sources */, - 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */, + 50ED2BE619BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */, 15AE18EC19AAD35000C27E9E /* CCActionObject.cpp in Sources */, 1A01C68E18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, @@ -6483,7 +6507,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 15AE1B9819AADAA100C27E9E /* UIVideoPlayerIOS.mm in Sources */, + 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */, 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, 15AE1B4019AAD43700C27E9E /* cpShape.c in Sources */, 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */, @@ -6503,7 +6527,7 @@ 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, 50ABC0161926664800A911A9 /* CCImage.cpp in Sources */, 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, - 292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */, + 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, 15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, 15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */, @@ -6513,7 +6537,7 @@ 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 15AE1B3419AAD43700C27E9E /* cpRatchetJoint.c in Sources */, 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, - 503DD8E11926736A00CD74DD /* CCApplication.mm in Sources */, + 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, 15AE1A0319AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, @@ -6523,7 +6547,7 @@ 15AE185C19AAD31200C27E9E /* CDOpenALSupport.m in Sources */, 15AE186119AAD31200C27E9E /* SimpleAudioEngine_objc.m in Sources */, 15AE182519AAD2F700C27E9E /* CCMesh.cpp in Sources */, - 503DD8EE1926736A00CD74DD /* CCImage.mm in Sources */, + 503DD8EE1926736A00CD74DD /* CCImage-ios.mm in Sources */, B37510811823ACA100B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */, 46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */, 15AE1BEA19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, @@ -6602,7 +6626,7 @@ 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */, 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, - 292DB14419B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, + 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */, 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1AC419AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, @@ -6650,8 +6674,8 @@ 15AE1ACC19AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */, - 503DD8E21926736A00CD74DD /* CCCommon.mm in Sources */, - 292DB14A19B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */, + 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, + 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, @@ -6685,7 +6709,7 @@ 15AE1A0B19AAD3A700C27E9E /* CCSkeletonAnimation.cpp in Sources */, 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, 15AE1AA519AAD40300C27E9E /* b2Fixture.cpp in Sources */, - 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImplWp8.cpp in Sources */, + 50ED2BE719BEAF7900A0AB90 /* UIEditBoxImpl-wp8.cpp in Sources */, 15AE1BAD19AADFDF00C27E9E /* UILayoutParameter.cpp in Sources */, B375107E1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.cpp in Sources */, 15AE19AA19AAD39700C27E9E /* ListViewReader.cpp in Sources */, @@ -6723,14 +6747,14 @@ 1A570211180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */, 15AE1B3819AAD43700C27E9E /* cpArbiter.c in Sources */, - 503DD8ED1926736A00CD74DD /* CCGLViewImpl.mm in Sources */, + 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */, 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 15AE1A0F19AAD3A700C27E9E /* Json.cpp in Sources */, 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */, 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, 1A570215180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 1A570222180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, - 292DB15019B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */, + 292DB15019B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, 15AE19F119AAD3A700C27E9E /* Event.cpp in Sources */, 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */, 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */, @@ -6745,7 +6769,7 @@ 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, - 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl-ios.mm in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, @@ -6811,9 +6835,9 @@ 50ABBE2C1925AB6F00A911A9 /* ccCArray.cpp in Sources */, 15AE193219AAD35100C27E9E /* CCActionNode.cpp in Sources */, 15AE195319AAD35100C27E9E /* CCDisplayFactory.cpp in Sources */, - 50ABC0061926664800A911A9 /* CCThread.mm in Sources */, + 50ABC0061926664800A911A9 /* CCThread-apple.mm in Sources */, B375107C1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */, - 50ABBEB61925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */, + 50ABBEB61925AB6F00A911A9 /* CCUserDefault-android.cpp in Sources */, 1A57034C180BD09B0088DEC7 /* tinyxml2.cpp in Sources */, 50ABBDB61925AB4100A911A9 /* CCTexture2D.cpp in Sources */, 15AE1BAB19AADFDF00C27E9E /* UILayout.cpp in Sources */, @@ -6832,7 +6856,7 @@ 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, 15AE1A9619AAD40300C27E9E /* b2Draw.cpp in Sources */, - 503DD8E91926736A00CD74DD /* CCES2Renderer.m in Sources */, + 503DD8E91926736A00CD74DD /* CCES2Renderer-ios.m in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, 15AE183919AAD2F700C27E9E /* CCRay.cpp in Sources */, 15AE1B8219AADA9A00C27E9E /* UITextBMFont.cpp in Sources */, @@ -6865,12 +6889,12 @@ 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 15AE1AC219AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, - 503DD8E71926736A00CD74DD /* CCEAGLView.mm in Sources */, + 503DD8E71926736A00CD74DD /* CCEAGLView-ios.mm in Sources */, 50ABBDA41925AB4100A911A9 /* CCQuadCommand.cpp in Sources */, 15AE18C319AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, 15AE197919AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */, - 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImplWin.cpp in Sources */, + 50ED2BE519BEAF7900A0AB90 /* UIEditBoxImpl-win32.cpp in Sources */, 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */, 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */, 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, @@ -6891,16 +6915,16 @@ 15AE1AA719AAD40300C27E9E /* b2Island.cpp in Sources */, 3E6176741960F89B00DE83F5 /* CCEventController.cpp in Sources */, 50ABBE361925AB6F00A911A9 /* CCConsole.cpp in Sources */, - 503DD8E51926736A00CD74DD /* CCDirectorCaller.mm in Sources */, + 503DD8E51926736A00CD74DD /* CCDirectorCaller-ios.mm in Sources */, 15AE194519AAD35100C27E9E /* CCComAttribute.cpp in Sources */, 15AE18CC19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, 50ABBD5D1925AB0000A911A9 /* Vec3.cpp in Sources */, 50ABC0121926664800A911A9 /* CCGLView.cpp in Sources */, - 50ABC0021926664800A911A9 /* CCLock.cpp in Sources */, + 50ABC0021926664800A911A9 /* CCLock-apple.cpp in Sources */, 50ABBEBC1925AB6F00A911A9 /* ccUtils.cpp in Sources */, 15AE1A4719AAD3D500C27E9E /* b2ChainShape.cpp in Sources */, 50ABBE721925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, - 50ABC0001926664800A911A9 /* CCFileUtilsApple.mm in Sources */, + 50ABC0001926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 50ABBEB81925AB6F00A911A9 /* ccUTF8.cpp in Sources */, 15AE194F19AAD35100C27E9E /* CCDatas.cpp in Sources */, 50ABBE841925AB6F00A911A9 /* ccFPSImages.c in Sources */, @@ -6911,10 +6935,10 @@ 15AE183519AAD2F700C27E9E /* CCObjLoader.cpp in Sources */, 50ABBED01925AB6F00A911A9 /* TGAlib.cpp in Sources */, 1A01C68518F57BE800EFE3A6 /* CCArray.cpp in Sources */, - 503DD8E31926736A00CD74DD /* CCDevice.mm in Sources */, + 503DD8E31926736A00CD74DD /* CCDevice-ios.mm in Sources */, 15AE1AB419AAD40300C27E9E /* b2Contact.cpp in Sources */, 15AE19F719AAD3A700C27E9E /* Animation.cpp in Sources */, - 50ABBEB41925AB6F00A911A9 /* CCUserDefault.mm in Sources */, + 50ABBEB41925AB6F00A911A9 /* CCUserDefault-apple.mm in Sources */, 1A1645B1191B726C008C7C7F /* ConvertUTF.c in Sources */, 50ABBE3A1925AB6F00A911A9 /* CCData.cpp in Sources */, 1A1645B3191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, diff --git a/cocos/2d/CCActionCamera.cpp b/cocos/2d/CCActionCamera.cpp index 820de644e0..2241bbec5b 100644 --- a/cocos/2d/CCActionCamera.cpp +++ b/cocos/2d/CCActionCamera.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "2d/CCActionCamera.h" #include "2d/CCNode.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" NS_CC_BEGIN // diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index e169d00f3a..404416be59 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -26,16 +26,17 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCActionInterval.h" + +#include + #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 +#include "platform/CCStdC.h" NS_CC_BEGIN diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 6fde2fe9b7..ba9301e590 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -29,7 +29,7 @@ #define __MISCNODE_CCCLIPPING_NODE_H__ #include "2d/CCNode.h" -#include "CCGL.h" +#include "platform/CCGL.h" #include "renderer/CCGroupCommand.h" #include "renderer/CCCustomCommand.h" diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index 4d7f7d7924..3094221cc0 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -22,7 +22,6 @@ */ #include "2d/CCDrawNode.h" -#include "CCGL.h" #include "base/CCEventType.h" #include "base/CCConfiguration.h" #include "renderer/CCRenderer.h" @@ -31,6 +30,7 @@ #include "base/CCDirector.h" #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" +#include "platform/CCGL.h" NS_CC_BEGIN diff --git a/cocos/2d/CCDrawingPrimitives.cpp b/cocos/2d/CCDrawingPrimitives.cpp index 456a88a66e..83a2ad90a8 100644 --- a/cocos/2d/CCDrawingPrimitives.cpp +++ b/cocos/2d/CCDrawingPrimitives.cpp @@ -41,12 +41,12 @@ THE SOFTWARE. #include #include -#include "CCGL.h" +#include "2d/CCActionCatmullRom.h" #include "base/CCDirector.h" #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgramCache.h" -#include "2d/CCActionCatmullRom.h" #include "renderer/CCRenderer.h" +#include "platform/CCGL.h" NS_CC_BEGIN #ifndef M_PI diff --git a/cocos/2d/CCFontAtlas.h b/cocos/2d/CCFontAtlas.h index 73eb643ef9..d2a43a2375 100644 --- a/cocos/2d/CCFontAtlas.h +++ b/cocos/2d/CCFontAtlas.h @@ -25,12 +25,13 @@ #ifndef _CCFontAtlas_h_ #define _CCFontAtlas_h_ -#include "base/CCPlatformMacros.h" -#include "base/CCRef.h" -#include "CCStdC.h" // ssize_t on windows #include #include +#include "base/CCPlatformMacros.h" +#include "base/CCRef.h" +#include "platform/CCStdC.h" // ssize_t on windows + NS_CC_BEGIN //fwd diff --git a/cocos/2d/CCGLBufferedNode.h b/cocos/2d/CCGLBufferedNode.h index 4cc28a4721..0fdd30d0fb 100644 --- a/cocos/2d/CCGLBufferedNode.h +++ b/cocos/2d/CCGLBufferedNode.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CC_GL_BUFFERED_NODE__ #define __CC_GL_BUFFERED_NODE__ -#include "CCGL.h" +#include "platform/CCGL.h" class GLBufferedNode { diff --git a/cocos/2d/CCGrabber.h b/cocos/2d/CCGrabber.h index d53918d4bb..f7830225f5 100644 --- a/cocos/2d/CCGrabber.h +++ b/cocos/2d/CCGrabber.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __EFFECTS_CCGRABBER_H__ #include "base/CCRef.h" -#include "CCGL.h" +#include "platform/CCGL.h" NS_CC_BEGIN diff --git a/cocos/2d/CCGrid.cpp b/cocos/2d/CCGrid.cpp index db68c100ce..20fa4a653f 100644 --- a/cocos/2d/CCGrid.cpp +++ b/cocos/2d/CCGrid.cpp @@ -34,7 +34,7 @@ THE SOFTWARE. #include "renderer/ccGLStateCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCTexture2D.h" -#include "CCGL.h" +#include "platform/CCGL.h" NS_CC_BEGIN // implementation of GridBase diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index 811fa3f0e4..7d9141edc6 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -26,9 +26,9 @@ THE SOFTWARE. #include "2d/CCMenu.h" #include "base/CCDirector.h" #include "base/CCTouch.h" -#include "CCStdC.h" #include "base/CCEventListenerTouch.h" #include "base/CCEventDispatcher.h" +#include "platform/CCStdC.h" #include "deprecated/CCString.h" #include diff --git a/cocos/Android.mk b/cocos/Android.mk index 87573c5ce1..b8721b64ab 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -122,7 +122,7 @@ base/CCScheduler.cpp \ base/CCScriptSupport.cpp \ base/CCTouch.cpp \ base/CCUserDefault.cpp \ -base/CCUserDefaultAndroid.cpp \ +base/CCUserDefault-android.cpp \ base/CCValue.cpp \ base/TGAlib.cpp \ base/ZipUtils.cpp \ diff --git a/cocos/base/CCConfiguration.h b/cocos/base/CCConfiguration.h index 2b215695a7..acb9d73ece 100644 --- a/cocos/base/CCConfiguration.h +++ b/cocos/base/CCConfiguration.h @@ -27,11 +27,12 @@ THE SOFTWARE. #ifndef __CCCONFIGURATION_H__ #define __CCCONFIGURATION_H__ -#include "base/CCRef.h" -#include "CCGL.h" -#include "base/CCValue.h" #include +#include "base/CCRef.h" +#include "base/CCValue.h" +#include "platform/CCGL.h" + NS_CC_BEGIN /** diff --git a/cocos/base/CCData.h b/cocos/base/CCData.h index 7532093bae..f442e32a5f 100644 --- a/cocos/base/CCData.h +++ b/cocos/base/CCData.h @@ -29,7 +29,7 @@ #include "base/CCPlatformMacros.h" #include // for ssize_t on android #include // for ssize_t on linux -#include "CCStdC.h" // for ssize_t on window +#include "platform/CCStdC.h" // for ssize_t on window NS_CC_BEGIN diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index e660eb96e7..3c28800afd 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -57,9 +57,8 @@ THE SOFTWARE. #include "base/CCConsole.h" #include "base/CCAutoreleasePool.h" #include "base/CCConfiguration.h" - -#include "CCApplication.h" -#include "CCGLViewImpl.h" +#include "platform/CCApplication.h" +//#include "platform/CCGLViewImpl.h" /** Position of the FPS diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index dc388b451a..8cf5f596ca 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -28,14 +28,14 @@ THE SOFTWARE. #ifndef __CCDIRECTOR_H__ #define __CCDIRECTOR_H__ -#include "base/CCPlatformMacros.h" +#include +#include "base/CCPlatformMacros.h" #include "base/CCRef.h" #include "base/CCVector.h" #include "2d/CCScene.h" -#include "CCGL.h" -#include #include "math/CCMath.h" +#include "platform/CCGL.h" #include "platform/CCGLView.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventDispatcher.h b/cocos/base/CCEventDispatcher.h index 0c43ef1919..5293faebc0 100644 --- a/cocos/base/CCEventDispatcher.h +++ b/cocos/base/CCEventDispatcher.h @@ -34,7 +34,7 @@ #include "base/CCPlatformMacros.h" #include "base/CCEventListener.h" #include "base/CCEvent.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" NS_CC_BEGIN diff --git a/cocos/base/CCPlatformConfig.h b/cocos/base/CCPlatformConfig.h index 12c1735256..204732a6b6 100644 --- a/cocos/base/CCPlatformConfig.h +++ b/cocos/base/CCPlatformConfig.h @@ -27,7 +27,9 @@ THE SOFTWARE. #define __BASE_CC_PLATFORM_CONFIG_H__ /** -Config of cocos2d-x project, per target platform. + Config of cocos2d-x project, per target platform. + + THIS FILE MUST NOT INCLUDE ANY OTHER FILE */ ////////////////////////////////////////////////////////////////////////// diff --git a/cocos/base/CCPlatformMacros.h b/cocos/base/CCPlatformMacros.h index 2e91a5fda2..0511fbfb01 100644 --- a/cocos/base/CCPlatformMacros.h +++ b/cocos/base/CCPlatformMacros.h @@ -30,7 +30,7 @@ Copyright (c) 2013-2014 Chukong Technologies */ #include "base/ccConfig.h" #include "base/CCPlatformConfig.h" -#include "CCPlatformDefine.h" +#include "platform/CCPlatformDefine.h" /** * define a create function for a specific type, such as Layer diff --git a/cocos/base/CCUserDefaultAndroid.cpp b/cocos/base/CCUserDefault-android.cpp similarity index 100% rename from cocos/base/CCUserDefaultAndroid.cpp rename to cocos/base/CCUserDefault-android.cpp diff --git a/cocos/base/CCUserDefault.mm b/cocos/base/CCUserDefault-apple.mm similarity index 100% rename from cocos/base/CCUserDefault.mm rename to cocos/base/CCUserDefault-apple.mm diff --git a/cocos/base/ZipUtils.h b/cocos/base/ZipUtils.h index 9920cd582c..19a56aace1 100644 --- a/cocos/base/ZipUtils.h +++ b/cocos/base/ZipUtils.h @@ -27,14 +27,14 @@ THE SOFTWARE. #include #include "base/CCPlatformConfig.h" -#include "CCPlatformDefine.h" #include "base/CCPlatformMacros.h" +#include "platform/CCPlatformDefine.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "platform/android/CCFileUtilsAndroid.h" +#include "platform/android/CCFileUtils-android.h" #elif(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) // for import ssize_t on win32 platform -#include "CCStdC.h" +#include "platform/CCStdC.h" #endif namespace cocos2d diff --git a/cocos/base/atitc.h b/cocos/base/atitc.h index 1f1ad7a8ef..77fdf1ebb5 100644 --- a/cocos/base/atitc.h +++ b/cocos/base/atitc.h @@ -26,7 +26,7 @@ #ifndef COCOS2DX_PLATFORM_THIRDPARTY_ATITC_ #define COCOS2DX_PLATFORM_THIRDPARTY_ATITC_ -#include "CCStdC.h" +#include "platform/CCStdC.h" enum class ATITCDecodeFlag { diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index cce54e8f83..ae174c680d 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -33,7 +33,7 @@ THE SOFTWARE. #endif #include "base/CCConsole.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" #ifndef CCASSERT #if COCOS2D_DEBUG > 0 diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index 7b2902f749..2d2b448852 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -32,8 +32,8 @@ THE SOFTWARE. #include "math/CCGeometry.h" #include "math/CCMath.h" -#include "CCGL.h" -#include "CCRef.h" +#include "base/CCRef.h" +#include "platform/CCGL.h" NS_CC_BEGIN diff --git a/cocos/base/s3tc.h b/cocos/base/s3tc.h index e6573d9849..1c3638e353 100644 --- a/cocos/base/s3tc.h +++ b/cocos/base/s3tc.h @@ -26,7 +26,7 @@ #ifndef COCOS2DX_PLATFORM_THIRDPARTY_S3TC_ #define COCOS2DX_PLATFORM_THIRDPARTY_S3TC_ -#include "CCStdC.h" +#include "platform/CCStdC.h" enum class S3TCDecodeFlag { diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index dd6fbb70a2..01893a48a6 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -179,17 +179,17 @@ THE SOFTWARE. #include "base/CCPlatformMacros.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - #include "platform/ios/CCApplication.h" - #include "platform/ios/CCGLViewImpl.h" - #include "platform/ios/CCGL.h" - #include "platform/ios/CCStdC.h" + #include "platform/ios/CCApplication-ios.h" + #include "platform/ios/CCGLViewImpl-ios.h" + #include "platform/ios/CCGL-ios.h" + #include "platform/ios/CCStdC-ios.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - #include "platform/android/CCApplication.h" - #include "platform/android/CCGLViewImpl.h" - #include "platform/android/CCGL.h" - #include "platform/android/CCStdC.h" + #include "platform/android/CCApplication-android.h" + #include "platform/android/CCGLViewImpl-android.h" + #include "platform/android/CCGL-android.h" + #include "platform/android/CCStdC-android.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) @@ -200,24 +200,24 @@ THE SOFTWARE. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - #include "platform/win32/CCApplication.h" - #include "platform/desktop/CCGLViewImpl.h" - #include "platform/win32/CCGL.h" - #include "platform/win32/CCStdC.h" + #include "platform/win32/CCApplication-win32.h" + #include "platform/desktop/CCGLViewImpl-win32.h" + #include "platform/win32/CCGL-win32.h" + #include "platform/win32/CCStdC-win32.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - #include "platform/mac/CCApplication.h" - #include "platform/desktop/CCGLViewImpl.h" - #include "platform/mac/CCGL.h" - #include "platform/mac/CCStdC.h" + #include "platform/desktop/CCGLViewImpl-desktop.h" + #include "platform/mac/CCApplication-mac.h" + #include "platform/mac/CCGL-mac.h" + #include "platform/mac/CCStdC-mac.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC #if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - #include "platform/linux/CCApplication.h" - #include "platform/desktop/CCGLViewImpl.h" - #include "platform/linux/CCGL.h" - #include "platform/linux/CCStdC.h" + #include "platform/linux/CCApplication-linux.h" + #include "platform/desktop/CCGLViewImpl-desktop.h" + #include "platform/linux/CCGL-linux.h" + #include "platform/linux/CCStdC-linux.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) @@ -230,7 +230,7 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "platform/winrt/CCApplication.h" - #include "platform/wp8/CCGLViewImpl.h" + #include "platform/wp8/CCGLViewImpl-wp8.h" #include "platform/winrt/CCGL.h" #include "platform/winrt/CCStdC.h" #include "platform/winrt/CCPrecompiledShaders.h" diff --git a/cocos/editor-support/cocostudio/CCActionFrameEasing.cpp b/cocos/editor-support/cocostudio/CCActionFrameEasing.cpp index 43e43dbc4e..92d56854ca 100644 --- a/cocos/editor-support/cocostudio/CCActionFrameEasing.cpp +++ b/cocos/editor-support/cocostudio/CCActionFrameEasing.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include #include "cocostudio/CCActionFrameEasing.h" #include "cocostudio/DictionaryHelper.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" namespace cocostudio { diff --git a/cocos/math/TransformUtils.h b/cocos/math/TransformUtils.h index eea629af11..67556359f3 100644 --- a/cocos/math/TransformUtils.h +++ b/cocos/math/TransformUtils.h @@ -28,7 +28,7 @@ THE SOFTWARE. #define __SUPPORT_TRANSFORM_UTILS_H__ // TODO: when in MAC or windows, it includes -#include "CCGL.h" +#include "platform/CCGL.h" #include "base/ccMacros.h" namespace cocos2d { diff --git a/cocos/network/WebSocket.h b/cocos/network/WebSocket.h index 5548ca50fa..3c2f3e1e65 100644 --- a/cocos/network/WebSocket.h +++ b/cocos/network/WebSocket.h @@ -30,11 +30,12 @@ #ifndef __CC_WEBSOCKET_H__ #define __CC_WEBSOCKET_H__ -#include "base/CCPlatformMacros.h" -#include "CCStdC.h" #include #include +#include "base/CCPlatformMacros.h" +#include "platform/CCStdC.h" + struct libwebsocket; struct libwebsocket_context; struct libwebsocket_protocols; diff --git a/cocos/platform/CCApplication.h b/cocos/platform/CCApplication.h new file mode 100644 index 0000000000..13049cb7c6 --- /dev/null +++ b/cocos/platform/CCApplication.h @@ -0,0 +1,45 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. +****************************************************************************/ + +#ifndef __PLATFORM_CCAPPLICATION_H__ +#define __PLATFORM_CCAPPLICATION_H__ + +#include "base/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC +#include "platform/mac/CCApplication-mac.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#include "platform/ios/CCApplication-ios.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID +#include "platform/android/CCApplication-android.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#include "platform/win32/CCApplication-win32.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#include "platform/winrt/CCApplication.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX +#include "platform/linux/CCApplication-linux.h" +#endif + +#endif /* __PLATFORM_CCAPPLICATION_H__*/ diff --git a/cocos/platform/CCGL.h b/cocos/platform/CCGL.h new file mode 100644 index 0000000000..348a0c5542 --- /dev/null +++ b/cocos/platform/CCGL.h @@ -0,0 +1,45 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. +****************************************************************************/ + +#ifndef __PLATFORM_CCGL_H__ +#define __PLATFORM_CCGL_H__ + +#include "base/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC +#include "platform/mac/CCGL-mac.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#include "platform/ios/CCGL-ios.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID +#include "platform/android/CCGL-android.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#include "platform/win32/CCGL-win32.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#include "platform/winrt/CCGL.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX +#include "platform/linux/CCGL-linux.h" +#endif + +#endif /* __PLATFORM_CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index d022327fc1..8de876aa2e 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -85,7 +85,7 @@ extern "C" #include "base/ccUtils.h" #include "base/ZipUtils.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "android/CCFileUtilsAndroid.h" +#include "android/CCFileUtils-android.h" #endif #define CC_GL_ATC_RGB_AMD 0x8C92 diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h new file mode 100644 index 0000000000..28a5df3217 --- /dev/null +++ b/cocos/platform/CCPlatformDefine.h @@ -0,0 +1,45 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. +****************************************************************************/ + +#ifndef __PLATFORM_CCPLATFORMDEFINE_H__ +#define __PLATFORM_CCPLATFORMDEFINE_H__ + +#include "base/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC +#include "platform/mac/CCPlatformDefine-mac.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#include "platform/ios/CCPlatformDefine-ios.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID +#include "platform/android/CCPlatformDefine-android.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#include "platform/win32/CCPlatformDefine-win32.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#include "platform/wp8/CCPlatformDefine-wp8.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX +#include "platform/linux/CCPlatformDefine-linux.h" +#endif + +#endif /* __PLATFORM_CCPLATFORMDEFINE_H__*/ diff --git a/cocos/platform/CCStdC.h b/cocos/platform/CCStdC.h new file mode 100644 index 0000000000..a7e258856b --- /dev/null +++ b/cocos/platform/CCStdC.h @@ -0,0 +1,45 @@ +/**************************************************************************** +Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2013-2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. +****************************************************************************/ + +#ifndef __PLATFORM_CCSTDC_H__ +#define __PLATFORM_CCSTDC_H__ + +#include "base/CCPlatformConfig.h" + +#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC +#include "platform/mac/CCStdC-mac.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#include "platform/ios/CCStdC-ios.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID +#include "platform/android/CCStdC-android.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#include "platform/win32/CCStdC-win32.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 +#include "platform/winrt/CCStdC.h" +#elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX +#include "platform/linux/CCStdC-linux.h" +#endif + +#endif /* __PLATFORM_CCSTDC_H__*/ diff --git a/cocos/platform/android/Android.mk b/cocos/platform/android/Android.mk index bfc2e61672..415449727e 100644 --- a/cocos/platform/android/Android.mk +++ b/cocos/platform/android/Android.mk @@ -7,12 +7,12 @@ LOCAL_MODULE := cocos2dxandroid_static LOCAL_MODULE_FILENAME := libcocos2dandroid LOCAL_SRC_FILES := \ -CCApplication.cpp \ -CCCommon.cpp \ -CCDevice.cpp \ -CCGLViewImpl.cpp \ -CCFileUtilsAndroid.cpp \ -javaactivity.cpp \ +CCApplication-android.cpp \ +CCCommon-android.cpp \ +CCDevice-android.cpp \ +CCGLViewImpl-android.cpp \ +CCFileUtils-android.cpp \ +javaactivity-android.cpp \ jni/DPIJni.cpp \ jni/IMEJni.cpp \ jni/Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp \ diff --git a/cocos/platform/android/CCApplication.cpp b/cocos/platform/android/CCApplication-android.cpp similarity index 100% rename from cocos/platform/android/CCApplication.cpp rename to cocos/platform/android/CCApplication-android.cpp diff --git a/cocos/platform/android/CCApplication.h b/cocos/platform/android/CCApplication-android.h similarity index 100% rename from cocos/platform/android/CCApplication.h rename to cocos/platform/android/CCApplication-android.h diff --git a/cocos/platform/android/CCCommon.cpp b/cocos/platform/android/CCCommon-android.cpp similarity index 100% rename from cocos/platform/android/CCCommon.cpp rename to cocos/platform/android/CCCommon-android.cpp diff --git a/cocos/platform/android/CCDevice.cpp b/cocos/platform/android/CCDevice-android.cpp similarity index 100% rename from cocos/platform/android/CCDevice.cpp rename to cocos/platform/android/CCDevice-android.cpp diff --git a/cocos/platform/android/CCFileUtilsAndroid.cpp b/cocos/platform/android/CCFileUtils-android.cpp similarity index 99% rename from cocos/platform/android/CCFileUtilsAndroid.cpp rename to cocos/platform/android/CCFileUtils-android.cpp index e4ff00dec6..04ef3e58a9 100644 --- a/cocos/platform/android/CCFileUtilsAndroid.cpp +++ b/cocos/platform/android/CCFileUtils-android.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "CCFileUtilsAndroid.h" +#include "CCFileUtils-android.h" #include "platform/CCCommon.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" #include "android/asset_manager.h" @@ -34,7 +34,7 @@ THE SOFTWARE. #include -#define LOG_TAG "CCFileUtilsAndroid.cpp" +#define LOG_TAG "CCFileUtils-android.cpp" #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) using namespace std; diff --git a/cocos/platform/android/CCFileUtilsAndroid.h b/cocos/platform/android/CCFileUtils-android.h similarity index 100% rename from cocos/platform/android/CCFileUtilsAndroid.h rename to cocos/platform/android/CCFileUtils-android.h diff --git a/cocos/platform/android/CCGL.h b/cocos/platform/android/CCGL-android.h similarity index 100% rename from cocos/platform/android/CCGL.h rename to cocos/platform/android/CCGL-android.h diff --git a/cocos/platform/android/CCGLViewImpl.cpp b/cocos/platform/android/CCGLViewImpl-android.cpp similarity index 99% rename from cocos/platform/android/CCGLViewImpl.cpp rename to cocos/platform/android/CCGLViewImpl-android.cpp index 8431dcdcab..565bbe920a 100644 --- a/cocos/platform/android/CCGLViewImpl.cpp +++ b/cocos/platform/android/CCGLViewImpl-android.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "CCGLViewImpl.h" +#include "CCGLViewImpl-android.h" #include "base/CCDirector.h" #include "base/ccMacros.h" #include "jni/IMEJni.h" diff --git a/cocos/platform/android/CCGLViewImpl.h b/cocos/platform/android/CCGLViewImpl-android.h similarity index 100% rename from cocos/platform/android/CCGLViewImpl.h rename to cocos/platform/android/CCGLViewImpl-android.h diff --git a/cocos/platform/android/CCPlatformDefine.h b/cocos/platform/android/CCPlatformDefine-android.h similarity index 100% rename from cocos/platform/android/CCPlatformDefine.h rename to cocos/platform/android/CCPlatformDefine-android.h diff --git a/cocos/platform/android/CCStdC.h b/cocos/platform/android/CCStdC-android.h similarity index 100% rename from cocos/platform/android/CCStdC.h rename to cocos/platform/android/CCStdC-android.h diff --git a/cocos/platform/android/java/project.properties b/cocos/platform/android/java/project.properties index 88ca83f9d0..6cd1f6a8ff 100644 --- a/cocos/platform/android/java/project.properties +++ b/cocos/platform/android/java/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-10 +target=android-20 diff --git a/cocos/platform/android/javaactivity.cpp b/cocos/platform/android/javaactivity-android.cpp similarity index 98% rename from cocos/platform/android/javaactivity.cpp rename to cocos/platform/android/javaactivity-android.cpp index 74a26aed0c..e8542347d1 100644 --- a/cocos/platform/android/javaactivity.cpp +++ b/cocos/platform/android/javaactivity-android.cpp @@ -25,7 +25,8 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "CCApplication.h" +#include "CCApplication-android.h" +#include "CCGLViewImpl-android.h" #include "base/CCDirector.h" #include "base/CCEventCustom.h" #include "base/CCEventType.h" @@ -34,7 +35,6 @@ THE SOFTWARE. #include "renderer/CCTextureCache.h" #include "renderer/ccGLStateCache.h" #include "2d/CCDrawingPrimitives.h" -#include "CCGLViewImpl.h" #include "platform/android/jni/JniHelper.h" #include #include diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp index ef9fac20a4..b7b25a937d 100644 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp +++ b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include #include #include "JniHelper.h" -#include "CCFileUtilsAndroid.h" +#include "CCFileUtils-android.h" #include "android/asset_manager_jni.h" #include "deprecated/CCString.h" #include "Java_org_cocos2dx_lib_Cocos2dxHelper.h" diff --git a/cocos/platform/android/jni/TouchesJni.cpp b/cocos/platform/android/jni/TouchesJni.cpp index 69b759aabb..aaeaf89fc2 100644 --- a/cocos/platform/android/jni/TouchesJni.cpp +++ b/cocos/platform/android/jni/TouchesJni.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/CCEventKeyboard.h" #include "base/CCEventDispatcher.h" -#include "CCGLViewImpl.h" +#include "platform/android/CCGLViewImpl-android.h" #include #include diff --git a/cocos/platform/apple/CCFileUtilsApple.h b/cocos/platform/apple/CCFileUtils-apple.h similarity index 100% rename from cocos/platform/apple/CCFileUtilsApple.h rename to cocos/platform/apple/CCFileUtils-apple.h diff --git a/cocos/platform/apple/CCFileUtilsApple.mm b/cocos/platform/apple/CCFileUtils-apple.mm similarity index 99% rename from cocos/platform/apple/CCFileUtilsApple.mm rename to cocos/platform/apple/CCFileUtils-apple.mm index b70a53bafe..ae81af2b7e 100644 --- a/cocos/platform/apple/CCFileUtilsApple.mm +++ b/cocos/platform/apple/CCFileUtils-apple.mm @@ -25,7 +25,7 @@ THE SOFTWARE. ****************************************************************************/ #import -#include "CCFileUtilsApple.h" +#include "CCFileUtils-apple.h" #include #include diff --git a/cocos/platform/apple/CCLock.cpp b/cocos/platform/apple/CCLock-apple.cpp similarity index 98% rename from cocos/platform/apple/CCLock.cpp rename to cocos/platform/apple/CCLock-apple.cpp index 0a6f29bfe5..4ac0698964 100644 --- a/cocos/platform/apple/CCLock.cpp +++ b/cocos/platform/apple/CCLock-apple.cpp @@ -22,7 +22,8 @@ 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 "CCLock.h" + +#include "CCLock-apple.h" NS_CC_BEGIN diff --git a/cocos/platform/apple/CCLock.h b/cocos/platform/apple/CCLock-apple.h similarity index 100% rename from cocos/platform/apple/CCLock.h rename to cocos/platform/apple/CCLock-apple.h diff --git a/cocos/platform/apple/CCThread.mm b/cocos/platform/apple/CCThread-apple.mm similarity index 100% rename from cocos/platform/apple/CCThread.mm rename to cocos/platform/apple/CCThread-apple.mm diff --git a/cocos/platform/desktop/CCGLViewImpl.cpp b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp similarity index 99% rename from cocos/platform/desktop/CCGLViewImpl.cpp rename to cocos/platform/desktop/CCGLViewImpl-desktop.cpp index 90d1767062..94dd7beedc 100644 --- a/cocos/platform/desktop/CCGLViewImpl.cpp +++ b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp @@ -23,8 +23,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCGLViewImpl.h" -#include "CCApplication.h" +#include "CCGLViewImpl-desktop.h" + +#include + +#include "platform/CCApplication.h" #include "base/CCDirector.h" #include "base/CCTouch.h" #include "base/CCEventDispatcher.h" @@ -34,7 +37,6 @@ THE SOFTWARE. #include "base/ccUtils.h" #include "base/ccUTF8.h" -#include NS_CC_BEGIN diff --git a/cocos/platform/desktop/CCGLViewImpl.h b/cocos/platform/desktop/CCGLViewImpl-desktop.h similarity index 100% rename from cocos/platform/desktop/CCGLViewImpl.h rename to cocos/platform/desktop/CCGLViewImpl-desktop.h diff --git a/cocos/platform/ios/CCApplication.h b/cocos/platform/ios/CCApplication-ios.h similarity index 100% rename from cocos/platform/ios/CCApplication.h rename to cocos/platform/ios/CCApplication-ios.h diff --git a/cocos/platform/ios/CCApplication.mm b/cocos/platform/ios/CCApplication-ios.mm similarity index 98% rename from cocos/platform/ios/CCApplication.mm rename to cocos/platform/ios/CCApplication-ios.mm index 374037b1b8..cbacf107e9 100644 --- a/cocos/platform/ios/CCApplication.mm +++ b/cocos/platform/ios/CCApplication-ios.mm @@ -29,8 +29,8 @@ #import -#import "CCGeometry.h" -#import "CCDirectorCaller.h" +#import "math/CCGeometry.h" +#import "CCDirectorCaller-ios.h" NS_CC_BEGIN diff --git a/cocos/platform/ios/CCCommon.mm b/cocos/platform/ios/CCCommon-ios.mm similarity index 100% rename from cocos/platform/ios/CCCommon.mm rename to cocos/platform/ios/CCCommon-ios.mm diff --git a/cocos/platform/ios/CCDevice.mm b/cocos/platform/ios/CCDevice-ios.mm similarity index 100% rename from cocos/platform/ios/CCDevice.mm rename to cocos/platform/ios/CCDevice-ios.mm diff --git a/cocos/platform/ios/CCDirectorCaller.h b/cocos/platform/ios/CCDirectorCaller-ios.h similarity index 100% rename from cocos/platform/ios/CCDirectorCaller.h rename to cocos/platform/ios/CCDirectorCaller-ios.h diff --git a/cocos/platform/ios/CCDirectorCaller.mm b/cocos/platform/ios/CCDirectorCaller-ios.mm similarity index 97% rename from cocos/platform/ios/CCDirectorCaller.mm rename to cocos/platform/ios/CCDirectorCaller-ios.mm index 3250816d26..386d1f1ff4 100644 --- a/cocos/platform/ios/CCDirectorCaller.mm +++ b/cocos/platform/ios/CCDirectorCaller-ios.mm @@ -26,11 +26,13 @@ #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#import "CCDirectorCaller-ios.h" + #import #import -#import "CCDirectorCaller.h" -#import "CCDirector.h" -#import "CCEAGLView.h" + +#import "base/CCDirector.h" +#import "CCEAGLView-ios.h" static id s_sharedDirectorCaller; diff --git a/cocos/platform/ios/CCEAGLView.h b/cocos/platform/ios/CCEAGLView-ios.h similarity index 99% rename from cocos/platform/ios/CCEAGLView.h rename to cocos/platform/ios/CCEAGLView-ios.h index 92c22a7371..ed5a690a98 100644 --- a/cocos/platform/ios/CCEAGLView.h +++ b/cocos/platform/ios/CCEAGLView-ios.h @@ -71,7 +71,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. #import #import -#import "CCESRenderer.h" +#import "CCESRenderer-ios.h" //CLASS INTERFACE: diff --git a/cocos/platform/ios/CCEAGLView.mm b/cocos/platform/ios/CCEAGLView-ios.mm similarity index 99% rename from cocos/platform/ios/CCEAGLView.mm rename to cocos/platform/ios/CCEAGLView-ios.mm index 87a02a566c..947e24838d 100644 --- a/cocos/platform/ios/CCEAGLView.mm +++ b/cocos/platform/ios/CCEAGLView-ios.mm @@ -64,15 +64,18 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#import "CCEAGLView-ios.h" + #import -#import "CCGLViewImpl.h" -#import "CCEAGLView.h" -#import "CCES2Renderer.h" -#import "CCDirector.h" -#import "CCSet.h" -#import "CCTouch.h" -#import "CCIMEDispatcher.h" -#import "OpenGL_Internal.h" + +#import "base/CCDirector.h" +#import "deprecated/CCSet.h" +#import "base/CCTouch.h" +#import "base/CCIMEDispatcher.h" +#import "CCGLViewImpl-ios.h" +#import "CCES2Renderer-ios.h" +#import "OpenGL_Internal-ios.h" + //CLASS IMPLEMENTATIONS: #define IOS_MAX_TOUCHES_COUNT 10 diff --git a/cocos/platform/ios/CCES2Renderer.h b/cocos/platform/ios/CCES2Renderer-ios.h similarity index 98% rename from cocos/platform/ios/CCES2Renderer.h rename to cocos/platform/ios/CCES2Renderer-ios.h index ca4751397d..66d9127af3 100644 --- a/cocos/platform/ios/CCES2Renderer.h +++ b/cocos/platform/ios/CCES2Renderer-ios.h @@ -31,11 +31,13 @@ #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#import "CCPlatformMacros.h" -#import "CCESRenderer.h" +#import "CCESRenderer-ios.h" + #import #import +#import "CCPlatformMacros.h" + @interface CCES2Renderer : NSObject { // The pixel dimensions of the CAEAGLLayer diff --git a/cocos/platform/ios/CCES2Renderer.m b/cocos/platform/ios/CCES2Renderer-ios.m similarity index 98% rename from cocos/platform/ios/CCES2Renderer.m rename to cocos/platform/ios/CCES2Renderer-ios.m index 4c687c2d38..c3c64cddb2 100644 --- a/cocos/platform/ios/CCES2Renderer.m +++ b/cocos/platform/ios/CCES2Renderer-ios.m @@ -28,12 +28,13 @@ // Only compile this code on iOS. These files should NOT be included on your Mac project. // But in case they are included, it won't be compiled. -#import "CCES2Renderer.h" +#include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#import "CCPlatformMacros.h" -#import "OpenGL_Internal.h" +#import "CCES2Renderer-ios.h" +#import "base/CCPlatformMacros.h" +#import "OpenGL_Internal-ios.h" #if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 #define NSLog(...) do {} while (0) diff --git a/cocos/platform/ios/CCESRenderer.h b/cocos/platform/ios/CCESRenderer-ios.h similarity index 100% rename from cocos/platform/ios/CCESRenderer.h rename to cocos/platform/ios/CCESRenderer-ios.h diff --git a/cocos/platform/ios/CCGL.h b/cocos/platform/ios/CCGL-ios.h similarity index 100% rename from cocos/platform/ios/CCGL.h rename to cocos/platform/ios/CCGL-ios.h diff --git a/cocos/platform/ios/CCGLViewImpl.h b/cocos/platform/ios/CCGLViewImpl-ios.h similarity index 100% rename from cocos/platform/ios/CCGLViewImpl.h rename to cocos/platform/ios/CCGLViewImpl-ios.h diff --git a/cocos/platform/ios/CCGLViewImpl.mm b/cocos/platform/ios/CCGLViewImpl-ios.mm similarity index 98% rename from cocos/platform/ios/CCGLViewImpl.mm rename to cocos/platform/ios/CCGLViewImpl-ios.mm index 15522de773..b0bb0ed2c2 100644 --- a/cocos/platform/ios/CCGLViewImpl.mm +++ b/cocos/platform/ios/CCGLViewImpl-ios.mm @@ -28,9 +28,9 @@ #import -#include "CCEAGLView.h" -#include "CCDirectorCaller.h" -#include "CCGLViewImpl.h" +#include "CCEAGLView-ios.h" +#include "CCDirectorCaller-ios.h" +#include "CCGLViewImpl-ios.h" #include "CCSet.h" #include "base/CCTouch.h" diff --git a/cocos/platform/ios/CCImage.mm b/cocos/platform/ios/CCImage-ios.mm similarity index 100% rename from cocos/platform/ios/CCImage.mm rename to cocos/platform/ios/CCImage-ios.mm diff --git a/cocos/platform/ios/CCPlatformDefine.h b/cocos/platform/ios/CCPlatformDefine-ios.h similarity index 100% rename from cocos/platform/ios/CCPlatformDefine.h rename to cocos/platform/ios/CCPlatformDefine-ios.h diff --git a/cocos/platform/ios/CCStdC.h b/cocos/platform/ios/CCStdC-ios.h similarity index 100% rename from cocos/platform/ios/CCStdC.h rename to cocos/platform/ios/CCStdC-ios.h diff --git a/cocos/platform/ios/OpenGL_Internal.h b/cocos/platform/ios/OpenGL_Internal-ios.h similarity index 100% rename from cocos/platform/ios/OpenGL_Internal.h rename to cocos/platform/ios/OpenGL_Internal-ios.h diff --git a/cocos/platform/linux/CCApplication.cpp b/cocos/platform/linux/CCApplication-linux.cpp similarity index 100% rename from cocos/platform/linux/CCApplication.cpp rename to cocos/platform/linux/CCApplication-linux.cpp diff --git a/cocos/platform/linux/CCApplication.h b/cocos/platform/linux/CCApplication-linux.h similarity index 100% rename from cocos/platform/linux/CCApplication.h rename to cocos/platform/linux/CCApplication-linux.h diff --git a/cocos/platform/linux/CCCommon.cpp b/cocos/platform/linux/CCCommon-linux.cpp similarity index 100% rename from cocos/platform/linux/CCCommon.cpp rename to cocos/platform/linux/CCCommon-linux.cpp diff --git a/cocos/platform/linux/CCDevice.cpp b/cocos/platform/linux/CCDevice-linux.cpp similarity index 100% rename from cocos/platform/linux/CCDevice.cpp rename to cocos/platform/linux/CCDevice-linux.cpp diff --git a/cocos/platform/linux/CCFileUtilsLinux.cpp b/cocos/platform/linux/CCFileUtils-linux.cpp similarity index 100% rename from cocos/platform/linux/CCFileUtilsLinux.cpp rename to cocos/platform/linux/CCFileUtils-linux.cpp diff --git a/cocos/platform/linux/CCFileUtilsLinux.h b/cocos/platform/linux/CCFileUtils-linux.h similarity index 100% rename from cocos/platform/linux/CCFileUtilsLinux.h rename to cocos/platform/linux/CCFileUtils-linux.h diff --git a/cocos/platform/linux/CCGL.h b/cocos/platform/linux/CCGL-linux.h similarity index 100% rename from cocos/platform/linux/CCGL.h rename to cocos/platform/linux/CCGL-linux.h diff --git a/cocos/platform/linux/CCPlatformDefine.h b/cocos/platform/linux/CCPlatformDefine-linux.h similarity index 100% rename from cocos/platform/linux/CCPlatformDefine.h rename to cocos/platform/linux/CCPlatformDefine-linux.h diff --git a/cocos/platform/linux/CCStdC.cpp b/cocos/platform/linux/CCStdC-linux.cpp similarity index 100% rename from cocos/platform/linux/CCStdC.cpp rename to cocos/platform/linux/CCStdC-linux.cpp diff --git a/cocos/platform/linux/CCStdC.h b/cocos/platform/linux/CCStdC-linux.h similarity index 100% rename from cocos/platform/linux/CCStdC.h rename to cocos/platform/linux/CCStdC-linux.h diff --git a/cocos/platform/mac/CCApplication.h b/cocos/platform/mac/CCApplication-mac.h similarity index 100% rename from cocos/platform/mac/CCApplication.h rename to cocos/platform/mac/CCApplication-mac.h diff --git a/cocos/platform/mac/CCApplication.mm b/cocos/platform/mac/CCApplication-mac.mm similarity index 100% rename from cocos/platform/mac/CCApplication.mm rename to cocos/platform/mac/CCApplication-mac.mm diff --git a/cocos/platform/mac/CCCommon.mm b/cocos/platform/mac/CCCommon-mac.mm similarity index 100% rename from cocos/platform/mac/CCCommon.mm rename to cocos/platform/mac/CCCommon-mac.mm diff --git a/cocos/platform/mac/CCDevice.mm b/cocos/platform/mac/CCDevice-mac.mm similarity index 100% rename from cocos/platform/mac/CCDevice.mm rename to cocos/platform/mac/CCDevice-mac.mm diff --git a/cocos/platform/mac/CCGL.h b/cocos/platform/mac/CCGL-mac.h similarity index 100% rename from cocos/platform/mac/CCGL.h rename to cocos/platform/mac/CCGL-mac.h diff --git a/cocos/platform/mac/CCPlatformDefine.h b/cocos/platform/mac/CCPlatformDefine-mac.h similarity index 100% rename from cocos/platform/mac/CCPlatformDefine.h rename to cocos/platform/mac/CCPlatformDefine-mac.h diff --git a/cocos/platform/mac/CCStdC.h b/cocos/platform/mac/CCStdC-mac.h similarity index 100% rename from cocos/platform/mac/CCStdC.h rename to cocos/platform/mac/CCStdC-mac.h diff --git a/cocos/platform/win32/CCApplication.cpp b/cocos/platform/win32/CCApplication-win32.cpp similarity index 100% rename from cocos/platform/win32/CCApplication.cpp rename to cocos/platform/win32/CCApplication-win32.cpp diff --git a/cocos/platform/win32/CCApplication.h b/cocos/platform/win32/CCApplication-win32.h similarity index 100% rename from cocos/platform/win32/CCApplication.h rename to cocos/platform/win32/CCApplication-win32.h diff --git a/cocos/platform/win32/CCCommon.cpp b/cocos/platform/win32/CCCommon-win32.cpp similarity index 100% rename from cocos/platform/win32/CCCommon.cpp rename to cocos/platform/win32/CCCommon-win32.cpp diff --git a/cocos/platform/win32/CCDevice.cpp b/cocos/platform/win32/CCDevice-win32.cpp similarity index 100% rename from cocos/platform/win32/CCDevice.cpp rename to cocos/platform/win32/CCDevice-win32.cpp diff --git a/cocos/platform/win32/CCFileUtilsWin32.cpp b/cocos/platform/win32/CCFileUtils-win32.cpp similarity index 100% rename from cocos/platform/win32/CCFileUtilsWin32.cpp rename to cocos/platform/win32/CCFileUtils-win32.cpp diff --git a/cocos/platform/win32/CCFileUtilsWin32.h b/cocos/platform/win32/CCFileUtils-win32.h similarity index 100% rename from cocos/platform/win32/CCFileUtilsWin32.h rename to cocos/platform/win32/CCFileUtils-win32.h diff --git a/cocos/platform/win32/CCGL.h b/cocos/platform/win32/CCGL-win32.h similarity index 100% rename from cocos/platform/win32/CCGL.h rename to cocos/platform/win32/CCGL-win32.h diff --git a/cocos/platform/win32/CCPlatformDefine.h b/cocos/platform/win32/CCPlatformDefine-win32.h similarity index 100% rename from cocos/platform/win32/CCPlatformDefine.h rename to cocos/platform/win32/CCPlatformDefine-win32.h diff --git a/cocos/platform/win32/CCStdC.cpp b/cocos/platform/win32/CCStdC-win32.cpp similarity index 100% rename from cocos/platform/win32/CCStdC.cpp rename to cocos/platform/win32/CCStdC-win32.cpp diff --git a/cocos/platform/win32/CCStdC.h b/cocos/platform/win32/CCStdC-win32.h similarity index 100% rename from cocos/platform/win32/CCStdC.h rename to cocos/platform/win32/CCStdC-win32.h diff --git a/cocos/platform/wp8/CCGLViewImpl.cpp b/cocos/platform/wp8/CCGLViewImpl-wp8.cpp similarity index 100% rename from cocos/platform/wp8/CCGLViewImpl.cpp rename to cocos/platform/wp8/CCGLViewImpl-wp8.cpp diff --git a/cocos/platform/wp8/CCGLViewImpl.h b/cocos/platform/wp8/CCGLViewImpl-wp8.h similarity index 100% rename from cocos/platform/wp8/CCGLViewImpl.h rename to cocos/platform/wp8/CCGLViewImpl-wp8.h diff --git a/cocos/renderer/CCGLProgram.h b/cocos/renderer/CCGLProgram.h index d73519562f..3d31d6f077 100644 --- a/cocos/renderer/CCGLProgram.h +++ b/cocos/renderer/CCGLProgram.h @@ -35,7 +35,7 @@ THE SOFTWARE. #include "base/ccMacros.h" #include "base/CCRef.h" #include "base/ccTypes.h" -#include "CCGL.h" +#include "platform/CCGL.h" #include "math/CCMath.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index 35da31e076..db7d74651c 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -32,7 +32,7 @@ #include "base/CCPlatformMacros.h" #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgram.h" -#include "CCGL.h" +#include "platform/CCGL.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index 1857c24d43..b0e0d182e9 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -33,7 +33,7 @@ THE SOFTWARE. #include "renderer/CCTexture2D.h" -#include "CCGL.h" +#include "platform/CCGL.h" #include "platform/CCImage.h" #include "base/ccUtils.h" #include "platform/CCDevice.h" diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index c62cdb164f..4893a11e0a 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -40,7 +40,7 @@ THE SOFTWARE. #include "renderer/ccGLStateCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCTexture2D.h" -#include "CCGL.h" +#include "platform/CCGL.h" #include "deprecated/CCString.h" diff --git a/cocos/renderer/CCVertexIndexBuffer.h b/cocos/renderer/CCVertexIndexBuffer.h index 6454c17cd1..1eaffe76f3 100644 --- a/cocos/renderer/CCVertexIndexBuffer.h +++ b/cocos/renderer/CCVertexIndexBuffer.h @@ -27,7 +27,7 @@ #include #include "base/CCRef.h" -#include "CCGL.h" +#include "platform/CCGL.h" NS_CC_BEGIN diff --git a/cocos/renderer/ccGLStateCache.h b/cocos/renderer/ccGLStateCache.h index 8428cc77ff..bb77f763a9 100644 --- a/cocos/renderer/ccGLStateCache.h +++ b/cocos/renderer/ccGLStateCache.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include -#include "CCGL.h" +#include "platform/CCGL.h" #include "base/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/renderer/ccShaders.h b/cocos/renderer/ccShaders.h index fd619bf31f..be82d4e12f 100644 --- a/cocos/renderer/ccShaders.h +++ b/cocos/renderer/ccShaders.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCSHADER_H__ #define __CCSHADER_H__ -#include "CCGL.h" +#include "platform/CCGL.h" #include "base/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index a76af6d91a..3969bd138f 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -28,13 +28,13 @@ UIRichText.cpp \ UIHBox.cpp \ UIVBox.cpp \ UIRelativeBox.cpp \ -UIVideoPlayerAndroid.cpp \ +UIVideoPlayer-android.cpp \ UIDeprecated.cpp \ UIScale9Sprite.cpp \ UIWebView.cpp \ -UIWebViewImpl_android.cpp \ +UIWebViewImpl-android.cpp \ UIEditBox/UIEditBox.cpp \ -UIEditBox/UIEditBoxImplAndroid.cpp \ +UIEditBox/UIEditBoxImpl-android.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ diff --git a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-android.cpp similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp rename to cocos/ui/UIEditBox/UIEditBoxImpl-android.cpp index 338b8defd3..864feaa7de 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-android.cpp @@ -23,14 +23,15 @@ THE SOFTWARE. ****************************************************************************/ -#include "UIEditBoxImplAndroid.h" +#include "UIEditBoxImpl-android.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "UIEditBox.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" - +#include "2d/CCLabel.h" +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h b/cocos/ui/UIEditBox/UIEditBoxImpl-android.h similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplAndroid.h rename to cocos/ui/UIEditBox/UIEditBoxImpl-android.h index a4adb68944..11a2a0b7e9 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-android.h @@ -34,6 +34,8 @@ NS_CC_BEGIN +class Label; + namespace ui { class EditBox; diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.h b/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h similarity index 100% rename from cocos/ui/UIEditBox/UIEditBoxImplIOS.h rename to cocos/ui/UIEditBox/UIEditBoxImpl-ios.h diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm b/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplIOS.mm rename to cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm index a2456ed125..da5a1b0c45 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm @@ -22,14 +22,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "UIEditBoxImplIOS.h" +#include "UIEditBoxImpl-ios.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #define kLabelZOrder 9999 #include "UIEditBox.h" -#import "CCEAGLView.h" +#import "platform/ios/CCEAGLView-ios.h" #define getEditBoxImplIOS() ((cocos2d::ui::EditBoxImplIOS*)editBox_) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplMac.h b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h similarity index 100% rename from cocos/ui/UIEditBox/UIEditBoxImplMac.h rename to cocos/ui/UIEditBox/UIEditBoxImpl-mac.h diff --git a/cocos/ui/UIEditBox/UIEditBoxImplMac.mm b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplMac.mm rename to cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm index 87bf88e615..2896d983e4 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplMac.mm +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm @@ -23,11 +23,11 @@ THE SOFTWARE. ****************************************************************************/ -#include "UIEditBoxImplMac.h" -#include "base/CCDirector.h" +#include "UIEditBoxImpl-mac.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) +#include "base/CCDirector.h" #include "UIEditBox.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImplNone.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-stub.cpp similarity index 100% rename from cocos/ui/UIEditBox/UIEditBoxImplNone.cpp rename to cocos/ui/UIEditBox/UIEditBoxImpl-stub.cpp diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplWin.cpp rename to cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index 46cd7e825d..1ecc777ed4 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "UIEditBoxImplWin.h" +#include "UIEditBoxImpl-win32.h" #include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.h b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h similarity index 100% rename from cocos/ui/UIEditBox/UIEditBoxImplWin.h rename to cocos/ui/UIEditBox/UIEditBoxImpl-win32.h diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp similarity index 99% rename from cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp rename to cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp index 4675c1005a..26f1154b93 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "UIEditBoxImplWp8.h" +#include "UIEditBoxImpl-wp8.h" #include "UIEditBox.h" #include "CCGLViewImpl.h" #include "base/CCScriptSupport.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.h b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h similarity index 100% rename from cocos/ui/UIEditBox/UIEditBoxImplWp8.h rename to cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h diff --git a/cocos/ui/UIVideoPlayerAndroid.cpp b/cocos/ui/UIVideoPlayer-android.cpp similarity index 100% rename from cocos/ui/UIVideoPlayerAndroid.cpp rename to cocos/ui/UIVideoPlayer-android.cpp diff --git a/cocos/ui/UIVideoPlayerIOS.mm b/cocos/ui/UIVideoPlayer-ios.mm similarity index 99% rename from cocos/ui/UIVideoPlayerIOS.mm rename to cocos/ui/UIVideoPlayer-ios.mm index 51cda4a9b7..94749f2422 100644 --- a/cocos/ui/UIVideoPlayerIOS.mm +++ b/cocos/ui/UIVideoPlayer-ios.mm @@ -24,14 +24,15 @@ #include "UIVideoPlayer.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS using namespace cocos2d::experimental::ui; //------------------------------------------------------------------------------------- -#include "CCEAGLView.h" + +#include "platform/ios/CCEAGLView-ios.h" #import #include "base/CCDirector.h" -#include "CCFileUtils.h" +#include "platform/CCFileUtils.h" @interface UIVideoViewWrapperIos : NSObject diff --git a/cocos/ui/UIWebView.cpp b/cocos/ui/UIWebView.cpp index bf09a92c73..9a3aa24263 100644 --- a/cocos/ui/UIWebView.cpp +++ b/cocos/ui/UIWebView.cpp @@ -25,7 +25,7 @@ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "UIWebViewImpl_android.h" +#include "UIWebViewImpl-android.h" #include "UIWebView-inl.h" diff --git a/cocos/ui/UIWebView.mm b/cocos/ui/UIWebView.mm index 9958d6a4d1..1f8ef6ae80 100644 --- a/cocos/ui/UIWebView.mm +++ b/cocos/ui/UIWebView.mm @@ -26,7 +26,7 @@ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "UIWebViewImpl_iOS.h" +#include "UIWebViewImpl-ios.h" #include "UIWebView-inl.h" #endif diff --git a/cocos/ui/UIWebViewImpl_android.cpp b/cocos/ui/UIWebViewImpl-android.cpp similarity index 99% rename from cocos/ui/UIWebViewImpl_android.cpp rename to cocos/ui/UIWebViewImpl-android.cpp index 30e1313068..adfb5d57f6 100644 --- a/cocos/ui/UIWebViewImpl_android.cpp +++ b/cocos/ui/UIWebViewImpl-android.cpp @@ -24,7 +24,7 @@ #ifdef __ANDROID__ -#include "UIWebViewImpl_android.h" +#include "UIWebViewImpl-android.h" #include #include diff --git a/cocos/ui/UIWebViewImpl_android.h b/cocos/ui/UIWebViewImpl-android.h similarity index 100% rename from cocos/ui/UIWebViewImpl_android.h rename to cocos/ui/UIWebViewImpl-android.h diff --git a/cocos/ui/UIWebViewImpl_iOS.h b/cocos/ui/UIWebViewImpl-ios.h similarity index 100% rename from cocos/ui/UIWebViewImpl_iOS.h rename to cocos/ui/UIWebViewImpl-ios.h diff --git a/cocos/ui/UIWebViewImpl_iOS.mm b/cocos/ui/UIWebViewImpl-ios.mm similarity index 98% rename from cocos/ui/UIWebViewImpl_iOS.mm rename to cocos/ui/UIWebViewImpl-ios.mm index 116b116975..e1fefa80bf 100644 --- a/cocos/ui/UIWebViewImpl_iOS.mm +++ b/cocos/ui/UIWebViewImpl-ios.mm @@ -24,11 +24,11 @@ #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#include "UIWebViewImpl_iOS.h" +#include "UIWebViewImpl-ios.h" #include "renderer/CCRenderer.h" -#include "CCDirector.h" -#include "CCGLView.h" -#include "CCEAGLView.h" +#include "base/CCDirector.h" +#include "platform/CCGLView.h" +#include "platform/ios/CCEAGLView-ios.h" #include "platform/CCFileUtils.h" #include "ui/UIWebView.h" diff --git a/tests/cpp-empty-test/proj.android/project.properties b/tests/cpp-empty-test/proj.android/project.properties index 572f7c30de..e8b0265294 100644 --- a/tests/cpp-empty-test/proj.android/project.properties +++ b/tests/cpp-empty-test/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=android-20 android.library.reference.1=../../../cocos/platform/android/java diff --git a/tests/cpp-empty-test/proj.ios/AppController.mm b/tests/cpp-empty-test/proj.ios/AppController.mm index fb70c76a07..4310cbe5a6 100644 --- a/tests/cpp-empty-test/proj.ios/AppController.mm +++ b/tests/cpp-empty-test/proj.ios/AppController.mm @@ -24,8 +24,8 @@ #import #import "AppController.h" #import "cocos2d.h" +#import "platform/ios/CCEAGLView-ios.h" #import "AppDelegate.h" -#import "CCEAGLView.h" #import "RootViewController.h" @implementation AppController diff --git a/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.cpp b/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.cpp index a3062bb59a..34d3c257fc 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.cpp @@ -23,16 +23,6 @@ ****************************************************************************/ #include "DrawNode3D.h" -#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" NS_CC_BEGIN diff --git a/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.h b/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.h index 240bb025ee..9b8b1093c0 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.h +++ b/tests/cpp-tests/Classes/Sprite3DTest/DrawNode3D.h @@ -25,9 +25,7 @@ #ifndef __DRAW_NODE_3D_H__ #define __DRAW_NODE_3D_H__ -#include "2d/CCNode.h" -#include "base/ccTypes.h" -#include "renderer/CCCustomCommand.h" +#include "cocos2d.h" NS_CC_BEGIN diff --git a/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm b/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm index 7df7890aa2..ba3aa6218c 100644 --- a/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm +++ b/tests/cpp-tests/proj.ios/Classes/testsAppDelegate.mm @@ -25,7 +25,7 @@ #import "testsAppDelegate.h" -#import "CCEAGLView.h" +#import "platform/ios/CCEAGLView-ios.h" #import "cocos2d.h" #import "AppDelegate.h" #import "RootViewController.h" diff --git a/tests/lua-empty-test/project/Classes/AppDelegate.h b/tests/lua-empty-test/project/Classes/AppDelegate.h index 41d0b2ca88..1d6b047898 100644 --- a/tests/lua-empty-test/project/Classes/AppDelegate.h +++ b/tests/lua-empty-test/project/Classes/AppDelegate.h @@ -1,7 +1,7 @@ #ifndef _APP_DELEGATE_H_ #define _APP_DELEGATE_H_ -#include "CCApplication.h" +#include "platform/CCApplication.h" /** @brief The cocos2d Application. diff --git a/tests/lua-empty-test/project/proj.ios/AppController.mm b/tests/lua-empty-test/project/proj.ios/AppController.mm index 7cfd72062b..67ab321d93 100644 --- a/tests/lua-empty-test/project/proj.ios/AppController.mm +++ b/tests/lua-empty-test/project/proj.ios/AppController.mm @@ -24,7 +24,7 @@ #import #import "AppController.h" #import "cocos2d.h" -#import "CCEAGLView.h" +#import "platform/ios/CCEAGLView-ios.h" #import "AppDelegate.h" #import "RootViewController.h" diff --git a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm index 12f7bd601f..4eb2ff3083 100644 --- a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm +++ b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm @@ -24,7 +24,7 @@ #import #import "AppController.h" #import "cocos2d.h" -#import "CCEAGLView.h" +#import "platform/ios/CCEAGLView-ios.h" #import "AppDelegate.h" #import "RootViewController.h" From f5e54f8e69e0668743e0e8194d1f5ba278b43780 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 17:01:07 -0700 Subject: [PATCH 44/61] Fixes for linux compilation --- cocos/CMakeLists.txt | 44 +++++++++---------- ...geAndroid.cpp => LocalStorage-android.cpp} | 0 2 files changed, 22 insertions(+), 22 deletions(-) rename cocos/storage/local-storage/{LocalStorageAndroid.cpp => LocalStorage-android.cpp} (100%) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 8d3960a6b6..677cac1d84 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -93,7 +93,7 @@ set(COCOS2D_BASE_SRC base/CCScriptSupport.cpp base/CCTouch.cpp base/CCUserDefault.cpp - base/CCUserDefaultAndroid.cpp + base/CCUserDefault-android.cpp base/CCValue.cpp base/ObjectFactory.cpp base/TGAlib.cpp @@ -219,15 +219,15 @@ set(COCOS2D_BASE_SRC ui/UITextBMFont.cpp ui/UITextField.cpp ui/UIVBox.cpp - ui/UIVideoPlayerAndroid.cpp + ui/UIVideoPlayer-android.cpp ui/UIWebView.cpp - ui/UIWebViewImpl_android.cpp + ui/UIWebViewImpl-android.cpp ui/UIWidget.cpp ui/UIEditBox/UIEditBox.cpp - ui/UIEditBox/UIEditBoxImplAndroid.cpp - ui/UIEditBox/UIEditBoxImplNone.cpp - ui/UIEditBox/UIEditBoxImplWin.cpp - ui/UIEditBox/UIEditBoxImplWp8.cpp + ui/UIEditBox/UIEditBoxImpl-android.cpp + ui/UIEditBox/UIEditBoxImpl-stub.cpp + ui/UIEditBox/UIEditBoxImpl-win32.cpp + ui/UIEditBox/UIEditBoxImpl-wp8.cpp math/CCAffineTransform.cpp math/CCGeometry.cpp @@ -287,14 +287,14 @@ set(COCOS2D_BASE_SRC platform/CCThread.cpp storage/local-storage/LocalStorage.cpp - storage/local-storage/LocalStorageAndroid.cpp + storage/local-storage/LocalStorage-android.cpp ) if(MACOSX) set(COCOS2D_BASE_SRC ${COCOS2D_BASE_SRC} - ui/UIEditBox/UIEditBoxImplIOS.mm - ui/UIEditBox/UIEditBoxImplMac.mm + ui/UIEditBox/UIEditBoxImpl-ios.mm + ui/UIEditBox/UIEditBoxImpl-mac.mm base/CCUserDefault.mm ) endif() @@ -451,27 +451,27 @@ set(COCOS2D_EXTERNAL_SRC ) set(COCOS2D_DESKTOP_SRC - platform/desktop/CCGLViewImpl.cpp + platform/desktop/CCGLViewImpl-desktop.cpp ) if(LINUX) set(COCOS2D_PLATFORM_SRC ${COCOS2D_DESKTOP_SRC} - platform/linux/CCApplication.cpp - platform/linux/CCCommon.cpp - platform/linux/CCDevice.cpp - platform/linux/CCFileUtilsLinux.cpp - platform/linux/CCStdC.cpp + platform/linux/CCApplication-linux.cpp + platform/linux/CCCommon-linux.cpp + platform/linux/CCDevice-linux.cpp + platform/linux/CCFileUtils-linux.cpp + platform/linux/CCStdC-linux.cpp ) elseif(MACOSX) set(COCOS2D_PLATFORM_SRC ${COCOS2D_DESKTOP_SRC} - platform/mac/CCApplication.mm - platform/mac/CCCommon.mm - platform/mac/CCDevice.mm - platform/apple/CCLock.cpp - platform/apple/CCFileUtilsApple.mm - platform/apple/CCThread.mm + platform/mac/CCApplication-mac.mm + platform/mac/CCCommon-mac.mm + platform/mac/CCDevice-mac.mm + platform/apple/CCLock-apple.cpp + platform/apple/CCFileUtils-apple.mm + platform/apple/CCThread-apple.mm ) else() message( FATAL_ERROR "Unsupported architecture, CMake will exit" ) diff --git a/cocos/storage/local-storage/LocalStorageAndroid.cpp b/cocos/storage/local-storage/LocalStorage-android.cpp similarity index 100% rename from cocos/storage/local-storage/LocalStorageAndroid.cpp rename to cocos/storage/local-storage/LocalStorage-android.cpp From 73450be71598bd9a1339ce57923f7f155e343cbe Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 17:11:06 -0700 Subject: [PATCH 45/61] compiles and runs in Linux --- cocos/platform/linux/CCApplication-linux.cpp | 2 +- cocos/platform/linux/CCCommon-linux.cpp | 2 +- cocos/platform/linux/CCFileUtils-linux.cpp | 4 ++-- cocos/platform/linux/CCStdC-linux.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/platform/linux/CCApplication-linux.cpp b/cocos/platform/linux/CCApplication-linux.cpp index c23d0f9883..65000f5a3c 100644 --- a/cocos/platform/linux/CCApplication-linux.cpp +++ b/cocos/platform/linux/CCApplication-linux.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#include "CCApplication.h" +#include "CCApplication-linux.h" #include #include #include diff --git a/cocos/platform/linux/CCCommon-linux.cpp b/cocos/platform/linux/CCCommon-linux.cpp index 320f96d108..63fa8ed8ce 100644 --- a/cocos/platform/linux/CCCommon-linux.cpp +++ b/cocos/platform/linux/CCCommon-linux.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/CCCommon.h" -#include "CCStdC.h" +#include "CCStdC-linux.h" #include "base/CCConsole.h" NS_CC_BEGIN diff --git a/cocos/platform/linux/CCFileUtils-linux.cpp b/cocos/platform/linux/CCFileUtils-linux.cpp index dfb882c885..f34a231088 100644 --- a/cocos/platform/linux/CCFileUtils-linux.cpp +++ b/cocos/platform/linux/CCFileUtils-linux.cpp @@ -26,10 +26,10 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#include "CCFileUtilsLinux.h" +#include "CCFileUtils-linux.h" +#include "CCApplication-linux.h" #include "platform/CCCommon.h" #include "base/ccMacros.h" -#include "CCApplication.h" #include "deprecated/CCString.h" #include #include diff --git a/cocos/platform/linux/CCStdC-linux.cpp b/cocos/platform/linux/CCStdC-linux.cpp index 14eb0c984d..8cbffa3835 100644 --- a/cocos/platform/linux/CCStdC-linux.cpp +++ b/cocos/platform/linux/CCStdC-linux.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#include "CCStdC.h" +#include "CCStdC-linux.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) From 6f3ca63f003eea84244c1493d6a3f6c94b0908d5 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 17:17:07 -0700 Subject: [PATCH 46/61] Moved base/CCPlatform* -> platform/CCPlatform* --- build/cocos2d_libs.xcodeproj/project.pbxproj | 36 +++++++++---------- cocos/2d/CCAnimation.h | 2 +- cocos/2d/CCFontAtlas.h | 2 +- cocos/2d/CCLabelTextFormatter.h | 2 +- cocos/2d/CCTweenFunction.h | 2 +- cocos/3d/CCAnimationCurve.h | 2 +- cocos/3d/CCBundleReader.h | 2 +- cocos/3d/CCSprite3D.cpp | 2 +- cocos/base/CCConsole.cpp | 2 +- cocos/base/CCConsole.h | 2 +- cocos/base/CCController-iOS.mm | 2 +- cocos/base/CCData.h | 2 +- cocos/base/CCDataVisitor.h | 2 +- cocos/base/CCDirector.h | 2 +- cocos/base/CCEvent.h | 2 +- cocos/base/CCEventController.h | 2 +- cocos/base/CCEventDispatcher.h | 2 +- cocos/base/CCEventListener.h | 2 +- cocos/base/CCEventListenerController.h | 2 +- cocos/base/CCRef.h | 2 +- cocos/base/CCUserDefault-android.cpp | 2 +- cocos/base/CCUserDefault-apple.mm | 2 +- cocos/base/CCUserDefault.h | 2 +- cocos/base/CCValue.h | 2 +- cocos/base/ObjectFactory.h | 2 +- cocos/base/ZipUtils.h | 4 +-- cocos/base/base64.h | 2 +- cocos/base/ccConfig.h | 2 +- cocos/base/ccRandom.h | 2 +- cocos/base/ccUTF8.h | 2 +- cocos/cocos2d.cpp | 2 +- cocos/cocos2d.h | 4 +-- .../cocostudio/CCInputDelegate.h | 2 +- .../cocostudio/CCSpriteFrameCacheHelper.h | 2 +- .../cocostudio/DictionaryHelper.cpp | 2 +- cocos/math/CCAffineTransform.h | 2 +- cocos/math/CCGeometry.h | 2 +- cocos/math/CCMathBase.h | 2 +- cocos/network/SocketIO.h | 2 +- cocos/network/WebSocket.h | 2 +- .../chipmunk/CCPhysicsBodyInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsContactInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsHelper_chipmunk.h | 2 +- .../chipmunk/CCPhysicsJointInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsShapeInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsWorldInfo_chipmunk.h | 2 +- cocos/platform/CCApplication.h | 2 +- cocos/platform/CCApplicationProtocol.h | 2 +- cocos/platform/CCCommon.h | 2 +- cocos/platform/CCDevice.h | 2 +- cocos/platform/CCFileUtils.h | 2 +- cocos/platform/CCGL.h | 2 +- cocos/{base => platform}/CCPlatformConfig.h | 0 cocos/platform/CCPlatformDefine.h | 2 +- cocos/{base => platform}/CCPlatformMacros.h | 2 +- cocos/platform/CCSAXParser.h | 2 +- cocos/platform/CCStdC.h | 2 +- cocos/platform/CCThread.h | 2 +- cocos/platform/apple/CCFileUtils-apple.h | 2 +- cocos/platform/apple/CCLock-apple.h | 2 +- cocos/platform/ios/CCApplication-ios.h | 2 +- cocos/platform/ios/CCCommon-ios.mm | 2 +- cocos/platform/ios/CCDevice-ios.mm | 2 +- cocos/platform/ios/CCDirectorCaller-ios.h | 2 +- cocos/platform/ios/CCDirectorCaller-ios.mm | 2 +- cocos/platform/ios/CCEAGLView-ios.h | 2 +- cocos/platform/ios/CCEAGLView-ios.mm | 2 +- cocos/platform/ios/CCES2Renderer-ios.h | 2 +- cocos/platform/ios/CCES2Renderer-ios.m | 4 +-- cocos/platform/ios/CCESRenderer-ios.h | 4 +-- cocos/platform/ios/CCGL-ios.h | 2 +- cocos/platform/ios/CCGLViewImpl-ios.h | 2 +- cocos/platform/ios/CCGLViewImpl-ios.mm | 2 +- cocos/platform/ios/CCImage-ios.mm | 2 +- cocos/platform/ios/CCPlatformDefine-ios.h | 2 +- cocos/platform/ios/CCStdC-ios.h | 4 +-- cocos/platform/ios/OpenGL_Internal-ios.h | 2 +- cocos/platform/mac/CCApplication-mac.h | 2 +- cocos/platform/mac/CCApplication-mac.mm | 2 +- cocos/platform/mac/CCCommon-mac.mm | 2 +- cocos/platform/mac/CCDevice-mac.mm | 2 +- cocos/platform/mac/CCGL-mac.h | 2 +- cocos/platform/mac/CCPlatformDefine-mac.h | 2 +- cocos/platform/mac/CCStdC-mac.h | 4 +-- cocos/renderer/CCRenderCommand.h | 2 +- cocos/renderer/CCRenderCommandPool.h | 2 +- cocos/renderer/CCRenderer.h | 2 +- cocos/renderer/CCTexture2D.cpp | 2 +- cocos/renderer/ccGLStateCache.h | 2 +- cocos/renderer/ccShaders.h | 2 +- .../local-storage/LocalStorage-android.cpp | 2 +- cocos/storage/local-storage/LocalStorage.cpp | 2 +- cocos/ui/UIDeprecated.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-android.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-ios.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-mac.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-win32.h | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h | 2 +- cocos/ui/UIHelper.h | 2 +- cocos/ui/UIScale9Sprite.h | 2 +- cocos/ui/UIWebView.mm | 2 +- .../cpp-tests/proj.android/project.properties | 2 +- 104 files changed, 126 insertions(+), 126 deletions(-) rename cocos/{base => platform}/CCPlatformConfig.h (100%) rename cocos/{base => platform}/CCPlatformMacros.h (99%) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 4f12f69323..ffcf926cf0 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1328,8 +1328,6 @@ 1AAF5850180E40B9000584C8 /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */; }; 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF584D180E40B9000584C8 /* LocalStorage.h */; }; 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF584D180E40B9000584C8 /* LocalStorage.h */; }; - 1AAF5853180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584E180E40B9000584C8 /* LocalStorageAndroid.cpp */; }; - 1AAF5854180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF584E180E40B9000584C8 /* LocalStorageAndroid.cpp */; }; 1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */; }; 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */; }; 1ABA68B01888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; @@ -1486,6 +1484,12 @@ 50643BDA19BFAF4400EF68ED /* CCApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD719BFAF4400EF68ED /* CCApplication.h */; }; 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BD819BFAF4400EF68ED /* CCStdC.h */; }; + 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */; }; + 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */; }; + 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */; }; + 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */; }; + 50643BE419BFCF1800EF68ED /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */; }; + 50643BE519BFCF1800EF68ED /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */; }; 5091A7A319BFABA800AC8789 /* CCPlatformDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */; }; 50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */; }; @@ -1705,10 +1709,6 @@ 50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDF71925AB6E00A911A9 /* CCNS.cpp */; }; 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF81925AB6E00A911A9 /* CCNS.h */; }; 50ABBE8E1925AB6F00A911A9 /* CCNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF81925AB6E00A911A9 /* CCNS.h */; }; - 50ABBE8F1925AB6F00A911A9 /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF91925AB6E00A911A9 /* CCPlatformConfig.h */; }; - 50ABBE901925AB6F00A911A9 /* CCPlatformConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDF91925AB6E00A911A9 /* CCPlatformConfig.h */; }; - 50ABBE911925AB6F00A911A9 /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFA1925AB6E00A911A9 /* CCPlatformMacros.h */; }; - 50ABBE921925AB6F00A911A9 /* CCPlatformMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFA1925AB6E00A911A9 /* CCPlatformMacros.h */; }; 50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDFB1925AB6E00A911A9 /* CCProfiling.cpp */; }; 50ABBE941925AB6F00A911A9 /* CCProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBDFB1925AB6E00A911A9 /* CCProfiling.cpp */; }; 50ABBE951925AB6F00A911A9 /* CCProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 50ABBDFC1925AB6E00A911A9 /* CCProfiling.h */; }; @@ -2199,7 +2199,6 @@ 1AAF584B180E40B9000584C8 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = ""; }; 1AAF584D180E40B9000584C8 /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = ""; }; - 1AAF584E180E40B9000584C8 /* LocalStorageAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageAndroid.cpp; sourceTree = ""; }; 1ABA68AC1888D700007D1BB4 /* CCFontCharMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFontCharMap.cpp; sourceTree = ""; }; 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFontCharMap.h; sourceTree = ""; }; 1AC026991914068200FA920D /* ConvertUTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvertUTF.h; sourceTree = ""; }; @@ -2664,6 +2663,9 @@ 50643BD319BFAECF00EF68ED /* CCGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGL.h; sourceTree = ""; }; 50643BD719BFAF4400EF68ED /* CCApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCApplication.h; sourceTree = ""; }; 50643BD819BFAF4400EF68ED /* CCStdC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStdC.h; sourceTree = ""; }; + 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "LocalStorage-android.cpp"; sourceTree = ""; }; + 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformConfig.h; sourceTree = ""; }; + 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformMacros.h; sourceTree = ""; }; 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPlatformDefine.h; sourceTree = ""; }; 50ABBD1B1925AB0000A911A9 /* CCAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAffineTransform.cpp; sourceTree = ""; }; 50ABBD1C1925AB0000A911A9 /* CCAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAffineTransform.h; sourceTree = ""; }; @@ -2781,8 +2783,6 @@ 50ABBDF61925AB6E00A911A9 /* CCMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCMap.h; path = ../base/CCMap.h; sourceTree = ""; }; 50ABBDF71925AB6E00A911A9 /* CCNS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNS.cpp; path = ../base/CCNS.cpp; sourceTree = ""; }; 50ABBDF81925AB6E00A911A9 /* CCNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNS.h; path = ../base/CCNS.h; sourceTree = ""; }; - 50ABBDF91925AB6E00A911A9 /* CCPlatformConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPlatformConfig.h; path = ../base/CCPlatformConfig.h; sourceTree = ""; }; - 50ABBDFA1925AB6E00A911A9 /* CCPlatformMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPlatformMacros.h; path = ../base/CCPlatformMacros.h; sourceTree = ""; }; 50ABBDFB1925AB6E00A911A9 /* CCProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCProfiling.cpp; path = ../base/CCProfiling.cpp; sourceTree = ""; }; 50ABBDFC1925AB6E00A911A9 /* CCProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCProfiling.h; path = ../base/CCProfiling.h; sourceTree = ""; }; 50ABBDFD1925AB6E00A911A9 /* CCProtocols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCProtocols.h; path = ../base/CCProtocols.h; sourceTree = ""; }; @@ -3205,8 +3205,6 @@ 50ABBDF61925AB6E00A911A9 /* CCMap.h */, 50ABBDF71925AB6E00A911A9 /* CCNS.cpp */, 50ABBDF81925AB6E00A911A9 /* CCNS.h */, - 50ABBDF91925AB6E00A911A9 /* CCPlatformConfig.h */, - 50ABBDFA1925AB6E00A911A9 /* CCPlatformMacros.h */, 50ABBDFB1925AB6E00A911A9 /* CCProfiling.cpp */, 50ABBDFC1925AB6E00A911A9 /* CCProfiling.h */, 50ABBDFD1925AB6E00A911A9 /* CCProtocols.h */, @@ -3835,10 +3833,10 @@ 1AAF584A180E40B9000584C8 /* local-storage */ = { isa = PBXGroup; children = ( + 50643BDD19BFCCA300EF68ED /* LocalStorage-android.cpp */, 1AAF584B180E40B9000584C8 /* Android.mk */, 1AAF584C180E40B9000584C8 /* LocalStorage.cpp */, 1AAF584D180E40B9000584C8 /* LocalStorage.h */, - 1AAF584E180E40B9000584C8 /* LocalStorageAndroid.cpp */, ); path = "local-storage"; sourceTree = ""; @@ -4741,6 +4739,8 @@ 50ABBF2D1926664700A911A9 /* desktop */, 50ABBF4E1926664700A911A9 /* mac */, 50ABBF1A1926664700A911A9 /* apple */, + 50643BE019BFCF1800EF68ED /* CCPlatformConfig.h */, + 50643BE119BFCF1800EF68ED /* CCPlatformMacros.h */, 5091A7A219BFABA800AC8789 /* CCPlatformDefine.h */, 50643BD319BFAECF00EF68ED /* CCGL.h */, 50643BD719BFAF4400EF68ED /* CCApplication.h */, @@ -5188,6 +5188,7 @@ 1A570204180BCBD40088DEC7 /* CCClippingNode.h in Headers */, 15AE1A7B19AAD40300C27E9E /* b2PolygonContact.h in Headers */, 15AE1A2919AAD3D500C27E9E /* b2Collision.h in Headers */, + 50643BE419BFCF1800EF68ED /* CCPlatformMacros.h in Headers */, 15AE184219AAD2F700C27E9E /* CCSprite3D.h in Headers */, 15AE18A019AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 1A01C6A618F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, @@ -5229,6 +5230,7 @@ 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, + 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, @@ -5258,7 +5260,6 @@ 1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */, 50ABBD421925AB0000A911A9 /* CCMathBase.h in Headers */, 1A570298180BCCAB0088DEC7 /* CCAnimationCache.h in Headers */, - 50ABBE911925AB6F00A911A9 /* CCPlatformMacros.h in Headers */, 50ABC05D1926664800A911A9 /* CCApplication-mac.h in Headers */, 15AE190019AAD35000C27E9E /* CCComAudio.h in Headers */, 15AE190419AAD35000C27E9E /* CCComRender.h in Headers */, @@ -5362,7 +5363,6 @@ 3EA3EDBE1991CDFA00645534 /* CCCamera.h in Headers */, 15AE1B6619AADA9900C27E9E /* UIImageView.h in Headers */, 15AE1BB419AADFEF00C27E9E /* HttpResponse.h in Headers */, - 50ABBE8F1925AB6F00A911A9 /* CCPlatformConfig.h in Headers */, 15AE1A8519AAD40300C27E9E /* b2Joint.h in Headers */, 15AE1A8D19AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, 50ABBE291925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, @@ -5543,6 +5543,7 @@ 50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */, 50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */, B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, + 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 15AE1B0D19AAD42500C27E9E /* cpVect.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, @@ -5696,7 +5697,7 @@ 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, 15AE1A3919AAD3D500C27E9E /* Box2D.h in Headers */, 50ABBECE1925AB6F00A911A9 /* s3tc.h in Headers */, - 50ABBE901925AB6F00A911A9 /* CCPlatformConfig.h in Headers */, + 50643BE519BFCF1800EF68ED /* CCPlatformMacros.h in Headers */, 15AE1BFA19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, 15AE182F19AAD2F700C27E9E /* CCMeshVertexIndexData.h in Headers */, 15AE19F419AAD3A700C27E9E /* EventData.h in Headers */, @@ -5919,7 +5920,6 @@ 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, 50ABBD5F1925AB0000A911A9 /* Vec3.h in Headers */, - 50ABBE921925AB6F00A911A9 /* CCPlatformMacros.h in Headers */, 50ABBE821925AB6F00A911A9 /* CCEventType.h in Headers */, 15AE194C19AAD35100C27E9E /* CCComRender.h in Headers */, 1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */, @@ -6130,6 +6130,7 @@ 1A570061180BC5A10088DEC7 /* CCAction.cpp in Sources */, 15AE1BDC19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, 50ABBEC51925AB6F00A911A9 /* etc1.cpp in Sources */, + 50643BDE19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 15AE1B5B19AADA9900C27E9E /* UITextAtlas.cpp in Sources */, 1A570065180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, @@ -6424,7 +6425,6 @@ 15AE1B1D19AAD43700C27E9E /* cpBBTree.c in Sources */, 15AE1A2A19AAD3D500C27E9E /* b2Distance.cpp in Sources */, 50ABBE6D1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, - 1AAF5853180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */, 15AE1B1B19AAD43700C27E9E /* cpArray.c in Sources */, 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */, 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, @@ -6650,6 +6650,7 @@ 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, 15AE1A0119AAD3A700C27E9E /* Attachment.cpp in Sources */, + 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, 15AE1B4819AAD43700C27E9E /* cpVect.c in Sources */, 15AE1B3E19AAD43700C27E9E /* cpHashSet.c in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, @@ -6898,7 +6899,6 @@ 15AE192E19AAD35100C27E9E /* CCActionFrameEasing.cpp in Sources */, 15AE195519AAD35100C27E9E /* CCDisplayManager.cpp in Sources */, 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, - 1AAF5854180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */, 15AE1ACE19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, 15AE1B4719AAD43700C27E9E /* cpSweep1D.c in Sources */, diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index 39b35e8f63..5b7027fe9a 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -27,7 +27,7 @@ THE SOFTWARE. #ifndef __CC_ANIMATION_H__ #define __CC_ANIMATION_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #include "base/CCRef.h" #include "base/CCValue.h" #include "base/CCVector.h" diff --git a/cocos/2d/CCFontAtlas.h b/cocos/2d/CCFontAtlas.h index d2a43a2375..5c8d920eef 100644 --- a/cocos/2d/CCFontAtlas.h +++ b/cocos/2d/CCFontAtlas.h @@ -28,7 +28,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCRef.h" #include "platform/CCStdC.h" // ssize_t on windows diff --git a/cocos/2d/CCLabelTextFormatter.h b/cocos/2d/CCLabelTextFormatter.h index 664310a8b3..abd9155e59 100644 --- a/cocos/2d/CCLabelTextFormatter.h +++ b/cocos/2d/CCLabelTextFormatter.h @@ -26,7 +26,7 @@ #ifndef _CCLabelTextFormatter_h_ #define _CCLabelTextFormatter_h_ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTweenFunction.h b/cocos/2d/CCTweenFunction.h index b825e30221..b934842c03 100644 --- a/cocos/2d/CCTweenFunction.h +++ b/cocos/2d/CCTweenFunction.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCTWEENFUNCTION_H__ #define __CCTWEENFUNCTION_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/3d/CCAnimationCurve.h b/cocos/3d/CCAnimationCurve.h index 0f2b9eb0c4..07966a0bfd 100644 --- a/cocos/3d/CCAnimationCurve.h +++ b/cocos/3d/CCAnimationCurve.h @@ -26,7 +26,7 @@ #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCRef.h" #include "math/CCMath.h" diff --git a/cocos/3d/CCBundleReader.h b/cocos/3d/CCBundleReader.h index b332fa4c80..90fb10694b 100644 --- a/cocos/3d/CCBundleReader.h +++ b/cocos/3d/CCBundleReader.h @@ -29,7 +29,7 @@ #include #include "base/CCRef.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCConsole.h" NS_CC_BEGIN diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index ed9a3baf89..a17b5b02d4 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -31,7 +31,7 @@ #include "3d/CCMesh.h" #include "base/CCDirector.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccMacros.h" #include "platform/CCFileUtils.h" #include "renderer/CCTextureCache.h" diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 262c8e9891..827217ed0f 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -56,7 +56,7 @@ #include "base/CCDirector.h" #include "base/CCScheduler.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #include "base/CCConfiguration.h" #include "2d/CCScene.h" #include "platform/CCFileUtils.h" diff --git a/cocos/base/CCConsole.h b/cocos/base/CCConsole.h index 9ab18ff443..7e05a4bf29 100644 --- a/cocos/base/CCConsole.h +++ b/cocos/base/CCConsole.h @@ -49,7 +49,7 @@ typedef SSIZE_T ssize_t; #include "base/CCRef.h" #include "base/ccMacros.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/base/CCController-iOS.mm b/cocos/base/CCController-iOS.mm index 881477bd1c..971a93d477 100644 --- a/cocos/base/CCController-iOS.mm +++ b/cocos/base/CCController-iOS.mm @@ -24,7 +24,7 @@ ****************************************************************************/ #include "CCController.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ccMacros.h" diff --git a/cocos/base/CCData.h b/cocos/base/CCData.h index f442e32a5f..435e51eac0 100644 --- a/cocos/base/CCData.h +++ b/cocos/base/CCData.h @@ -26,7 +26,7 @@ #ifndef __CCDATA_H__ #define __CCDATA_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include // for ssize_t on android #include // for ssize_t on linux #include "platform/CCStdC.h" // for ssize_t on window diff --git a/cocos/base/CCDataVisitor.h b/cocos/base/CCDataVisitor.h index e40620e1f9..ee25ff980f 100644 --- a/cocos/base/CCDataVisitor.h +++ b/cocos/base/CCDataVisitor.h @@ -25,7 +25,7 @@ #ifndef __CCDATAVISITOR_H__ #define __CCDATAVISITOR_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include NS_CC_BEGIN diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index 8cf5f596ca..d786885574 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCRef.h" #include "base/CCVector.h" #include "2d/CCScene.h" diff --git a/cocos/base/CCEvent.h b/cocos/base/CCEvent.h index 8280a6c2af..08f1cbd01f 100644 --- a/cocos/base/CCEvent.h +++ b/cocos/base/CCEvent.h @@ -27,7 +27,7 @@ #define __CCEVENT_H__ #include "base/CCRef.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventController.h b/cocos/base/CCEventController.h index d8190a0b8e..14b3c0870a 100644 --- a/cocos/base/CCEventController.h +++ b/cocos/base/CCEventController.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__EventController__ #define __cocos2d_libs__EventController__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventDispatcher.h b/cocos/base/CCEventDispatcher.h index 5293faebc0..1f3349e101 100644 --- a/cocos/base/CCEventDispatcher.h +++ b/cocos/base/CCEventDispatcher.h @@ -31,7 +31,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCEventListener.h" #include "base/CCEvent.h" #include "platform/CCStdC.h" diff --git a/cocos/base/CCEventListener.h b/cocos/base/CCEventListener.h index 321b16f57a..aecfd92a8d 100644 --- a/cocos/base/CCEventListener.h +++ b/cocos/base/CCEventListener.h @@ -29,7 +29,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCRef.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerController.h b/cocos/base/CCEventListenerController.h index ebb3f09e50..cdcefd023a 100644 --- a/cocos/base/CCEventListenerController.h +++ b/cocos/base/CCEventListenerController.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__EventListenerController__ #define __cocos2d_libs__EventListenerController__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCEventListener.h" NS_CC_BEGIN diff --git a/cocos/base/CCRef.h b/cocos/base/CCRef.h index 283fd1cae7..5246f4feae 100644 --- a/cocos/base/CCRef.h +++ b/cocos/base/CCRef.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __BASE_CCREF_H__ #define __BASE_CCREF_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccConfig.h" #define CC_USE_MEM_LEAK_DETECTION 0 diff --git a/cocos/base/CCUserDefault-android.cpp b/cocos/base/CCUserDefault-android.cpp index 9240747e5c..c6bc9f9a57 100644 --- a/cocos/base/CCUserDefault-android.cpp +++ b/cocos/base/CCUserDefault-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "base/CCUserDefault.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #include "base/ccUtils.h" #include "platform/CCCommon.h" #include "base/base64.h" diff --git a/cocos/base/CCUserDefault-apple.mm b/cocos/base/CCUserDefault-apple.mm index 6492d8cd77..0f004e200c 100644 --- a/cocos/base/CCUserDefault-apple.mm +++ b/cocos/base/CCUserDefault-apple.mm @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) #import diff --git a/cocos/base/CCUserDefault.h b/cocos/base/CCUserDefault.h index 8ba6bcf7d8..858b60b18f 100644 --- a/cocos/base/CCUserDefault.h +++ b/cocos/base/CCUserDefault.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __SUPPORT_CCUSERDEFAULT_H__ #define __SUPPORT_CCUSERDEFAULT_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include "base/CCData.h" diff --git a/cocos/base/CCValue.h b/cocos/base/CCValue.h index a3cf561ce0..98531422f5 100644 --- a/cocos/base/CCValue.h +++ b/cocos/base/CCValue.h @@ -25,7 +25,7 @@ #ifndef __cocos2d_libs__CCValue__ #define __cocos2d_libs__CCValue__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccMacros.h" #include #include diff --git a/cocos/base/ObjectFactory.h b/cocos/base/ObjectFactory.h index c9342f2c9d..c2ade91ba8 100644 --- a/cocos/base/ObjectFactory.h +++ b/cocos/base/ObjectFactory.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include #include "base/CCRef.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/base/ZipUtils.h b/cocos/base/ZipUtils.h index 19a56aace1..0ab769383e 100644 --- a/cocos/base/ZipUtils.h +++ b/cocos/base/ZipUtils.h @@ -26,8 +26,8 @@ THE SOFTWARE. #define __SUPPORT_ZIPUTILS_H__ #include -#include "base/CCPlatformConfig.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformConfig.h" +#include "platform/CCPlatformMacros.h" #include "platform/CCPlatformDefine.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/base/base64.h b/cocos/base/base64.h index 1180c365ce..2e0d9e7b51 100644 --- a/cocos/base/base64.h +++ b/cocos/base/base64.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __SUPPORT_BASE64_H__ #define __SUPPORT_BASE64_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #ifdef __cplusplus extern "C" { diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index a44ede24ef..443da7a9ef 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -28,7 +28,7 @@ THE SOFTWARE. #ifndef __CCCONFIG_H__ #define __CCCONFIG_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" /** @file diff --git a/cocos/base/ccRandom.h b/cocos/base/ccRandom.h index 272da902b2..a2b5c8983d 100644 --- a/cocos/base/ccRandom.h +++ b/cocos/base/ccRandom.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __ccRandom_H_ #define __ccRandom_H_ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include diff --git a/cocos/base/ccUTF8.h b/cocos/base/ccUTF8.h index f9561efa09..bd6e7c831d 100644 --- a/cocos/base/ccUTF8.h +++ b/cocos/base/ccUTF8.h @@ -26,7 +26,7 @@ #ifndef __cocos2dx__ccUTF8__ #define __cocos2dx__ccUTF8__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include diff --git a/cocos/cocos2d.cpp b/cocos/cocos2d.cpp index adc8a7ac05..23ca3561dc 100644 --- a/cocos/cocos2d.cpp +++ b/cocos/cocos2d.cpp @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 01893a48a6..328ea8d43f 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -175,8 +175,8 @@ THE SOFTWARE. #include "platform/CCImage.h" #include "platform/CCSAXParser.h" #include "platform/CCThread.h" -#include "base/CCPlatformConfig.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformConfig.h" +#include "platform/CCPlatformMacros.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "platform/ios/CCApplication-ios.h" diff --git a/cocos/editor-support/cocostudio/CCInputDelegate.h b/cocos/editor-support/cocostudio/CCInputDelegate.h index 15b1233bb0..a9f6f24a79 100644 --- a/cocos/editor-support/cocostudio/CCInputDelegate.h +++ b/cocos/editor-support/cocostudio/CCInputDelegate.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CC_EXTENTIONS_CCINPUTDELEGATE_H__ #define __CC_EXTENTIONS_CCINPUTDELEGATE_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCTouch.h" #include "base/CCEvent.h" #include "base/ccTypes.h" diff --git a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h index d0e6fa9585..20db0f5aba 100644 --- a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h +++ b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h @@ -24,7 +24,7 @@ THE SOFTWARE. #ifndef __CCSPRITEFRAMECACHEHELPER_H__ #define __CCSPRITEFRAMECACHEHELPER_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CocosStudioExport.h" #include diff --git a/cocos/editor-support/cocostudio/DictionaryHelper.cpp b/cocos/editor-support/cocostudio/DictionaryHelper.cpp index 232290505b..7dad513cb6 100644 --- a/cocos/editor-support/cocostudio/DictionaryHelper.cpp +++ b/cocos/editor-support/cocostudio/DictionaryHelper.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "cocostudio/DictionaryHelper.h" namespace cocostudio { diff --git a/cocos/math/CCAffineTransform.h b/cocos/math/CCAffineTransform.h index a055fa5bfd..83164ff2e3 100644 --- a/cocos/math/CCAffineTransform.h +++ b/cocos/math/CCAffineTransform.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __MATH_CCAFFINETRANSFORM_H__ #define __MATH_CCAFFINETRANSFORM_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "math/CCGeometry.h" #include "math/CCMath.h" diff --git a/cocos/math/CCGeometry.h b/cocos/math/CCGeometry.h index 1ea35bf059..272a7d7b02 100644 --- a/cocos/math/CCGeometry.h +++ b/cocos/math/CCGeometry.h @@ -28,7 +28,7 @@ THE SOFTWARE. #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccMacros.h" #include "math/CCMath.h" diff --git a/cocos/math/CCMathBase.h b/cocos/math/CCMathBase.h index ee777d52e2..76978b1531 100644 --- a/cocos/math/CCMathBase.h +++ b/cocos/math/CCMathBase.h @@ -3,7 +3,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #define MATH_DEG_TO_RAD(x) ((x) * 0.0174532925f) #define MATH_RAD_TO_DEG(x) ((x)* 57.29577951f) diff --git a/cocos/network/SocketIO.h b/cocos/network/SocketIO.h index cab25c2c71..152a8c5c72 100644 --- a/cocos/network/SocketIO.h +++ b/cocos/network/SocketIO.h @@ -59,7 +59,7 @@ in the onClose method the pointer should be set to NULL or used to connect to a #ifndef __CC_SOCKETIO_H__ #define __CC_SOCKETIO_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCMap.h" #include diff --git a/cocos/network/WebSocket.h b/cocos/network/WebSocket.h index 3c2f3e1e65..b5f0048976 100644 --- a/cocos/network/WebSocket.h +++ b/cocos/network/WebSocket.h @@ -33,7 +33,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "platform/CCStdC.h" struct libwebsocket; diff --git a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h index f26e327158..389e342077 100644 --- a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h @@ -28,7 +28,7 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCRef.h" struct cpBody; diff --git a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h index 13dde02524..20cdb952f6 100644 --- a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h @@ -28,7 +28,7 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN class PhysicsContact; diff --git a/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h index fde230ad1f..e6deb135a4 100644 --- a/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h @@ -29,7 +29,7 @@ #if CC_USE_PHYSICS #include "chipmunk.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h index fca8f708ad..9e5eccf2bf 100644 --- a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h @@ -28,7 +28,7 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include diff --git a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h index f760ec15a6..4167211051 100644 --- a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h @@ -30,7 +30,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" typedef uintptr_t cpGroup; struct cpShape; diff --git a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h index 2027dd23ac..15b8e08e33 100644 --- a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h @@ -29,7 +29,7 @@ #if CC_USE_PHYSICS #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "math/CCGeometry.h" struct cpSpace; diff --git a/cocos/platform/CCApplication.h b/cocos/platform/CCApplication.h index 13049cb7c6..4581bdaaf8 100644 --- a/cocos/platform/CCApplication.h +++ b/cocos/platform/CCApplication.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_CCAPPLICATION_H__ #define __PLATFORM_CCAPPLICATION_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/mac/CCApplication-mac.h" diff --git a/cocos/platform/CCApplicationProtocol.h b/cocos/platform/CCApplicationProtocol.h index 2e56e0524d..6d9697fdb6 100644 --- a/cocos/platform/CCApplicationProtocol.h +++ b/cocos/platform/CCApplicationProtocol.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_PROTOCOL_H__ #define __CC_APPLICATION_PROTOCOL_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCScriptSupport.h" #include "base/CCAutoreleasePool.h" diff --git a/cocos/platform/CCCommon.h b/cocos/platform/CCCommon.h index 91c932c9df..2b80353da9 100644 --- a/cocos/platform/CCCommon.h +++ b/cocos/platform/CCCommon.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_COMMON_H__ #define __CC_COMMON_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/platform/CCDevice.h b/cocos/platform/CCDevice.h index 91e6485559..cda97b218a 100644 --- a/cocos/platform/CCDevice.h +++ b/cocos/platform/CCDevice.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCDEVICE_H__ #define __CCDEVICE_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccMacros.h" #include "base/CCData.h" diff --git a/cocos/platform/CCFileUtils.h b/cocos/platform/CCFileUtils.h index fc8ec3b69a..ee097a3c53 100644 --- a/cocos/platform/CCFileUtils.h +++ b/cocos/platform/CCFileUtils.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" #include "base/CCValue.h" #include "base/CCData.h" diff --git a/cocos/platform/CCGL.h b/cocos/platform/CCGL.h index 348a0c5542..0b3a703e99 100644 --- a/cocos/platform/CCGL.h +++ b/cocos/platform/CCGL.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_CCGL_H__ #define __PLATFORM_CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/mac/CCGL-mac.h" diff --git a/cocos/base/CCPlatformConfig.h b/cocos/platform/CCPlatformConfig.h similarity index 100% rename from cocos/base/CCPlatformConfig.h rename to cocos/platform/CCPlatformConfig.h diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h index 28a5df3217..1f794101a9 100644 --- a/cocos/platform/CCPlatformDefine.h +++ b/cocos/platform/CCPlatformDefine.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_CCPLATFORMDEFINE_H__ #define __PLATFORM_CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/mac/CCPlatformDefine-mac.h" diff --git a/cocos/base/CCPlatformMacros.h b/cocos/platform/CCPlatformMacros.h similarity index 99% rename from cocos/base/CCPlatformMacros.h rename to cocos/platform/CCPlatformMacros.h index 0511fbfb01..455f7c0cf2 100644 --- a/cocos/base/CCPlatformMacros.h +++ b/cocos/platform/CCPlatformMacros.h @@ -29,7 +29,7 @@ Copyright (c) 2013-2014 Chukong Technologies * define some platform specific macros */ #include "base/ccConfig.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #include "platform/CCPlatformDefine.h" /** diff --git a/cocos/platform/CCSAXParser.h b/cocos/platform/CCSAXParser.h index 601e87d831..222affb538 100644 --- a/cocos/platform/CCSAXParser.h +++ b/cocos/platform/CCSAXParser.h @@ -24,7 +24,7 @@ #ifndef __CCSAXPARSER_H__ #define __CCSAXPARSER_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #include "platform/CCCommon.h" #include diff --git a/cocos/platform/CCStdC.h b/cocos/platform/CCStdC.h index a7e258856b..9ea6eba3be 100644 --- a/cocos/platform/CCStdC.h +++ b/cocos/platform/CCStdC.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_CCSTDC_H__ #define __PLATFORM_CCSTDC_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/mac/CCStdC-mac.h" diff --git a/cocos/platform/CCThread.h b/cocos/platform/CCThread.h index b9aa869af3..0598adcf97 100644 --- a/cocos/platform/CCThread.h +++ b/cocos/platform/CCThread.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_PLATFORM_THREAD_H__ #define __CC_PLATFORM_THREAD_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/platform/apple/CCFileUtils-apple.h b/cocos/platform/apple/CCFileUtils-apple.h index 6245ef8bd9..41c24328cc 100644 --- a/cocos/platform/apple/CCFileUtils-apple.h +++ b/cocos/platform/apple/CCFileUtils-apple.h @@ -30,7 +30,7 @@ #include #include "platform/CCFileUtils.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/platform/apple/CCLock-apple.h b/cocos/platform/apple/CCLock-apple.h index 94868a92c1..52b9000100 100644 --- a/cocos/platform/apple/CCLock-apple.h +++ b/cocos/platform/apple/CCLock-apple.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_IPHONE_PLATFORM_CCLOCK_H__ #define __PLATFORM_IPHONE_PLATFORM_CCLOCK_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/platform/ios/CCApplication-ios.h b/cocos/platform/ios/CCApplication-ios.h index b41cabd53a..88c6a4f486 100644 --- a/cocos/platform/ios/CCApplication-ios.h +++ b/cocos/platform/ios/CCApplication-ios.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_IOS_H__ #define __CC_APPLICATION_IOS_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "platform/CCCommon.h" diff --git a/cocos/platform/ios/CCCommon-ios.mm b/cocos/platform/ios/CCCommon-ios.mm index c435c69a94..eb86946277 100644 --- a/cocos/platform/ios/CCCommon-ios.mm +++ b/cocos/platform/ios/CCCommon-ios.mm @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "platform/CCCommon.h" diff --git a/cocos/platform/ios/CCDevice-ios.mm b/cocos/platform/ios/CCDevice-ios.mm index 28438ea897..ab91dc7843 100644 --- a/cocos/platform/ios/CCDevice-ios.mm +++ b/cocos/platform/ios/CCDevice-ios.mm @@ -24,7 +24,7 @@ ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "CCDevice.h" diff --git a/cocos/platform/ios/CCDirectorCaller-ios.h b/cocos/platform/ios/CCDirectorCaller-ios.h index 7802453409..ef91022d00 100644 --- a/cocos/platform/ios/CCDirectorCaller-ios.h +++ b/cocos/platform/ios/CCDirectorCaller-ios.h @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import diff --git a/cocos/platform/ios/CCDirectorCaller-ios.mm b/cocos/platform/ios/CCDirectorCaller-ios.mm index 386d1f1ff4..04099bc2b5 100644 --- a/cocos/platform/ios/CCDirectorCaller-ios.mm +++ b/cocos/platform/ios/CCDirectorCaller-ios.mm @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import "CCDirectorCaller-ios.h" diff --git a/cocos/platform/ios/CCEAGLView-ios.h b/cocos/platform/ios/CCEAGLView-ios.h index ed5a690a98..d3a48f1cff 100644 --- a/cocos/platform/ios/CCEAGLView-ios.h +++ b/cocos/platform/ios/CCEAGLView-ios.h @@ -61,7 +61,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. */ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import diff --git a/cocos/platform/ios/CCEAGLView-ios.mm b/cocos/platform/ios/CCEAGLView-ios.mm index 947e24838d..338b3907a2 100644 --- a/cocos/platform/ios/CCEAGLView-ios.mm +++ b/cocos/platform/ios/CCEAGLView-ios.mm @@ -61,7 +61,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. */ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import "CCEAGLView-ios.h" diff --git a/cocos/platform/ios/CCES2Renderer-ios.h b/cocos/platform/ios/CCES2Renderer-ios.h index 66d9127af3..d581c5a746 100644 --- a/cocos/platform/ios/CCES2Renderer-ios.h +++ b/cocos/platform/ios/CCES2Renderer-ios.h @@ -28,7 +28,7 @@ // Only compile this code on iOS. These files should NOT be included on your Mac project. // But in case they are included, it won't be compiled. -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import "CCESRenderer-ios.h" diff --git a/cocos/platform/ios/CCES2Renderer-ios.m b/cocos/platform/ios/CCES2Renderer-ios.m index c3c64cddb2..3327a5f159 100644 --- a/cocos/platform/ios/CCES2Renderer-ios.m +++ b/cocos/platform/ios/CCES2Renderer-ios.m @@ -28,12 +28,12 @@ // Only compile this code on iOS. These files should NOT be included on your Mac project. // But in case they are included, it won't be compiled. -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import "CCES2Renderer-ios.h" -#import "base/CCPlatformMacros.h" +#import "platform/CCPlatformMacros.h" #import "OpenGL_Internal-ios.h" #if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 diff --git a/cocos/platform/ios/CCESRenderer-ios.h b/cocos/platform/ios/CCESRenderer-ios.h index 9a91a08d1a..af8c4542d0 100644 --- a/cocos/platform/ios/CCESRenderer-ios.h +++ b/cocos/platform/ios/CCESRenderer-ios.h @@ -28,10 +28,10 @@ // Only compile this code on iOS. These files should NOT be included on your Mac project. // But in case they are included, it won't be compiled. -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #import #import diff --git a/cocos/platform/ios/CCGL-ios.h b/cocos/platform/ios/CCGL-ios.h index 5983070072..ea9734473e 100644 --- a/cocos/platform/ios/CCGL-ios.h +++ b/cocos/platform/ios/CCGL-ios.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_IOS_CCGL_H__ #define __PLATFORM_IOS_CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #define glClearDepth glClearDepthf diff --git a/cocos/platform/ios/CCGLViewImpl-ios.h b/cocos/platform/ios/CCGLViewImpl-ios.h index 4370151600..8e0f3286bb 100644 --- a/cocos/platform/ios/CCGLViewImpl-ios.h +++ b/cocos/platform/ios/CCGLViewImpl-ios.h @@ -26,7 +26,7 @@ #ifndef __CC_EGLVIEWIMPL_IPHONE_H__ #define __CC_EGLVIEWIMPL_IPHONE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "base/CCRef.h" diff --git a/cocos/platform/ios/CCGLViewImpl-ios.mm b/cocos/platform/ios/CCGLViewImpl-ios.mm index b0bb0ed2c2..9eeaeddacf 100644 --- a/cocos/platform/ios/CCGLViewImpl-ios.mm +++ b/cocos/platform/ios/CCGLViewImpl-ios.mm @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import diff --git a/cocos/platform/ios/CCImage-ios.mm b/cocos/platform/ios/CCImage-ios.mm index ab288f8f65..d9a0dad034 100644 --- a/cocos/platform/ios/CCImage-ios.mm +++ b/cocos/platform/ios/CCImage-ios.mm @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #import "platform/CCImage.h" diff --git a/cocos/platform/ios/CCPlatformDefine-ios.h b/cocos/platform/ios/CCPlatformDefine-ios.h index 275878fa1c..31f2979e65 100644 --- a/cocos/platform/ios/CCPlatformDefine-ios.h +++ b/cocos/platform/ios/CCPlatformDefine-ios.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include diff --git a/cocos/platform/ios/CCStdC-ios.h b/cocos/platform/ios/CCStdC-ios.h index 6e8bcbd94f..ad3765ab0a 100644 --- a/cocos/platform/ios/CCStdC-ios.h +++ b/cocos/platform/ios/CCStdC-ios.h @@ -26,10 +26,10 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include #include diff --git a/cocos/platform/ios/OpenGL_Internal-ios.h b/cocos/platform/ios/OpenGL_Internal-ios.h index bf5758cd70..d9d9c2acc3 100644 --- a/cocos/platform/ios/OpenGL_Internal-ios.h +++ b/cocos/platform/ios/OpenGL_Internal-ios.h @@ -61,7 +61,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. */ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS /* Generic error reporting */ diff --git a/cocos/platform/mac/CCApplication-mac.h b/cocos/platform/mac/CCApplication-mac.h index 0655b4120b..8ff4c7e166 100644 --- a/cocos/platform/mac/CCApplication-mac.h +++ b/cocos/platform/mac/CCApplication-mac.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_MAC_H__ #define __CC_APPLICATION_MAC_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/CCCommon.h" diff --git a/cocos/platform/mac/CCApplication-mac.mm b/cocos/platform/mac/CCApplication-mac.mm index bae4d94522..3f7f1d4f1c 100644 --- a/cocos/platform/mac/CCApplication-mac.mm +++ b/cocos/platform/mac/CCApplication-mac.mm @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #import "CCApplication.h" diff --git a/cocos/platform/mac/CCCommon-mac.mm b/cocos/platform/mac/CCCommon-mac.mm index 739628c873..e114eab0cd 100644 --- a/cocos/platform/mac/CCCommon-mac.mm +++ b/cocos/platform/mac/CCCommon-mac.mm @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/CCCommon.h" diff --git a/cocos/platform/mac/CCDevice-mac.mm b/cocos/platform/mac/CCDevice-mac.mm index 87dbaeadb5..447a55d327 100644 --- a/cocos/platform/mac/CCDevice-mac.mm +++ b/cocos/platform/mac/CCDevice-mac.mm @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include "platform/CCDevice.h" diff --git a/cocos/platform/mac/CCGL-mac.h b/cocos/platform/mac/CCGL-mac.h index ad1244726d..8e3a985a67 100644 --- a/cocos/platform/mac/CCGL-mac.h +++ b/cocos/platform/mac/CCGL-mac.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFORM_MAC_CCGL_H__ #define __PLATFORM_MAC_CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #import diff --git a/cocos/platform/mac/CCPlatformDefine-mac.h b/cocos/platform/mac/CCPlatformDefine-mac.h index cc87086f88..fef5584edd 100644 --- a/cocos/platform/mac/CCPlatformDefine-mac.h +++ b/cocos/platform/mac/CCPlatformDefine-mac.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC #include diff --git a/cocos/platform/mac/CCStdC-mac.h b/cocos/platform/mac/CCStdC-mac.h index fdb0ace8b9..7da1a774fe 100644 --- a/cocos/platform/mac/CCStdC-mac.h +++ b/cocos/platform/mac/CCStdC-mac.h @@ -26,10 +26,10 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_MAC -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include #include diff --git a/cocos/renderer/CCRenderCommand.h b/cocos/renderer/CCRenderCommand.h index 882cc3518e..7c560cda58 100644 --- a/cocos/renderer/CCRenderCommand.h +++ b/cocos/renderer/CCRenderCommand.h @@ -28,7 +28,7 @@ #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCRenderCommandPool.h b/cocos/renderer/CCRenderCommandPool.h index de4c5e0201..157ff8c2c3 100644 --- a/cocos/renderer/CCRenderCommandPool.h +++ b/cocos/renderer/CCRenderCommandPool.h @@ -28,7 +28,7 @@ #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index db7d74651c..9402fa15a7 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -29,7 +29,7 @@ #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgram.h" #include "platform/CCGL.h" diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index b0e0d182e9..a7eb01b4b1 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -40,7 +40,7 @@ THE SOFTWARE. #include "base/ccConfig.h" #include "base/ccMacros.h" #include "base/CCConfiguration.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/CCDirector.h" #include "renderer/CCGLProgram.h" #include "renderer/ccGLStateCache.h" diff --git a/cocos/renderer/ccGLStateCache.h b/cocos/renderer/ccGLStateCache.h index bb77f763a9..07b25bfe3d 100644 --- a/cocos/renderer/ccGLStateCache.h +++ b/cocos/renderer/ccGLStateCache.h @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include "platform/CCGL.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/renderer/ccShaders.h b/cocos/renderer/ccShaders.h index be82d4e12f..bca7199d22 100644 --- a/cocos/renderer/ccShaders.h +++ b/cocos/renderer/ccShaders.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CCSHADER_H__ #include "platform/CCGL.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/storage/local-storage/LocalStorage-android.cpp b/cocos/storage/local-storage/LocalStorage-android.cpp index 352a80ef5d..93ea42ec15 100644 --- a/cocos/storage/local-storage/LocalStorage-android.cpp +++ b/cocos/storage/local-storage/LocalStorage-android.cpp @@ -29,7 +29,7 @@ */ #include "LocalStorage.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/storage/local-storage/LocalStorage.cpp b/cocos/storage/local-storage/LocalStorage.cpp index f925b12d71..f91a134a7d 100644 --- a/cocos/storage/local-storage/LocalStorage.cpp +++ b/cocos/storage/local-storage/LocalStorage.cpp @@ -28,7 +28,7 @@ */ #include "LocalStorage.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) diff --git a/cocos/ui/UIDeprecated.h b/cocos/ui/UIDeprecated.h index f5ec082110..508322d061 100644 --- a/cocos/ui/UIDeprecated.h +++ b/cocos/ui/UIDeprecated.h @@ -25,7 +25,7 @@ #ifndef cocos2d_libs_UIDeprecated_h #define cocos2d_libs_UIDeprecated_h -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "ui/UIWidget.h" #include "ui/UILayout.h" #include "ui/UIListView.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-android.h b/cocos/ui/UIEditBox/UIEditBoxImpl-android.h index 11a2a0b7e9..706a10d4d4 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-android.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-android.h @@ -26,7 +26,7 @@ #ifndef __UIEDITBOXIMPLANDROID_H__ #define __UIEDITBOXIMPLANDROID_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h b/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h index 453166ff47..20a3636481 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLIOS_H__ #define __UIEditBoxIMPLIOS_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h index 326187a689..d9b47a5f43 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLMAC_H__ #define __UIEditBoxIMPLMAC_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index 1ecc777ed4..819e1daddd 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -24,7 +24,7 @@ ****************************************************************************/ #include "UIEditBoxImpl-win32.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "UIEditBox.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h index 61ff89bd81..2d2e4e28f7 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h @@ -26,7 +26,7 @@ #ifndef __UIEditBoxIMPLWIN_H__ #define __UIEditBoxIMPLWIN_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp index 26f1154b93..efffa3d87e 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "UIEditBoxImpl-wp8.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h index c4164d67a1..f819fe9f47 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h @@ -24,7 +24,7 @@ THE SOFTWARE. #ifndef __UIEditBoxIMPLWP8_H__ #define __UIEditBoxIMPLWP8_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "UIEditBoxImpl.h" diff --git a/cocos/ui/UIHelper.h b/cocos/ui/UIHelper.h index fb6136e7c7..20e8ee3cf2 100644 --- a/cocos/ui/UIHelper.h +++ b/cocos/ui/UIHelper.h @@ -26,7 +26,7 @@ THE SOFTWARE. #define __UIHELPER_H__ #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "ui/GUIExport.h" NS_CC_BEGIN diff --git a/cocos/ui/UIScale9Sprite.h b/cocos/ui/UIScale9Sprite.h index 6a0d8b7e4f..51c32aea2c 100644 --- a/cocos/ui/UIScale9Sprite.h +++ b/cocos/ui/UIScale9Sprite.h @@ -28,7 +28,7 @@ #include "2d/CCNode.h" #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteBatchNode.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "ui/GUIExport.h" NS_CC_BEGIN diff --git a/cocos/ui/UIWebView.mm b/cocos/ui/UIWebView.mm index 1f8ef6ae80..d537d7f00c 100644 --- a/cocos/ui/UIWebView.mm +++ b/cocos/ui/UIWebView.mm @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) diff --git a/tests/cpp-tests/proj.android/project.properties b/tests/cpp-tests/proj.android/project.properties index 572f7c30de..e8b0265294 100644 --- a/tests/cpp-tests/proj.android/project.properties +++ b/tests/cpp-tests/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=android-20 android.library.reference.1=../../../cocos/platform/android/java From 0972506bf543688cbfb43c99e814b2196ac8b473 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 17:41:49 -0700 Subject: [PATCH 47/61] compiles and runs on linux --- cocos/base/CCController.h | 2 +- cocos/platform/android/CCApplication-android.cpp | 2 +- cocos/platform/android/CCCommon-android.cpp | 2 +- cocos/platform/android/CCDevice-android.cpp | 2 +- cocos/platform/android/CCFileUtils-android.cpp | 2 +- cocos/platform/android/CCGLViewImpl-android.cpp | 2 +- cocos/platform/android/javaactivity-android.cpp | 2 +- cocos/platform/linux/CCApplication-linux.cpp | 2 +- cocos/platform/linux/CCApplication-linux.h | 2 +- cocos/platform/linux/CCCommon-linux.cpp | 2 +- cocos/platform/linux/CCDevice-linux.cpp | 2 +- cocos/platform/linux/CCFileUtils-linux.cpp | 2 +- cocos/platform/linux/CCFileUtils-linux.h | 4 ++-- cocos/platform/linux/CCGL-linux.h | 2 +- cocos/platform/linux/CCPlatformDefine-linux.h | 2 +- cocos/platform/linux/CCStdC-linux.cpp | 2 +- cocos/platform/linux/CCStdC-linux.h | 4 ++-- cocos/platform/win32/CCApplication-win32.cpp | 2 +- cocos/platform/win32/CCCommon-win32.cpp | 2 +- cocos/platform/win32/CCDevice-win32.cpp | 2 +- cocos/platform/win32/CCFileUtils-win32.cpp | 2 +- cocos/platform/win32/CCStdC-win32.cpp | 2 +- cocos/platform/winrt/CCDevice.cpp | 2 +- cocos/platform/winrt/CCGLViewImpl.cpp | 2 +- cocos/platform/winrt/CCPThreadWinRT.cpp | 2 +- cocos/platform/winrt/DirectXBase.cpp | 2 +- cocos/ui/UIWebView.cpp | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cocos/base/CCController.h b/cocos/base/CCController.h index 0c596f3cfe..0cc6440800 100644 --- a/cocos/base/CCController.h +++ b/cocos/base/CCController.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__CCController__ #define __cocos2d_libs__CCController__ -#include "CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include #include diff --git a/cocos/platform/android/CCApplication-android.cpp b/cocos/platform/android/CCApplication-android.cpp index b7ff8bb8db..e542fcf0b5 100644 --- a/cocos/platform/android/CCApplication-android.cpp +++ b/cocos/platform/android/CCApplication-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "jni/JniHelper.h" diff --git a/cocos/platform/android/CCCommon-android.cpp b/cocos/platform/android/CCCommon-android.cpp index 0692077c21..0052a0b6c9 100644 --- a/cocos/platform/android/CCCommon-android.cpp +++ b/cocos/platform/android/CCCommon-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "platform/CCCommon.h" diff --git a/cocos/platform/android/CCDevice-android.cpp b/cocos/platform/android/CCDevice-android.cpp index 3ccb441d19..72119dfb10 100644 --- a/cocos/platform/android/CCDevice-android.cpp +++ b/cocos/platform/android/CCDevice-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "platform/CCDevice.h" diff --git a/cocos/platform/android/CCFileUtils-android.cpp b/cocos/platform/android/CCFileUtils-android.cpp index 04ef3e58a9..6045c1f371 100644 --- a/cocos/platform/android/CCFileUtils-android.cpp +++ b/cocos/platform/android/CCFileUtils-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "CCFileUtils-android.h" diff --git a/cocos/platform/android/CCGLViewImpl-android.cpp b/cocos/platform/android/CCGLViewImpl-android.cpp index 565bbe920a..2e218596a9 100644 --- a/cocos/platform/android/CCGLViewImpl-android.cpp +++ b/cocos/platform/android/CCGLViewImpl-android.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "CCGLViewImpl-android.h" diff --git a/cocos/platform/android/javaactivity-android.cpp b/cocos/platform/android/javaactivity-android.cpp index e8542347d1..488fe4dd01 100644 --- a/cocos/platform/android/javaactivity-android.cpp +++ b/cocos/platform/android/javaactivity-android.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "CCApplication-android.h" diff --git a/cocos/platform/linux/CCApplication-linux.cpp b/cocos/platform/linux/CCApplication-linux.cpp index 65000f5a3c..65310a9b0c 100644 --- a/cocos/platform/linux/CCApplication-linux.cpp +++ b/cocos/platform/linux/CCApplication-linux.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "CCApplication-linux.h" diff --git a/cocos/platform/linux/CCApplication-linux.h b/cocos/platform/linux/CCApplication-linux.h index f8fadac55e..5c7163fc6e 100644 --- a/cocos/platform/linux/CCApplication-linux.h +++ b/cocos/platform/linux/CCApplication-linux.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef CCAPLICATION_H_ #define CCAPLICATION_H_ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/CCCommon.h" diff --git a/cocos/platform/linux/CCCommon-linux.cpp b/cocos/platform/linux/CCCommon-linux.cpp index 63fa8ed8ce..18726dbb8e 100644 --- a/cocos/platform/linux/CCCommon-linux.cpp +++ b/cocos/platform/linux/CCCommon-linux.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/CCCommon.h" diff --git a/cocos/platform/linux/CCDevice-linux.cpp b/cocos/platform/linux/CCDevice-linux.cpp index 24b70d05b2..76c0f79c2f 100644 --- a/cocos/platform/linux/CCDevice-linux.cpp +++ b/cocos/platform/linux/CCDevice-linux.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/CCDevice.h" diff --git a/cocos/platform/linux/CCFileUtils-linux.cpp b/cocos/platform/linux/CCFileUtils-linux.cpp index f34a231088..a1c047b5bd 100644 --- a/cocos/platform/linux/CCFileUtils-linux.cpp +++ b/cocos/platform/linux/CCFileUtils-linux.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "CCFileUtils-linux.h" diff --git a/cocos/platform/linux/CCFileUtils-linux.h b/cocos/platform/linux/CCFileUtils-linux.h index e9a38a61eb..89b38d5702 100644 --- a/cocos/platform/linux/CCFileUtils-linux.h +++ b/cocos/platform/linux/CCFileUtils-linux.h @@ -25,11 +25,11 @@ THE SOFTWARE. #ifndef __CC_FILEUTILS_LINUX_H__ #define __CC_FILEUTILS_LINUX_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/CCFileUtils.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" #include #include diff --git a/cocos/platform/linux/CCGL-linux.h b/cocos/platform/linux/CCGL-linux.h index ae7b1dc46b..9b882a4838 100644 --- a/cocos/platform/linux/CCGL-linux.h +++ b/cocos/platform/linux/CCGL-linux.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "GL/glew.h" diff --git a/cocos/platform/linux/CCPlatformDefine-linux.h b/cocos/platform/linux/CCPlatformDefine-linux.h index 6f75e27c01..8a85486672 100644 --- a/cocos/platform/linux/CCPlatformDefine-linux.h +++ b/cocos/platform/linux/CCPlatformDefine-linux.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include diff --git a/cocos/platform/linux/CCStdC-linux.cpp b/cocos/platform/linux/CCStdC-linux.cpp index 8cbffa3835..d0be296fdb 100644 --- a/cocos/platform/linux/CCStdC-linux.cpp +++ b/cocos/platform/linux/CCStdC-linux.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "CCStdC-linux.h" diff --git a/cocos/platform/linux/CCStdC-linux.h b/cocos/platform/linux/CCStdC-linux.h index 41f03fcd3d..c1669fd09b 100644 --- a/cocos/platform/linux/CCStdC-linux.h +++ b/cocos/platform/linux/CCStdC-linux.h @@ -26,10 +26,10 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include diff --git a/cocos/platform/win32/CCApplication-win32.cpp b/cocos/platform/win32/CCApplication-win32.cpp index 562c7835ed..28f9c588dd 100644 --- a/cocos/platform/win32/CCApplication-win32.cpp +++ b/cocos/platform/win32/CCApplication-win32.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "CCApplication.h" diff --git a/cocos/platform/win32/CCCommon-win32.cpp b/cocos/platform/win32/CCCommon-win32.cpp index a1e2319055..bbaf289aa8 100644 --- a/cocos/platform/win32/CCCommon-win32.cpp +++ b/cocos/platform/win32/CCCommon-win32.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/CCCommon.h" diff --git a/cocos/platform/win32/CCDevice-win32.cpp b/cocos/platform/win32/CCDevice-win32.cpp index ed69905ab1..e31274ab4e 100644 --- a/cocos/platform/win32/CCDevice-win32.cpp +++ b/cocos/platform/win32/CCDevice-win32.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/CCDevice.h" diff --git a/cocos/platform/win32/CCFileUtils-win32.cpp b/cocos/platform/win32/CCFileUtils-win32.cpp index 1e174ef13e..719910c198 100644 --- a/cocos/platform/win32/CCFileUtils-win32.cpp +++ b/cocos/platform/win32/CCFileUtils-win32.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "CCFileUtilsWin32.h" diff --git a/cocos/platform/win32/CCStdC-win32.cpp b/cocos/platform/win32/CCStdC-win32.cpp index c9e6481673..8f46d67509 100644 --- a/cocos/platform/win32/CCStdC-win32.cpp +++ b/cocos/platform/win32/CCStdC-win32.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCStdC.h" -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #ifndef __MINGW32__ diff --git a/cocos/platform/winrt/CCDevice.cpp b/cocos/platform/winrt/CCDevice.cpp index eedd87cd87..75d01764ab 100644 --- a/cocos/platform/winrt/CCDevice.cpp +++ b/cocos/platform/winrt/CCDevice.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "cocos2d.h" diff --git a/cocos/platform/winrt/CCGLViewImpl.cpp b/cocos/platform/winrt/CCGLViewImpl.cpp index 9bf0241ab6..0a4535847a 100644 --- a/cocos/platform/winrt/CCGLViewImpl.cpp +++ b/cocos/platform/winrt/CCGLViewImpl.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "CCGLViewImpl.h" diff --git a/cocos/platform/winrt/CCPThreadWinRT.cpp b/cocos/platform/winrt/CCPThreadWinRT.cpp index 5bd691eb9f..33df10ee59 100644 --- a/cocos/platform/winrt/CCPThreadWinRT.cpp +++ b/cocos/platform/winrt/CCPThreadWinRT.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "CCPThreadWinRT.h" diff --git a/cocos/platform/winrt/DirectXBase.cpp b/cocos/platform/winrt/DirectXBase.cpp index 27166a9758..21e1359e6f 100644 --- a/cocos/platform/winrt/DirectXBase.cpp +++ b/cocos/platform/winrt/DirectXBase.cpp @@ -17,7 +17,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //----------------------------------------------------------------------------------------------- -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "DirectXBase.h" diff --git a/cocos/ui/UIWebView.cpp b/cocos/ui/UIWebView.cpp index 9a3aa24263..f20d34cdfa 100644 --- a/cocos/ui/UIWebView.cpp +++ b/cocos/ui/UIWebView.cpp @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) From fdabaa30822ed9d52895cbc5669895ae19373b5f Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 17:53:08 -0700 Subject: [PATCH 48/61] Compiles on Android --- cocos/platform/android/CCApplication-android.h | 2 +- cocos/platform/android/CCFileUtils-android.h | 4 ++-- cocos/platform/android/CCGL-android.h | 2 +- cocos/platform/android/CCGLViewImpl-android.h | 2 +- cocos/platform/android/CCPlatformDefine-android.h | 2 +- cocos/platform/android/CCStdC-android.h | 4 ++-- cocos/platform/android/jni/JniHelper.h | 2 +- cocos/platform/win32/CCApplication-win32.cpp | 2 +- cocos/platform/win32/CCApplication-win32.h | 4 ++-- cocos/platform/win32/CCCommon-win32.cpp | 2 +- cocos/platform/win32/CCDevice-win32.cpp | 2 +- cocos/platform/win32/CCFileUtils-win32.cpp | 2 +- cocos/platform/win32/CCFileUtils-win32.h | 4 ++-- cocos/platform/win32/CCGL-win32.h | 2 +- cocos/platform/win32/CCPlatformDefine-win32.h | 2 +- cocos/platform/win32/CCStdC-win32.cpp | 3 ++- cocos/platform/win32/CCStdC-win32.h | 4 ++-- cocos/platform/winrt/CCApplication.h | 2 +- cocos/platform/winrt/CCCommon.cpp | 2 +- cocos/platform/winrt/CCDevice.cpp | 2 +- cocos/platform/winrt/CCFileUtilsWinRT.h | 2 +- cocos/platform/winrt/CCGLViewImpl.h | 2 +- cocos/platform/winrt/CCPThreadWinRT.h | 4 ++-- cocos/platform/winrt/CCPlatformDefine.h | 2 +- cocos/platform/winrt/CCStdC.cpp | 2 +- cocos/platform/winrt/CCStdC.h | 4 ++-- cocos/platform/winrt/CCWinRTUtils.h | 2 +- cocos/platform/winrt/DirectXBase.h | 2 +- cocos/platform/winrt/DirectXHelper.h | 2 +- 29 files changed, 37 insertions(+), 36 deletions(-) diff --git a/cocos/platform/android/CCApplication-android.h b/cocos/platform/android/CCApplication-android.h index 9a921d7b75..e0a3975824 100644 --- a/cocos/platform/android/CCApplication-android.h +++ b/cocos/platform/android/CCApplication-android.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_ANDROID_H__ #define __CC_APPLICATION_ANDROID_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "platform/CCCommon.h" diff --git a/cocos/platform/android/CCFileUtils-android.h b/cocos/platform/android/CCFileUtils-android.h index 2b461d49b4..d2415da2f7 100644 --- a/cocos/platform/android/CCFileUtils-android.h +++ b/cocos/platform/android/CCFileUtils-android.h @@ -25,11 +25,11 @@ Copyright (c) 2013-2014 Chukong Technologies Inc. #ifndef __CC_FILEUTILS_ANDROID_H__ #define __CC_FILEUTILS_ANDROID_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "platform/CCFileUtils.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" #include #include diff --git a/cocos/platform/android/CCGL-android.h b/cocos/platform/android/CCGL-android.h index 334322b8af..46989ec1ae 100644 --- a/cocos/platform/android/CCGL-android.h +++ b/cocos/platform/android/CCGL-android.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #define glClearDepth glClearDepthf diff --git a/cocos/platform/android/CCGLViewImpl-android.h b/cocos/platform/android/CCGLViewImpl-android.h index 820189e148..a05e200047 100644 --- a/cocos/platform/android/CCGLViewImpl-android.h +++ b/cocos/platform/android/CCGLViewImpl-android.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_EGLVIEWIMPL_ANDROID_H__ #define __CC_EGLVIEWIMPL_ANDROID_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "base/CCRef.h" diff --git a/cocos/platform/android/CCPlatformDefine-android.h b/cocos/platform/android/CCPlatformDefine-android.h index 5fe38ce2dd..8e256d02be 100644 --- a/cocos/platform/android/CCPlatformDefine-android.h +++ b/cocos/platform/android/CCPlatformDefine-android.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "android/log.h" diff --git a/cocos/platform/android/CCStdC-android.h b/cocos/platform/android/CCStdC-android.h index cc74a150fb..37c47a1583 100644 --- a/cocos/platform/android/CCStdC-android.h +++ b/cocos/platform/android/CCStdC-android.h @@ -26,10 +26,10 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include #include diff --git a/cocos/platform/android/jni/JniHelper.h b/cocos/platform/android/jni/JniHelper.h index a33438da79..1eb982bf75 100644 --- a/cocos/platform/android/jni/JniHelper.h +++ b/cocos/platform/android/jni/JniHelper.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include #include -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/platform/win32/CCApplication-win32.cpp b/cocos/platform/win32/CCApplication-win32.cpp index 28f9c588dd..b419c69e33 100644 --- a/cocos/platform/win32/CCApplication-win32.cpp +++ b/cocos/platform/win32/CCApplication-win32.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 -#include "CCApplication.h" +#include "platform/CCApplication.h" #include "base/CCDirector.h" #include #include "platform/CCFileUtils.h" diff --git a/cocos/platform/win32/CCApplication-win32.h b/cocos/platform/win32/CCApplication-win32.h index 7167a4d747..bd4afd7a3d 100644 --- a/cocos/platform/win32/CCApplication-win32.h +++ b/cocos/platform/win32/CCApplication-win32.h @@ -25,10 +25,10 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_WIN32_H__ #define __CC_APPLICATION_WIN32_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 -#include "CCStdC.h" +#include "platform/CCStdC.h" #include "platform/CCCommon.h" #include "platform/CCApplicationProtocol.h" #include diff --git a/cocos/platform/win32/CCCommon-win32.cpp b/cocos/platform/win32/CCCommon-win32.cpp index bbaf289aa8..7e00f9afe5 100644 --- a/cocos/platform/win32/CCCommon-win32.cpp +++ b/cocos/platform/win32/CCCommon-win32.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/CCCommon.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" NS_CC_BEGIN diff --git a/cocos/platform/win32/CCDevice-win32.cpp b/cocos/platform/win32/CCDevice-win32.cpp index e31274ab4e..fc53415347 100644 --- a/cocos/platform/win32/CCDevice-win32.cpp +++ b/cocos/platform/win32/CCDevice-win32.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "platform/CCDevice.h" #include "platform/CCFileUtils.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" NS_CC_BEGIN diff --git a/cocos/platform/win32/CCFileUtils-win32.cpp b/cocos/platform/win32/CCFileUtils-win32.cpp index 719910c198..b4e1f936d0 100644 --- a/cocos/platform/win32/CCFileUtils-win32.cpp +++ b/cocos/platform/win32/CCFileUtils-win32.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 -#include "CCFileUtilsWin32.h" +#include "CCFileUtils-win32.h" #include "platform/CCCommon.h" #include diff --git a/cocos/platform/win32/CCFileUtils-win32.h b/cocos/platform/win32/CCFileUtils-win32.h index fdb2b9106b..9495888be4 100644 --- a/cocos/platform/win32/CCFileUtils-win32.h +++ b/cocos/platform/win32/CCFileUtils-win32.h @@ -25,11 +25,11 @@ THE SOFTWARE. #ifndef __CC_FILEUTILS_WIN32_H__ #define __CC_FILEUTILS_WIN32_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/CCFileUtils.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" #include #include diff --git a/cocos/platform/win32/CCGL-win32.h b/cocos/platform/win32/CCGL-win32.h index 2ed38288bc..592cecffc7 100644 --- a/cocos/platform/win32/CCGL-win32.h +++ b/cocos/platform/win32/CCGL-win32.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "GL/glew.h" diff --git a/cocos/platform/win32/CCPlatformDefine-win32.h b/cocos/platform/win32/CCPlatformDefine-win32.h index 354cbf80a7..3e6cda860c 100644 --- a/cocos/platform/win32/CCPlatformDefine-win32.h +++ b/cocos/platform/win32/CCPlatformDefine-win32.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #ifdef __MINGW32__ diff --git a/cocos/platform/win32/CCStdC-win32.cpp b/cocos/platform/win32/CCStdC-win32.cpp index 8f46d67509..aebe38de3e 100644 --- a/cocos/platform/win32/CCStdC-win32.cpp +++ b/cocos/platform/win32/CCStdC-win32.cpp @@ -23,11 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCStdC.h" #include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 +#include "platform/CCStdC.h" + #ifndef __MINGW32__ NS_CC_BEGIN diff --git a/cocos/platform/win32/CCStdC-win32.h b/cocos/platform/win32/CCStdC-win32.h index 1a4de0d996..a900689c53 100644 --- a/cocos/platform/win32/CCStdC-win32.h +++ b/cocos/platform/win32/CCStdC-win32.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include @@ -35,7 +35,7 @@ THE SOFTWARE. typedef SSIZE_T ssize_t; #endif // __SSIZE_T -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include // for math.h on win32 platform diff --git a/cocos/platform/winrt/CCApplication.h b/cocos/platform/winrt/CCApplication.h index 97028820e4..8f0c58d748 100644 --- a/cocos/platform/winrt/CCApplication.h +++ b/cocos/platform/winrt/CCApplication.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CC_APPLICATION_WINRT_H__ #define __CC_APPLICATION_WINRT_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "CCStdC.h" diff --git a/cocos/platform/winrt/CCCommon.cpp b/cocos/platform/winrt/CCCommon.cpp index 2ba71ff75d..5f1e3a141f 100644 --- a/cocos/platform/winrt/CCCommon.cpp +++ b/cocos/platform/winrt/CCCommon.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "platform/CCCommon.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" #include "CCWinRTUtils.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) diff --git a/cocos/platform/winrt/CCDevice.cpp b/cocos/platform/winrt/CCDevice.cpp index 75d01764ab..bc2b9ac6a5 100644 --- a/cocos/platform/winrt/CCDevice.cpp +++ b/cocos/platform/winrt/CCDevice.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "platform/CCDevice.h" #include "platform/CCFileUtils.h" #include "platform/winrt/CCFreeTypeFont.h" -#include "CCStdC.h" +#include "platform/CCStdC.h" using namespace Windows::Graphics::Display; using namespace Windows::Devices::Sensors; diff --git a/cocos/platform/winrt/CCFileUtilsWinRT.h b/cocos/platform/winrt/CCFileUtilsWinRT.h index 8e130e496e..e2054cc91b 100644 --- a/cocos/platform/winrt/CCFileUtilsWinRT.h +++ b/cocos/platform/winrt/CCFileUtilsWinRT.h @@ -29,7 +29,7 @@ #include #include "platform/CCFileUtils.h" -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/platform/winrt/CCGLViewImpl.h b/cocos/platform/winrt/CCGLViewImpl.h index a678936133..9b87c30fda 100644 --- a/cocos/platform/winrt/CCGLViewImpl.h +++ b/cocos/platform/winrt/CCGLViewImpl.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CC_EGLVIEWIMPL_WINRT_H__ #define __CC_EGLVIEWIMPL_WINRT_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include "CCStdC.h" diff --git a/cocos/platform/winrt/CCPThreadWinRT.h b/cocos/platform/winrt/CCPThreadWinRT.h index 2a75a9535a..b6d3dfbe0c 100644 --- a/cocos/platform/winrt/CCPThreadWinRT.h +++ b/cocos/platform/winrt/CCPThreadWinRT.h @@ -27,10 +27,10 @@ THE SOFTWARE. #define __CCPTHREADWINRT_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include diff --git a/cocos/platform/winrt/CCPlatformDefine.h b/cocos/platform/winrt/CCPlatformDefine.h index 4ecb58ea25..d0ed82ed65 100644 --- a/cocos/platform/winrt/CCPlatformDefine.h +++ b/cocos/platform/winrt/CCPlatformDefine.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ -#include "CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 #if 0 diff --git a/cocos/platform/winrt/CCStdC.cpp b/cocos/platform/winrt/CCStdC.cpp index f05d9ccfef..ef29c37191 100644 --- a/cocos/platform/winrt/CCStdC.cpp +++ b/cocos/platform/winrt/CCStdC.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCStdC.h" +#include "platform/CCStdC.h" int CC_DLL gettimeofday(struct timeval * val, struct timezone *) { diff --git a/cocos/platform/winrt/CCStdC.h b/cocos/platform/winrt/CCStdC.h index 21d91faea6..97d53e2631 100644 --- a/cocos/platform/winrt/CCStdC.h +++ b/cocos/platform/winrt/CCStdC.h @@ -26,11 +26,11 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include diff --git a/cocos/platform/winrt/CCWinRTUtils.h b/cocos/platform/winrt/CCWinRTUtils.h index f289ead8c4..5671e352cf 100644 --- a/cocos/platform/winrt/CCWinRTUtils.h +++ b/cocos/platform/winrt/CCWinRTUtils.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCWINRT_UTILS_H__ #define __CCWINRT_UTILS_H__ -#include "base/CCPlatformMacros.h" +#include "platform/CCPlatformMacros.h" #include #include diff --git a/cocos/platform/winrt/DirectXBase.h b/cocos/platform/winrt/DirectXBase.h index 73e7a1276b..87f3aef4cc 100644 --- a/cocos/platform/winrt/DirectXBase.h +++ b/cocos/platform/winrt/DirectXBase.h @@ -18,7 +18,7 @@ //----------------------------------------------------------------------------------------------- #pragma once -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) #include diff --git a/cocos/platform/winrt/DirectXHelper.h b/cocos/platform/winrt/DirectXHelper.h index 6065191353..9ff8d58538 100644 --- a/cocos/platform/winrt/DirectXHelper.h +++ b/cocos/platform/winrt/DirectXHelper.h @@ -19,7 +19,7 @@ #pragma once -#include "base/CCPlatformConfig.h" +#include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) // Helper utilities to make Win32 APIs work with exceptions. From 4d57e991ea4058434e1db2593a62f8200e5f31f9 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 18:07:24 -0700 Subject: [PATCH 49/61] Compiles in Win32 --- cocos/2d/libcocos2d.vcxproj | 32 +++++------ cocos/2d/libcocos2d.vcxproj.filters | 84 ++++++++++++++--------------- cocos/audio/win32/MciPlayer.h | 2 +- cocos/cocos2d.h | 2 +- tests/cpp-tests/proj.win32/main.h | 2 +- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 3942ace1ee..7ac28368b6 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -1,4 +1,4 @@ - + @@ -374,12 +374,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - - - - - - + + + + + + @@ -408,7 +408,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - + @@ -747,12 +747,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - - - - - - + + + + + + @@ -784,8 +784,8 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas + - @@ -895,4 +895,4 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\releas - + \ No newline at end of file diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 71ff22990a..dfcdb7b987 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -631,21 +631,6 @@ renderer - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - math @@ -718,9 +703,6 @@ storage - - platform\desktop - platform @@ -1126,9 +1108,6 @@ ui\UIWidgets\EditBox - - ui\UIWidgets\EditBox - extension\GUI\CCControlExtensions @@ -1165,6 +1144,27 @@ ui\UIWidgets\EditBox + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\desktop + + + ui\UIWidgets\EditBox +
@@ -1639,21 +1639,6 @@ platform\win32\compat - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - math @@ -1744,9 +1729,6 @@ storage - - platform\desktop - platform @@ -2248,9 +2230,6 @@ ui\UIWidgets\EditBox - - ui\UIWidgets\EditBox - extension\GUI\CCControlExtensions @@ -2290,6 +2269,27 @@ ui\UIWidgets\EditBox + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\desktop + + + ui\UIWidgets\EditBox + diff --git a/cocos/audio/win32/MciPlayer.h b/cocos/audio/win32/MciPlayer.h index ba13b12759..a004265fdb 100644 --- a/cocos/audio/win32/MciPlayer.h +++ b/cocos/audio/win32/MciPlayer.h @@ -1,7 +1,7 @@ #ifndef _MCI_PLAYER_WIN32_H_ #define _MCI_PLAYER_WIN32_H_ -#include "CCStdC.h" +#include "platform/CCStdC.h" #include #include using namespace std; diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 328ea8d43f..f240c4f7e8 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -201,7 +201,7 @@ THE SOFTWARE. #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #include "platform/win32/CCApplication-win32.h" - #include "platform/desktop/CCGLViewImpl-win32.h" + #include "platform/desktop/CCGLViewImpl-desktop.h" #include "platform/win32/CCGL-win32.h" #include "platform/win32/CCStdC-win32.h" #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 diff --git a/tests/cpp-tests/proj.win32/main.h b/tests/cpp-tests/proj.win32/main.h index e74708bdf2..095e22791f 100644 --- a/tests/cpp-tests/proj.win32/main.h +++ b/tests/cpp-tests/proj.win32/main.h @@ -8,6 +8,6 @@ #include // C RunTime Header Files -#include "CCStdC.h" +#include "platform/CCStdC.h" #endif // __MAIN_H__ From 6b4323642a26f869e2fc7de7918ab1a122107201 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 18:15:16 -0700 Subject: [PATCH 50/61] compiles on winphone8 --- cocos/2d/cocos2d_wp8.vcxproj | 8 ++++++-- cocos/2d/cocos2d_wp8.vcxproj.filters | 24 ++++++++++++++++++------ cocos/platform/CCPlatformDefine.h | 2 +- cocos/platform/winrt/CCApplication.cpp | 2 +- cocos/platform/winrt/CCApplication.h | 2 +- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/cocos2d_wp8.vcxproj index 58078bb03d..f7c587db4a 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/cocos2d_wp8.vcxproj @@ -495,8 +495,6 @@ - - @@ -553,13 +551,19 @@ + + + + + + diff --git a/cocos/2d/cocos2d_wp8.vcxproj.filters b/cocos/2d/cocos2d_wp8.vcxproj.filters index 0634b1b385..bafd33af76 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj.filters +++ b/cocos/2d/cocos2d_wp8.vcxproj.filters @@ -1105,12 +1105,6 @@ base - - base - - - base - base @@ -1346,6 +1340,24 @@ 3d + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + diff --git a/cocos/platform/CCPlatformDefine.h b/cocos/platform/CCPlatformDefine.h index 1f794101a9..0b218eb6ca 100644 --- a/cocos/platform/CCPlatformDefine.h +++ b/cocos/platform/CCPlatformDefine.h @@ -37,7 +37,7 @@ THE SOFTWARE. #elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCPlatformDefine-win32.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_WP8 -#include "platform/wp8/CCPlatformDefine-wp8.h" +#include "platform/winrt/CCPlatformDefine.h" #elif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #include "platform/linux/CCPlatformDefine-linux.h" #endif diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index 084ae68061..7daa28d785 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -22,7 +22,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 "CCApplication.h" +#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCGLViewImpl.h" #else diff --git a/cocos/platform/winrt/CCApplication.h b/cocos/platform/winrt/CCApplication.h index 8f0c58d748..ac6435527e 100644 --- a/cocos/platform/winrt/CCApplication.h +++ b/cocos/platform/winrt/CCApplication.h @@ -28,7 +28,7 @@ THE SOFTWARE. #include "platform/CCPlatformConfig.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "CCStdC.h" +#include "platform/CCStdC.h" #include "platform/CCCommon.h" #include "platform/CCApplicationProtocol.h" #include From d5a6289a9b47c6b338d1b91e81f3fa81754e20d8 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 18:22:11 -0700 Subject: [PATCH 51/61] compiles on wp8 --- cocos/2d/cocos2d_wp8.vcxproj | 4 ++-- cocos/2d/cocos2d_wp8.vcxproj.filters | 12 ++++++------ cocos/platform/winrt/CCApplication.cpp | 2 +- cocos/platform/winrt/CCCommon.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp | 3 ++- cocos/ui/proj.wp8/libGUI.vcxproj | 4 ++-- cocos/ui/proj.wp8/libGUI.vcxproj.filters | 4 ++-- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cocos/2d/cocos2d_wp8.vcxproj b/cocos/2d/cocos2d_wp8.vcxproj index f7c587db4a..55c197c118 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj +++ b/cocos/2d/cocos2d_wp8.vcxproj @@ -341,7 +341,7 @@ - + @@ -580,7 +580,7 @@ - + diff --git a/cocos/2d/cocos2d_wp8.vcxproj.filters b/cocos/2d/cocos2d_wp8.vcxproj.filters index bafd33af76..f2ef328bdc 100644 --- a/cocos/2d/cocos2d_wp8.vcxproj.filters +++ b/cocos/2d/cocos2d_wp8.vcxproj.filters @@ -611,9 +611,6 @@ platform - - platform\wp8 - 2d @@ -659,6 +656,9 @@ 3d + + platform\wp8 + @@ -1292,9 +1292,6 @@ platform - - platform\wp8 - 2d @@ -1358,6 +1355,9 @@ platform + + platform\wp8 + diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index 7daa28d785..c039b4a8f7 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT #include "platform/winrt/CCGLViewImpl.h" #else -#include "platform/wp8/CCGLViewImpl.h" +#include "platform/wp8/CCGLViewImpl-wp8.h" #endif #include "base/CCDirector.h" #include diff --git a/cocos/platform/winrt/CCCommon.cpp b/cocos/platform/winrt/CCCommon.cpp index 5f1e3a141f..4c8c2c6663 100644 --- a/cocos/platform/winrt/CCCommon.cpp +++ b/cocos/platform/winrt/CCCommon.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "CCWinRTUtils.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "platform/wp8/CCGLViewImpl.h" +#include "platform/wp8/CCGLViewImpl-wp8.h" #endif #if defined(VLD_DEBUG_MEMORY) diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp index efffa3d87e..892e53daf6 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp @@ -27,9 +27,10 @@ THE SOFTWARE. #include "UIEditBoxImpl-wp8.h" #include "UIEditBox.h" -#include "CCGLViewImpl.h" +#include "CCGLViewImpl-wp8.h" #include "base/CCScriptSupport.h" #include "base/ccUTF8.h" +#include "2d/CCLabel.h" NS_CC_BEGIN diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj b/cocos/ui/proj.wp8/libGUI.vcxproj index 47ec5d9d10..73289725e6 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj +++ b/cocos/ui/proj.wp8/libGUI.vcxproj @@ -185,8 +185,8 @@ + - @@ -214,7 +214,7 @@ - + diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj.filters b/cocos/ui/proj.wp8/libGUI.vcxproj.filters index c0a7f8250b..c577091a29 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj.filters +++ b/cocos/ui/proj.wp8/libGUI.vcxproj.filters @@ -93,7 +93,7 @@ UIWidgets - + UIWidgets @@ -173,7 +173,7 @@ UIWidgets - + UIWidgets From 1e79cacf26448326945dc0d644c3ea82e24657dc Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 18:25:47 -0700 Subject: [PATCH 52/61] Updates CHANGELOG --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 32d4083f08..d64df950a5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,8 @@ cocos2d-x-3.3?? ?? [NEW] Renderer: added TriangleCommand [NEW] UI: added `WebView` on iOS and Android + [FIX] C++: CMake works for Mac builds + [FIX] C++: Reorganized cocos2d/platform folder. Easier to add new platforms [FIX] EditBox: moved to ui:EditBox [FIX] HttpClient: condition variable sleep on unrelated mutex [FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()` From f5cd48f1544a45e083a017deed86fe1a3ffd65bd Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 9 Sep 2014 18:46:47 -0700 Subject: [PATCH 53/61] Android properties back to 10 --- cocos/platform/android/java/project.properties | 2 +- tests/cpp-empty-test/proj.android/project.properties | 2 +- tests/cpp-tests/proj.android/project.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/platform/android/java/project.properties b/cocos/platform/android/java/project.properties index 6cd1f6a8ff..88ca83f9d0 100644 --- a/cocos/platform/android/java/project.properties +++ b/cocos/platform/android/java/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-20 +target=android-10 diff --git a/tests/cpp-empty-test/proj.android/project.properties b/tests/cpp-empty-test/proj.android/project.properties index e8b0265294..572f7c30de 100644 --- a/tests/cpp-empty-test/proj.android/project.properties +++ b/tests/cpp-empty-test/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-20 +target=android-10 android.library.reference.1=../../../cocos/platform/android/java diff --git a/tests/cpp-tests/proj.android/project.properties b/tests/cpp-tests/proj.android/project.properties index e8b0265294..572f7c30de 100644 --- a/tests/cpp-tests/proj.android/project.properties +++ b/tests/cpp-tests/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-20 +target=android-10 android.library.reference.1=../../../cocos/platform/android/java From 15254a5ddbfd29f17bf094b3c5b9337f212d7af4 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 10 Sep 2014 01:50:11 +0000 Subject: [PATCH 54/61] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 182 +++++++++++++++++----------------- 1 file changed, 92 insertions(+), 90 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 8371a753c1..e38435ef67 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -226,7 +226,6 @@ "cocos/3d/CCSprite3D.h", "cocos/3d/CCSprite3DMaterial.cpp", "cocos/3d/CCSprite3DMaterial.h", - "cocos/3d/CMakeLists.txt", "cocos/3d/cocos3d.h", "cocos/Android.mk", "cocos/CMakeLists.txt", @@ -343,8 +342,6 @@ "cocos/base/CCMap.h", "cocos/base/CCNS.cpp", "cocos/base/CCNS.h", - "cocos/base/CCPlatformConfig.h", - "cocos/base/CCPlatformMacros.h", "cocos/base/CCProfiling.cpp", "cocos/base/CCProfiling.h", "cocos/base/CCProtocols.h", @@ -357,10 +354,10 @@ "cocos/base/CCScriptSupport.h", "cocos/base/CCTouch.cpp", "cocos/base/CCTouch.h", + "cocos/base/CCUserDefault-android.cpp", + "cocos/base/CCUserDefault-apple.mm", "cocos/base/CCUserDefault.cpp", "cocos/base/CCUserDefault.h", - "cocos/base/CCUserDefault.mm", - "cocos/base/CCUserDefaultAndroid.cpp", "cocos/base/CCValue.cpp", "cocos/base/CCValue.h", "cocos/base/CCVector.h", @@ -658,7 +655,6 @@ "cocos/math/CCMathBase.h", "cocos/math/CCVertex.cpp", "cocos/math/CCVertex.h", - "cocos/math/CMakeLists.txt", "cocos/math/Mat4.cpp", "cocos/math/Mat4.h", "cocos/math/Mat4.inl", @@ -712,31 +708,37 @@ "cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h", "cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp", "cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h", + "cocos/platform/CCApplication.h", "cocos/platform/CCApplicationProtocol.h", "cocos/platform/CCCommon.h", "cocos/platform/CCDevice.h", "cocos/platform/CCFileUtils.cpp", "cocos/platform/CCFileUtils.h", + "cocos/platform/CCGL.h", "cocos/platform/CCGLView.cpp", "cocos/platform/CCGLView.h", "cocos/platform/CCImage.cpp", "cocos/platform/CCImage.h", + "cocos/platform/CCPlatformConfig.h", + "cocos/platform/CCPlatformDefine.h", + "cocos/platform/CCPlatformMacros.h", "cocos/platform/CCSAXParser.cpp", "cocos/platform/CCSAXParser.h", + "cocos/platform/CCStdC.h", "cocos/platform/CCThread.cpp", "cocos/platform/CCThread.h", "cocos/platform/android/Android.mk", - "cocos/platform/android/CCApplication.cpp", - "cocos/platform/android/CCApplication.h", - "cocos/platform/android/CCCommon.cpp", - "cocos/platform/android/CCDevice.cpp", - "cocos/platform/android/CCFileUtilsAndroid.cpp", - "cocos/platform/android/CCFileUtilsAndroid.h", - "cocos/platform/android/CCGL.h", - "cocos/platform/android/CCGLViewImpl.cpp", - "cocos/platform/android/CCGLViewImpl.h", - "cocos/platform/android/CCPlatformDefine.h", - "cocos/platform/android/CCStdC.h", + "cocos/platform/android/CCApplication-android.cpp", + "cocos/platform/android/CCApplication-android.h", + "cocos/platform/android/CCCommon-android.cpp", + "cocos/platform/android/CCDevice-android.cpp", + "cocos/platform/android/CCFileUtils-android.cpp", + "cocos/platform/android/CCFileUtils-android.h", + "cocos/platform/android/CCGL-android.h", + "cocos/platform/android/CCGLViewImpl-android.cpp", + "cocos/platform/android/CCGLViewImpl-android.h", + "cocos/platform/android/CCPlatformDefine-android.h", + "cocos/platform/android/CCStdC-android.h", "cocos/platform/android/ControllerManualAdapter/.classpath", "cocos/platform/android/ControllerManualAdapter/.project", "cocos/platform/android/ControllerManualAdapter/.settings/org.eclipse.jdt.core.prefs", @@ -785,7 +787,7 @@ "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerAdapter.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerDelegate.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerUtils.java", - "cocos/platform/android/javaactivity.cpp", + "cocos/platform/android/javaactivity-android.cpp", "cocos/platform/android/jni/DPIJni.cpp", "cocos/platform/android/jni/DPIJni.h", "cocos/platform/android/jni/IMEJni.cpp", @@ -799,58 +801,58 @@ "cocos/platform/android/jni/JniHelper.cpp", "cocos/platform/android/jni/JniHelper.h", "cocos/platform/android/jni/TouchesJni.cpp", - "cocos/platform/apple/CCFileUtilsApple.h", - "cocos/platform/apple/CCFileUtilsApple.mm", - "cocos/platform/apple/CCLock.cpp", - "cocos/platform/apple/CCLock.h", - "cocos/platform/apple/CCThread.mm", - "cocos/platform/desktop/CCGLViewImpl.cpp", - "cocos/platform/desktop/CCGLViewImpl.h", - "cocos/platform/ios/CCApplication.h", - "cocos/platform/ios/CCApplication.mm", - "cocos/platform/ios/CCCommon.mm", - "cocos/platform/ios/CCDevice.mm", - "cocos/platform/ios/CCDirectorCaller.h", - "cocos/platform/ios/CCDirectorCaller.mm", - "cocos/platform/ios/CCEAGLView.h", - "cocos/platform/ios/CCEAGLView.mm", - "cocos/platform/ios/CCES2Renderer.h", - "cocos/platform/ios/CCES2Renderer.m", - "cocos/platform/ios/CCESRenderer.h", - "cocos/platform/ios/CCGL.h", - "cocos/platform/ios/CCGLViewImpl.h", - "cocos/platform/ios/CCGLViewImpl.mm", - "cocos/platform/ios/CCImage.mm", - "cocos/platform/ios/CCPlatformDefine.h", - "cocos/platform/ios/CCStdC.h", - "cocos/platform/ios/OpenGL_Internal.h", - "cocos/platform/linux/CCApplication.cpp", - "cocos/platform/linux/CCApplication.h", - "cocos/platform/linux/CCCommon.cpp", - "cocos/platform/linux/CCDevice.cpp", - "cocos/platform/linux/CCFileUtilsLinux.cpp", - "cocos/platform/linux/CCFileUtilsLinux.h", - "cocos/platform/linux/CCGL.h", - "cocos/platform/linux/CCPlatformDefine.h", - "cocos/platform/linux/CCStdC.cpp", - "cocos/platform/linux/CCStdC.h", - "cocos/platform/mac/CCApplication.h", - "cocos/platform/mac/CCApplication.mm", - "cocos/platform/mac/CCCommon.mm", - "cocos/platform/mac/CCDevice.mm", - "cocos/platform/mac/CCGL.h", - "cocos/platform/mac/CCPlatformDefine.h", - "cocos/platform/mac/CCStdC.h", - "cocos/platform/win32/CCApplication.cpp", - "cocos/platform/win32/CCApplication.h", - "cocos/platform/win32/CCCommon.cpp", - "cocos/platform/win32/CCDevice.cpp", - "cocos/platform/win32/CCFileUtilsWin32.cpp", - "cocos/platform/win32/CCFileUtilsWin32.h", - "cocos/platform/win32/CCGL.h", - "cocos/platform/win32/CCPlatformDefine.h", - "cocos/platform/win32/CCStdC.cpp", - "cocos/platform/win32/CCStdC.h", + "cocos/platform/apple/CCFileUtils-apple.h", + "cocos/platform/apple/CCFileUtils-apple.mm", + "cocos/platform/apple/CCLock-apple.cpp", + "cocos/platform/apple/CCLock-apple.h", + "cocos/platform/apple/CCThread-apple.mm", + "cocos/platform/desktop/CCGLViewImpl-desktop.cpp", + "cocos/platform/desktop/CCGLViewImpl-desktop.h", + "cocos/platform/ios/CCApplication-ios.h", + "cocos/platform/ios/CCApplication-ios.mm", + "cocos/platform/ios/CCCommon-ios.mm", + "cocos/platform/ios/CCDevice-ios.mm", + "cocos/platform/ios/CCDirectorCaller-ios.h", + "cocos/platform/ios/CCDirectorCaller-ios.mm", + "cocos/platform/ios/CCEAGLView-ios.h", + "cocos/platform/ios/CCEAGLView-ios.mm", + "cocos/platform/ios/CCES2Renderer-ios.h", + "cocos/platform/ios/CCES2Renderer-ios.m", + "cocos/platform/ios/CCESRenderer-ios.h", + "cocos/platform/ios/CCGL-ios.h", + "cocos/platform/ios/CCGLViewImpl-ios.h", + "cocos/platform/ios/CCGLViewImpl-ios.mm", + "cocos/platform/ios/CCImage-ios.mm", + "cocos/platform/ios/CCPlatformDefine-ios.h", + "cocos/platform/ios/CCStdC-ios.h", + "cocos/platform/ios/OpenGL_Internal-ios.h", + "cocos/platform/linux/CCApplication-linux.cpp", + "cocos/platform/linux/CCApplication-linux.h", + "cocos/platform/linux/CCCommon-linux.cpp", + "cocos/platform/linux/CCDevice-linux.cpp", + "cocos/platform/linux/CCFileUtils-linux.cpp", + "cocos/platform/linux/CCFileUtils-linux.h", + "cocos/platform/linux/CCGL-linux.h", + "cocos/platform/linux/CCPlatformDefine-linux.h", + "cocos/platform/linux/CCStdC-linux.cpp", + "cocos/platform/linux/CCStdC-linux.h", + "cocos/platform/mac/CCApplication-mac.h", + "cocos/platform/mac/CCApplication-mac.mm", + "cocos/platform/mac/CCCommon-mac.mm", + "cocos/platform/mac/CCDevice-mac.mm", + "cocos/platform/mac/CCGL-mac.h", + "cocos/platform/mac/CCPlatformDefine-mac.h", + "cocos/platform/mac/CCStdC-mac.h", + "cocos/platform/win32/CCApplication-win32.cpp", + "cocos/platform/win32/CCApplication-win32.h", + "cocos/platform/win32/CCCommon-win32.cpp", + "cocos/platform/win32/CCDevice-win32.cpp", + "cocos/platform/win32/CCFileUtils-win32.cpp", + "cocos/platform/win32/CCFileUtils-win32.h", + "cocos/platform/win32/CCGL-win32.h", + "cocos/platform/win32/CCPlatformDefine-win32.h", + "cocos/platform/win32/CCStdC-win32.cpp", + "cocos/platform/win32/CCStdC-win32.h", "cocos/platform/win32/compat/stdint.h", "cocos/platform/winrt/CCApplication.cpp", "cocos/platform/winrt/CCApplication.h", @@ -906,8 +908,8 @@ "cocos/platform/wp8-xaml/xaml/EditBox.xaml.cs", "cocos/platform/wp8-xaml/xaml/MainPage.xaml", "cocos/platform/wp8-xaml/xaml/MainPage.xaml.cs", - "cocos/platform/wp8/CCGLViewImpl.cpp", - "cocos/platform/wp8/CCGLViewImpl.h", + "cocos/platform/wp8/CCGLViewImpl-wp8.cpp", + "cocos/platform/wp8/CCGLViewImpl-wp8.h", "cocos/platform/wp8/Direct3DBase.cpp", "cocos/platform/wp8/Direct3DBase.h", "cocos/platform/wp8/DirectXBase.cpp", @@ -984,9 +986,9 @@ "cocos/renderer/ccShaders.cpp", "cocos/renderer/ccShaders.h", "cocos/storage/local-storage/Android.mk", + "cocos/storage/local-storage/LocalStorage-android.cpp", "cocos/storage/local-storage/LocalStorage.cpp", "cocos/storage/local-storage/LocalStorage.h", - "cocos/storage/local-storage/LocalStorageAndroid.cpp", "cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj", "cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters", "cocos/ui/Android.mk", @@ -1002,18 +1004,18 @@ "cocos/ui/UIDeprecated.h", "cocos/ui/UIEditBox/UIEditBox.cpp", "cocos/ui/UIEditBox/UIEditBox.h", + "cocos/ui/UIEditBox/UIEditBoxImpl-android.cpp", + "cocos/ui/UIEditBox/UIEditBoxImpl-android.h", + "cocos/ui/UIEditBox/UIEditBoxImpl-ios.h", + "cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm", + "cocos/ui/UIEditBox/UIEditBoxImpl-mac.h", + "cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm", + "cocos/ui/UIEditBox/UIEditBoxImpl-stub.cpp", + "cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp", + "cocos/ui/UIEditBox/UIEditBoxImpl-win32.h", + "cocos/ui/UIEditBox/UIEditBoxImpl-wp8.cpp", + "cocos/ui/UIEditBox/UIEditBoxImpl-wp8.h", "cocos/ui/UIEditBox/UIEditBoxImpl.h", - "cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp", - "cocos/ui/UIEditBox/UIEditBoxImplAndroid.h", - "cocos/ui/UIEditBox/UIEditBoxImplIOS.h", - "cocos/ui/UIEditBox/UIEditBoxImplIOS.mm", - "cocos/ui/UIEditBox/UIEditBoxImplMac.h", - "cocos/ui/UIEditBox/UIEditBoxImplMac.mm", - "cocos/ui/UIEditBox/UIEditBoxImplNone.cpp", - "cocos/ui/UIEditBox/UIEditBoxImplWin.cpp", - "cocos/ui/UIEditBox/UIEditBoxImplWin.h", - "cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp", - "cocos/ui/UIEditBox/UIEditBoxImplWp8.h", "cocos/ui/UIHBox.cpp", "cocos/ui/UIHBox.h", "cocos/ui/UIHelper.cpp", @@ -1052,17 +1054,17 @@ "cocos/ui/UITextField.h", "cocos/ui/UIVBox.cpp", "cocos/ui/UIVBox.h", + "cocos/ui/UIVideoPlayer-android.cpp", + "cocos/ui/UIVideoPlayer-ios.mm", "cocos/ui/UIVideoPlayer.h", - "cocos/ui/UIVideoPlayerAndroid.cpp", - "cocos/ui/UIVideoPlayerIOS.mm", "cocos/ui/UIWebView-inl.h", "cocos/ui/UIWebView.cpp", "cocos/ui/UIWebView.h", "cocos/ui/UIWebView.mm", - "cocos/ui/UIWebViewImpl_android.cpp", - "cocos/ui/UIWebViewImpl_android.h", - "cocos/ui/UIWebViewImpl_iOS.h", - "cocos/ui/UIWebViewImpl_iOS.mm", + "cocos/ui/UIWebViewImpl-android.cpp", + "cocos/ui/UIWebViewImpl-android.h", + "cocos/ui/UIWebViewImpl-ios.h", + "cocos/ui/UIWebViewImpl-ios.mm", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", "cocos/ui/proj.win32/Win32InputBox.cpp", From 0e49107514e6e113299ad59cd43eea71e807f9ed Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 10 Sep 2014 01:52:43 +0000 Subject: [PATCH 55/61] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Animate3D.lua | 82 - .../lua-bindings/auto/api/Animation3D.lua | 21 - .../lua-bindings/auto/api/AttachNode.lua | 29 - .../scripting/lua-bindings/auto/api/Mesh.lua | 124 - .../lua-bindings/auto/api/Skeleton3D.lua | 52 - .../lua-bindings/auto/api/Sprite3D.lua | 110 - .../auto/api/lua_cocos2dx_3d_auto_api.lua | 30 - .../auto/api/lua_cocos2dx_auto_api.lua | 10 +- .../auto/lua_cocos2dx_3d_auto.cpp | 2336 +---------------- .../auto/lua_cocos2dx_3d_auto.hpp | 54 - .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 1145 ++++---- .../auto/lua_cocos2dx_controller_auto.cpp | 2 +- 12 files changed, 580 insertions(+), 3415 deletions(-) delete mode 100644 cocos/scripting/lua-bindings/auto/api/Animate3D.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/Animation3D.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/AttachNode.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/Mesh.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/Sprite3D.lua diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua deleted file mode 100644 index fb9c86d96c..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ /dev/null @@ -1,82 +0,0 @@ - --------------------------------- --- @module Animate3D --- @extend ActionInterval --- @parent_module cc - --------------------------------- --- --- @function [parent=#Animate3D] setSpeed --- @param self --- @param #float speed - --------------------------------- --- --- @function [parent=#Animate3D] setWeight --- @param self --- @param #float weight - --------------------------------- --- get & set speed, negative speed means playing reverse --- @function [parent=#Animate3D] getSpeed --- @param self --- @return float#float ret (return value: float) - --------------------------------- --- get & set blend weight, weight must positive --- @function [parent=#Animate3D] getWeight --- @param self --- @return float#float ret (return value: float) - --------------------------------- --- @overload self, cc.Animation3D, float, float --- @overload self, cc.Animation3D --- @function [parent=#Animate3D] create --- @param self --- @param #cc.Animation3D animation --- @param #float fromTime --- @param #float duration --- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D) - --------------------------------- --- animate transistion time --- @function [parent=#Animate3D] getTransitionTime --- @param self --- @return float#float ret (return value: float) - --------------------------------- --- --- @function [parent=#Animate3D] startWithTarget --- @param self --- @param #cc.Node target - --------------------------------- --- --- @function [parent=#Animate3D] reverse --- @param self --- @return Animate3D#Animate3D ret (return value: cc.Animate3D) - --------------------------------- --- --- @function [parent=#Animate3D] clone --- @param self --- @return Animate3D#Animate3D ret (return value: cc.Animate3D) - --------------------------------- --- --- @function [parent=#Animate3D] stop --- @param self - --------------------------------- --- --- @function [parent=#Animate3D] update --- @param self --- @param #float t - --------------------------------- --- --- @function [parent=#Animate3D] step --- @param self --- @param #float dt - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua deleted file mode 100644 index c04f1611bf..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua +++ /dev/null @@ -1,21 +0,0 @@ - --------------------------------- --- @module Animation3D --- @extend Ref --- @parent_module cc - --------------------------------- --- get duration --- @function [parent=#Animation3D] getDuration --- @param self --- @return float#float ret (return value: float) - --------------------------------- --- read all animation or only the animation with given animationName? animationName == "" read the first. --- @function [parent=#Animation3D] create --- @param self --- @param #string filename --- @param #string animationName --- @return Animation3D#Animation3D ret (return value: cc.Animation3D) - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua deleted file mode 100644 index e61a0d0d48..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua +++ /dev/null @@ -1,29 +0,0 @@ - --------------------------------- --- @module AttachNode --- @extend Node --- @parent_module cc - --------------------------------- --- creates an AttachNode
--- param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent --- @function [parent=#AttachNode] create --- @param self --- @param #cc.Bone3D attachBone --- @return AttachNode#AttachNode ret (return value: cc.AttachNode) - --------------------------------- --- --- @function [parent=#AttachNode] getWorldToNodeTransform --- @param self --- @return mat4_table#mat4_table ret (return value: mat4_table) - --------------------------------- --- --- @function [parent=#AttachNode] visit --- @param self --- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua deleted file mode 100644 index 2b58a7a1dc..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Mesh.lua +++ /dev/null @@ -1,124 +0,0 @@ - --------------------------------- --- @module Mesh --- @extend Ref --- @parent_module cc - --------------------------------- --- get mesh vertex attribute count --- @function [parent=#Mesh] getMeshVertexAttribCount --- @param self --- @return long#long ret (return value: long) - --------------------------------- --- @overload self, cc.Texture2D --- @overload self, string --- @function [parent=#Mesh] setTexture --- @param self --- @param #string texPath - --------------------------------- --- mesh index data getter --- @function [parent=#Mesh] getMeshIndexData --- @param self --- @return MeshIndexData#MeshIndexData ret (return value: cc.MeshIndexData) - --------------------------------- --- --- @function [parent=#Mesh] getTexture --- @param self --- @return Texture2D#Texture2D ret (return value: cc.Texture2D) - --------------------------------- --- skin getter --- @function [parent=#Mesh] getSkin --- @param self --- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin) - --------------------------------- --- name getter --- @function [parent=#Mesh] getName --- @param self --- @return string#string ret (return value: string) - --------------------------------- --- --- @function [parent=#Mesh] setBlendFunc --- @param self --- @param #cc.BlendFunc blendFunc - --------------------------------- --- get index format --- @function [parent=#Mesh] getIndexFormat --- @param self --- @return unsigned int#unsigned int ret (return value: unsigned int) - --------------------------------- --- get per vertex size in bytes --- @function [parent=#Mesh] getVertexSizeInBytes --- @param self --- @return int#int ret (return value: int) - --------------------------------- --- --- @function [parent=#Mesh] getBlendFunc --- @param self --- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) - --------------------------------- --- get GLProgramState --- @function [parent=#Mesh] getGLProgramState --- @param self --- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) - --------------------------------- --- get index count --- @function [parent=#Mesh] getIndexCount --- @param self --- @return long#long ret (return value: long) - --------------------------------- --- get vertex buffer --- @function [parent=#Mesh] getVertexBuffer --- @param self --- @return unsigned int#unsigned int ret (return value: unsigned int) - --------------------------------- --- get MeshVertexAttribute by index --- @function [parent=#Mesh] getMeshVertexAttribute --- @param self --- @param #int idx --- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib) - --------------------------------- --- --- @function [parent=#Mesh] isVisible --- @param self --- @return bool#bool ret (return value: bool) - --------------------------------- --- get index buffer --- @function [parent=#Mesh] getIndexBuffer --- @param self --- @return unsigned int#unsigned int ret (return value: unsigned int) - --------------------------------- --- has vertex attribute? --- @function [parent=#Mesh] hasVertexAttrib --- @param self --- @param #int attrib --- @return bool#bool ret (return value: bool) - --------------------------------- --- get primitive type --- @function [parent=#Mesh] getPrimitiveType --- @param self --- @return unsigned int#unsigned int ret (return value: unsigned int) - --------------------------------- --- visible getter and setter --- @function [parent=#Mesh] setVisible --- @param self --- @param #bool visible - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua deleted file mode 100644 index b4271af29d..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua +++ /dev/null @@ -1,52 +0,0 @@ - --------------------------------- --- @module Skeleton3D --- @extend Ref --- @parent_module cc - --------------------------------- --- --- @function [parent=#Skeleton3D] getBoneByName --- @param self --- @param #string id --- @return Bone3D#Bone3D ret (return value: cc.Bone3D) - --------------------------------- --- --- @function [parent=#Skeleton3D] getRootBone --- @param self --- @param #int index --- @return Bone3D#Bone3D ret (return value: cc.Bone3D) - --------------------------------- --- refresh bone world matrix --- @function [parent=#Skeleton3D] updateBoneMatrix --- @param self - --------------------------------- --- get bone --- @function [parent=#Skeleton3D] getBoneByIndex --- @param self --- @param #unsigned int index --- @return Bone3D#Bone3D ret (return value: cc.Bone3D) - --------------------------------- --- get & set root bone --- @function [parent=#Skeleton3D] getRootCount --- @param self --- @return long#long ret (return value: long) - --------------------------------- --- get bone index --- @function [parent=#Skeleton3D] getBoneIndex --- @param self --- @param #cc.Bone3D bone --- @return int#int ret (return value: int) - --------------------------------- --- get total bone count --- @function [parent=#Skeleton3D] getBoneCount --- @param self --- @return long#long ret (return value: long) - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua deleted file mode 100644 index 002556c277..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ /dev/null @@ -1,110 +0,0 @@ - --------------------------------- --- @module Sprite3D --- @extend Node,BlendProtocol --- @parent_module cc - --------------------------------- --- --- @function [parent=#Sprite3D] setCullFaceEnabled --- @param self --- @param #bool enable - --------------------------------- --- @overload self, cc.Texture2D --- @overload self, string --- @function [parent=#Sprite3D] setTexture --- @param self --- @param #string texFile - --------------------------------- --- remove all attach nodes --- @function [parent=#Sprite3D] removeAllAttachNode --- @param self - --------------------------------- --- --- @function [parent=#Sprite3D] setBlendFunc --- @param self --- @param #cc.BlendFunc blendFunc - --------------------------------- --- get mesh --- @function [parent=#Sprite3D] getMesh --- @param self --- @return Mesh#Mesh ret (return value: cc.Mesh) - --------------------------------- --- --- @function [parent=#Sprite3D] getBlendFunc --- @param self --- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) - --------------------------------- --- --- @function [parent=#Sprite3D] setCullFace --- @param self --- @param #unsigned int cullFace - --------------------------------- --- remove attach node --- @function [parent=#Sprite3D] removeAttachNode --- @param self --- @param #string boneName - --------------------------------- --- get SubMeshState by index --- @function [parent=#Sprite3D] getMeshByIndex --- @param self --- @param #int index --- @return Mesh#Mesh ret (return value: cc.Mesh) - --------------------------------- --- get SubMeshState by Name --- @function [parent=#Sprite3D] getMeshByName --- @param self --- @param #string name --- @return Mesh#Mesh ret (return value: cc.Mesh) - --------------------------------- --- --- @function [parent=#Sprite3D] getSkeleton --- @param self --- @return Skeleton3D#Skeleton3D ret (return value: cc.Skeleton3D) - --------------------------------- --- get AttachNode by bone name, return nullptr if not exist --- @function [parent=#Sprite3D] getAttachNode --- @param self --- @param #string boneName --- @return AttachNode#AttachNode ret (return value: cc.AttachNode) - --------------------------------- --- @overload self, string, string --- @overload self, string --- @function [parent=#Sprite3D] create --- @param self --- @param #string modelPath --- @param #string texturePath --- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D) - --------------------------------- --- Returns 2d bounding-box
--- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate. --- @function [parent=#Sprite3D] getBoundingBox --- @param self --- @return rect_table#rect_table ret (return value: rect_table) - --------------------------------- --- set GLProgramState, you should bind attributes by yourself --- @function [parent=#Sprite3D] setGLProgramState --- @param self --- @param #cc.GLProgramState glProgramState - --------------------------------- --- just rember bind attributes --- @function [parent=#Sprite3D] setGLProgram --- @param self --- @param #cc.GLProgram glprogram - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index 99551a8c83..c4a5b11fd8 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -1,34 +1,4 @@ -------------------------------- -- @module cc --------------------------------------------------------- --- the cc Skeleton3D --- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module - - --------------------------------------------------------- --- the cc Sprite3D --- @field [parent=#cc] Sprite3D#Sprite3D Sprite3D preloaded module - - --------------------------------------------------------- --- the cc Mesh --- @field [parent=#cc] Mesh#Mesh Mesh preloaded module - - --------------------------------------------------------- --- the cc Animation3D --- @field [parent=#cc] Animation3D#Animation3D Animation3D preloaded module - - --------------------------------------------------------- --- the cc Animate3D --- @field [parent=#cc] Animate3D#Animate3D Animate3D preloaded module - - --------------------------------------------------------- --- the cc AttachNode --- @field [parent=#cc] AttachNode#AttachNode AttachNode preloaded module - - return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index c4905a9598..d1de791a11 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -731,6 +731,11 @@ -- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module +-------------------------------------------------------- +-- the cc ProtectedNode +-- @field [parent=#cc] ProtectedNode#ProtectedNode ProtectedNode preloaded module + + -------------------------------------------------------- -- the cc GLProgramState -- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module @@ -1206,9 +1211,4 @@ -- @field [parent=#cc] Component#Component Component preloaded module --------------------------------------------------------- --- the cc ProtectedNode --- @field [parent=#cc] ProtectedNode#ProtectedNode ProtectedNode preloaded module - - return nil diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 24f4d06e03..98d011c813 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1,2337 +1,9 @@ #include "lua_cocos2dx_3d_auto.hpp" +#include "cocos3d.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" - -int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateBoneMatrix(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getRootCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Bone3D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - return 0; - int ret = cobj->getBoneIndex(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getBoneCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Skeleton3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Skeleton3D"); - tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Skeleton3D"); - tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); - tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); - tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); - tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); - tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); - tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); - tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Skeleton3D).name(); - g_luaType[typeName] = "cc.Skeleton3D"; - g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; - return 1; -} - -int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); - if(!ok) - return 0; - cobj->setCullFaceEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllAttachNode(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; - if(!ok) - return 0; - cobj->setBlendFunc(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); - if(!ok) - return 0; - cobj->setCullFace(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); - if(!ok) - return 0; - cobj->removeAttachNode(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); - if(!ok) - return 0; - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite3D"); - tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite3D"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3D).name(); - g_luaType[typeName] = "cc.Sprite3D"; - g_typeCast["Sprite3D"] = "cc.Sprite3D"; - return 1; -} - -int lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getMeshVertexAttribCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getMeshVertexAttribCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Mesh:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getMeshIndexData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getMeshIndexData'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::MeshIndexData* ret = cobj->getMeshIndexData(); - object_to_luaval(tolua_S, "cc.MeshIndexData",(cocos2d::MeshIndexData*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getMeshIndexData",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getMeshIndexData'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Texture2D* ret = cobj->getTexture(); - object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getSkin(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getSkin'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::MeshSkin* ret = cobj->getSkin(); - object_to_luaval(tolua_S, "cc.MeshSkin",(cocos2d::MeshSkin*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getSkin",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getSkin'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const std::string& ret = cobj->getName(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; - if(!ok) - return 0; - cobj->setBlendFunc(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getIndexFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getIndexFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getIndexFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getIndexFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getIndexFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getVertexSizeInBytes(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getVertexSizeInBytes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getVertexSizeInBytes(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getVertexSizeInBytes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getVertexSizeInBytes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getGLProgramState",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getGLProgramState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getIndexCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getIndexCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getIndexCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getIndexCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getIndexCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getVertexBuffer(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getVertexBuffer'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getVertexBuffer(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getVertexBuffer",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getVertexBuffer'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getMeshVertexAttribute(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getMeshVertexAttribute'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Mesh:getMeshVertexAttribute"); - if(!ok) - return 0; - const cocos2d::MeshVertexAttrib& ret = cobj->getMeshVertexAttribute(arg0); - mesh_vertex_attrib_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getMeshVertexAttribute",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getMeshVertexAttribute'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_isVisible(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_isVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isVisible(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:isVisible",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_isVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getIndexBuffer(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getIndexBuffer'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getIndexBuffer(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getIndexBuffer",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getIndexBuffer'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_hasVertexAttrib(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_hasVertexAttrib'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Mesh:hasVertexAttrib"); - if(!ok) - return 0; - bool ret = cobj->hasVertexAttrib(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:hasVertexAttrib",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_hasVertexAttrib'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_getPrimitiveType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_getPrimitiveType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getPrimitiveType(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:getPrimitiveType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_getPrimitiveType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Mesh_setVisible(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Mesh* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_setVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Mesh:setVisible"); - if(!ok) - return 0; - cobj->setVisible(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setVisible",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setVisible'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_Mesh_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Mesh)"); - return 0; -} - -int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Mesh"); - tolua_cclass(tolua_S,"Mesh","cc.Mesh","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Mesh"); - tolua_function(tolua_S,"getMeshVertexAttribCount",lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Mesh_setTexture); - tolua_function(tolua_S,"getMeshIndexData",lua_cocos2dx_3d_Mesh_getMeshIndexData); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_3d_Mesh_getTexture); - tolua_function(tolua_S,"getSkin",lua_cocos2dx_3d_Mesh_getSkin); - tolua_function(tolua_S,"getName",lua_cocos2dx_3d_Mesh_getName); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Mesh_setBlendFunc); - tolua_function(tolua_S,"getIndexFormat",lua_cocos2dx_3d_Mesh_getIndexFormat); - tolua_function(tolua_S,"getVertexSizeInBytes",lua_cocos2dx_3d_Mesh_getVertexSizeInBytes); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Mesh_getBlendFunc); - tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_3d_Mesh_getGLProgramState); - tolua_function(tolua_S,"getIndexCount",lua_cocos2dx_3d_Mesh_getIndexCount); - tolua_function(tolua_S,"getVertexBuffer",lua_cocos2dx_3d_Mesh_getVertexBuffer); - tolua_function(tolua_S,"getMeshVertexAttribute",lua_cocos2dx_3d_Mesh_getMeshVertexAttribute); - tolua_function(tolua_S,"isVisible",lua_cocos2dx_3d_Mesh_isVisible); - tolua_function(tolua_S,"getIndexBuffer",lua_cocos2dx_3d_Mesh_getIndexBuffer); - tolua_function(tolua_S,"hasVertexAttrib",lua_cocos2dx_3d_Mesh_hasVertexAttrib); - tolua_function(tolua_S,"getPrimitiveType",lua_cocos2dx_3d_Mesh_getPrimitiveType); - tolua_function(tolua_S,"setVisible",lua_cocos2dx_3d_Mesh_setVisible); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Mesh).name(); - g_luaType[typeName] = "cc.Mesh"; - g_typeCast["Mesh"] = "cc.Mesh"; - return 1; -} - -int lua_cocos2dx_3d_Animation3D_getDuration(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Animation3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Animation3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Animation3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Animation3D_getDuration'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getDuration(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Animation3D:getDuration",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animation3D_getDuration'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Animation3D_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Animation3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Animation3D:create"); - if(!ok) - return 0; - cocos2d::Animation3D* ret = cocos2d::Animation3D::create(arg0); - object_to_luaval(tolua_S, "cc.Animation3D",(cocos2d::Animation3D*)ret); - return 1; - } - if (argc == 2) - { - std::string arg0; - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Animation3D:create"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Animation3D:create"); - if(!ok) - return 0; - cocos2d::Animation3D* ret = cocos2d::Animation3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Animation3D",(cocos2d::Animation3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Animation3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animation3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Animation3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Animation3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Animation3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Animation3D"); - tolua_cclass(tolua_S,"Animation3D","cc.Animation3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Animation3D"); - tolua_function(tolua_S,"getDuration",lua_cocos2dx_3d_Animation3D_getDuration); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Animation3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Animation3D).name(); - g_luaType[typeName] = "cc.Animation3D"; - g_typeCast["Animation3D"] = "cc.Animation3D"; - return 1; -} - -int lua_cocos2dx_3d_Animate3D_setSpeed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Animate3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Animate3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Animate3D_setSpeed'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Animate3D:setSpeed"); - if(!ok) - return 0; - cobj->setSpeed(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Animate3D:setSpeed",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_setSpeed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Animate3D_setWeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Animate3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Animate3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Animate3D_setWeight'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Animate3D:setWeight"); - if(!ok) - return 0; - cobj->setWeight(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Animate3D:setWeight",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_setWeight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Animate3D_getSpeed(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Animate3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Animate3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Animate3D_getSpeed'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getSpeed(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Animate3D:getSpeed",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_getSpeed'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Animate3D_getWeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Animate3D* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Animate3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Animate3D_getWeight'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getWeight(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Animate3D:getWeight",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_getWeight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Animate3D_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 3) - { - cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Animate3D:create"); - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Animate3D:create"); - if (!ok) { break; } - cocos2d::Animate3D* ret = cocos2d::Animate3D::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.Animate3D",(cocos2d::Animate3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - cocos2d::Animation3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Animation3D",&arg0); - if (!ok) { break; } - cocos2d::Animate3D* ret = cocos2d::Animate3D::create(arg0); - object_to_luaval(tolua_S, "cc.Animate3D",(cocos2d::Animate3D*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Animate3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_Animate3D_getTransitionTime(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.Animate3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - double ret = cocos2d::Animate3D::getTransitionTime(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Animate3D:getTransitionTime",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Animate3D_getTransitionTime'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Animate3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Animate3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Animate3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Animate3D"); - tolua_cclass(tolua_S,"Animate3D","cc.Animate3D","cc.ActionInterval",nullptr); - - tolua_beginmodule(tolua_S,"Animate3D"); - tolua_function(tolua_S,"setSpeed",lua_cocos2dx_3d_Animate3D_setSpeed); - tolua_function(tolua_S,"setWeight",lua_cocos2dx_3d_Animate3D_setWeight); - tolua_function(tolua_S,"getSpeed",lua_cocos2dx_3d_Animate3D_getSpeed); - tolua_function(tolua_S,"getWeight",lua_cocos2dx_3d_Animate3D_getWeight); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Animate3D_create); - tolua_function(tolua_S,"getTransitionTime", lua_cocos2dx_3d_Animate3D_getTransitionTime); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Animate3D).name(); - g_luaType[typeName] = "cc.Animate3D"; - g_typeCast["Animate3D"] = "cc.Animate3D"; - return 1; -} - -int lua_cocos2dx_3d_AttachNode_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.AttachNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Bone3D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - return 0; - cocos2d::AttachNode* ret = cocos2d::AttachNode::create(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AttachNode:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AttachNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_AttachNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AttachNode)"); - return 0; -} - -int lua_register_cocos2dx_3d_AttachNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AttachNode"); - tolua_cclass(tolua_S,"AttachNode","cc.AttachNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"AttachNode"); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_AttachNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AttachNode).name(); - g_luaType[typeName] = "cc.AttachNode"; - g_typeCast["AttachNode"] = "cc.AttachNode"; - return 1; -} TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) { tolua_open(tolua_S); @@ -2339,12 +11,6 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) tolua_module(tolua_S,"cc",0); tolua_beginmodule(tolua_S,"cc"); - lua_register_cocos2dx_3d_Animate3D(tolua_S); - lua_register_cocos2dx_3d_Sprite3D(tolua_S); - lua_register_cocos2dx_3d_AttachNode(tolua_S); - lua_register_cocos2dx_3d_Animation3D(tolua_S); - lua_register_cocos2dx_3d_Skeleton3D(tolua_S); - lua_register_cocos2dx_3d_Mesh(tolua_S); tolua_endmodule(tolua_S); return 1; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index caf32f6118..861f8f7c10 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -12,58 +12,4 @@ extern "C" { int register_all_cocos2dx_3d(lua_State* tolua_S); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #endif // __cocos2dx_3d_h__ diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 7b2faf6b78..6ba60ed246 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -1,5 +1,6 @@ #include "lua_cocos2dx_auto.hpp" #include "cocos2d.h" +#include "CCProtectedNode.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" @@ -32018,6 +32019,575 @@ int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + cobj->addProtectedChild(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + cobj->addProtectedChild(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.ProtectedNode:addProtectedChild"); + + if (!ok) { break; } + cobj->addProtectedChild(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:addProtectedChild",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_disableCascadeColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->disableCascadeColor(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeProtectedChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); + if(!ok) + return 0; + cobj->removeProtectedChildByTag(arg0); + return 0; + } + if (argc == 2) + { + int arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChildByTag"); + if(!ok) + return 0; + cobj->removeProtectedChildByTag(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeProtectedChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_reorderProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Node* arg0; + int arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:reorderProtectedChild"); + if(!ok) + return 0; + cobj->reorderProtectedChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:reorderProtectedChild",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup"); + if(!ok) + return 0; + cobj->removeAllProtectedChildrenWithCleanup(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_disableCascadeOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->disableCascadeOpacity(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_sortAllProtectedChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->sortAllProtectedChildren(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:sortAllProtectedChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_getProtectedChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:getProtectedChildByTag"); + if(!ok) + return 0; + cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:getProtectedChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + return 0; + cobj->removeProtectedChild(arg0); + return 0; + } + if (argc == 2) + { + cocos2d::Node* arg0; + bool arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChild"); + if(!ok) + return 0; + cobj->removeProtectedChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeProtectedChild",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_removeAllProtectedChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProtectedNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllProtectedChildren(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProtectedNode_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); + object_to_luaval(tolua_S, "cc.ProtectedNode",(cocos2d::ProtectedNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProtectedNode:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ProtectedNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ProtectedNode)"); + return 0; +} + +int lua_register_cocos2dx_ProtectedNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ProtectedNode"); + tolua_cclass(tolua_S,"ProtectedNode","cc.ProtectedNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ProtectedNode"); + tolua_function(tolua_S,"addProtectedChild",lua_cocos2dx_ProtectedNode_addProtectedChild); + tolua_function(tolua_S,"disableCascadeColor",lua_cocos2dx_ProtectedNode_disableCascadeColor); + tolua_function(tolua_S,"removeProtectedChildByTag",lua_cocos2dx_ProtectedNode_removeProtectedChildByTag); + tolua_function(tolua_S,"reorderProtectedChild",lua_cocos2dx_ProtectedNode_reorderProtectedChild); + tolua_function(tolua_S,"removeAllProtectedChildrenWithCleanup",lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup); + tolua_function(tolua_S,"disableCascadeOpacity",lua_cocos2dx_ProtectedNode_disableCascadeOpacity); + tolua_function(tolua_S,"sortAllProtectedChildren",lua_cocos2dx_ProtectedNode_sortAllProtectedChildren); + tolua_function(tolua_S,"getProtectedChildByTag",lua_cocos2dx_ProtectedNode_getProtectedChildByTag); + tolua_function(tolua_S,"removeProtectedChild",lua_cocos2dx_ProtectedNode_removeProtectedChild); + tolua_function(tolua_S,"removeAllProtectedChildren",lua_cocos2dx_ProtectedNode_removeAllProtectedChildren); + tolua_function(tolua_S,"create", lua_cocos2dx_ProtectedNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ProtectedNode).name(); + g_luaType[typeName] = "cc.ProtectedNode"; + g_typeCast["ProtectedNode"] = "cc.ProtectedNode"; + return 1; +} + int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) { int argc = 0; @@ -64030,575 +64600,6 @@ int lua_register_cocos2dx_Component(lua_State* tolua_S) g_typeCast["Component"] = "cc.Component"; return 1; } - -int lua_cocos2dx_ProtectedNode_addProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - cobj->addProtectedChild(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - cobj->addProtectedChild(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.ProtectedNode:addProtectedChild"); - - if (!ok) { break; } - cobj->addProtectedChild(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:addProtectedChild",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_addProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_disableCascadeColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->disableCascadeColor(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeProtectedChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); - if(!ok) - return 0; - cobj->removeProtectedChildByTag(arg0); - return 0; - } - if (argc == 2) - { - int arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:removeProtectedChildByTag"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChildByTag"); - if(!ok) - return 0; - cobj->removeProtectedChildByTag(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeProtectedChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_reorderProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Node* arg0; - int arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ProtectedNode:reorderProtectedChild"); - if(!ok) - return 0; - cobj->reorderProtectedChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:reorderProtectedChild",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_reorderProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup"); - if(!ok) - return 0; - cobj->removeAllProtectedChildrenWithCleanup(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildrenWithCleanup",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_disableCascadeOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->disableCascadeOpacity(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:disableCascadeOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_disableCascadeOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_sortAllProtectedChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->sortAllProtectedChildren(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:sortAllProtectedChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_sortAllProtectedChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_getProtectedChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProtectedNode:getProtectedChildByTag"); - if(!ok) - return 0; - cocos2d::Node* ret = cobj->getProtectedChildByTag(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:getProtectedChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_getProtectedChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeProtectedChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - return 0; - cobj->removeProtectedChild(arg0); - return 0; - } - if (argc == 2) - { - cocos2d::Node* arg0; - bool arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.ProtectedNode:removeProtectedChild"); - if(!ok) - return 0; - cobj->removeProtectedChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeProtectedChild",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeProtectedChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_removeAllProtectedChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProtectedNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProtectedNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllProtectedChildren(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProtectedNode:removeAllProtectedChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_removeAllProtectedChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProtectedNode_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.ProtectedNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::ProtectedNode* ret = cocos2d::ProtectedNode::create(); - object_to_luaval(tolua_S, "cc.ProtectedNode",(cocos2d::ProtectedNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProtectedNode:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProtectedNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_ProtectedNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ProtectedNode)"); - return 0; -} - -int lua_register_cocos2dx_ProtectedNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ProtectedNode"); - tolua_cclass(tolua_S,"ProtectedNode","cc.ProtectedNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ProtectedNode"); - tolua_function(tolua_S,"addProtectedChild",lua_cocos2dx_ProtectedNode_addProtectedChild); - tolua_function(tolua_S,"disableCascadeColor",lua_cocos2dx_ProtectedNode_disableCascadeColor); - tolua_function(tolua_S,"removeProtectedChildByTag",lua_cocos2dx_ProtectedNode_removeProtectedChildByTag); - tolua_function(tolua_S,"reorderProtectedChild",lua_cocos2dx_ProtectedNode_reorderProtectedChild); - tolua_function(tolua_S,"removeAllProtectedChildrenWithCleanup",lua_cocos2dx_ProtectedNode_removeAllProtectedChildrenWithCleanup); - tolua_function(tolua_S,"disableCascadeOpacity",lua_cocos2dx_ProtectedNode_disableCascadeOpacity); - tolua_function(tolua_S,"sortAllProtectedChildren",lua_cocos2dx_ProtectedNode_sortAllProtectedChildren); - tolua_function(tolua_S,"getProtectedChildByTag",lua_cocos2dx_ProtectedNode_getProtectedChildByTag); - tolua_function(tolua_S,"removeProtectedChild",lua_cocos2dx_ProtectedNode_removeProtectedChild); - tolua_function(tolua_S,"removeAllProtectedChildren",lua_cocos2dx_ProtectedNode_removeAllProtectedChildren); - tolua_function(tolua_S,"create", lua_cocos2dx_ProtectedNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ProtectedNode).name(); - g_luaType[typeName] = "cc.ProtectedNode"; - g_typeCast["ProtectedNode"] = "cc.ProtectedNode"; - return 1; -} TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) { tolua_open(tolua_S); @@ -64654,6 +64655,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_FadeOutUpTiles(tolua_S); lua_register_cocos2dx_FadeOutDownTiles(tolua_S); lua_register_cocos2dx_StopGrid(tolua_S); + lua_register_cocos2dx_ParticleBatchNode(tolua_S); lua_register_cocos2dx_SkewTo(tolua_S); lua_register_cocos2dx_SkewBy(tolua_S); lua_register_cocos2dx_EaseQuadraticActionOut(tolua_S); @@ -64807,7 +64809,6 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TMXMapInfo(tolua_S); lua_register_cocos2dx_EaseExponentialIn(tolua_S); lua_register_cocos2dx_ReuseGrid(tolua_S); - lua_register_cocos2dx_ProtectedNode(tolua_S); lua_register_cocos2dx_EaseQuinticActionOut(tolua_S); lua_register_cocos2dx_EventDispatcher(tolua_S); lua_register_cocos2dx_MenuItemAtlasFont(tolua_S); @@ -64815,7 +64816,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_OrbitCamera(tolua_S); lua_register_cocos2dx_ParallaxNode(tolua_S); lua_register_cocos2dx_EventCustom(tolua_S); - lua_register_cocos2dx_ParticleBatchNode(tolua_S); + lua_register_cocos2dx_TransitionFade(tolua_S); lua_register_cocos2dx_Component(tolua_S); lua_register_cocos2dx_EaseCubicActionOut(tolua_S); lua_register_cocos2dx_EventListenerTouchOneByOne(tolua_S); @@ -64829,7 +64830,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_MenuItemToggle(tolua_S); lua_register_cocos2dx_RemoveSelf(tolua_S); lua_register_cocos2dx_SplitCols(tolua_S); - lua_register_cocos2dx_TransitionFade(tolua_S); + lua_register_cocos2dx_ProtectedNode(tolua_S); lua_register_cocos2dx_MotionStreak(tolua_S); lua_register_cocos2dx_RotateBy(tolua_S); lua_register_cocos2dx_FileUtils(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp index 38e7a29476..30a5370bd9 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp @@ -1,6 +1,6 @@ #include "lua_cocos2dx_controller_auto.hpp" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "base/CCGameController.h" +#include "CCGameController.h" #include "tolua_fix.h" #include "LuaBasicConversions.h" From 182a76a0f58be1409aa1879e49cca2b25d0159f4 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 10 Sep 2014 10:08:38 +0800 Subject: [PATCH 56/61] add chipmunk config for iOS & mac --- .gitignore | 1 + build/cocos2d_libs.xcodeproj/project.pbxproj | 408 ++----------------- 2 files changed, 33 insertions(+), 376 deletions(-) diff --git a/.gitignore b/.gitignore index 8816560e93..c99206c306 100644 --- a/.gitignore +++ b/.gitignore @@ -139,3 +139,4 @@ project.properties /v*-lua-runtime-*.zip /tools/fbx-conv/ external/chipmunk +tests/cpp-tests/Resources/audio diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index ffcf926cf0..a518e62b73 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -711,116 +711,6 @@ 15AE1AD919AAD41000C27E9E /* b2Rope.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169331807AF9C005B8026 /* b2Rope.h */; }; 15AE1ADA19AAD41000C27E9E /* b2Rope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A169321807AF9C005B8026 /* b2Rope.cpp */; }; 15AE1ADB19AAD41000C27E9E /* b2Rope.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169331807AF9C005B8026 /* b2Rope.h */; }; - 15AE1ADC19AAD42500C27E9E /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169401807AFD6005B8026 /* chipmunk.h */; }; - 15AE1ADD19AAD42500C27E9E /* chipmunk_ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169411807AFD6005B8026 /* chipmunk_ffi.h */; }; - 15AE1ADE19AAD42500C27E9E /* chipmunk_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169421807AFD6005B8026 /* chipmunk_private.h */; }; - 15AE1ADF19AAD42500C27E9E /* chipmunk_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169431807AFD6005B8026 /* chipmunk_types.h */; }; - 15AE1AE019AAD42500C27E9E /* chipmunk_unsafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */; }; - 15AE1AE119AAD42500C27E9E /* cpConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169461807AFD6005B8026 /* cpConstraint.h */; }; - 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */; }; - 15AE1AE319AAD42500C27E9E /* cpDampedSpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169481807AFD6005B8026 /* cpDampedSpring.h */; }; - 15AE1AE419AAD42500C27E9E /* cpGearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169491807AFD6005B8026 /* cpGearJoint.h */; }; - 15AE1AE519AAD42500C27E9E /* cpGrooveJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */; }; - 15AE1AE619AAD42500C27E9E /* cpPinJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694B1807AFD6005B8026 /* cpPinJoint.h */; }; - 15AE1AE719AAD42500C27E9E /* cpPivotJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */; }; - 15AE1AE819AAD42500C27E9E /* cpRatchetJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */; }; - 15AE1AE919AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */; }; - 15AE1AEA19AAD42500C27E9E /* cpSimpleMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */; }; - 15AE1AEB19AAD42500C27E9E /* cpSlideJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169501807AFD6005B8026 /* cpSlideJoint.h */; }; - 15AE1AEC19AAD42500C27E9E /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169511807AFD6005B8026 /* util.h */; }; - 15AE1AED19AAD42500C27E9E /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169521807AFD6005B8026 /* cpArbiter.h */; }; - 15AE1AEE19AAD42500C27E9E /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169531807AFD6005B8026 /* cpBB.h */; }; - 15AE1AEF19AAD42500C27E9E /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169541807AFD6005B8026 /* cpBody.h */; }; - 15AE1AF019AAD42500C27E9E /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169551807AFD6005B8026 /* cpPolyShape.h */; }; - 15AE1AF119AAD42500C27E9E /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169561807AFD6005B8026 /* cpShape.h */; }; - 15AE1AF219AAD42500C27E9E /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169571807AFD6005B8026 /* cpSpace.h */; }; - 15AE1AF319AAD42500C27E9E /* cpSpatialIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169581807AFD6005B8026 /* cpSpatialIndex.h */; }; - 15AE1AF419AAD42500C27E9E /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169591807AFD6005B8026 /* cpVect.h */; }; - 15AE1AF519AAD42500C27E9E /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169401807AFD6005B8026 /* chipmunk.h */; }; - 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169411807AFD6005B8026 /* chipmunk_ffi.h */; }; - 15AE1AF719AAD42500C27E9E /* chipmunk_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169421807AFD6005B8026 /* chipmunk_private.h */; }; - 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169431807AFD6005B8026 /* chipmunk_types.h */; }; - 15AE1AF919AAD42500C27E9E /* chipmunk_unsafe.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */; }; - 15AE1AFA19AAD42500C27E9E /* cpConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169461807AFD6005B8026 /* cpConstraint.h */; }; - 15AE1AFB19AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */; }; - 15AE1AFC19AAD42500C27E9E /* cpDampedSpring.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169481807AFD6005B8026 /* cpDampedSpring.h */; }; - 15AE1AFD19AAD42500C27E9E /* cpGearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169491807AFD6005B8026 /* cpGearJoint.h */; }; - 15AE1AFE19AAD42500C27E9E /* cpGrooveJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */; }; - 15AE1AFF19AAD42500C27E9E /* cpPinJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694B1807AFD6005B8026 /* cpPinJoint.h */; }; - 15AE1B0019AAD42500C27E9E /* cpPivotJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */; }; - 15AE1B0119AAD42500C27E9E /* cpRatchetJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */; }; - 15AE1B0219AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */; }; - 15AE1B0319AAD42500C27E9E /* cpSimpleMotor.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */; }; - 15AE1B0419AAD42500C27E9E /* cpSlideJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169501807AFD6005B8026 /* cpSlideJoint.h */; }; - 15AE1B0519AAD42500C27E9E /* util.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169511807AFD6005B8026 /* util.h */; }; - 15AE1B0619AAD42500C27E9E /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169521807AFD6005B8026 /* cpArbiter.h */; }; - 15AE1B0719AAD42500C27E9E /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169531807AFD6005B8026 /* cpBB.h */; }; - 15AE1B0819AAD42500C27E9E /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169541807AFD6005B8026 /* cpBody.h */; }; - 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169551807AFD6005B8026 /* cpPolyShape.h */; }; - 15AE1B0A19AAD42500C27E9E /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169561807AFD6005B8026 /* cpShape.h */; }; - 15AE1B0B19AAD42500C27E9E /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169571807AFD6005B8026 /* cpSpace.h */; }; - 15AE1B0C19AAD42500C27E9E /* cpSpatialIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169581807AFD6005B8026 /* cpSpatialIndex.h */; }; - 15AE1B0D19AAD42500C27E9E /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A169591807AFD6005B8026 /* cpVect.h */; }; - 15AE1B0E19AAD43700C27E9E /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697B1807AFD6005B8026 /* chipmunk.c */; }; - 15AE1B0F19AAD43700C27E9E /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697E1807AFD6005B8026 /* cpConstraint.c */; }; - 15AE1B1019AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */; }; - 15AE1B1119AAD43700C27E9E /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169801807AFD6005B8026 /* cpDampedSpring.c */; }; - 15AE1B1219AAD43700C27E9E /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169811807AFD6005B8026 /* cpGearJoint.c */; }; - 15AE1B1319AAD43700C27E9E /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169821807AFD6005B8026 /* cpGrooveJoint.c */; }; - 15AE1B1419AAD43700C27E9E /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169831807AFD6005B8026 /* cpPinJoint.c */; }; - 15AE1B1519AAD43700C27E9E /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169841807AFD6005B8026 /* cpPivotJoint.c */; }; - 15AE1B1619AAD43700C27E9E /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169851807AFD6005B8026 /* cpRatchetJoint.c */; }; - 15AE1B1719AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */; }; - 15AE1B1819AAD43700C27E9E /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169871807AFD6005B8026 /* cpSimpleMotor.c */; }; - 15AE1B1919AAD43700C27E9E /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169881807AFD6005B8026 /* cpSlideJoint.c */; }; - 15AE1B1A19AAD43700C27E9E /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169891807AFD6005B8026 /* cpArbiter.c */; }; - 15AE1B1B19AAD43700C27E9E /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698A1807AFD6005B8026 /* cpArray.c */; }; - 15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698B1807AFD6005B8026 /* cpBB.c */; }; - 15AE1B1D19AAD43700C27E9E /* cpBBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698C1807AFD6005B8026 /* cpBBTree.c */; }; - 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698D1807AFD6005B8026 /* cpBody.c */; }; - 15AE1B1F19AAD43700C27E9E /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698E1807AFD6005B8026 /* cpCollision.c */; }; - 15AE1B2019AAD43700C27E9E /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698F1807AFD6005B8026 /* cpHashSet.c */; }; - 15AE1B2119AAD43700C27E9E /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169901807AFD6005B8026 /* cpPolyShape.c */; }; - 15AE1B2219AAD43700C27E9E /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169911807AFD6005B8026 /* cpShape.c */; }; - 15AE1B2319AAD43700C27E9E /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169921807AFD6005B8026 /* cpSpace.c */; }; - 15AE1B2419AAD43700C27E9E /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169931807AFD6005B8026 /* cpSpaceComponent.c */; }; - 15AE1B2519AAD43700C27E9E /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169941807AFD6005B8026 /* cpSpaceHash.c */; }; - 15AE1B2619AAD43700C27E9E /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169951807AFD6005B8026 /* cpSpaceQuery.c */; }; - 15AE1B2719AAD43700C27E9E /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169961807AFD6005B8026 /* cpSpaceStep.c */; }; - 15AE1B2819AAD43700C27E9E /* cpSpatialIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169971807AFD6005B8026 /* cpSpatialIndex.c */; }; - 15AE1B2919AAD43700C27E9E /* cpSweep1D.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169981807AFD6005B8026 /* cpSweep1D.c */; }; - 15AE1B2A19AAD43700C27E9E /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169991807AFD6005B8026 /* cpVect.c */; }; - 15AE1B2B19AAD43700C27E9E /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1699A1807AFD6005B8026 /* prime.h */; }; - 15AE1B2C19AAD43700C27E9E /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697B1807AFD6005B8026 /* chipmunk.c */; }; - 15AE1B2D19AAD43700C27E9E /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697E1807AFD6005B8026 /* cpConstraint.c */; }; - 15AE1B2E19AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */; }; - 15AE1B2F19AAD43700C27E9E /* cpDampedSpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169801807AFD6005B8026 /* cpDampedSpring.c */; }; - 15AE1B3019AAD43700C27E9E /* cpGearJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169811807AFD6005B8026 /* cpGearJoint.c */; }; - 15AE1B3119AAD43700C27E9E /* cpGrooveJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169821807AFD6005B8026 /* cpGrooveJoint.c */; }; - 15AE1B3219AAD43700C27E9E /* cpPinJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169831807AFD6005B8026 /* cpPinJoint.c */; }; - 15AE1B3319AAD43700C27E9E /* cpPivotJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169841807AFD6005B8026 /* cpPivotJoint.c */; }; - 15AE1B3419AAD43700C27E9E /* cpRatchetJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169851807AFD6005B8026 /* cpRatchetJoint.c */; }; - 15AE1B3519AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */; }; - 15AE1B3619AAD43700C27E9E /* cpSimpleMotor.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169871807AFD6005B8026 /* cpSimpleMotor.c */; }; - 15AE1B3719AAD43700C27E9E /* cpSlideJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169881807AFD6005B8026 /* cpSlideJoint.c */; }; - 15AE1B3819AAD43700C27E9E /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169891807AFD6005B8026 /* cpArbiter.c */; }; - 15AE1B3919AAD43700C27E9E /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698A1807AFD6005B8026 /* cpArray.c */; }; - 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698B1807AFD6005B8026 /* cpBB.c */; }; - 15AE1B3B19AAD43700C27E9E /* cpBBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698C1807AFD6005B8026 /* cpBBTree.c */; }; - 15AE1B3C19AAD43700C27E9E /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698D1807AFD6005B8026 /* cpBody.c */; }; - 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698E1807AFD6005B8026 /* cpCollision.c */; }; - 15AE1B3E19AAD43700C27E9E /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A1698F1807AFD6005B8026 /* cpHashSet.c */; }; - 15AE1B3F19AAD43700C27E9E /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169901807AFD6005B8026 /* cpPolyShape.c */; }; - 15AE1B4019AAD43700C27E9E /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169911807AFD6005B8026 /* cpShape.c */; }; - 15AE1B4119AAD43700C27E9E /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169921807AFD6005B8026 /* cpSpace.c */; }; - 15AE1B4219AAD43700C27E9E /* cpSpaceComponent.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169931807AFD6005B8026 /* cpSpaceComponent.c */; }; - 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169941807AFD6005B8026 /* cpSpaceHash.c */; }; - 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169951807AFD6005B8026 /* cpSpaceQuery.c */; }; - 15AE1B4519AAD43700C27E9E /* cpSpaceStep.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169961807AFD6005B8026 /* cpSpaceStep.c */; }; - 15AE1B4619AAD43700C27E9E /* cpSpatialIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169971807AFD6005B8026 /* cpSpatialIndex.c */; }; - 15AE1B4719AAD43700C27E9E /* cpSweep1D.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169981807AFD6005B8026 /* cpSweep1D.c */; }; - 15AE1B4819AAD43700C27E9E /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = 46A169991807AFD6005B8026 /* cpVect.c */; }; - 15AE1B4919AAD43700C27E9E /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1699A1807AFD6005B8026 /* prime.h */; }; 15AE1B4A19AAD49000C27E9E /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF541C180E3B6A000584C8 /* libcurl.a */; }; 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905F9FE18CF08D000240AA3 /* UIListView.cpp */; }; 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905F9FF18CF08D000240AA3 /* UIListView.h */; }; @@ -1334,6 +1224,8 @@ 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; + 29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0619BFE8D400EFA1DF /* libchipmunk.a */; }; + 29031E0919BFE8DE00EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */; }; 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; @@ -2298,6 +2190,8 @@ 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; + 29031E0619BFE8D400EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/mac/libchipmunk.a; sourceTree = ""; }; + 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libchipmunk.a; path = prebuilt/ios/libchipmunk.a; sourceTree = ""; }; 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUI.cpp; sourceTree = ""; }; 2905F9EA18CF08D000240AA3 /* CocosGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUI.h; sourceTree = ""; }; 2905F9EB18CF08D000240AA3 /* GUIDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDefine.h; sourceTree = ""; }; @@ -2547,62 +2441,6 @@ 46A169121807AF9C005B8026 /* b2WheelJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = b2WheelJoint.h; sourceTree = ""; }; 46A169321807AF9C005B8026 /* b2Rope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = b2Rope.cpp; sourceTree = ""; }; 46A169331807AF9C005B8026 /* b2Rope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = b2Rope.h; sourceTree = ""; }; - 46A169401807AFD6005B8026 /* chipmunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; }; - 46A169411807AFD6005B8026 /* chipmunk_ffi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; }; - 46A169421807AFD6005B8026 /* chipmunk_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = ""; }; - 46A169431807AFD6005B8026 /* chipmunk_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_types.h; sourceTree = ""; }; - 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chipmunk_unsafe.h; sourceTree = ""; }; - 46A169461807AFD6005B8026 /* cpConstraint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpConstraint.h; sourceTree = ""; }; - 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpDampedRotarySpring.h; sourceTree = ""; }; - 46A169481807AFD6005B8026 /* cpDampedSpring.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpDampedSpring.h; sourceTree = ""; }; - 46A169491807AFD6005B8026 /* cpGearJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpGearJoint.h; sourceTree = ""; }; - 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpGrooveJoint.h; sourceTree = ""; }; - 46A1694B1807AFD6005B8026 /* cpPinJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPinJoint.h; sourceTree = ""; }; - 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPivotJoint.h; sourceTree = ""; }; - 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpRatchetJoint.h; sourceTree = ""; }; - 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpRotaryLimitJoint.h; sourceTree = ""; }; - 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSimpleMotor.h; sourceTree = ""; }; - 46A169501807AFD6005B8026 /* cpSlideJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSlideJoint.h; sourceTree = ""; }; - 46A169511807AFD6005B8026 /* util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; }; - 46A169521807AFD6005B8026 /* cpArbiter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpArbiter.h; sourceTree = ""; }; - 46A169531807AFD6005B8026 /* cpBB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpBB.h; sourceTree = ""; }; - 46A169541807AFD6005B8026 /* cpBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpBody.h; sourceTree = ""; }; - 46A169551807AFD6005B8026 /* cpPolyShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpPolyShape.h; sourceTree = ""; }; - 46A169561807AFD6005B8026 /* cpShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpShape.h; sourceTree = ""; }; - 46A169571807AFD6005B8026 /* cpSpace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSpace.h; sourceTree = ""; }; - 46A169581807AFD6005B8026 /* cpSpatialIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpSpatialIndex.h; sourceTree = ""; }; - 46A169591807AFD6005B8026 /* cpVect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = ""; }; - 46A1697B1807AFD6005B8026 /* chipmunk.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = chipmunk.c; sourceTree = ""; }; - 46A1697C1807AFD6005B8026 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - 46A1697E1807AFD6005B8026 /* cpConstraint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpConstraint.c; sourceTree = ""; }; - 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpDampedRotarySpring.c; sourceTree = ""; }; - 46A169801807AFD6005B8026 /* cpDampedSpring.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpDampedSpring.c; sourceTree = ""; }; - 46A169811807AFD6005B8026 /* cpGearJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpGearJoint.c; sourceTree = ""; }; - 46A169821807AFD6005B8026 /* cpGrooveJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpGrooveJoint.c; sourceTree = ""; }; - 46A169831807AFD6005B8026 /* cpPinJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPinJoint.c; sourceTree = ""; }; - 46A169841807AFD6005B8026 /* cpPivotJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPivotJoint.c; sourceTree = ""; }; - 46A169851807AFD6005B8026 /* cpRatchetJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpRatchetJoint.c; sourceTree = ""; }; - 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpRotaryLimitJoint.c; sourceTree = ""; }; - 46A169871807AFD6005B8026 /* cpSimpleMotor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSimpleMotor.c; sourceTree = ""; }; - 46A169881807AFD6005B8026 /* cpSlideJoint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSlideJoint.c; sourceTree = ""; }; - 46A169891807AFD6005B8026 /* cpArbiter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpArbiter.c; sourceTree = ""; }; - 46A1698A1807AFD6005B8026 /* cpArray.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = ""; }; - 46A1698B1807AFD6005B8026 /* cpBB.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBB.c; sourceTree = ""; }; - 46A1698C1807AFD6005B8026 /* cpBBTree.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBBTree.c; sourceTree = ""; }; - 46A1698D1807AFD6005B8026 /* cpBody.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpBody.c; sourceTree = ""; }; - 46A1698E1807AFD6005B8026 /* cpCollision.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpCollision.c; sourceTree = ""; }; - 46A1698F1807AFD6005B8026 /* cpHashSet.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpHashSet.c; sourceTree = ""; }; - 46A169901807AFD6005B8026 /* cpPolyShape.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpPolyShape.c; sourceTree = ""; }; - 46A169911807AFD6005B8026 /* cpShape.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpShape.c; sourceTree = ""; }; - 46A169921807AFD6005B8026 /* cpSpace.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpace.c; sourceTree = ""; }; - 46A169931807AFD6005B8026 /* cpSpaceComponent.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceComponent.c; sourceTree = ""; }; - 46A169941807AFD6005B8026 /* cpSpaceHash.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = ""; }; - 46A169951807AFD6005B8026 /* cpSpaceQuery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceQuery.c; sourceTree = ""; }; - 46A169961807AFD6005B8026 /* cpSpaceStep.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpaceStep.c; sourceTree = ""; }; - 46A169971807AFD6005B8026 /* cpSpatialIndex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSpatialIndex.c; sourceTree = ""; }; - 46A169981807AFD6005B8026 /* cpSweep1D.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpSweep1D.c; sourceTree = ""; }; - 46A169991807AFD6005B8026 /* cpVect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = ""; }; - 46A1699A1807AFD6005B8026 /* prime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = ""; }; 46A1706E1807CE7A005B8026 /* CCPhysicsBody.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsBody.cpp; sourceTree = ""; }; 46A1706F1807CE7A005B8026 /* CCPhysicsBody.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsBody.h; sourceTree = ""; }; 46A170701807CE7A005B8026 /* CCPhysicsContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContact.cpp; sourceTree = ""; }; @@ -2937,6 +2775,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */, 15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */, B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */, B21770491977ED4C009EE11B /* libz.dylib in Frameworks */, @@ -2964,6 +2803,7 @@ 1A570364180BD1120088DEC7 /* libpng.a in Frameworks */, 1A570378180BD1B40088DEC7 /* libjpeg.a in Frameworks */, 1A5703A4180BD2350088DEC7 /* libtiff.a in Frameworks */, + 29031E0919BFE8DE00EFA1DF /* libchipmunk.a in Frameworks */, 1A5703BB180BD2800088DEC7 /* libwebp.a in Frameworks */, 1A57052E180BD3280088DEC7 /* libfreetype.a in Frameworks */, ); @@ -4004,6 +3844,22 @@ path = ../external/json; sourceTree = ""; }; + 29031E0419BFE8BE00EFA1DF /* ios */ = { + isa = PBXGroup; + children = ( + 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */, + ); + name = ios; + sourceTree = ""; + }; + 29031E0519BFE8C400EFA1DF /* mac */ = { + isa = PBXGroup; + children = ( + 29031E0619BFE8D400EFA1DF /* libchipmunk.a */, + ); + name = mac; + sourceTree = ""; + }; 2905F9E618CF08D000240AA3 /* ui */ = { isa = PBXGroup; children = ( @@ -4415,107 +4271,13 @@ 46A1693A1807AFD6005B8026 /* chipmunk */ = { isa = PBXGroup; children = ( - 46A1693E1807AFD6005B8026 /* include */, - 46A1697A1807AFD6005B8026 /* src */, + 29031E0519BFE8C400EFA1DF /* mac */, + 29031E0419BFE8BE00EFA1DF /* ios */, ); name = chipmunk; path = ../external/chipmunk; sourceTree = ""; }; - 46A1693E1807AFD6005B8026 /* include */ = { - isa = PBXGroup; - children = ( - 46A1693F1807AFD6005B8026 /* chipmunk */, - ); - path = include; - sourceTree = ""; - }; - 46A1693F1807AFD6005B8026 /* chipmunk */ = { - isa = PBXGroup; - children = ( - 46A169401807AFD6005B8026 /* chipmunk.h */, - 46A169411807AFD6005B8026 /* chipmunk_ffi.h */, - 46A169421807AFD6005B8026 /* chipmunk_private.h */, - 46A169431807AFD6005B8026 /* chipmunk_types.h */, - 46A169441807AFD6005B8026 /* chipmunk_unsafe.h */, - 46A169451807AFD6005B8026 /* constraints */, - 46A169521807AFD6005B8026 /* cpArbiter.h */, - 46A169531807AFD6005B8026 /* cpBB.h */, - 46A169541807AFD6005B8026 /* cpBody.h */, - 46A169551807AFD6005B8026 /* cpPolyShape.h */, - 46A169561807AFD6005B8026 /* cpShape.h */, - 46A169571807AFD6005B8026 /* cpSpace.h */, - 46A169581807AFD6005B8026 /* cpSpatialIndex.h */, - 46A169591807AFD6005B8026 /* cpVect.h */, - ); - path = chipmunk; - sourceTree = ""; - }; - 46A169451807AFD6005B8026 /* constraints */ = { - isa = PBXGroup; - children = ( - 46A169461807AFD6005B8026 /* cpConstraint.h */, - 46A169471807AFD6005B8026 /* cpDampedRotarySpring.h */, - 46A169481807AFD6005B8026 /* cpDampedSpring.h */, - 46A169491807AFD6005B8026 /* cpGearJoint.h */, - 46A1694A1807AFD6005B8026 /* cpGrooveJoint.h */, - 46A1694B1807AFD6005B8026 /* cpPinJoint.h */, - 46A1694C1807AFD6005B8026 /* cpPivotJoint.h */, - 46A1694D1807AFD6005B8026 /* cpRatchetJoint.h */, - 46A1694E1807AFD6005B8026 /* cpRotaryLimitJoint.h */, - 46A1694F1807AFD6005B8026 /* cpSimpleMotor.h */, - 46A169501807AFD6005B8026 /* cpSlideJoint.h */, - 46A169511807AFD6005B8026 /* util.h */, - ); - path = constraints; - sourceTree = ""; - }; - 46A1697A1807AFD6005B8026 /* src */ = { - isa = PBXGroup; - children = ( - 46A1697B1807AFD6005B8026 /* chipmunk.c */, - 46A1697C1807AFD6005B8026 /* CMakeLists.txt */, - 46A1697D1807AFD6005B8026 /* constraints */, - 46A169891807AFD6005B8026 /* cpArbiter.c */, - 46A1698A1807AFD6005B8026 /* cpArray.c */, - 46A1698B1807AFD6005B8026 /* cpBB.c */, - 46A1698C1807AFD6005B8026 /* cpBBTree.c */, - 46A1698D1807AFD6005B8026 /* cpBody.c */, - 46A1698E1807AFD6005B8026 /* cpCollision.c */, - 46A1698F1807AFD6005B8026 /* cpHashSet.c */, - 46A169901807AFD6005B8026 /* cpPolyShape.c */, - 46A169911807AFD6005B8026 /* cpShape.c */, - 46A169921807AFD6005B8026 /* cpSpace.c */, - 46A169931807AFD6005B8026 /* cpSpaceComponent.c */, - 46A169941807AFD6005B8026 /* cpSpaceHash.c */, - 46A169951807AFD6005B8026 /* cpSpaceQuery.c */, - 46A169961807AFD6005B8026 /* cpSpaceStep.c */, - 46A169971807AFD6005B8026 /* cpSpatialIndex.c */, - 46A169981807AFD6005B8026 /* cpSweep1D.c */, - 46A169991807AFD6005B8026 /* cpVect.c */, - 46A1699A1807AFD6005B8026 /* prime.h */, - ); - path = src; - sourceTree = ""; - }; - 46A1697D1807AFD6005B8026 /* constraints */ = { - isa = PBXGroup; - children = ( - 46A1697E1807AFD6005B8026 /* cpConstraint.c */, - 46A1697F1807AFD6005B8026 /* cpDampedRotarySpring.c */, - 46A169801807AFD6005B8026 /* cpDampedSpring.c */, - 46A169811807AFD6005B8026 /* cpGearJoint.c */, - 46A169821807AFD6005B8026 /* cpGrooveJoint.c */, - 46A169831807AFD6005B8026 /* cpPinJoint.c */, - 46A169841807AFD6005B8026 /* cpPivotJoint.c */, - 46A169851807AFD6005B8026 /* cpRatchetJoint.c */, - 46A169861807AFD6005B8026 /* cpRotaryLimitJoint.c */, - 46A169871807AFD6005B8026 /* cpSimpleMotor.c */, - 46A169881807AFD6005B8026 /* cpSlideJoint.c */, - ); - path = constraints; - sourceTree = ""; - }; 46A169A11807B037005B8026 /* 2d */ = { isa = PBXGroup; children = ( @@ -5035,7 +4797,6 @@ 15AE19E919AAD3A700C27E9E /* Slot.h in Headers */, B375107B1823AC9F00B3BA6A /* CCPhysicsWorldInfo_chipmunk.h in Headers */, 15AE18A319AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, - 15AE1AE919AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */, 46A170F01807CECA005B8026 /* CCPhysicsWorld.h in Headers */, 15AE199D19AAD39600C27E9E /* ScrollViewReader.h in Headers */, 50ABBEC11925AB6F00A911A9 /* CCValue.h in Headers */, @@ -5101,7 +4862,6 @@ 15AE1A6B19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, 1A570110180BC8EE0088DEC7 /* CCDrawingPrimitives.h in Headers */, B37510791823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */, - 15AE1AF419AAD42500C27E9E /* cpVect.h in Headers */, 1A570114180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, 15AE1A6019AAD40300C27E9E /* b2ContactManager.h in Headers */, 15AE188319AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, @@ -5113,16 +4873,13 @@ 5034CA2D191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */, 15AE1A7119AAD40300C27E9E /* b2Contact.h in Headers */, - 15AE1AF019AAD42500C27E9E /* cpPolyShape.h in Headers */, 50ABBED11925AB6F00A911A9 /* TGAlib.h in Headers */, 15AE19D319AAD3A700C27E9E /* Bone.h in Headers */, - 15AE1AE819AAD42500C27E9E /* cpRatchetJoint.h in Headers */, 1A57019F180BCB590088DEC7 /* CCFont.h in Headers */, 1A5701A3180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE18E919AAD35000C27E9E /* CCActionManagerEx.h in Headers */, 1A01C68618F57BE800EFE3A6 /* CCArray.h in Headers */, 1A5701A7180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, - 15AE1ADD19AAD42500C27E9E /* chipmunk_ffi.h in Headers */, 15AE1A7D19AAD40300C27E9E /* b2MotorJoint.h in Headers */, 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */, 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, @@ -5143,13 +4900,10 @@ 1A5701BB180BCB5A0088DEC7 /* CCLabel.h in Headers */, 15AE182619AAD2F700C27E9E /* CCMesh.h in Headers */, 15AE192019AAD35000C27E9E /* CCUtilMath.h in Headers */, - 15AE1ADC19AAD42500C27E9E /* chipmunk.h in Headers */, 15AE1BC119AADFFB00C27E9E /* cocos-ext.h in Headers */, 15AE19D519AAD3A700C27E9E /* BoneData.h in Headers */, 1A5701BF180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, - 15AE1AEF19AAD42500C27E9E /* cpBody.h in Headers */, 50ABBED91925AB6F00A911A9 /* ZipUtils.h in Headers */, - 15AE1AF119AAD42500C27E9E /* cpShape.h in Headers */, 50643BDB19BFAF4400EF68ED /* CCStdC.h in Headers */, 1A5701C3180BCB5A0088DEC7 /* CCLabelBMFont.h in Headers */, 50ABBE5F1925AB6F00A911A9 /* CCEventListener.h in Headers */, @@ -5167,21 +4921,17 @@ 15AE18E519AAD35000C27E9E /* CCActionFrame.h in Headers */, 50ABBEAD1925AB6F00A911A9 /* ccTypes.h in Headers */, 1A087AEA1860400400196EF5 /* edtaa3func.h in Headers */, - 15AE1AE519AAD42500C27E9E /* cpGrooveJoint.h in Headers */, 15AE181C19AAD2F700C27E9E /* CCBundle3D.h in Headers */, 15AE189919AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, 15AE1B5E19AADA9900C27E9E /* UITextBMFont.h in Headers */, 15AE18E719AAD35000C27E9E /* CCActionFrameEasing.h in Headers */, 1A5701E8180BCB8C0088DEC7 /* CCTransition.h in Headers */, - 15AE1AE119AAD42500C27E9E /* cpConstraint.h in Headers */, 1A5701EC180BCB8C0088DEC7 /* CCTransitionPageTurn.h in Headers */, 15AE196F19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, - 15AE1AF319AAD42500C27E9E /* cpSpatialIndex.h in Headers */, 15AE19DB19AAD3A700C27E9E /* extension.h in Headers */, 1A5701F0180BCB8C0088DEC7 /* CCTransitionProgress.h in Headers */, 1A5701F9180BCBAD0088DEC7 /* CCMenu.h in Headers */, 50ABBD401925AB0000A911A9 /* CCMath.h in Headers */, - 15AE1AE419AAD42500C27E9E /* cpGearJoint.h in Headers */, 15AE1A9319AAD40300C27E9E /* b2WheelJoint.h in Headers */, 15AE1A3119AAD3D500C27E9E /* b2ChainShape.h in Headers */, 1A5701FD180BCBAD0088DEC7 /* CCMenuItem.h in Headers */, @@ -5219,8 +4969,6 @@ 15AE191C19AAD35000C27E9E /* CCTransformHelp.h in Headers */, 5034CA2F191D591100CE6051 /* ccShader_PositionTexture.vert in Headers */, 15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */, - 15AE1AE619AAD42500C27E9E /* cpPinJoint.h in Headers */, - 15AE1AEE19AAD42500C27E9E /* cpBB.h in Headers */, 50ABBE951925AB6F00A911A9 /* CCProfiling.h in Headers */, 5034CA4B191D591100CE6051 /* ccShader_Label_df_glow.frag in Headers */, 50ABBE4F1925AB6F00A911A9 /* CCEventCustom.h in Headers */, @@ -5229,7 +4977,6 @@ 15AE18F119AAD35000C27E9E /* CCArmatureAnimation.h in Headers */, 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, - 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, @@ -5250,7 +4997,6 @@ 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */, 1A570288180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, 15AE189519AAD33D00C27E9E /* CCLayerLoader.h in Headers */, - 15AE1AEB19AAD42500C27E9E /* cpSlideJoint.h in Headers */, 1A57028C180BCC900088DEC7 /* CCSpriteFrameCache.h in Headers */, 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */, 15AE1B5A19AADA9900C27E9E /* UIText.h in Headers */, @@ -5331,7 +5077,6 @@ 15AE188219AAD33D00C27E9E /* CCBReader.h in Headers */, 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, 15AE19C319AAD3A700C27E9E /* BoundingBoxAttachment.h in Headers */, - 15AE1AF219AAD42500C27E9E /* cpSpace.h in Headers */, 15AE19C919AAD3A700C27E9E /* AnimationStateData.h in Headers */, 15AE191819AAD35000C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, 15AE1BA219AADFDF00C27E9E /* UILayoutParameter.h in Headers */, @@ -5346,11 +5091,9 @@ 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, B37510741823AC9F00B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, - 15AE1ADF19AAD42500C27E9E /* chipmunk_types.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */, 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */, - 15AE1AEA19AAD42500C27E9E /* cpSimpleMotor.h in Headers */, 50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE1A5619AAD40300C27E9E /* b2Math.h in Headers */, 50ABBE9D1925AB6F00A911A9 /* CCRefPtr.h in Headers */, @@ -5403,7 +5146,6 @@ 50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */, 15AE19A119AAD39600C27E9E /* TextAtlasReader.h in Headers */, 50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */, - 15AE1AE319AAD42500C27E9E /* cpDampedSpring.h in Headers */, 15AE188D19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 15AE1B5019AADA9900C27E9E /* UILoadingBar.h in Headers */, 50ABBFFD1926664800A911A9 /* CCFileUtils-apple.h in Headers */, @@ -5411,7 +5153,6 @@ 50ABBE7F1925AB6F00A911A9 /* CCEventTouch.h in Headers */, 50ABBE5B1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, 1A01C69E18F57BE800EFE3A6 /* CCString.h in Headers */, - 15AE1AE019AAD42500C27E9E /* chipmunk_unsafe.h in Headers */, 50ABC00F1926664800A911A9 /* CCFileUtils.h in Headers */, 15AE1A3719AAD3D500C27E9E /* b2PolygonShape.h in Headers */, 15AE1B5419AADA9900C27E9E /* UIRichText.h in Headers */, @@ -5421,17 +5162,14 @@ 15AE199F19AAD39600C27E9E /* SliderReader.h in Headers */, 50ABBD9D1925AB4100A911A9 /* ccGLStateCache.h in Headers */, 50ABBEB91925AB6F00A911A9 /* ccUTF8.h in Headers */, - 15AE1AEC19AAD42500C27E9E /* util.h in Headers */, 15AE19DD19AAD3A700C27E9E /* Json.h in Headers */, 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, - 15AE1B2B19AAD43700C27E9E /* prime.h in Headers */, 15AE19ED19AAD3A700C27E9E /* spine-cocos2dx.h in Headers */, 50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */, 15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - 15AE1AE719AAD42500C27E9E /* cpPivotJoint.h in Headers */, 1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */, 15AE19CB19AAD3A700C27E9E /* Atlas.h in Headers */, 1A01C69018F57BE800EFE3A6 /* CCDictionary.h in Headers */, @@ -5467,7 +5205,6 @@ 50ABBE971925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABC0691926664800A911A9 /* CCStdC-mac.h in Headers */, 15AE1A2B19AAD3D500C27E9E /* b2Distance.h in Headers */, - 15AE1ADE19AAD42500C27E9E /* chipmunk_private.h in Headers */, 15AE198919AAD36A00C27E9E /* ButtonReader.h in Headers */, 15AE190219AAD35000C27E9E /* CCComController.h in Headers */, 15AE18DE19AAD35000C27E9E /* TriggerObj.h in Headers */, @@ -5477,7 +5214,6 @@ 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, - 15AE1AED19AAD42500C27E9E /* cpArbiter.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, 50ABC0091926664800A911A9 /* CCCommon.h in Headers */, @@ -5507,7 +5243,6 @@ 46A171041807CECB005B8026 /* CCPhysicsShape.h in Headers */, 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, - 15AE1AFA19AAD42500C27E9E /* cpConstraint.h in Headers */, 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 15AE1A0A19AAD3A700C27E9E /* CCSkeleton.h in Headers */, @@ -5538,14 +5273,12 @@ 15AE1AA919AAD40300C27E9E /* b2TimeStep.h in Headers */, 15AE197A19AAD35700C27E9E /* CCActionTimelineCache.h in Headers */, 15AE19B919AAD39700C27E9E /* TextFieldReader.h in Headers */, - 15AE1AF919AAD42500C27E9E /* chipmunk_unsafe.h in Headers */, 15AE181319AAD2F700C27E9E /* CCAnimation3D.h in Headers */, 50ABBEC21925AB6F00A911A9 /* CCValue.h in Headers */, 50ABBECA1925AB6F00A911A9 /* firePngData.h in Headers */, B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, - 15AE1B0D19AAD42500C27E9E /* cpVect.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, 15AE1A0E19AAD3A700C27E9E /* extension.h in Headers */, 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, @@ -5555,7 +5288,6 @@ 15AE1BA819AADFDF00C27E9E /* UIRelativeBox.h in Headers */, 503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */, 15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, - 15AE1B0719AAD42500C27E9E /* cpBB.h in Headers */, 15AE18DB19AAD33D00C27E9E /* CocosBuilder.h in Headers */, 15AE1ACD19AAD40300C27E9E /* b2PrismaticJoint.h in Headers */, 50ABBEBA1925AB6F00A911A9 /* ccUTF8.h in Headers */, @@ -5563,7 +5295,6 @@ 15AE1A1219AAD3A700C27E9E /* RegionAttachment.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, 15AE18BC19AAD33D00C27E9E /* CCControlLoader.h in Headers */, - 15AE1B0219AAD42500C27E9E /* cpRotaryLimitJoint.h in Headers */, 15AE18C019AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */, 1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, 15AE195C19AAD35100C27E9E /* CCSGUIReader.h in Headers */, @@ -5576,7 +5307,6 @@ 15AE194A19AAD35100C27E9E /* CCComController.h in Headers */, B37510841823ACA100B3BA6A /* CCPhysicsShapeInfo_chipmunk.h in Headers */, 5034CA46191D591100CE6051 /* ccShader_Label_outline.frag in Headers */, - 15AE1B0019AAD42500C27E9E /* cpPivotJoint.h in Headers */, 1A570078180BC5A10088DEC7 /* CCActionGrid3D.h in Headers */, 50ABBD631925AB0000A911A9 /* Vec4.h in Headers */, 15AE19AF19AAD39700C27E9E /* PageViewReader.h in Headers */, @@ -5626,7 +5356,6 @@ 503DD8E61926736A00CD74DD /* CCEAGLView-ios.h in Headers */, 50ABBE4C1925AB6F00A911A9 /* CCEventAcceleration.h in Headers */, 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, - 15AE1B0419AAD42500C27E9E /* cpSlideJoint.h in Headers */, 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */, 1A570122180BC90D0088DEC7 /* CCGrid.h in Headers */, @@ -5654,7 +5383,6 @@ 15AE1AAD19AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */, - 15AE1AFF19AAD42500C27E9E /* cpPinJoint.h in Headers */, 1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, 15AE1A4C19AAD3D500C27E9E /* b2EdgeShape.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, @@ -5672,7 +5400,6 @@ 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, - 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */, 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, 5034CA42191D591100CE6051 /* ccShader_Position_uColor.frag in Headers */, @@ -5681,8 +5408,6 @@ 15AE1C1819AAE2C700C27E9E /* CCPhysicsSprite.h in Headers */, 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */, 15AE1BBC19AADFF000C27E9E /* HttpResponse.h in Headers */, - 15AE1B0319AAD42500C27E9E /* cpSimpleMotor.h in Headers */, - 15AE1AFE19AAD42500C27E9E /* cpGrooveJoint.h in Headers */, 15AE186019AAD31200C27E9E /* SimpleAudioEngine_objc.h in Headers */, 50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */, 15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */, @@ -5691,7 +5416,6 @@ 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */, 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, - 15AE1B0B19AAD42500C27E9E /* cpSpace.h in Headers */, 50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */, 5034CA22191D591100CE6051 /* ccShader_PositionTextureColorAlphaTest.frag in Headers */, 15AE1B8E19AADA9A00C27E9E /* UIDeprecated.h in Headers */, @@ -5728,13 +5452,11 @@ 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */, 50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */, 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, - 15AE1B4919AAD43700C27E9E /* prime.h in Headers */, 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, 15AE1A0419AAD3A700C27E9E /* AttachmentLoader.h in Headers */, 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, 15AE1ABD19AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, - 15AE1B0119AAD42500C27E9E /* cpRatchetJoint.h in Headers */, 15AE1AA819AAD40300C27E9E /* b2Island.h in Headers */, 1A570213180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, B37510821823ACA100B3BA6A /* CCPhysicsJointInfo_chipmunk.h in Headers */, @@ -5750,14 +5472,12 @@ 1A57022C180BCC1A0088DEC7 /* CCParticleSystem.h in Headers */, 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, - 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */, 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, 15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */, 15AE192A19AAD35100C27E9E /* TriggerMng.h in Headers */, - 15AE1B0819AAD42500C27E9E /* cpBody.h in Headers */, 5034CA2C191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, 50ABBE981925AB6F00A911A9 /* CCProtocols.h in Headers */, 50ABBD431925AB0000A911A9 /* CCMathBase.h in Headers */, @@ -5794,7 +5514,6 @@ 15AE18C819AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */, 15AE18D119AAD33D00C27E9E /* CCNodeLoaderLibrary.h in Headers */, 15AE1AC319AAD40300C27E9E /* b2DistanceJoint.h in Headers */, - 15AE1AF719AAD42500C27E9E /* chipmunk_private.h in Headers */, 50ABBE741925AB6F00A911A9 /* CCEventListenerMouse.h in Headers */, 1A5702CB180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */, 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, @@ -5822,7 +5541,6 @@ 15AE1AD519AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE18B019AAD33D00C27E9E /* CCBKeyframe.h in Headers */, 15AE18C419AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */, - 15AE1AFB19AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, 1A570313180BCF190088DEC7 /* CCComponentContainer.h in Headers */, 1A087AEB1860400400196EF5 /* edtaa3func.h in Headers */, B375107F1823ACA100B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, @@ -5831,7 +5549,6 @@ 15AE185D19AAD31200C27E9E /* CocosDenshion.h in Headers */, 15AE194319AAD35100C27E9E /* CCColliderDetector.h in Headers */, 15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */, - 15AE1AFC19AAD42500C27E9E /* cpDampedSpring.h in Headers */, 15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */, 1A57034E180BD09B0088DEC7 /* tinyxml2.h in Headers */, 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, @@ -5868,12 +5585,10 @@ 50ABBE3C1925AB6F00A911A9 /* CCData.h in Headers */, 503DD8FA1926B0DB00CD74DD /* CCIMEDispatcher.h in Headers */, 50ABBEC81925AB6F00A911A9 /* etc1.h in Headers */, - 15AE1AFD19AAD42500C27E9E /* cpGearJoint.h in Headers */, 50ABBDB01925AB4100A911A9 /* CCRenderer.h in Headers */, B29594B71926D5EC003EEF37 /* CCMeshCommand.h in Headers */, 3E6176771960F89B00DE83F5 /* CCEventListenerController.h in Headers */, 50ABBD861925AB4100A911A9 /* CCBatchCommand.h in Headers */, - 15AE1B0A19AAD42500C27E9E /* cpShape.h in Headers */, 15AE18CA19AAD33D00C27E9E /* CCMenuItemLoader.h in Headers */, 50ABBE481925AB6F00A911A9 /* CCEvent.h in Headers */, 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */, @@ -5915,7 +5630,6 @@ 15AE1AD119AAD40300C27E9E /* b2RevoluteJoint.h in Headers */, 50643BD519BFAECF00EF68ED /* CCGL.h in Headers */, 15AE1A2119AAD3A700C27E9E /* spine.h in Headers */, - 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, @@ -5947,7 +5661,6 @@ 15AE1BF619AAE01E00C27E9E /* CCControlSlider.h in Headers */, 1A01C68718F57BE800EFE3A6 /* CCArray.h in Headers */, 1A01C6A718F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, - 15AE1AF519AAD42500C27E9E /* chipmunk.h in Headers */, 50ABBEDA1925AB6F00A911A9 /* ZipUtils.h in Headers */, 50ABBDC01925AB4100A911A9 /* CCTextureCache.h in Headers */, B276EF641988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, @@ -5968,19 +5681,16 @@ 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 1A01C68D18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, - 15AE1B0C19AAD42500C27E9E /* cpSpatialIndex.h in Headers */, 503DD8EA1926736A00CD74DD /* CCESRenderer-ios.h in Headers */, 50ABBE581925AB6F00A911A9 /* CCEventFocus.h in Headers */, 15AE196419AAD35100C27E9E /* CCTransformHelp.h in Headers */, 15AE1AAF19AAD40300C27E9E /* b2ChainAndCircleContact.h in Headers */, - 15AE1B0619AAD42500C27E9E /* cpArbiter.h in Headers */, 15AE1B9719AADAA100C27E9E /* UIVideoPlayer.h in Headers */, 15AE18BE19AAD33D00C27E9E /* CCLabelBMFontLoader.h in Headers */, 50ABC00A1926664800A911A9 /* CCCommon.h in Headers */, 15AE19AD19AAD39700C27E9E /* LoadingBarReader.h in Headers */, 50ABBE5C1925AB6F00A911A9 /* CCEventKeyboard.h in Headers */, B375107D1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.h in Headers */, - 15AE1B0519AAD42500C27E9E /* util.h in Headers */, 50ABC01C1926664800A911A9 /* CCSAXParser.h in Headers */, 503DD8F11926736A00CD74DD /* OpenGL_Internal-ios.h in Headers */, B37510801823ACA100B3BA6A /* CCPhysicsHelper_chipmunk.h in Headers */, @@ -6067,7 +5777,6 @@ files = ( 15AE1A9019AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 50ABBE2B1925AB6F00A911A9 /* ccCArray.cpp in Sources */, - 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */, 292DB14F19B4574100A80320 /* UIEditBoxImpl-stub.cpp in Sources */, @@ -6082,25 +5791,20 @@ 15AE1A5D19AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, 15AE19D619AAD3A700C27E9E /* CCSkeleton.cpp in Sources */, - 15AE1B1F19AAD43700C27E9E /* cpCollision.c in Sources */, 46A170EA1807CECA005B8026 /* CCPhysicsJoint.cpp in Sources */, 15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */, 15AE1B4D19AADA9900C27E9E /* UIListView.cpp in Sources */, 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, - 15AE1B2719AAD43700C27E9E /* cpSpaceStep.c in Sources */, 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */, 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */, - 15AE1B2519AAD43700C27E9E /* cpSpaceHash.c in Sources */, 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */, 15AE198219AAD36400C27E9E /* WidgetReader.cpp in Sources */, 46A170EF1807CECA005B8026 /* CCPhysicsWorld.cpp in Sources */, 15AE18E419AAD35000C27E9E /* CCActionFrame.cpp in Sources */, 15AE18FD19AAD35000C27E9E /* CCComAttribute.cpp in Sources */, 46A170ED1807CECA005B8026 /* CCPhysicsShape.cpp in Sources */, - 15AE1B0F19AAD43700C27E9E /* cpConstraint.c in Sources */, 50ABBE991925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */, - 15AE1B2219AAD43700C27E9E /* cpShape.c in Sources */, ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */, 15AE1A2C19AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, @@ -6116,10 +5820,8 @@ 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */, 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */, - 15AE1B2119AAD43700C27E9E /* cpPolyShape.c in Sources */, 15AE189819AAD33D00C27E9E /* CCMenuItemLoader.cpp in Sources */, 15AE1A5719AAD40300C27E9E /* b2Settings.cpp in Sources */, - 15AE1B1819AAD43700C27E9E /* cpSimpleMotor.c in Sources */, 50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */, 15AE197419AAD35700C27E9E /* CCTimeLine.cpp in Sources */, 15AE188E19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, @@ -6135,7 +5837,6 @@ 1A570065180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, 50ABBEAB1925AB6F00A911A9 /* ccTypes.cpp in Sources */, 15AE18A219AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - 15AE1B2A19AAD43700C27E9E /* cpVect.c in Sources */, 15AE188C19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 15AE19E619AAD3A700C27E9E /* Skin.cpp in Sources */, 1A570069180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, @@ -6151,10 +5852,8 @@ B37510761823AC9F00B3BA6A /* CCPhysicsJointInfo_chipmunk.cpp in Sources */, 50ABBFFF1926664800A911A9 /* CCFileUtils-apple.mm in Sources */, 1A570075180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, - 15AE1B2019AAD43700C27E9E /* cpHashSet.c in Sources */, 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */, B375107A1823AC9F00B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, - 15AE1B1A19AAD43700C27E9E /* cpArbiter.c in Sources */, 15AE1A5F19AAD40300C27E9E /* b2ContactManager.cpp in Sources */, 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, @@ -6177,7 +5876,6 @@ 50ABBEBF1925AB6F00A911A9 /* CCValue.cpp in Sources */, 1A570098180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, 1A57009E180BC5D20088DEC7 /* CCNode.cpp in Sources */, - 15AE1B1C19AAD43700C27E9E /* cpBB.c in Sources */, 50ED2BD919BE5D5D00A0AB90 /* CCEventListenerController.cpp in Sources */, B257B460198A353E00D9A687 /* CCPrimitiveCommand.cpp in Sources */, 15AE19A419AAD39600C27E9E /* TextFieldReader.cpp in Sources */, @@ -6186,7 +5884,6 @@ 15AE187C19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */, 50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */, 15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */, - 15AE1B0E19AAD43700C27E9E /* chipmunk.c in Sources */, 15AE183819AAD2F700C27E9E /* CCRay.cpp in Sources */, B37510781823AC9F00B3BA6A /* CCPhysicsShapeInfo_chipmunk.cpp in Sources */, 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, @@ -6222,13 +5919,11 @@ 1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */, 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */, 15AE19DC19AAD3A700C27E9E /* Json.cpp in Sources */, - 15AE1B2419AAD43700C27E9E /* cpSpaceComponent.c in Sources */, 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 15AE1A8819AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, 1A5701C1180BCB5A0088DEC7 /* CCLabelBMFont.cpp in Sources */, - 15AE1B2819AAD43700C27E9E /* cpSpatialIndex.c in Sources */, 15AE182C19AAD2F700C27E9E /* CCMeshVertexIndexData.cpp in Sources */, 15AE1A8C19AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, 50ABBD4C1925AB0000A911A9 /* MathUtil.cpp in Sources */, @@ -6241,7 +5936,6 @@ 1A5701C7180BCB5A0088DEC7 /* CCLabelTextFormatter.cpp in Sources */, 15AE18A819AAD33D00C27E9E /* CCSpriteLoader.cpp in Sources */, 1A5701CB180BCB5A0088DEC7 /* CCLabelTTF.cpp in Sources */, - 15AE1B2619AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 50ABBE711925AB6F00A911A9 /* CCEventListenerMouse.cpp in Sources */, 1A5701DE180BCB8C0088DEC7 /* CCLayer.cpp in Sources */, 15AE1B5919AADA9900C27E9E /* UIText.cpp in Sources */, @@ -6293,7 +5987,6 @@ B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, - 15AE1B1419AAD43700C27E9E /* cpPinJoint.c in Sources */, 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, 15AE1B6A19AADA9900C27E9E /* UIDeprecated.cpp in Sources */, 15AE183C19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, @@ -6335,14 +6028,12 @@ B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */, 1A5702F2180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, 15AE1A5B19AAD40300C27E9E /* b2Timer.cpp in Sources */, - 15AE1B1219AAD43700C27E9E /* cpGearJoint.c in Sources */, 15AE189419AAD33D00C27E9E /* CCLayerLoader.cpp in Sources */, 15AE197219AAD35700C27E9E /* CCNodeReader.cpp in Sources */, 1A5702F6180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 1A5702FA180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */, 15AE19E219AAD3A700C27E9E /* SkeletonData.cpp in Sources */, - 15AE1B1119AAD43700C27E9E /* cpDampedSpring.c in Sources */, 15AE1A7219AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBD5C1925AB0000A911A9 /* Vec3.cpp in Sources */, @@ -6422,13 +6113,10 @@ 50ABBEA31925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, 15AE190519AAD35000C27E9E /* CCDataReaderHelper.cpp in Sources */, 15AE19A019AAD39600C27E9E /* TextAtlasReader.cpp in Sources */, - 15AE1B1D19AAD43700C27E9E /* cpBBTree.c in Sources */, 15AE1A2A19AAD3D500C27E9E /* b2Distance.cpp in Sources */, 50ABBE6D1925AB6F00A911A9 /* CCEventListenerKeyboard.cpp in Sources */, - 15AE1B1B19AAD43700C27E9E /* cpArray.c in Sources */, 15AE190B19AAD35000C27E9E /* CCDisplayFactory.cpp in Sources */, 1A9DCA27180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - 15AE1B1919AAD43700C27E9E /* cpSlideJoint.c in Sources */, 50ABBD541925AB0000A911A9 /* TransformUtils.cpp in Sources */, 15AE1A3619AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, @@ -6436,7 +6124,6 @@ 15AE19E019AAD3A700C27E9E /* Skeleton.cpp in Sources */, 50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */, 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */, - 15AE1B1519AAD43700C27E9E /* cpPivotJoint.c in Sources */, 15AE1A3219AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, 15AE180819AAD2F700C27E9E /* CCAABB.cpp in Sources */, 15AE197019AAD35700C27E9E /* CCFrame.cpp in Sources */, @@ -6449,7 +6136,6 @@ 15AE1A8E19AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, 15AE19BC19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */, 50ABBD871925AB4100A911A9 /* CCCustomCommand.cpp in Sources */, - 15AE1B2319AAD43700C27E9E /* cpSpace.c in Sources */, 50ABBDBD1925AB4100A911A9 /* CCTextureCache.cpp in Sources */, 15AE188619AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */, 15AE1B4F19AADA9900C27E9E /* UILoadingBar.cpp in Sources */, @@ -6461,7 +6147,6 @@ 50ABC0211926664800A911A9 /* CCGLViewImpl-desktop.cpp in Sources */, 50ABC00D1926664800A911A9 /* CCFileUtils.cpp in Sources */, 50ABBE4D1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */, - 15AE1B1319AAD43700C27E9E /* cpGrooveJoint.c in Sources */, 15AE1A6819AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, 50ABBE9F1925AB6F00A911A9 /* CCScheduler.cpp in Sources */, 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */, @@ -6481,7 +6166,6 @@ 50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */, 15AE1A9219AAD40300C27E9E /* b2WheelJoint.cpp in Sources */, B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */, - 15AE1B1619AAD43700C27E9E /* cpRatchetJoint.c in Sources */, 15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, 15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */, 15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */, @@ -6494,10 +6178,7 @@ 15AE1B6B19AADA9900C27E9E /* UIWidget.cpp in Sources */, 50ABBE931925AB6F00A911A9 /* CCProfiling.cpp in Sources */, 15AE188819AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */, - 15AE1B1719AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */, - 15AE1B1019AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */, 15AE18A419AAD33D00C27E9E /* CCScale9SpriteLoader.cpp in Sources */, - 15AE1B2919AAD43700C27E9E /* cpSweep1D.c in Sources */, 15AE1B5719AADA9900C27E9E /* UISlider.cpp in Sources */, 1ABA68AE1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, ); @@ -6509,19 +6190,14 @@ files = ( 15AE1B9819AADAA100C27E9E /* UIVideoPlayer-ios.mm in Sources */, 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, - 15AE1B4019AAD43700C27E9E /* cpShape.c in Sources */, 15AE198A19AAD36A00C27E9E /* ButtonReader.cpp in Sources */, 15AE18D019AAD33D00C27E9E /* CCNodeLoaderLibrary.cpp in Sources */, 15AE192C19AAD35100C27E9E /* CCActionFrame.cpp in Sources */, - 15AE1B2D19AAD43700C27E9E /* cpConstraint.c in Sources */, 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */, 15AE199219AAD37300C27E9E /* ImageViewReader.cpp in Sources */, - 15AE1B3B19AAD43700C27E9E /* cpBBTree.c in Sources */, 15AE197D19AAD35700C27E9E /* CCNodeReader.cpp in Sources */, 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */, - 15AE1B3119AAD43700C27E9E /* cpGrooveJoint.c in Sources */, - 15AE1B3919AAD43700C27E9E /* cpArray.c in Sources */, 46A171051807CECB005B8026 /* CCPhysicsWorld.cpp in Sources */, 50ABBDA01925AB4100A911A9 /* CCGroupCommand.cpp in Sources */, 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, @@ -6535,7 +6211,6 @@ 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, B276EF621988D1D500CD400F /* CCVertexIndexData.cpp in Sources */, 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, - 15AE1B3419AAD43700C27E9E /* cpRatchetJoint.c in Sources */, 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, @@ -6563,7 +6238,6 @@ 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */, 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */, - 15AE1B3519AAD43700C27E9E /* cpRotaryLimitJoint.c in Sources */, 15AE1A9B19AAD40300C27E9E /* b2Settings.cpp in Sources */, 1A57006A180BC5A10088DEC7 /* CCActionCatmullRom.cpp in Sources */, 15AE1BEF19AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, @@ -6620,10 +6294,8 @@ 15AE1AB219AAD40300C27E9E /* b2CircleContact.cpp in Sources */, 15AE1A1919AAD3A700C27E9E /* Skin.cpp in Sources */, 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, - 15AE1B2C19AAD43700C27E9E /* chipmunk.c in Sources */, B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, 15AE1BB919AADFF000C27E9E /* HttpClient.cpp in Sources */, - 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */, 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, 292DB14419B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, @@ -6636,7 +6308,6 @@ 15AE1AD019AAD40300C27E9E /* b2RevoluteJoint.cpp in Sources */, 15AE192419AAD35100C27E9E /* CocoLoader.cpp in Sources */, 50ABBE421925AB6F00A911A9 /* CCDirector.cpp in Sources */, - 15AE1B4119AAD43700C27E9E /* cpSpace.c in Sources */, 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */, 15AE1A1B19AAD3A700C27E9E /* Slot.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, @@ -6651,14 +6322,11 @@ 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, 15AE1A0119AAD3A700C27E9E /* Attachment.cpp in Sources */, 50643BDF19BFCCA400EF68ED /* LocalStorage-android.cpp in Sources */, - 15AE1B4819AAD43700C27E9E /* cpVect.c in Sources */, - 15AE1B3E19AAD43700C27E9E /* cpHashSet.c in Sources */, 50ABBED81925AB6F00A911A9 /* ZipUtils.cpp in Sources */, 15AE1B9219AADA9A00C27E9E /* UIHelper.cpp in Sources */, 15AE1AA119AAD40300C27E9E /* b2Body.cpp in Sources */, 15AE1ABA19AAD40300C27E9E /* b2EdgeAndPolygonContact.cpp in Sources */, 15AE181B19AAD2F700C27E9E /* CCBundle3D.cpp in Sources */, - 15AE1B3719AAD43700C27E9E /* cpSlideJoint.c in Sources */, 1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, 1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, 1A570099180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, @@ -6678,7 +6346,6 @@ 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, - 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, 1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 3E61781D1966A5A300DE83F5 /* CCController.cpp in Sources */, @@ -6730,14 +6397,11 @@ 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, - 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */, 1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */, 15AE1A9D19AAD40300C27E9E /* b2StackAllocator.cpp in Sources */, 1A5701EF180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */, 1A5701F8180BCBAD0088DEC7 /* CCMenu.cpp in Sources */, 50ABBD511925AB0000A911A9 /* Quaternion.cpp in Sources */, - 15AE1B2F19AAD43700C27E9E /* cpDampedSpring.c in Sources */, - 15AE1B3619AAD43700C27E9E /* cpSimpleMotor.c in Sources */, 1A5701FC180BCBAD0088DEC7 /* CCMenuItem.cpp in Sources */, 15AE195119AAD35100C27E9E /* CCDecorativeDisplay.cpp in Sources */, 15AE19BA19AAD39700C27E9E /* TextReader.cpp in Sources */, @@ -6747,7 +6411,6 @@ 1A570209180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 1A570211180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, 15AE193819AAD35100C27E9E /* CCArmatureAnimation.cpp in Sources */, - 15AE1B3819AAD43700C27E9E /* cpArbiter.c in Sources */, 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */, 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 15AE1A0F19AAD3A700C27E9E /* Json.cpp in Sources */, @@ -6791,7 +6454,6 @@ 15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */, 1A57028B180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 1A570293180BCCAB0088DEC7 /* CCAnimation.cpp in Sources */, - 15AE1B3319AAD43700C27E9E /* cpPivotJoint.c in Sources */, 15AE1AAE19AAD40300C27E9E /* b2ChainAndCircleContact.cpp in Sources */, 15AE194D19AAD35100C27E9E /* CCDataReaderHelper.cpp in Sources */, 15AE1B8C19AADA9A00C27E9E /* UIScale9Sprite.cpp in Sources */, @@ -6803,14 +6465,12 @@ 15AE1AD419AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */, - 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, 15AE1BA519AADFDF00C27E9E /* UIHBox.cpp in Sources */, 15AE19F519AAD3A700C27E9E /* BoundingBoxAttachment.cpp in Sources */, 1A5702F3180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */, - 15AE1B3219AAD43700C27E9E /* cpPinJoint.c in Sources */, 15AE1BAF19AADFDF00C27E9E /* UILayoutManager.cpp in Sources */, 15AE182119AAD2F700C27E9E /* CCBundleReader.cpp in Sources */, 50ABBD3D1925AB0000A911A9 /* CCGeometry.cpp in Sources */, @@ -6870,23 +6530,18 @@ 50ABBEB01925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, 50ABBE521925AB6F00A911A9 /* CCEventDispatcher.cpp in Sources */, 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */, - 15AE1B4619AAD43700C27E9E /* cpSpatialIndex.c in Sources */, 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */, 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, - 15AE1B3C19AAD43700C27E9E /* cpBody.c in Sources */, 15AE196319AAD35100C27E9E /* CCTransformHelp.cpp in Sources */, 15AE19A819AAD39700C27E9E /* LayoutReader.cpp in Sources */, - 15AE1B3F19AAD43700C27E9E /* cpPolyShape.c in Sources */, 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */, 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */, 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, 15AE1C1519AAE2C700C27E9E /* CCPhysicsDebugNode.cpp in Sources */, - 15AE1B4219AAD43700C27E9E /* cpSpaceComponent.c in Sources */, 50ABBD841925AB4100A911A9 /* CCBatchCommand.cpp in Sources */, 50ABBDA81925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, 15AE1B7419AADA9A00C27E9E /* UILoadingBar.cpp in Sources */, - 15AE1B2E19AAD43700C27E9E /* cpDampedRotarySpring.c in Sources */, 50ABBEA41925AB6F00A911A9 /* CCScriptSupport.cpp in Sources */, 3E6176761960F89B00DE83F5 /* CCEventListenerController.cpp in Sources */, 15AE1AC219AAD40300C27E9E /* b2DistanceJoint.cpp in Sources */, @@ -6901,12 +6556,9 @@ 15AE1BA719AADFDF00C27E9E /* UIRelativeBox.cpp in Sources */, 15AE1ACE19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, - 15AE1B4719AAD43700C27E9E /* cpSweep1D.c in Sources */, 15AE1BF919AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */, 15AE196719AAD35100C27E9E /* CCUtilMath.cpp in Sources */, 50ABBE201925AB6F00A911A9 /* atitc.cpp in Sources */, - 15AE1B4519AAD43700C27E9E /* cpSpaceStep.c in Sources */, - 15AE1B3019AAD43700C27E9E /* cpGearJoint.c in Sources */, 50ABBE9A1925AB6F00A911A9 /* CCRef.cpp in Sources */, 15AE18BF19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */, 15AE1B9519AADA9A00C27E9E /* CocosGUI.cpp in Sources */, @@ -7054,9 +6706,10 @@ "\"$(SRCROOT)/../external/webp/prebuilt/mac\"", "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"", ); MACH_O_TYPE = staticlib; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Debug; }; @@ -7088,9 +6741,10 @@ "\"$(SRCROOT)/../external/webp/prebuilt/mac\"", "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/mac\"", ); MACH_O_TYPE = staticlib; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac $(SRCROOT)/../external/websockets/include/mac $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Release; }; @@ -7118,10 +6772,11 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/ios\"", "\"$(SRCROOT)/../external/curl/prebuilt/ios\"", "\"$(SRCROOT)/../external/websockets/prebuilt/ios\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/ios\"", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Debug; }; @@ -7150,10 +6805,11 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/ios\"", "\"$(SRCROOT)/../external/curl/prebuilt/ios\"", "\"$(SRCROOT)/../external/websockets/prebuilt/ios\"", + "\"$(SRCROOT)/../external/chipmunk/prebuilt/ios\"", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/freetype2/include/ios $(SRCROOT)/../external/curl/include/ios $(SRCROOT)/../external/webp/include/ios $(SRCROOT)/../external/tiff/include/ios $(SRCROOT)/../external/jpeg/include/ios $(SRCROOT)/../external/png/include/ios $(SRCROOT)/../external/websockets/include/ios $(SRCROOT)/../external/chipmunk/include/chipmunk"; }; name = Release; }; From 499d8281798cd03eb1ed96625e441cb303edf395 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 10 Sep 2014 10:58:20 +0800 Subject: [PATCH 57/61] add chipmunk static library for linux --- CMakeLists.txt | 1 + cocos/CMakeLists.txt | 36 +++--------------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 033d9ac19a..3fcc2753a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,7 @@ link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/external/png/prebuilt/${PLATFORM_FOLDER_ARCH} ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER_ARCH} ${CMAKE_CURRENT_SOURCE_DIR}/external/websockets/prebuilt/${PLATFORM_FOLDER_ARCH} + ${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk/prebuilt/${PLATFORM_FOLDER_ARCH} ) # libcocos2d.a diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 677cac1d84..b52bca6c0e 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -40,6 +40,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../external/glfw3/include/${PLATFORM_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR}/../external/freetype2/include/${PLATFORM_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR}/../external/websockets/include/${PLATFORM_FOLDER} + ${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/include/chipmunk ${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash ${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF ${CMAKE_CURRENT_SOURCE_DIR}/../external/${PLATFORM_FOLDER}-specific/fmod/include/${ARCH_DIR} @@ -506,37 +507,6 @@ set(COCOS2D_EXTENSIONS_SRC ../extensions/physics-nodes/CCPhysicsSprite.cpp ) -set(CHIPMUNK_SRC - ../external/chipmunk/src/chipmunk.c - ../external/chipmunk/src/cpArbiter.c - ../external/chipmunk/src/cpArray.c - ../external/chipmunk/src/cpBB.c - ../external/chipmunk/src/cpBBTree.c - ../external/chipmunk/src/cpBody.c - ../external/chipmunk/src/cpCollision.c - ../external/chipmunk/src/cpHashSet.c - ../external/chipmunk/src/cpPolyShape.c - ../external/chipmunk/src/cpShape.c - ../external/chipmunk/src/cpSpace.c - ../external/chipmunk/src/cpSpaceComponent.c - ../external/chipmunk/src/cpSpaceHash.c - ../external/chipmunk/src/cpSpaceQuery.c - ../external/chipmunk/src/cpSpaceStep.c - ../external/chipmunk/src/cpSpatialIndex.c - ../external/chipmunk/src/cpSweep1D.c - ../external/chipmunk/src/cpVect.c - ../external/chipmunk/src/constraints/cpConstraint.c - ../external/chipmunk/src/constraints/cpDampedRotarySpring.c - ../external/chipmunk/src/constraints/cpDampedSpring.c - ../external/chipmunk/src/constraints/cpGearJoint.c - ../external/chipmunk/src/constraints/cpGrooveJoint.c - ../external/chipmunk/src/constraints/cpPinJoint.c - ../external/chipmunk/src/constraints/cpPivotJoint.c - ../external/chipmunk/src/constraints/cpRatchetJoint.c - ../external/chipmunk/src/constraints/cpRotaryLimitJoint.c - ../external/chipmunk/src/constraints/cpSimpleMotor.c - ../external/chipmunk/src/constraints/cpSlideJoint.c - ) set(BOX2D_SRC ../external/Box2D/Collision/b2BroadPhase.cpp @@ -587,7 +557,7 @@ set(BOX2D_SRC ../external/Box2D/Rope/b2Rope.cpp ) -add_library(cocos2d STATIC ${COCOS2D_SRC} ${COCOS2D_EXTENSIONS_SRC} ${BOX2D_SRC} ${CHIPMUNK_SRC}) +add_library(cocos2d STATIC ${COCOS2D_SRC} ${COCOS2D_EXTENSIONS_SRC} ${BOX2D_SRC}) if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) set(FMOD_LIB "fmodex64") @@ -634,7 +604,7 @@ else() message( FATAL_ERROR "Unsupported platform, CMake will exit" ) endif() -target_link_libraries(cocos2d jpeg webp tiff freetype png z curl ${PLATFORM_SPECIFIC_LIBS}) +target_link_libraries(cocos2d jpeg webp tiff freetype chipmunk png z curl ${PLATFORM_SPECIFIC_LIBS}) set_target_properties(cocos2d PROPERTIES From c20caa7c3522442275b65b22c82cc5a4c6bff131 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Wed, 10 Sep 2014 13:59:48 +0800 Subject: [PATCH 58/61] Update the reference of submodule cocos2d-console. --- tools/cocos2d-console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cocos2d-console b/tools/cocos2d-console index 305f090f26..0fd9899d87 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit 305f090f260a0b8766c3fd09a3d4d2072910bfd9 +Subproject commit 0fd9899d8797dad6fd68d99b5dc41a5548219a97 From 8aea6330a504c820520c24583b1c69806bcb0505 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 9 Sep 2014 22:59:55 -0700 Subject: [PATCH 59/61] modify linux cmakelist --- cocos/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index b52bca6c0e..e1d889b96c 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -27,6 +27,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/platform/desktop + ${CMAKE_CURRENT_SOURCE_DIR}/platform ${CMAKE_CURRENT_SOURCE_DIR}/audio/include ${CMAKE_CURRENT_SOURCE_DIR}/editor-support ${CMAKE_CURRENT_SOURCE_DIR}/../external/tinyxml2 @@ -40,7 +41,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../external/glfw3/include/${PLATFORM_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR}/../external/freetype2/include/${PLATFORM_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR}/../external/websockets/include/${PLATFORM_FOLDER} - ${CMAKE_CURRENT_SOURCE_DIR}/../external/chipmunk/include/chipmunk ${CMAKE_CURRENT_SOURCE_DIR}/../external/xxhash ${CMAKE_CURRENT_SOURCE_DIR}/../external/ConvertUTF ${CMAKE_CURRENT_SOURCE_DIR}/../external/${PLATFORM_FOLDER}-specific/fmod/include/${ARCH_DIR} From 2656b94fe6ee713a895f78b12e78275ed7053cde Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 10 Sep 2014 06:03:14 +0000 Subject: [PATCH 60/61] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index e38435ef67..7366645eee 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -3609,9 +3609,7 @@ "cocos/scripting/lua-bindings/auto/api/ActionTween.lua", "cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua", "cocos/scripting/lua-bindings/auto/api/Animate.lua", - "cocos/scripting/lua-bindings/auto/api/Animate3D.lua", "cocos/scripting/lua-bindings/auto/api/Animation.lua", - "cocos/scripting/lua-bindings/auto/api/Animation3D.lua", "cocos/scripting/lua-bindings/auto/api/AnimationCache.lua", "cocos/scripting/lua-bindings/auto/api/AnimationData.lua", "cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua", @@ -3623,7 +3621,6 @@ "cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua", "cocos/scripting/lua-bindings/auto/api/AssetsManager.lua", "cocos/scripting/lua-bindings/auto/api/AtlasNode.lua", - "cocos/scripting/lua-bindings/auto/api/AttachNode.lua", "cocos/scripting/lua-bindings/auto/api/BaseData.lua", "cocos/scripting/lua-bindings/auto/api/BatchNode.lua", "cocos/scripting/lua-bindings/auto/api/BezierBy.lua", @@ -3781,7 +3778,6 @@ "cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua", - "cocos/scripting/lua-bindings/auto/api/Mesh.lua", "cocos/scripting/lua-bindings/auto/api/MotionStreak.lua", "cocos/scripting/lua-bindings/auto/api/MoveBy.lua", "cocos/scripting/lua-bindings/auto/api/MoveTo.lua", @@ -3875,7 +3871,6 @@ "cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua", "cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua", "cocos/scripting/lua-bindings/auto/api/Skeleton.lua", - "cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua", "cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua", "cocos/scripting/lua-bindings/auto/api/SkewBy.lua", "cocos/scripting/lua-bindings/auto/api/SkewFrame.lua", @@ -3887,7 +3882,6 @@ "cocos/scripting/lua-bindings/auto/api/SplitCols.lua", "cocos/scripting/lua-bindings/auto/api/SplitRows.lua", "cocos/scripting/lua-bindings/auto/api/Sprite.lua", - "cocos/scripting/lua-bindings/auto/api/Sprite3D.lua", "cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua", "cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua", "cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua", From deef5cb3d762c49b4af2994d7f67eab43a6dbed1 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 10 Sep 2014 06:07:55 +0000 Subject: [PATCH 61/61] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 64 +++++++---------------------------- 1 file changed, 12 insertions(+), 52 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index e38435ef67..d7ce573238 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -1228,10 +1228,6 @@ "external/ConvertUTF/ConvertUTF.c", "external/ConvertUTF/ConvertUTF.h", "external/ConvertUTF/ConvertUTFWrapper.cpp", - "external/chipmunk/Android.mk", - "external/chipmunk/LICENSE.txt", - "external/chipmunk/README.txt", - "external/chipmunk/chipmunk-docs.html", "external/chipmunk/include/chipmunk/chipmunk.h", "external/chipmunk/include/chipmunk/chipmunk_ffi.h", "external/chipmunk/include/chipmunk/chipmunk_private.h", @@ -1257,42 +1253,18 @@ "external/chipmunk/include/chipmunk/cpSpace.h", "external/chipmunk/include/chipmunk/cpSpatialIndex.h", "external/chipmunk/include/chipmunk/cpVect.h", - "external/chipmunk/proj.win32/chipmunk.vcxproj", - "external/chipmunk/proj.win32/chipmunk.vcxproj.filters", - "external/chipmunk/proj.winrt/chipmunk.vcxproj", - "external/chipmunk/proj.winrt/chipmunk.vcxproj.filters", - "external/chipmunk/proj.wp8/chipmunk.vcxproj", - "external/chipmunk/proj.wp8/chipmunk.vcxproj.filters", - "external/chipmunk/src/chipmunk.c", - "external/chipmunk/src/constraints/cpConstraint.c", - "external/chipmunk/src/constraints/cpDampedRotarySpring.c", - "external/chipmunk/src/constraints/cpDampedSpring.c", - "external/chipmunk/src/constraints/cpGearJoint.c", - "external/chipmunk/src/constraints/cpGrooveJoint.c", - "external/chipmunk/src/constraints/cpPinJoint.c", - "external/chipmunk/src/constraints/cpPivotJoint.c", - "external/chipmunk/src/constraints/cpRatchetJoint.c", - "external/chipmunk/src/constraints/cpRotaryLimitJoint.c", - "external/chipmunk/src/constraints/cpSimpleMotor.c", - "external/chipmunk/src/constraints/cpSlideJoint.c", - "external/chipmunk/src/cpArbiter.c", - "external/chipmunk/src/cpArray.c", - "external/chipmunk/src/cpBB.c", - "external/chipmunk/src/cpBBTree.c", - "external/chipmunk/src/cpBody.c", - "external/chipmunk/src/cpCollision.c", - "external/chipmunk/src/cpHashSet.c", - "external/chipmunk/src/cpPolyShape.c", - "external/chipmunk/src/cpShape.c", - "external/chipmunk/src/cpSpace.c", - "external/chipmunk/src/cpSpaceComponent.c", - "external/chipmunk/src/cpSpaceHash.c", - "external/chipmunk/src/cpSpaceQuery.c", - "external/chipmunk/src/cpSpaceStep.c", - "external/chipmunk/src/cpSpatialIndex.c", - "external/chipmunk/src/cpSweep1D.c", - "external/chipmunk/src/cpVect.c", - "external/chipmunk/src/prime.h", + "external/chipmunk/prebuilt/android/Android.mk", + "external/chipmunk/prebuilt/android/armeabi-v7a/libchipmunk.a", + "external/chipmunk/prebuilt/android/armeabi/libchipmunk.a", + "external/chipmunk/prebuilt/android/x86/libchipmunk.a", + "external/chipmunk/prebuilt/ios/libchipmunk.a", + "external/chipmunk/prebuilt/linux/32-bit/libchipmunk.a", + "external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a", + "external/chipmunk/prebuilt/mac/libchipmunk.a", + "external/chipmunk/prebuilt/win32/debug-lib/libchipmunk.lib", + "external/chipmunk/prebuilt/win32/release-lib/libchipmunk.lib", + "external/chipmunk/prebuilt/wp8/ARM/libchipmunk.lib", + "external/chipmunk/prebuilt/wp8/win32/libchipmunk.lib", "external/config.json", "external/curl/include/android/curl/curl.h", "external/curl/include/android/curl/curlbuild.h", @@ -2197,10 +2169,6 @@ "external/websockets/prebuilt/wp8/arm/libwebsockets.lib", "external/websockets/prebuilt/wp8/win32/libwebsockets.dll", "external/websockets/prebuilt/wp8/win32/libwebsockets.lib", - "external/win32-specific/box2d/prebuilt/debug-lib/libbox2d.lib", - "external/win32-specific/box2d/prebuilt/release-lib/libbox2d.lib", - "external/win32-specific/chipmunk/prebuilt/debug-lib/libchipmunk.lib", - "external/win32-specific/chipmunk/prebuilt/release-lib/libchipmunk.lib", "external/win32-specific/gles/include/OGLES/GL/glew.h", "external/win32-specific/gles/include/OGLES/GL/glxew.h", "external/win32-specific/gles/include/OGLES/GL/wglew.h", @@ -2209,8 +2177,6 @@ "external/win32-specific/icon/include/iconv.h", "external/win32-specific/icon/prebuilt/iconv.dll", "external/win32-specific/icon/prebuilt/libiconv.lib", - "external/win32-specific/spine/prebuilt/debug-lib/libspine.lib", - "external/win32-specific/spine/prebuilt/release-lib/libspine.lib", "external/win32-specific/zlib/include/zconf.h", "external/win32-specific/zlib/include/zlib.h", "external/win32-specific/zlib/prebuilt/libzlib.lib", @@ -3609,9 +3575,7 @@ "cocos/scripting/lua-bindings/auto/api/ActionTween.lua", "cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua", "cocos/scripting/lua-bindings/auto/api/Animate.lua", - "cocos/scripting/lua-bindings/auto/api/Animate3D.lua", "cocos/scripting/lua-bindings/auto/api/Animation.lua", - "cocos/scripting/lua-bindings/auto/api/Animation3D.lua", "cocos/scripting/lua-bindings/auto/api/AnimationCache.lua", "cocos/scripting/lua-bindings/auto/api/AnimationData.lua", "cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua", @@ -3623,7 +3587,6 @@ "cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua", "cocos/scripting/lua-bindings/auto/api/AssetsManager.lua", "cocos/scripting/lua-bindings/auto/api/AtlasNode.lua", - "cocos/scripting/lua-bindings/auto/api/AttachNode.lua", "cocos/scripting/lua-bindings/auto/api/BaseData.lua", "cocos/scripting/lua-bindings/auto/api/BatchNode.lua", "cocos/scripting/lua-bindings/auto/api/BezierBy.lua", @@ -3781,7 +3744,6 @@ "cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua", "cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua", - "cocos/scripting/lua-bindings/auto/api/Mesh.lua", "cocos/scripting/lua-bindings/auto/api/MotionStreak.lua", "cocos/scripting/lua-bindings/auto/api/MoveBy.lua", "cocos/scripting/lua-bindings/auto/api/MoveTo.lua", @@ -3875,7 +3837,6 @@ "cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua", "cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua", "cocos/scripting/lua-bindings/auto/api/Skeleton.lua", - "cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua", "cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua", "cocos/scripting/lua-bindings/auto/api/SkewBy.lua", "cocos/scripting/lua-bindings/auto/api/SkewFrame.lua", @@ -3887,7 +3848,6 @@ "cocos/scripting/lua-bindings/auto/api/SplitCols.lua", "cocos/scripting/lua-bindings/auto/api/SplitRows.lua", "cocos/scripting/lua-bindings/auto/api/Sprite.lua", - "cocos/scripting/lua-bindings/auto/api/Sprite3D.lua", "cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua", "cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua", "cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua",