From 72344a318e47a64a911722054e6f249791a971c0 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 3 Jul 2013 14:57:29 +0800 Subject: [PATCH] closed #2363: Fixing compilation errors for JS projects. --- .../bindings/cocos2d_specifics.cpp.REMOVED.git-id | 2 +- .../javascript/bindings/cocos2d_specifics.hpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id b/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id index 2fd19b673d..11b82ca2c1 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id @@ -1 +1 @@ -b30514e90b5ed9a70853c63f20e9204052679459 \ No newline at end of file +410a885b1dddf03ae3268cc62a01e2658e2eb450 \ No newline at end of file diff --git a/scripting/javascript/bindings/cocos2d_specifics.hpp b/scripting/javascript/bindings/cocos2d_specifics.hpp index 8e816cdb9c..8029446206 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.hpp +++ b/scripting/javascript/bindings/cocos2d_specifics.hpp @@ -101,9 +101,9 @@ public: const jsval& getJSCallbackThis() const; const jsval& getJSExtraData() const; protected: - jsval jsCallback; - jsval jsThisObj; - jsval extraData; + jsval _jsCallback; + jsval _jsThisObj; + jsval _extraData; }; @@ -112,13 +112,13 @@ public: JSCCBAnimationWrapper() {} virtual ~JSCCBAnimationWrapper() {} - void animationCompleteCallback() const { + void animationCompleteCallback() { JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); jsval retval = JSVAL_NULL; - if(!JSVAL_IS_VOID(jsCallback) && !JSVAL_IS_VOID(jsThisObj)) { - JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(jsThisObj), jsCallback, 0, NULL, &retval); + if(!JSVAL_IS_VOID(_jsCallback) && !JSVAL_IS_VOID(_jsThisObj)) { + JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(_jsThisObj), _jsCallback, 0, NULL, &retval); } } @@ -162,7 +162,7 @@ public: void pause(); - void scheduleFunc(float dt) const; + void scheduleFunc(float dt); virtual void update(float dt); Object* getTarget();