diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp index ee7b872ee4..79094b721f 100644 --- a/samples/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -43,7 +43,7 @@ bool AppDelegate::applicationDidFinishLaunching() CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance(); CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine); - ScriptingCore::getInstance()->runScript("MoonWarriors-native.js"); + ScriptingCore::getInstance()->runScript("MoonWarriors-jsb.js"); return true; } diff --git a/samples/TestJavascript/cocos2d-js-tests b/samples/TestJavascript/cocos2d-js-tests index 454baa5e2a..d8a9715050 160000 --- a/samples/TestJavascript/cocos2d-js-tests +++ b/samples/TestJavascript/cocos2d-js-tests @@ -1 +1 @@ -Subproject commit 454baa5e2aa4d2ce4957da6f76482e7a05d242cd +Subproject commit d8a9715050f52e04aadc5e8410eeeacede4a3451 diff --git a/scripting/javascript/bindings/js_bindings_ccbreader.cpp b/scripting/javascript/bindings/js_bindings_ccbreader.cpp index 606bc80036..d37d7ca46d 100644 --- a/scripting/javascript/bindings/js_bindings_ccbreader.cpp +++ b/scripting/javascript/bindings/js_bindings_ccbreader.cpp @@ -98,31 +98,6 @@ JSBool js_cocos2dx_CCBAnimationManager_animationCompleteCallback(JSContext *cx, return JS_FALSE; } -JSBool js_cocos2dx_CCBReader_setCCBRootPath(JSContext *cx, uint32_t argc, jsval *vp) -{ - JSBool bRet = JS_FALSE; - if (argc == 1) { - jsval *argv = JS_ARGV(cx, vp); - cocos2d::extension::CCBReader* cobj; - JSObject* obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); - cobj = (cocos2d::extension::CCBReader *)(proxy ? proxy->ptr : NULL); - TEST_NATIVE_OBJECT(cx, cobj) - - if (argv[0].isString()) - { - JSStringWrapper str(argv[0], cx); - cobj->setCCBRootPath(str); - JS_SET_RVAL(cx, vp, JSVAL_VOID); - bRet = JS_TRUE; - } - return bRet; - } - - JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); - return JS_FALSE; -} - JSBool js_cocos2dx_CCBReader_readNodeGraphFromFile(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -327,6 +302,5 @@ void register_CCBuilderReader(JSContext *cx, JSObject *obj) { JS_DefineFunction(cx, tmpObj, "loadScene", js_cocos2dx_CCBReader_createSceneWithNodeGraphFromFile, 2, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCBReader_prototype, "load", js_cocos2dx_CCBReader_readNodeGraphFromFile, 2, JSPROP_READONLY | JSPROP_PERMANENT); - JS_DefineFunction(cx, js_cocos2dx_CCBReader_prototype, "setCCBRootPath", js_cocos2dx_CCBReader_setCCBRootPath, 1, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCBAnimationManager_prototype, "setCompletedAnimationCallback", js_cocos2dx_CCBAnimationManager_animationCompleteCallback, 2, JSPROP_READONLY | JSPROP_PERMANENT); }