diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index 35cb0ad779..0e61b0c9e8 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -c716fb5eae4ef941532f1184de8b414c4cd3261b \ No newline at end of file +c574341d56f31ced16553735ba34a697d1bbac02 \ No newline at end of file diff --git a/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id index 983a860ea6..cc5cbe86bf 100644 --- a/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -d57f7fce48d49b56eb650690a52eaf3abbff7ec4 \ No newline at end of file +a4c6fec549057de458346127f489e6e6bea2f0d1 \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/CCArmatureAnimation.h b/cocos/editor-support/cocostudio/CCArmatureAnimation.h index 5fa819f285..9551f97ff9 100644 --- a/cocos/editor-support/cocostudio/CCArmatureAnimation.h +++ b/cocos/editor-support/cocostudio/CCArmatureAnimation.h @@ -45,8 +45,8 @@ class Bone; typedef void (cocos2d::Object::*SEL_MovementEventCallFunc)(Armature *, MovementEventType, const char *); typedef void (cocos2d::Object::*SEL_FrameEventCallFunc)(Bone *, const char *, int, int); -#define movementEvent_selector(_SELECTOR) (SEL_MovementEventCallFunc)(&_SELECTOR) -#define frameEvent_selector(_SELECTOR) (SEL_FrameEventCallFunc)(&_SELECTOR) +#define movementEvent_selector(_SELECTOR) (cocostudio::SEL_MovementEventCallFunc)(&_SELECTOR) +#define frameEvent_selector(_SELECTOR) (cocostudio::SEL_FrameEventCallFunc)(&_SELECTOR) class ArmatureAnimation : public ProcessBase diff --git a/cocos/network/HttpRequest.h b/cocos/network/HttpRequest.h index 273a87b53e..81715d7991 100644 --- a/cocos/network/HttpRequest.h +++ b/cocos/network/HttpRequest.h @@ -32,7 +32,7 @@ namespace network { class HttpClient; class HttpResponse; typedef void (cocos2d::Object::*SEL_HttpResponse)(HttpClient* client, HttpResponse* response); -#define httpresponse_selector(_SELECTOR) (SEL_HttpResponse)(&_SELECTOR) +#define httpresponse_selector(_SELECTOR) (network::SEL_HttpResponse)(&_SELECTOR) /** @brief defines the object which users must packed for HttpClient::send(HttpRequest*) method. diff --git a/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp b/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp index b799f6aacf..2230a4a94d 100644 --- a/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp +++ b/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp @@ -167,7 +167,7 @@ void MinXmlHttpRequest::_setHttpRequestHeader() * @param sender Object which initialized callback * @param respone Response object */ -void MinXmlHttpRequest::handle_requestResponse(cocos2d::extension::HttpClient *sender, cocos2d::extension::HttpResponse *response) +void MinXmlHttpRequest::handle_requestResponse(network::HttpClient *sender, network::HttpResponse *response) { if (0 != strlen(response->getHttpRequest()->getTag())) { @@ -247,7 +247,7 @@ void MinXmlHttpRequest::handle_requestResponse(cocos2d::extension::HttpClient *s void MinXmlHttpRequest::_sendRequest(JSContext *cx) { _httpRequest->setResponseCallback(this, httpresponse_selector(MinXmlHttpRequest::handle_requestResponse)); - cocos2d::extension::HttpClient::getInstance()->send(_httpRequest); + network::HttpClient::getInstance()->send(_httpRequest); _httpRequest->release(); } @@ -261,7 +261,7 @@ MinXmlHttpRequest::MinXmlHttpRequest() : _onreadystateCallback(NULL), _isNetwork _requestHeader.clear(); _withCredentialsValue = true; _cx = ScriptingCore::getInstance()->getGlobalContext(); - _httpRequest = new cocos2d::extension::HttpRequest(); + _httpRequest = new network::HttpRequest(); } /** @@ -622,11 +622,11 @@ JS_BINDED_FUNC_IMPL(MinXmlHttpRequest, open) if (_meth.compare("post") == 0 || _meth.compare("POST") == 0) { - _httpRequest->setRequestType(cocos2d::extension::HttpRequest::Type::POST); + _httpRequest->setRequestType(network::HttpRequest::Type::POST); } else { - _httpRequest->setRequestType(cocos2d::extension::HttpRequest::Type::GET); + _httpRequest->setRequestType(network::HttpRequest::Type::GET); } _httpRequest->setUrl(_url.c_str()); diff --git a/cocos/scripting/javascript/bindings/XMLHTTPRequest.h b/cocos/scripting/javascript/bindings/XMLHTTPRequest.h index b94e05e5fe..861e0a2536 100644 --- a/cocos/scripting/javascript/bindings/XMLHTTPRequest.h +++ b/cocos/scripting/javascript/bindings/XMLHTTPRequest.h @@ -80,7 +80,7 @@ public: JS_BINDED_FUNC(MinXmlHttpRequest, setRequestHeader); JS_BINDED_FUNC(MinXmlHttpRequest, overrideMimeType); - void handle_requestResponse(cocos2d::extension::HttpClient *sender, cocos2d::extension::HttpResponse *response); + void handle_requestResponse(network::HttpClient *sender, network::HttpResponse *response); private: @@ -102,7 +102,7 @@ private: ResponseType _responseType; unsigned _timeout; bool _isAsync; - cocos2d::extension::HttpRequest* _httpRequest; + network::HttpRequest* _httpRequest; bool _isNetwork; bool _withCredentialsValue; std::map _httpHeader; diff --git a/cocos/scripting/javascript/bindings/js_bindings_ccbreader.cpp b/cocos/scripting/javascript/bindings/js_bindings_ccbreader.cpp index 523cdcda10..733ac47b45 100644 --- a/cocos/scripting/javascript/bindings/js_bindings_ccbreader.cpp +++ b/cocos/scripting/javascript/bindings/js_bindings_ccbreader.cpp @@ -12,6 +12,7 @@ USING_NS_CC; USING_NS_CC_EXT; +using namespace cocosbuilder; static void removeSelector(std::string &str) { size_t found; @@ -79,7 +80,7 @@ JSBool js_cocos2dx_CCBAnimationManager_animationCompleteCallback(JSContext *cx, JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::extension::CCBAnimationManager *node = (cocos2d::extension::CCBAnimationManager *)(proxy ? proxy->ptr : NULL); + cocosbuilder::CCBAnimationManager *node = (cocosbuilder::CCBAnimationManager *)(proxy ? proxy->ptr : NULL); JSCCBAnimationWrapper *tmpCobj = new JSCCBAnimationWrapper(); tmpCobj->autorelease(); @@ -103,10 +104,10 @@ JSBool js_cocos2dx_CCBReader_readNodeGraphFromFile(JSContext *cx, uint32_t argc, jsval *argv = JS_ARGV(cx, vp); JSBool ok = JS_TRUE; JSObject *obj; - cocos2d::extension::CCBReader* cobj; + cocosbuilder::CCBReader* cobj; obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::CCBReader *)(proxy ? proxy->ptr : NULL); + cobj = (cocosbuilder::CCBReader *)(proxy ? proxy->ptr : NULL); TEST_NATIVE_OBJECT(cx, cobj) if (argc == 2) { @@ -188,10 +189,10 @@ JSBool js_cocos2dx_CCBReader_createSceneWithNodeGraphFromFile(JSContext *cx, uin jsval *argv = JS_ARGV(cx, vp); JSBool ok = JS_TRUE; JSObject *obj; - cocos2d::extension::CCBReader* cobj; + cocosbuilder::CCBReader* cobj; obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::CCBReader *)(proxy ? proxy->ptr : NULL); + cobj = (cocosbuilder::CCBReader *)(proxy ? proxy->ptr : NULL); TEST_NATIVE_OBJECT(cx, cobj) if (argc == 2) { @@ -277,7 +278,7 @@ JSBool js_CocosBuilder_create(JSContext *cx, uint32_t argc, jsval *vp) ccNodeLoaderLibrary->registerNodeLoader("", JSLayerLoader::loader()); - cocos2d::extension::CCBReader * ret = new cocos2d::extension::CCBReader(ccNodeLoaderLibrary); + CCBReader * ret = new CCBReader(ccNodeLoaderLibrary); ret->autorelease(); jsval jsret; @@ -287,7 +288,7 @@ JSBool js_CocosBuilder_create(JSContext *cx, uint32_t argc, jsval *vp) jsret = OBJECT_TO_JSVAL(proxy->obj); } else { // create a new js obj of that class - proxy = js_get_or_create_proxy(cx, ret); + proxy = js_get_or_create_proxy(cx, ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } } else { diff --git a/cocos/scripting/javascript/bindings/js_bindings_ccbreader.h b/cocos/scripting/javascript/bindings/js_bindings_ccbreader.h index e81b9d3be2..8bcdabd044 100644 --- a/cocos/scripting/javascript/bindings/js_bindings_ccbreader.h +++ b/cocos/scripting/javascript/bindings/js_bindings_ccbreader.h @@ -9,13 +9,12 @@ #define __JS_BINDINGS_CCBREADER_H__ #include "jsapi.h" -#include "cocos-ext.h" #include "cocos2d_specifics.hpp" - +#include "cocosbuilder/CocosBuilder.h" class CCBScriptCallbackProxy: public cocos2d::Layer -, public cocos2d::extension::CCBSelectorResolver -, public cocos2d::extension::CCBMemberVariableAssigner { +, public cocosbuilder::CCBSelectorResolver +, public cocosbuilder::CCBMemberVariableAssigner { std::string callBackProp; jsval owner; @@ -35,7 +34,7 @@ public: virtual bool onAssignCCBMemberVariable(cocos2d::Object * pTarget, const char * pMemberVariableName, cocos2d::Node * pNode); virtual void onNodeLoaded(cocos2d::Node * pNode, - cocos2d::extension::NodeLoader * pNodeLoader); + cocosbuilder::NodeLoader * pNodeLoader); virtual CCBSelectorResolver * createNew(); void menuItemCallback(Object *pSender); @@ -46,7 +45,7 @@ public: }; -class JSLayerLoader : public cocos2d::extension::LayerLoader { +class JSLayerLoader : public cocosbuilder::LayerLoader { public: CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(JSLayerLoader, loader); diff --git a/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp b/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp index 3ec02a7d86..7a6d8bfc46 100644 --- a/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp +++ b/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp @@ -9,10 +9,11 @@ #include "cocos-ext.h" #include "ScriptingCore.h" #include "cocos2d_specifics.hpp" +#include "cocostudio/CocoStudio.h" USING_NS_CC; USING_NS_CC_EXT; -using namespace extension::armature; + class JSB_ScrollViewDelegate : public Object @@ -787,8 +788,8 @@ public: virtual void setJSCallbackThis(jsval thisObj); - void movementCallbackFunc(cocos2d::extension::armature::Armature * pArmature, cocos2d::extension::armature::MovementEventType pMovementEventType, const char *pMovementId); - void frameCallbackFunc(cocos2d::extension::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex); + void movementCallbackFunc(cocostudio::Armature * pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId); + void frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex); void addArmatureFileInfoAsyncCallbackFunc(float percent); private: @@ -825,7 +826,7 @@ void JSArmatureWrapper::setJSCallbackThis(jsval _jsThisObj) } } -void JSArmatureWrapper::movementCallbackFunc(cocos2d::extension::armature::Armature *pArmature, cocos2d::extension::armature::MovementEventType pMovementEventType, const char *pMovementId) +void JSArmatureWrapper::movementCallbackFunc(cocostudio::Armature *pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId) { JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj); @@ -865,7 +866,7 @@ void JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc(float percent) } -void JSArmatureWrapper::frameCallbackFunc(cocos2d::extension::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex) +void JSArmatureWrapper::frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex) { JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj); @@ -893,7 +894,7 @@ static JSBool js_cocos2dx_ArmatureAnimation_setMovementEventCallFunc(JSContext * { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::extension::armature::ArmatureAnimation* cobj = (cocos2d::extension::armature::ArmatureAnimation *)(proxy ? proxy->ptr : NULL); + cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); if (argc == 2) { @@ -917,7 +918,7 @@ static JSBool js_cocos2dx_ArmatureAnimation_setFrameEventCallFunc(JSContext *cx, { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::extension::armature::ArmatureAnimation* cobj = (cocos2d::extension::armature::ArmatureAnimation *)(proxy ? proxy->ptr : NULL); + cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); if (argc == 2) { @@ -941,7 +942,7 @@ static JSBool jsb_Animation_addArmatureFileInfoAsyncCallFunc(JSContext *cx, uint { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::extension::armature::ArmatureDataManager* cobj = (cocos2d::extension::armature::ArmatureDataManager *)(proxy ? proxy->ptr : NULL); + cocostudio::ArmatureDataManager* cobj = (cocostudio::ArmatureDataManager *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); if (argc == 3) { diff --git a/cocos/scripting/javascript/bindings/jsb_websocket.cpp b/cocos/scripting/javascript/bindings/jsb_websocket.cpp index 28a01fbc5b..49ecf7e57e 100644 --- a/cocos/scripting/javascript/bindings/jsb_websocket.cpp +++ b/cocos/scripting/javascript/bindings/jsb_websocket.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "ScriptingCore.h" #include "cocos2d_specifics.hpp" -USING_NS_CC_EXT; +using namespace network; /* [Constructor(in DOMString url, in optional DOMString protocols)] @@ -242,7 +242,7 @@ JSBool js_cocos2dx_extension_WebSocket_constructor(JSContext *cx, uint32_t argc, JSObject *obj = JS_NewObject(cx, js_cocos2dx_websocket_class, js_cocos2dx_websocket_prototype, NULL); - cocos2d::extension::WebSocket* cobj = new cocos2d::extension::WebSocket(); + WebSocket* cobj = new WebSocket(); JSB_WebSocketDelegate* delegate = new JSB_WebSocketDelegate(); delegate->setJSDelegate(obj); diff --git a/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_chipmunk.js b/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_chipmunk.js deleted file mode 100644 index c2913daba5..0000000000 --- a/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_chipmunk.js +++ /dev/null @@ -1,602 +0,0 @@ -/** - * @fileoverview Java Script Builtins for windows properties. - * - * @externs - */ - -/** - * @see https://cocos2d-x.org - */ - -/** - * for chipmunk api - * @type {string} - */ -var cp = function(){}; - -CSSProperties.prototype.cp; -CSSProperties.prototype.momentForCircle; -CSSProperties.prototype.areaForCircle; -CSSProperties.prototype.momentForSegment; -CSSProperties.prototype.areaForSegment; -CSSProperties.prototype.momentForPoly; -CSSProperties.prototype.areaForPoly; -CSSProperties.prototype.centroidForPoly; -CSSProperties.prototype.recenterPoly; -CSSProperties.prototype.momentForBox; -CSSProperties.prototype.momentForBox2; -CSSProperties.prototype.clamp01; -CSSProperties.prototype.fclamp01; -CSSProperties.prototype.Vect; -CSSProperties.prototype.add; -CSSProperties.prototype.sub; -CSSProperties.prototype.neg; -CSSProperties.prototype.mult; -CSSProperties.prototype.project; -CSSProperties.prototype.rotate; -CSSProperties.prototype.v; -CSSProperties.prototype.dot; -CSSProperties.prototype.len; -CSSProperties.prototype.eql; -CSSProperties.prototype.cross; -CSSProperties.prototype.perp; -CSSProperties.prototype.pvrperp; -CSSProperties.prototype.unrotate; -CSSProperties.prototype.lengthsq; -CSSProperties.prototype.lerp; -CSSProperties.prototype.normalize; -CSSProperties.prototype.normalize_safe; -CSSProperties.prototype.clamp; -CSSProperties.prototype.lerpconst; -CSSProperties.prototype.dist; -CSSProperties.prototype.distsq; -CSSProperties.prototype.near; -CSSProperties.prototype.slerp; -CSSProperties.prototype.slerpconst; -CSSProperties.prototype.forangle; -CSSProperties.prototype.toangle; -CSSProperties.prototype.str; -CSSProperties.prototype.vzero; -CSSProperties.prototype.x; -CSSProperties.prototype.y; -CSSProperties.prototype.BB; -CSSProperties.prototype.bb; -CSSProperties.prototype.NO_GROUP; -CSSProperties.prototype.ALL_LAYERS; -CSSProperties.prototype.resetShapeIdCounter; -CSSProperties.prototype.Shape; -CSSProperties.prototype.setElasticity; -CSSProperties.prototype.setFriction; -CSSProperties.prototype.setLayers; -CSSProperties.prototype.setSensor; -CSSProperties.prototype.setCollisionType; -CSSProperties.prototype.getBody; -CSSProperties.prototype.active; -CSSProperties.prototype.setBody; -CSSProperties.prototype.cacheBB; -CSSProperties.prototype.update; -CSSProperties.prototype.getBB; -CSSProperties.prototype.CircleShape; -CSSProperties.prototype.cacheData; -CSSProperties.prototype.pointQuery; -CSSProperties.prototype.segmentQuery; -CSSProperties.prototype.collisionCode; -CSSProperties.prototype.collisionTable; -CSSProperties.prototype.SegmentShape; -CSSProperties.prototype.setNeighbors; -CSSProperties.prototype.setEndpoints; -CSSProperties.prototype.PolyShape; -CSSProperties.prototype.setVerts; -CSSProperties.prototype.transformVerts; -CSSProperties.prototype.transformAxes; -CSSProperties.prototype.getNumVerts; -CSSProperties.prototype.getVert; -CSSProperties.prototype.valueOnAxis; -CSSProperties.prototype.containsVert; -CSSProperties.prototype.containsVertPartial; -CSSProperties.prototype.BoxShape; -CSSProperties.prototype.BoxShape2; -CSSProperties.prototype.Body; -CSSProperties.prototype.sanityCheck; -CSSProperties.prototype.getPos; -CSSProperties.prototype.getVel; -CSSProperties.prototype.getAngVel; -CSSProperties.prototype.isSleeping; -CSSProperties.prototype.isStatic; -CSSProperties.prototype.isRogue; -CSSProperties.prototype.setMass; -CSSProperties.prototype.setMoment; -CSSProperties.prototype.addShape; -CSSProperties.prototype.removeShape; -CSSProperties.prototype.removeConstraint; -CSSProperties.prototype.setPos; -CSSProperties.prototype.setVel; -CSSProperties.prototype.setAngVel; -CSSProperties.prototype.setAngleInternal; -CSSProperties.prototype.setAngle; -CSSProperties.prototype.velocity_func; -CSSProperties.prototype.position_func; -CSSProperties.prototype.resetForces; -CSSProperties.prototype.applyForce; -CSSProperties.prototype.applyImpulse; -CSSProperties.prototype.getVelAtPoint; -CSSProperties.prototype.getVelAtWorldPoint; -CSSProperties.prototype.getVelAtLocalPoint; -CSSProperties.prototype.eachShape; -CSSProperties.prototype.eachConstraint; -CSSProperties.prototype.eachArbiter; -CSSProperties.prototype.local2World; -CSSProperties.prototype.world2Local; -CSSProperties.prototype.kineticEnergy; -CSSProperties.prototype.activate; -CSSProperties.prototype.activateStatic; -CSSProperties.prototype.pushArbiter; -CSSProperties.prototype.sleep; -CSSProperties.prototype.sleepWithGroup; -CSSProperties.prototype.StaticBody; -CSSProperties.prototype.SpatialIndex; -CSSProperties.prototype.collideStatic; -CSSProperties.prototype.BBTree; -CSSProperties.prototype.getStamp; -CSSProperties.prototype.incrementStamp; -CSSProperties.prototype.insert; -CSSProperties.prototype.remove; -CSSProperties.prototype.contains; -CSSProperties.prototype.reindexQuery; -CSSProperties.prototype.reindex; -CSSProperties.prototype.reindexObject; -CSSProperties.prototype.query; -CSSProperties.prototype.count; -CSSProperties.prototype.each; -CSSProperties.prototype.optimize; -CSSProperties.prototype.log; -CSSProperties.prototype.CollisionHandler; -CSSProperties.prototype.begin; -CSSProperties.prototype.preSolve; -CSSProperties.prototype.postSolve; -CSSProperties.prototype.separate; -CSSProperties.prototype.collideShapes; -CSSProperties.prototype.Space; -CSSProperties.prototype.getCurrentTimeStep; -CSSProperties.prototype.isLocked; -CSSProperties.prototype.addCollisionHandler; -CSSProperties.prototype.removeCollisionHandler; -CSSProperties.prototype.setDefaultCollisionHandler; -CSSProperties.prototype.lookupHandler; -CSSProperties.prototype.addStaticShape; -CSSProperties.prototype.addBody; -CSSProperties.prototype.addConstraint; -CSSProperties.prototype.filterArbiters; -CSSProperties.prototype.removeStaticShape; -CSSProperties.prototype.removeBody; -CSSProperties.prototype.containsShape; -CSSProperties.prototype.containsBody; -CSSProperties.prototype.containsConstraint; -CSSProperties.prototype.uncacheArbiter; -CSSProperties.prototype.eachBody; -CSSProperties.prototype.reindexStatic; -CSSProperties.prototype.reindexShape; -CSSProperties.prototype.reindexShapesForBody; -CSSProperties.prototype.useSpatialHash; -CSSProperties.prototype.activateBody; -CSSProperties.prototype.deactivateBody; -CSSProperties.prototype.processComponents; -CSSProperties.prototype.activateShapesTouchingShape; -CSSProperties.prototype.pointQueryFirst; -CSSProperties.prototype.segmentQueryFirst; -CSSProperties.prototype.bbQuery; -CSSProperties.prototype.shapeQuery; -CSSProperties.prototype.addPostStepCallback; -CSSProperties.prototype.runPostStepCallbacks; -CSSProperties.prototype.lock; -CSSProperties.prototype.unlock; -CSSProperties.prototype.makeCollideShapes; -CSSProperties.prototype.arbiterSetFilter; -CSSProperties.prototype.step; -CSSProperties.prototype.Constraint; -CSSProperties.prototype.activateBodies; -CSSProperties.prototype.preStep; -CSSProperties.prototype.applyCachedImpulse; -CSSProperties.prototype.getImpulse; -CSSProperties.prototype.next; -CSSProperties.prototype.PinJoint; -CSSProperties.prototype.SlideJoint; -CSSProperties.prototype.PivotJoint; -CSSProperties.prototype.GrooveJoint; -CSSProperties.prototype.grooveConstrain; -CSSProperties.prototype.setGrooveA; -CSSProperties.prototype.setGrooveB; -CSSProperties.prototype.DampedSpring; -CSSProperties.prototype.DampedRotarySpring; -CSSProperties.prototype.RotaryLimitJoint; -CSSProperties.prototype.RatchetJoint; -CSSProperties.prototype.GearJoint; -CSSProperties.prototype.setRatio; -CSSProperties.prototype.SimpleMotor; -CSSProperties.prototype.Base; -CSSProperties.prototype._v; -CSSProperties.prototype.vadd; -CSSProperties.prototype.getHandle; -CSSProperties.prototype.getGravity; -CSSProperties.prototype.getIterations; -CSSProperties.prototype.getDamping; -CSSProperties.prototype.getStaticBody; -CSSProperties.prototype.getIdleSpeedThreshold; -CSSProperties.prototype.getSleepTimeThreshold; -CSSProperties.prototype.getCollisionSlop; -CSSProperties.prototype.getCollisionBias; -CSSProperties.prototype.getCollisionPersistence; -CSSProperties.prototype.getEnableContactGraph; -CSSProperties.prototype.getAngle; -CSSProperties.prototype.getAngVel; -CSSProperties.prototype.getPos; -CSSProperties.prototype.getVel; -CSSProperties.prototype.getMoment; -CSSProperties.prototype.getBody; -CSSProperties.prototype.getGroup; -CSSProperties.prototype.getCollisionType; -CSSProperties.prototype.getMaxForce; -CSSProperties.prototype.getAnchr1; -CSSProperties.prototype.getAnchr2; -CSSProperties.prototype.setHandle; -CSSProperties.prototype._setSpace; -CSSProperties.prototype._setCPBody; -CSSProperties.prototype.setGravity; -CSSProperties.prototype.setIterations; -CSSProperties.prototype.setDamping; -CSSProperties.prototype.setStaticBody; -CSSProperties.prototype.setIdleSpeedThreshold; -CSSProperties.prototype.setSleepTimeThreshold; -CSSProperties.prototype.setCollisionSlop; -CSSProperties.prototype.setCollisionBias; -CSSProperties.prototype.setCollisionPersistence; -CSSProperties.prototype.setEnableContactGraph; -CSSProperties.prototype.setAngle; -CSSProperties.prototype.setAngVel; -CSSProperties.prototype.setPos; -CSSProperties.prototype.setVel; -CSSProperties.prototype.setMoment; -CSSProperties.prototype.setBody; -CSSProperties.prototype.setGroup; -CSSProperties.prototype.setCollisionType; -CSSProperties.prototype.setMaxForce; -CSSProperties.prototype.setAnchr1; -CSSProperties.prototype.setAnchr2; -CSSProperties.prototype.vclamp; -CSSProperties.prototype.vcross; -CSSProperties.prototype.vdist; -CSSProperties.prototype.vdistsq; -CSSProperties.prototype.vdot; -CSSProperties.prototype.veql; -CSSProperties.prototype.vforangle; -CSSProperties.prototype.vlength; -CSSProperties.prototype.vlengthsq; -CSSProperties.prototype.vlerp; -CSSProperties.prototype.vlerpconst; -CSSProperties.prototype.vmult; -CSSProperties.prototype.vnear; -CSSProperties.prototype.vneg; -CSSProperties.prototype.vnormalize; -CSSProperties.prototype.vnormalize_safe; -CSSProperties.prototype.vperp; -CSSProperties.prototype.vproject; -CSSProperties.prototype.vrotate; -CSSProperties.prototype.vrperp; -CSSProperties.prototype.vslerp; -CSSProperties.prototype.vslerpconst; -CSSProperties.prototype.vsub; -CSSProperties.prototype.vtoangle; -CSSProperties.prototype.vunrotate; -CSSProperties.prototype.l; -CSSProperties.prototype.b; -CSSProperties.prototype.t; -CSSProperties.prototype.r; -CSSProperties.prototype.a; -CSSProperties.prototype.w; -CSSProperties.prototype.p; -CSSProperties.prototype.i; -CSSProperties.prototype.handle; -CSSProperties.prototype.gravity; -CSSProperties.prototype.iterations; -CSSProperties.prototype.damping; -CSSProperties.prototype.staticBody; -CSSProperties.prototype.idleSpeedThreshold; -CSSProperties.prototype.sleepTimeThreshold; -CSSProperties.prototype.collisionSlop; -CSSProperties.prototype.collisionBias; -CSSProperties.prototype.collisionPersistence; -CSSProperties.prototype.enableContactGraph; -CSSProperties.prototype.group; -CSSProperties.prototype.collision_type; -CSSProperties.prototype.maxForce; -CSSProperties.prototype.anchr1; -CSSProperties.prototype.anchr2; -CSSProperties.prototype.collisionBegin; -CSSProperties.prototype.collisionPre; -CSSProperties.prototype.collisionPost; -CSSProperties.prototype.collisionSeparate; -CSSProperties.prototype.createPhysicsSprite; -CSSProperties.prototype.Arbiter; -CSSProperties.prototype.spaceAddCollisionHandler; -CSSProperties.prototype.spaceRemoveCollisionHandler; -CSSProperties.prototype.arbiterGetBodies; -CSSProperties.prototype.arbiterGetShapes; -CSSProperties.prototype.bodyGetUserData; -CSSProperties.prototype.bodySetUserData; -CSSProperties.prototype.getBodies; -CSSProperties.prototype.getShapes; -CSSProperties.prototype.getUserData; -CSSProperties.prototype.setUserData; -CSSProperties.prototype.arbiterGetCount; -CSSProperties.prototype.arbiterGetDepth; -CSSProperties.prototype.arbiterGetElasticity; -CSSProperties.prototype.arbiterGetFriction; -CSSProperties.prototype.arbiterGetNormal; -CSSProperties.prototype.arbiterGetPoint; -CSSProperties.prototype.arbiterGetSurfaceVelocity; -CSSProperties.prototype.arbiterIgnore; -CSSProperties.prototype.arbiterIsFirstContact; -CSSProperties.prototype.arbiterSetElasticity; -CSSProperties.prototype.arbiterSetFriction; -CSSProperties.prototype.arbiterSetSurfaceVelocity; -CSSProperties.prototype.arbiterTotalImpulse; -CSSProperties.prototype.arbiterTotalImpulseWithFriction; -CSSProperties.prototype.arbiterTotalKE; -CSSProperties.prototype.areaForCircle; -CSSProperties.prototype.areaForSegment; -CSSProperties.prototype.bBArea; -CSSProperties.prototype.bBClampVect; -CSSProperties.prototype.bBContainsBB; -CSSProperties.prototype.bBContainsVect; -CSSProperties.prototype.bBExpand; -CSSProperties.prototype.bBIntersects; -CSSProperties.prototype.bBIntersectsSegment; -CSSProperties.prototype.bBMerge; -CSSProperties.prototype.bBMergedArea; -CSSProperties.prototype.bBNew; -CSSProperties.prototype.bBNewForCircle; -CSSProperties.prototype.bBSegmentQuery; -CSSProperties.prototype.bBWrapVect; -CSSProperties.prototype.bodyActivate; -CSSProperties.prototype.bodyActivateStatic; -CSSProperties.prototype.bodyApplyForce; -CSSProperties.prototype.bodyApplyImpulse; -CSSProperties.prototype.bodyDestroy; -CSSProperties.prototype.bodyFree; -CSSProperties.prototype.bodyGetAngVel; -CSSProperties.prototype.bodyGetAngVelLimit; -CSSProperties.prototype.bodyGetAngle; -CSSProperties.prototype.bodyGetForce; -CSSProperties.prototype.bodyGetMass; -CSSProperties.prototype.bodyGetMoment; -CSSProperties.prototype.bodyGetPos; -CSSProperties.prototype.bodyGetRot; -CSSProperties.prototype.bodyGetSpace; -CSSProperties.prototype.bodyGetTorque; -CSSProperties.prototype.bodyGetVel; -CSSProperties.prototype.bodyGetVelAtLocalPoint; -CSSProperties.prototype.bodyGetVelAtWorldPoint; -CSSProperties.prototype.bodyGetVelLimit; -CSSProperties.prototype.bodyInit; -CSSProperties.prototype.bodyInitStatic; -CSSProperties.prototype.bodyIsRogue; -CSSProperties.prototype.bodyIsSleeping; -CSSProperties.prototype.bodyIsStatic; -CSSProperties.prototype.bodyKineticEnergy; -CSSProperties.prototype.bodyLocal2World; -CSSProperties.prototype.bodyNew; -CSSProperties.prototype.bodyNewStatic; -CSSProperties.prototype.bodyResetForces; -CSSProperties.prototype.bodySetAngVel; -CSSProperties.prototype.bodySetAngVelLimit; -CSSProperties.prototype.bodySetAngle; -CSSProperties.prototype.bodySetForce; -CSSProperties.prototype.bodySetMass; -CSSProperties.prototype.bodySetMoment; -CSSProperties.prototype.bodySetPos; -CSSProperties.prototype.bodySetTorque; -CSSProperties.prototype.bodySetVel; -CSSProperties.prototype.bodySetVelLimit; -CSSProperties.prototype.bodySleep; -CSSProperties.prototype.bodySleepWithGroup; -CSSProperties.prototype.bodyUpdatePosition; -CSSProperties.prototype.bodyUpdateVelocity; -CSSProperties.prototype.bodyWorld2Local; -CSSProperties.prototype.boxShapeNew; -CSSProperties.prototype.boxShapeNew2; -CSSProperties.prototype.circleShapeGetOffset; -CSSProperties.prototype.circleShapeGetRadius; -CSSProperties.prototype.circleShapeNew; -CSSProperties.prototype.constraintActivateBodies; -CSSProperties.prototype.constraintDestroy; -CSSProperties.prototype.constraintFree; -CSSProperties.prototype.constraintGetA; -CSSProperties.prototype.constraintGetB; -CSSProperties.prototype.constraintGetErrorBias; -CSSProperties.prototype.constraintGetImpulse; -CSSProperties.prototype.constraintGetMaxBias; -CSSProperties.prototype.constraintGetMaxForce; -CSSProperties.prototype.constraintGetSpace; -CSSProperties.prototype.constraintSetErrorBias; -CSSProperties.prototype.constraintSetMaxBias; -CSSProperties.prototype.constraintSetMaxForce; -CSSProperties.prototype.dampedRotarySpringGetDamping; -CSSProperties.prototype.dampedRotarySpringGetRestAngle; -CSSProperties.prototype.dampedRotarySpringGetStiffness; -CSSProperties.prototype.dampedRotarySpringNew; -CSSProperties.prototype.dampedRotarySpringSetDamping; -CSSProperties.prototype.dampedRotarySpringSetRestAngle; -CSSProperties.prototype.dampedRotarySpringSetStiffness; -CSSProperties.prototype.dampedSpringGetAnchr1; -CSSProperties.prototype.dampedSpringGetAnchr2; -CSSProperties.prototype.dampedSpringGetDamping; -CSSProperties.prototype.dampedSpringGetRestLength; -CSSProperties.prototype.dampedSpringGetStiffness; -CSSProperties.prototype.dampedSpringNew; -CSSProperties.prototype.dampedSpringSetAnchr1; -CSSProperties.prototype.dampedSpringSetAnchr2; -CSSProperties.prototype.dampedSpringSetDamping; -CSSProperties.prototype.dampedSpringSetRestLength; -CSSProperties.prototype.dampedSpringSetStiffness; -CSSProperties.prototype.gearJointGetPhase; -CSSProperties.prototype.gearJointGetRatio; -CSSProperties.prototype.gearJointNew; -CSSProperties.prototype.gearJointSetPhase; -CSSProperties.prototype.gearJointSetRatio; -CSSProperties.prototype.grooveJointGetAnchr2; -CSSProperties.prototype.grooveJointGetGrooveA; -CSSProperties.prototype.grooveJointGetGrooveB; -CSSProperties.prototype.grooveJointNew; -CSSProperties.prototype.grooveJointSetAnchr2; -CSSProperties.prototype.grooveJointSetGrooveA; -CSSProperties.prototype.grooveJointSetGrooveB; -CSSProperties.prototype.initChipmunk; -CSSProperties.prototype.momentForBox; -CSSProperties.prototype.momentForBox2; -CSSProperties.prototype.momentForCircle; -CSSProperties.prototype.momentForSegment; -CSSProperties.prototype.pinJointGetAnchr1; -CSSProperties.prototype.pinJointGetAnchr2; -CSSProperties.prototype.pinJointGetDist; -CSSProperties.prototype.pinJointNew; -CSSProperties.prototype.pinJointSetAnchr1; -CSSProperties.prototype.pinJointSetAnchr2; -CSSProperties.prototype.pinJointSetDist; -CSSProperties.prototype.pivotJointGetAnchr1; -CSSProperties.prototype.pivotJointGetAnchr2; -CSSProperties.prototype.pivotJointNew; -CSSProperties.prototype.pivotJointNew2; -CSSProperties.prototype.pivotJointSetAnchr1; -CSSProperties.prototype.pivotJointSetAnchr2; -CSSProperties.prototype.polyShapeGetNumVerts; -CSSProperties.prototype.polyShapeGetVert; -CSSProperties.prototype.ratchetJointGetAngle; -CSSProperties.prototype.ratchetJointGetPhase; -CSSProperties.prototype.ratchetJointGetRatchet; -CSSProperties.prototype.ratchetJointNew; -CSSProperties.prototype.ratchetJointSetAngle; -CSSProperties.prototype.ratchetJointSetPhase; -CSSProperties.prototype.ratchetJointSetRatchet; -CSSProperties.prototype.resetShapeIdCounter; -CSSProperties.prototype.rotaryLimitJointGetMax; -CSSProperties.prototype.rotaryLimitJointGetMin; -CSSProperties.prototype.rotaryLimitJointNew; -CSSProperties.prototype.rotaryLimitJointSetMax; -CSSProperties.prototype.rotaryLimitJointSetMin; -CSSProperties.prototype.segmentShapeGetA; -CSSProperties.prototype.segmentShapeGetB; -CSSProperties.prototype.segmentShapeGetNormal; -CSSProperties.prototype.segmentShapeGetRadius; -CSSProperties.prototype.segmentShapeNew; -CSSProperties.prototype.segmentShapeSetNeighbors; -CSSProperties.prototype.shapeCacheBB; -CSSProperties.prototype.shapeDestroy; -CSSProperties.prototype.shapeFree; -CSSProperties.prototype.shapeGetBB; -CSSProperties.prototype.shapeGetBody; -CSSProperties.prototype.shapeGetCollisionType; -CSSProperties.prototype.shapeGetElasticity; -CSSProperties.prototype.shapeGetFriction; -CSSProperties.prototype.shapeGetGroup; -CSSProperties.prototype.shapeGetLayers; -CSSProperties.prototype.shapeGetSensor; -CSSProperties.prototype.shapeGetSurfaceVelocity; -CSSProperties.prototype.shapePointQuery; -CSSProperties.prototype.shapeSetBody; -CSSProperties.prototype.shapeSetCollisionType; -CSSProperties.prototype.shapeSetElasticity; -CSSProperties.prototype.shapeSetFriction; -CSSProperties.prototype.shapeSetGroup; -CSSProperties.prototype.shapeSetLayers; -CSSProperties.prototype.shapeSetSensor; -CSSProperties.prototype.shapeSetSurfaceVelocity; -CSSProperties.prototype.shapeUpdate; -CSSProperties.prototype.simpleMotorGetRate; -CSSProperties.prototype.simpleMotorNew; -CSSProperties.prototype.simpleMotorSetRate; -CSSProperties.prototype.slideJointGetAnchr1; -CSSProperties.prototype.slideJointGetAnchr2; -CSSProperties.prototype.slideJointGetMax; -CSSProperties.prototype.slideJointGetMin; -CSSProperties.prototype.slideJointNew; -CSSProperties.prototype.slideJointSetAnchr1; -CSSProperties.prototype.slideJointSetAnchr2; -CSSProperties.prototype.slideJointSetMax; -CSSProperties.prototype.slideJointSetMin; -CSSProperties.prototype.spaceActivateShapesTouchingShape; -CSSProperties.prototype.spaceAddBody; -CSSProperties.prototype.spaceAddConstraint; -CSSProperties.prototype.spaceAddShape; -CSSProperties.prototype.spaceAddStaticShape; -CSSProperties.prototype.spaceContainsBody; -CSSProperties.prototype.spaceContainsConstraint; -CSSProperties.prototype.spaceContainsShape; -CSSProperties.prototype.spaceDestroy; -CSSProperties.prototype.spaceFree; -CSSProperties.prototype.spaceGetCollisionBias; -CSSProperties.prototype.spaceGetCollisionPersistence; -CSSProperties.prototype.spaceGetCollisionSlop; -CSSProperties.prototype.spaceGetCurrentTimeStep; -CSSProperties.prototype.spaceGetDamping; -CSSProperties.prototype.spaceGetEnableContactGraph; -CSSProperties.prototype.spaceGetGravity; -CSSProperties.prototype.spaceGetIdleSpeedThreshold; -CSSProperties.prototype.spaceGetIterations; -CSSProperties.prototype.spaceGetSleepTimeThreshold; -CSSProperties.prototype.spaceGetStaticBody; -CSSProperties.prototype.spaceInit; -CSSProperties.prototype.spaceIsLocked; -CSSProperties.prototype.spaceNew; -CSSProperties.prototype.spacePointQueryFirst; -CSSProperties.prototype.spaceReindexShape; -CSSProperties.prototype.spaceReindexShapesForBody; -CSSProperties.prototype.spaceReindexStatic; -CSSProperties.prototype.spaceRemoveBody; -CSSProperties.prototype.spaceRemoveConstraint; -CSSProperties.prototype.spaceRemoveShape; -CSSProperties.prototype.spaceRemoveStaticShape; -CSSProperties.prototype.spaceSetCollisionBias; -CSSProperties.prototype.spaceSetCollisionPersistence; -CSSProperties.prototype.spaceSetCollisionSlop; -CSSProperties.prototype.spaceSetDamping; -CSSProperties.prototype.spaceSetEnableContactGraph; -CSSProperties.prototype.spaceSetGravity; -CSSProperties.prototype.spaceSetIdleSpeedThreshold; -CSSProperties.prototype.spaceSetIterations; -CSSProperties.prototype.spaceSetSleepTimeThreshold; -CSSProperties.prototype.spaceStep; -CSSProperties.prototype.spaceUseSpatialHash; -CSSProperties.prototype.fabs; -CSSProperties.prototype.fclamp; -CSSProperties.prototype.fclamp01; -CSSProperties.prototype.flerp; -CSSProperties.prototype.shapeGetSpace; -CSSProperties.prototype.flerpconst; -CSSProperties.prototype.fmax; -CSSProperties.prototype.fmin; -CSSProperties.prototype.vadd; -CSSProperties.prototype.vclamp; -CSSProperties.prototype.vcross; -CSSProperties.prototype.vdist; -CSSProperties.prototype.vdistsq; -CSSProperties.prototype.vdot; -CSSProperties.prototype.veql; -CSSProperties.prototype.vforangle; -CSSProperties.prototype.vlength; -CSSProperties.prototype.vlengthsq; -CSSProperties.prototype.vlerp; -CSSProperties.prototype.vlerpconst; -CSSProperties.prototype.vmult; -CSSProperties.prototype.vnear; -CSSProperties.prototype.vneg; -CSSProperties.prototype.vnormalize; -CSSProperties.prototype.vnormalize_safe; -CSSProperties.prototype.vperp; -CSSProperties.prototype.vproject; -CSSProperties.prototype.vrotate; -CSSProperties.prototype.vrperp; -CSSProperties.prototype.vslerp; -CSSProperties.prototype.vslerpconst; -CSSProperties.prototype.vsub; -CSSProperties.prototype.vtoangle; -CSSProperties.prototype.vunrotate; \ No newline at end of file diff --git a/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_cocos2d.js.REMOVED.git-id b/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_cocos2d.js.REMOVED.git-id deleted file mode 100644 index deca174a3f..0000000000 --- a/cocos/scripting/javascript/bindings/obfuscate/obfuscate_exclude_cocos2d.js.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d62414960a7cab961eb6e4aebefe7d21828bd8e5 \ No newline at end of file diff --git a/cocos/scripting/javascript/bindings/spidermonkey_specifics.h b/cocos/scripting/javascript/bindings/spidermonkey_specifics.h index 6cb006b358..be9c709c49 100644 --- a/cocos/scripting/javascript/bindings/spidermonkey_specifics.h +++ b/cocos/scripting/javascript/bindings/spidermonkey_specifics.h @@ -2,7 +2,7 @@ #define __SPIDERMONKEY_SPECIFICS_H__ #include "jsapi.h" -#include "support/data_support/uthash.h" +#include "uthash.h" typedef struct js_proxy { void *ptr; diff --git a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp index 3530e7e4fe..3276d5deda 100644 --- a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp +++ b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp @@ -36,6 +36,8 @@ bool AppDelegate::applicationDidFinishLaunching() pDirector->setProjection(Director::Projection::_2D); + FileUtils::getInstance()->addSearchPath("script"); + auto screenSize = EGLView::getInstance()->getFrameSize(); auto designSize = Size(320, 480); diff --git a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp index 5b607d407c..27520db220 100644 --- a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp +++ b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp @@ -31,13 +31,14 @@ bool AppDelegate::applicationDidFinishLaunching() pDirector->setOpenGLView(EGLView::getInstance()); pDirector->setProjection(Director::Projection::_2D); + FileUtils::getInstance()->addSearchPath("script"); auto screenSize = EGLView::getInstance()->getFrameSize(); auto designSize = Size(320, 480); auto resourceSize = Size(320, 480); - std::vector searchPaths; + std::vector searchPaths = FileUtils::getInstance()->getSearchPaths(); std::vector resDirOrders; Application::Platform platform = Application::getInstance()->getTargetPlatform(); diff --git a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp index 0f69f2cff7..7e7a33a156 100644 --- a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp @@ -40,7 +40,7 @@ bool AppDelegate::applicationDidFinishLaunching() // set FPS. the default value is 1.0/60 if you don't call this pDirector->setAnimationInterval(1.0 / 60); - FileUtils::getInstance()->addSearchPath("js"); + FileUtils::getInstance()->addSearchPath("script"); ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); diff --git a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp index 5d81a72e32..51ebd8d85f 100644 --- a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp +++ b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp @@ -42,7 +42,7 @@ bool AppDelegate::applicationDidFinishLaunching() pDirector->setAnimationInterval(1.0 / 60); FileUtils::getInstance()->addSearchPath("res"); - FileUtils::getInstance()->addSearchPath("js"); + FileUtils::getInstance()->addSearchPath("script"); ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); diff --git a/samples/Javascript/TestJavascript/game.js.REMOVED.git-id b/samples/Javascript/TestJavascript/game.js.REMOVED.git-id deleted file mode 100644 index fffc005595..0000000000 --- a/samples/Javascript/TestJavascript/game.js.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d6662088eb795b38f78febad2e46bd92ef24fb56 \ No newline at end of file diff --git a/samples/Javascript/TestJavascript/obfuscate.xml b/samples/Javascript/TestJavascript/obfuscate.xml deleted file mode 100644 index 8c16f77347..0000000000 --- a/samples/Javascript/TestJavascript/obfuscate.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp index dcfdb8e970..3e9c616b35 100644 --- a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp +++ b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp @@ -38,6 +38,8 @@ bool AppDelegate::applicationDidFinishLaunching() EGLView::getInstance()->setDesignResolutionSize(480, 320, ResolutionPolicy::FIXED_HEIGHT); + FileUtils::getInstance()->addSearchPath("script"); + ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); sc->addRegisterCallback(register_all_cocos2dx_extension); diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index f1075ca4a0..510440e508 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -13,16 +13,16 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include +cocos_headers = -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath/include cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT -cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common +cxxgenerator_headers = # extra arguments for clang extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/audio/include/SimpleAudioEngine.h +headers = %(cocosdir)s/cocos/2d/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". diff --git a/tools/tojs/cocos2dx_extension.ini b/tools/tojs/cocos2dx_extension.ini index a5170a5d86..1519b2eb92 100644 --- a/tools/tojs/cocos2dx_extension.ini +++ b/tools/tojs/cocos2dx_extension.ini @@ -13,16 +13,17 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions +cocos_headers = -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/gui -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath/include -I%(cocosdir)s/extensions -I%(cocosdir)s/external -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s + cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT -cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common +cxxgenerator_headers = # extra arguments for clang extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/extensions/cocos-ext.h +headers = %(cocosdir)s/extensions/cocos-ext.h %(cocosdir)s/cocos/editor-support/cocosbuilder/CocosBuilder.h %(cocosdir)s/cocos/editor-support/cocostudio/CocoStudio.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". diff --git a/tools/tojs/genbindings.sh b/tools/tojs/genbindings.sh index 8801c65d1f..56b1b4500f 100755 --- a/tools/tojs/genbindings.sh +++ b/tools/tojs/genbindings.sh @@ -80,7 +80,7 @@ echo --- # Generate bindings for cocos2dx echo "Generating bindings for cocos2dx..." set -x -LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -t spidermonkey -o ${COCOS2DX_ROOT}/scripting/auto-generated/js-bindings -n jsb_cocos2dx_auto +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -t spidermonkey -o ${COCOS2DX_ROOT}/cocos/scripting/auto-generated/js-bindings -n jsb_cocos2dx_auto echo "Generating bindings for cocos2dx_extension..." -LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx_extension.ini -s cocos2dx_extension -t spidermonkey -o ${COCOS2DX_ROOT}/scripting/auto-generated/js-bindings -n jsb_cocos2dx_extension_auto +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx_extension.ini -s cocos2dx_extension -t spidermonkey -o ${COCOS2DX_ROOT}/cocos/scripting/auto-generated/js-bindings -n jsb_cocos2dx_extension_auto diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index cc59df0bdb..8721cdba4f 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -13,16 +13,16 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include +cocos_headers = -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath/include cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT -cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common +cxxgenerator_headers = # extra arguments for clang extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/audio/include/SimpleAudioEngine.h +headers = %(cocosdir)s/cocos/2d/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". diff --git a/tools/tolua/cocos2dx_extension.ini b/tools/tolua/cocos2dx_extension.ini index ce914cf508..67d87c51d6 100644 --- a/tools/tolua/cocos2dx_extension.ini +++ b/tools/tolua/cocos2dx_extension.ini @@ -13,16 +13,16 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions +cocos_headers = -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/gui -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath/include -I%(cocosdir)s/extensions -I%(cocosdir)s/external -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT -cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common +cxxgenerator_headers = # extra arguments for clang extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s # what headers to parse -headers = %(cocosdir)s/extensions/cocos-ext.h +headers = %(cocosdir)s/extensions/cocos-ext.h %(cocosdir)s/cocos/editor-support/cocosbuilder/CocosBuilder.h %(cocosdir)s/cocos/editor-support/cocostudio/CocoStudio.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". diff --git a/tools/tolua/genbindings.sh b/tools/tolua/genbindings.sh index ba6033c7fc..b236c43ae8 100755 --- a/tools/tolua/genbindings.sh +++ b/tools/tolua/genbindings.sh @@ -80,7 +80,7 @@ echo --- # Generate bindings for cocos2dx echo "Generating bindings for cocos2dx..." set -x -LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -t lua -o ${COCOS2DX_ROOT}/scripting/auto-generated/lua-bindings -n lua_cocos2dx_auto +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -t lua -o ${COCOS2DX_ROOT}/cocos/scripting/auto-generated/lua-bindings -n lua_cocos2dx_auto echo "Generating bindings for cocos2dx_extension..." -LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx_extension.ini -s cocos2dx_extension -t lua -o ${COCOS2DX_ROOT}/scripting/auto-generated/lua-bindings -n lua_cocos2dx_extension_auto +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx_extension.ini -s cocos2dx_extension -t lua -o ${COCOS2DX_ROOT}/cocos/scripting/auto-generated/lua-bindings -n lua_cocos2dx_extension_auto