mirror of https://github.com/axmolengine/axmol.git
closed #2363: Fixing compilation errors for JS projects.
This commit is contained in:
parent
661a934e82
commit
72344a318e
|
@ -1 +1 @@
|
||||||
b30514e90b5ed9a70853c63f20e9204052679459
|
410a885b1dddf03ae3268cc62a01e2658e2eb450
|
|
@ -101,9 +101,9 @@ public:
|
||||||
const jsval& getJSCallbackThis() const;
|
const jsval& getJSCallbackThis() const;
|
||||||
const jsval& getJSExtraData() const;
|
const jsval& getJSExtraData() const;
|
||||||
protected:
|
protected:
|
||||||
jsval jsCallback;
|
jsval _jsCallback;
|
||||||
jsval jsThisObj;
|
jsval _jsThisObj;
|
||||||
jsval extraData;
|
jsval _extraData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,13 +112,13 @@ public:
|
||||||
JSCCBAnimationWrapper() {}
|
JSCCBAnimationWrapper() {}
|
||||||
virtual ~JSCCBAnimationWrapper() {}
|
virtual ~JSCCBAnimationWrapper() {}
|
||||||
|
|
||||||
void animationCompleteCallback() const {
|
void animationCompleteCallback() {
|
||||||
|
|
||||||
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
|
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
|
||||||
jsval retval = JSVAL_NULL;
|
jsval retval = JSVAL_NULL;
|
||||||
|
|
||||||
if(!JSVAL_IS_VOID(jsCallback) && !JSVAL_IS_VOID(jsThisObj)) {
|
if(!JSVAL_IS_VOID(_jsCallback) && !JSVAL_IS_VOID(_jsThisObj)) {
|
||||||
JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(jsThisObj), jsCallback, 0, NULL, &retval);
|
JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(_jsThisObj), _jsCallback, 0, NULL, &retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ public:
|
||||||
|
|
||||||
void pause();
|
void pause();
|
||||||
|
|
||||||
void scheduleFunc(float dt) const;
|
void scheduleFunc(float dt);
|
||||||
virtual void update(float dt);
|
virtual void update(float dt);
|
||||||
|
|
||||||
Object* getTarget();
|
Object* getTarget();
|
||||||
|
|
Loading…
Reference in New Issue