1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
sc->addRegisterCallback(register_all_cocos2dx);@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_extension);@H_404_56@
sc->addRegisterCallback(register_cocos2dx_js_extensions);@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_extension_manual);@H_404_56@
sc->addRegisterCallback(jsb_register_chipmunk);@H_404_56@
sc->addRegisterCallback(JSB_register_opengl);@H_404_56@
sc->addRegisterCallback(jsb_register_system);@H_404_56@
sc->addRegisterCallback(MinXmlHttpRequest::_js_register);@H_404_56@
sc->addRegisterCallback(register_jsb_websocket);@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_builder);@H_404_56@
sc->addRegisterCallback(register_CCBuilderReader);@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_gui);@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_gui_manual);@H_404_56@
@H_404_56@
sc->addRegisterCallback(register_all_cocos2dx_spine);@H_404_56@
|
node->setVisible(@H_404_56@
false@H_404_56@
当然,SpiderMonkey远远还不止干了这些,还做了很多事,比如绑定和查找JS和C++对象的对应关系,包装参数为对应类型,类型安全检查,返回值包装等等。要知道他干了些什么,直接看引擎代码是更好的选择。
19
JSBool js_cocos2dx_Node_create(JSContext *cx,uint32_t argc,jsval *vp)@H_404_56@
{@H_404_56@
cocos2d::Node* ret = cocos2d::Node::create();@H_404_56@
jsval jsret = JSVAL_NULL;@H_404_56@
(ret) {@H_404_56@
js_proxy_t *proxy = js_get_or_create_proxy<cocos2d::Node>(cx,(cocos2d::Node*)ret);@H_404_56@
jsret = OBJECT_TO_JSVAL(proxy->obj);@H_404_56@
jsret = JSVAL_NULL;@H_404_56@
}@H_404_56@
JS_SET_RVAL(cx,vp,jsret);@H_404_56@
}@H_404_56@
JS_ReportError(cx,@H_404_56@
"js_cocos2dx_Node_create : wrong number of arguments"@H_404_56@
);@H_404_56@
JS_FALSE;@H_404_56@
}@H_404_56@
1
jsval jsret = JSVAL_NULL;@H_404_56@