diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp index efad236f84..a142357ba4 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.cpp @@ -450,14 +450,14 @@ bool js_cocos2dx_3d_Animate3D_setSpeed(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_3d_Animate3D_init(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Animate3D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Animate3D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Animate3D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Animate3D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Animate3D_init : Invalid Native Object"); do { if (argc == 3) { @@ -1439,14 +1439,14 @@ JSObject *jsb_cocos2d_Mesh_prototype; bool js_cocos2dx_3d_Mesh_setTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Mesh* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Mesh* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Mesh *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Mesh_setTexture : Invalid Native Object"); do { if (argc == 1) { @@ -2690,14 +2690,14 @@ bool js_cocos2dx_3d_Sprite3D_setCullFaceEnabled(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_3d_Sprite3D_setTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite3D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite3D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setTexture : Invalid Native Object"); do { if (argc == 1) { @@ -2900,14 +2900,14 @@ bool js_cocos2dx_3d_Sprite3D_removeAllAttachNode(JSContext *cx, uint32_t argc, j } bool js_cocos2dx_3d_Sprite3D_setMaterial(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite3D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite3D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite3D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Sprite3D_setMaterial : Invalid Native Object"); do { if (argc == 2) { @@ -4056,14 +4056,14 @@ bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Terrain* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Terrain* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getHeight : Invalid Native Object"); do { if (argc == 1) { @@ -4216,14 +4216,14 @@ bool js_cocos2dx_3d_Terrain_getTerrainSize(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Terrain* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Terrain* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Invalid Native Object"); do { if (argc == 2) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index c687eaefc9..3a08e26c2c 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -110,14 +110,14 @@ bool js_cocos2dx_Texture2D_getStringForFormat(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_Texture2D_initWithImage(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Texture2D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Texture2D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Texture2D_initWithImage : Invalid Native Object"); do { if (argc == 2) { @@ -298,14 +298,14 @@ bool js_cocos2dx_Texture2D_getPixelsHigh(JSContext *cx, uint32_t argc, jsval *vp } bool js_cocos2dx_Texture2D_getBitsPerPixelForFormat(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Texture2D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Texture2D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Texture2D_getBitsPerPixelForFormat : Invalid Native Object"); do { if (argc == 1) { @@ -353,14 +353,14 @@ bool js_cocos2dx_Texture2D_getName(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Texture2D_initWithString(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Texture2D* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Texture2D* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Texture2D_initWithString : Invalid Native Object"); do { if (argc == 2) { @@ -1444,14 +1444,14 @@ bool js_cocos2dx_ComponentContainer_visit(JSContext *cx, uint32_t argc, jsval *v } bool js_cocos2dx_ComponentContainer_remove(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ComponentContainer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ComponentContainer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ComponentContainer *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ComponentContainer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ComponentContainer_remove : Invalid Native Object"); do { if (argc == 1) { @@ -1933,14 +1933,14 @@ JSObject *jsb_cocos2d_Node_prototype; bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_addChild : Invalid Native Object"); do { if (argc == 2) { @@ -2038,14 +2038,14 @@ bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_removeComponent(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_removeComponent : Invalid Native Object"); do { if (argc == 1) { @@ -2197,14 +2197,14 @@ bool js_cocos2dx_Node_setCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_Node_getChildren(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getChildren : Invalid Native Object"); do { if (argc == 0) { @@ -2938,14 +2938,14 @@ bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_removeAllChildrenWithCleanup : Invalid Native Object"); do { if (argc == 1) { @@ -3106,14 +3106,14 @@ bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentAffineTransform : Invalid Native Object"); do { if (argc == 1) { @@ -3455,14 +3455,14 @@ bool js_cocos2dx_Node_getChildrenCount(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentTransform : Invalid Native Object"); do { if (argc == 1) { @@ -3589,14 +3589,14 @@ bool js_cocos2dx_Node_runAction(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_visit(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_visit : Invalid Native Object"); do { if (argc == 0) { @@ -4063,14 +4063,14 @@ bool js_cocos2dx_Node_getLocalZOrder(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getScheduler(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getScheduler : Invalid Native Object"); do { if (argc == 0) { @@ -4157,14 +4157,14 @@ bool js_cocos2dx_Node_setActionManager(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getPosition(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getPosition : Invalid Native Object"); do { if (argc == 2) { @@ -4215,14 +4215,14 @@ bool js_cocos2dx_Node_isRunning(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getParent(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getParent : Invalid Native Object"); do { if (argc == 0) { @@ -4463,14 +4463,14 @@ bool js_cocos2dx_Node_setGlobalZOrder(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_setScale(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setScale : Invalid Native Object"); do { if (argc == 2) { @@ -4814,14 +4814,14 @@ bool js_cocos2dx_Node_getGlobalZOrder(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_draw(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_draw : Invalid Native Object"); do { if (argc == 0) { @@ -4960,14 +4960,14 @@ bool js_cocos2dx_Node_getonExitTransitionDidStartCallback(JSContext *cx, uint32_ } bool js_cocos2dx_Node_removeFromParentAndCleanup(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_removeFromParentAndCleanup : Invalid Native Object"); do { if (argc == 1) { @@ -5228,14 +5228,14 @@ bool js_cocos2dx_Node_stopAction(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Node_getActionManager(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Node* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Node* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Node *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getActionManager : Invalid Native Object"); do { if (argc == 0) { @@ -9694,14 +9694,14 @@ bool js_cocos2dx_SpriteFrame_setOffset(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_SpriteFrame_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::SpriteFrame* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::SpriteFrame* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::SpriteFrame *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::SpriteFrame *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpriteFrame_initWithTexture : Invalid Native Object"); do { if (argc == 5) { @@ -9782,14 +9782,14 @@ bool js_cocos2dx_SpriteFrame_isRotated(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_SpriteFrame_initWithTextureFilename(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::SpriteFrame* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::SpriteFrame* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::SpriteFrame *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::SpriteFrame *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpriteFrame_initWithTextureFilename : Invalid Native Object"); do { if (argc == 5) { @@ -10188,14 +10188,14 @@ bool js_cocos2dx_AnimationFrame_setSpriteFrame(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_AnimationFrame_getUserInfo(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::AnimationFrame* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::AnimationFrame* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::AnimationFrame *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::AnimationFrame *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_AnimationFrame_getUserInfo : Invalid Native Object"); do { if (argc == 0) { @@ -12064,14 +12064,14 @@ JSObject *jsb_cocos2d_RotateTo_prototype; bool js_cocos2dx_RotateTo_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::RotateTo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::RotateTo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RotateTo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::RotateTo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RotateTo_initWithDuration : Invalid Native Object"); do { if (argc == 2) { @@ -12303,14 +12303,14 @@ JSObject *jsb_cocos2d_RotateBy_prototype; bool js_cocos2dx_RotateBy_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::RotateBy* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::RotateBy* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RotateBy *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::RotateBy *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RotateBy_initWithDuration : Invalid Native Object"); do { if (argc == 3) { @@ -12558,14 +12558,14 @@ JSObject *jsb_cocos2d_MoveBy_prototype; bool js_cocos2dx_MoveBy_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::MoveBy* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::MoveBy* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::MoveBy *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::MoveBy *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MoveBy_initWithDuration : Invalid Native Object"); do { if (argc == 2) { @@ -12768,14 +12768,14 @@ JSObject *jsb_cocos2d_MoveTo_prototype; bool js_cocos2dx_MoveTo_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::MoveTo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::MoveTo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::MoveTo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::MoveTo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MoveTo_initWithDuration : Invalid Native Object"); do { if (argc == 2) { @@ -13864,14 +13864,14 @@ JSObject *jsb_cocos2d_ScaleTo_prototype; bool js_cocos2dx_ScaleTo_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ScaleTo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ScaleTo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ScaleTo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ScaleTo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ScaleTo_initWithDuration : Invalid Native Object"); do { if (argc == 3) { @@ -15685,14 +15685,14 @@ bool js_cocos2dx_Animate_initWithAnimation(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_Animate_getAnimation(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Animate* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Animate* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Animate *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Animate *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Animate_getAnimation : Invalid Native Object"); do { if (argc == 0) { @@ -15926,14 +15926,14 @@ JSObject *jsb_cocos2d_TargetedAction_prototype; bool js_cocos2dx_TargetedAction_getForcedTarget(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TargetedAction* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TargetedAction* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TargetedAction *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TargetedAction *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TargetedAction_getForcedTarget : Invalid Native Object"); do { if (argc == 0) { @@ -17052,14 +17052,14 @@ bool js_cocos2dx_Properties_getLong(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Properties_getNamespace(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Properties* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Properties* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getNamespace : Invalid Native Object"); do { if (argc == 0) { @@ -17342,14 +17342,14 @@ bool js_cocos2dx_Properties_getBool(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Properties_getColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Properties* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Properties* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Properties *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Properties_getColor : Invalid Native Object"); do { if (argc == 2) { @@ -18031,14 +18031,14 @@ bool js_cocos2dx_FileUtils_isAbsolutePath(JSContext *cx, uint32_t argc, jsval *v } bool js_cocos2dx_FileUtils_renameFile(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::FileUtils* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::FileUtils* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::FileUtils *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_FileUtils_renameFile : Invalid Native Object"); do { if (argc == 2) { @@ -19341,14 +19341,14 @@ bool js_cocos2dx_EventDispatcher_addEventListenerWithFixedPriority(JSContext *cx } bool js_cocos2dx_EventDispatcher_removeEventListenersForTarget(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::EventDispatcher* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::EventDispatcher* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::EventDispatcher *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::EventDispatcher *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_EventDispatcher_removeEventListenersForTarget : Invalid Native Object"); do { if (argc == 1) { @@ -21144,14 +21144,14 @@ JSObject *jsb_cocos2d_ActionCamera_prototype; bool js_cocos2dx_ActionCamera_setEye(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ActionCamera* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ActionCamera* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ActionCamera *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ActionCamera *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ActionCamera_setEye : Invalid Native Object"); do { if (argc == 3) { @@ -34451,14 +34451,14 @@ JSObject *jsb_cocos2d_GLProgramState_prototype; bool js_cocos2dx_GLProgramState_setUniformCallback(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformCallback : Invalid Native Object"); do { if (argc == 2) { @@ -34591,14 +34591,14 @@ bool js_cocos2dx_GLProgramState_applyAutoBinding(JSContext *cx, uint32_t argc, j } bool js_cocos2dx_GLProgramState_setUniformVec2(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformVec2 : Invalid Native Object"); do { if (argc == 2) { @@ -34633,14 +34633,14 @@ bool js_cocos2dx_GLProgramState_setUniformVec2(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_GLProgramState_setUniformVec3(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformVec3 : Invalid Native Object"); do { if (argc == 2) { @@ -34818,14 +34818,14 @@ bool js_cocos2dx_GLProgramState_setNodeBinding(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_GLProgramState_setUniformInt(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformInt : Invalid Native Object"); do { if (argc == 2) { @@ -34882,14 +34882,14 @@ bool js_cocos2dx_GLProgramState_setParameterAutoBinding(JSContext *cx, uint32_t } bool js_cocos2dx_GLProgramState_setUniformVec2v(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformVec2v : Invalid Native Object"); do { if (argc == 3) { @@ -35042,14 +35042,14 @@ bool js_cocos2dx_GLProgramState_setGLProgram(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_GLProgramState_setUniformFloatv(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformFloatv : Invalid Native Object"); do { if (argc == 3) { @@ -35117,14 +35117,14 @@ bool js_cocos2dx_GLProgramState_getGLProgram(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_GLProgramState_setUniformTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformTexture : Invalid Native Object"); do { if (argc == 2) { @@ -35219,14 +35219,14 @@ bool js_cocos2dx_GLProgramState_applyUniforms(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_GLProgramState_setUniformFloat(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformFloat : Invalid Native Object"); do { if (argc == 2) { @@ -35261,14 +35261,14 @@ bool js_cocos2dx_GLProgramState_setUniformFloat(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_GLProgramState_setUniformMat4(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformMat4 : Invalid Native Object"); do { if (argc == 2) { @@ -35303,14 +35303,14 @@ bool js_cocos2dx_GLProgramState_setUniformMat4(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_GLProgramState_setUniformVec3v(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgramState* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgramState* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgramState *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgramState_setUniformVec3v : Invalid Native Object"); do { if (argc == 3) { @@ -36313,14 +36313,14 @@ bool js_cocos2dx_DrawNode_drawLine(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_DrawNode_drawPoints(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::DrawNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::DrawNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_DrawNode_drawPoints : Invalid Native Object"); do { if (argc == 4) { @@ -36380,14 +36380,14 @@ bool js_cocos2dx_DrawNode_drawPoints(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_DrawNode_drawRect(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::DrawNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::DrawNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_DrawNode_drawRect : Invalid Native Object"); do { if (argc == 5) { @@ -36434,14 +36434,14 @@ bool js_cocos2dx_DrawNode_drawRect(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_DrawNode_drawSolidCircle(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::DrawNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::DrawNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_DrawNode_drawSolidCircle : Invalid Native Object"); do { if (argc == 5) { @@ -36664,14 +36664,14 @@ bool js_cocos2dx_DrawNode_onDraw(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_DrawNode_drawCircle(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::DrawNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::DrawNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::DrawNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_DrawNode_drawCircle : Invalid Native Object"); do { if (argc == 6) { @@ -37301,14 +37301,14 @@ bool js_cocos2dx_Label_getHeight(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Label_disableEffect(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Label* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Label* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Label *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Label *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Label_disableEffect : Invalid Native Object"); do { if (argc == 1) { @@ -37700,14 +37700,14 @@ bool js_cocos2dx_Label_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc } bool js_cocos2dx_Label_setCharMap(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Label* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Label* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Label *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Label *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Label_setCharMap : Invalid Native Object"); do { if (argc == 4) { @@ -38130,14 +38130,14 @@ bool js_cocos2dx_Label_setHorizontalAlignment(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_Label_setAlignment(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Label* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Label* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Label *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Label *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Label_setAlignment : Invalid Native Object"); do { if (argc == 2) { @@ -38677,14 +38677,14 @@ bool js_cocos2dx_LabelAtlas_setString(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_LabelAtlas_initWithString(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::LabelAtlas* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::LabelAtlas* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::LabelAtlas *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LabelAtlas_initWithString : Invalid Native Object"); do { if (argc == 2) { @@ -40742,14 +40742,14 @@ bool js_cocos2dx_LayerColor_changeWidth(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_LayerColor_initWithColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::LayerColor* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::LayerColor* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::LayerColor *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::LayerColor *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LayerColor_initWithColor : Invalid Native Object"); do { if (argc == 1) { @@ -41166,14 +41166,14 @@ bool js_cocos2dx_LayerGradient_setEndColor(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_LayerGradient_initWithColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::LayerGradient* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::LayerGradient* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::LayerGradient *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::LayerGradient *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_LayerGradient_initWithColor : Invalid Native Object"); do { if (argc == 3) { @@ -44092,14 +44092,14 @@ bool js_cocos2dx_MotionStreak_getStroke(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_MotionStreak_initWithFade(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::MotionStreak* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::MotionStreak* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::MotionStreak *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_MotionStreak_initWithFade : Invalid Native Object"); do { if (argc == 5) { @@ -44434,14 +44434,14 @@ bool js_cocos2dx_NodeGrid_setTarget(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_NodeGrid_getGrid(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::NodeGrid* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::NodeGrid* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::NodeGrid *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_NodeGrid_getGrid : Invalid Native Object"); do { if (argc == 0) { @@ -47085,14 +47085,14 @@ bool js_cocos2dx_ParticleSystem_setRadialAccel(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_ParticleSystem_initWithDictionary(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ParticleSystem* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ParticleSystem* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ParticleSystem *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParticleSystem_initWithDictionary : Invalid Native Object"); do { if (argc == 2) { @@ -49914,14 +49914,14 @@ bool js_cocos2dx_ProgressTimer_getBarChangeRate(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ProgressTimer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ProgressTimer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setReverseDirection : Invalid Native Object"); do { if (argc == 1) { @@ -50162,14 +50162,14 @@ JSObject *jsb_cocos2d_ProtectedNode_prototype; bool js_cocos2dx_ProtectedNode_addProtectedChild(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ProtectedNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ProtectedNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ProtectedNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProtectedNode_addProtectedChild : Invalid Native Object"); do { if (argc == 2) { @@ -51029,14 +51029,14 @@ JSObject *jsb_cocos2d_Sprite_prototype; bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setSpriteFrame : Invalid Native Object"); do { if (argc == 1) { @@ -51073,14 +51073,14 @@ bool js_cocos2dx_Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Sprite_setTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTexture : Invalid Native Object"); do { if (argc == 1) { @@ -51222,14 +51222,14 @@ bool js_cocos2dx_Sprite_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp } bool js_cocos2dx_Sprite_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithTexture : Invalid Native Object"); do { if (argc == 2) { @@ -51370,14 +51370,14 @@ bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(JSContext *cx, uint32_t arg } bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_setTextureRect : Invalid Native Object"); do { if (argc == 3) { @@ -51696,14 +51696,14 @@ bool js_cocos2dx_Sprite_getTextureRect(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_initWithFile : Invalid Native Object"); do { if (argc == 2) { @@ -52308,14 +52308,14 @@ bool js_cocos2dx_RenderTexture_endToLua(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_RenderTexture_beginWithClear(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::RenderTexture* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::RenderTexture* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_beginWithClear : Invalid Native Object"); do { if (argc == 5) { @@ -52536,14 +52536,14 @@ bool js_cocos2dx_RenderTexture_setClearDepth(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_RenderTexture_initWithWidthAndHeight(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::RenderTexture* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::RenderTexture* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::RenderTexture *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_RenderTexture_initWithWidthAndHeight : Invalid Native Object"); do { if (argc == 4) { @@ -56198,14 +56198,14 @@ JSObject *jsb_cocos2d_TransitionFade_prototype; bool js_cocos2dx_TransitionFade_initWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TransitionFade* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TransitionFade* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TransitionFade *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TransitionFade *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TransitionFade_initWithDuration : Invalid Native Object"); do { if (argc == 2) { @@ -60928,14 +60928,14 @@ bool js_cocos2dx_GridBase_getReuseGrid(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_GridBase_initWithSize(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GridBase* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GridBase* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GridBase *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GridBase *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GridBase_initWithSize : Invalid Native Object"); do { if (argc == 2) { @@ -62861,14 +62861,14 @@ bool js_cocos2dx_GLProgram_getUniform(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_GLProgram_initWithByteArrays(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgram* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgram* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgram_initWithByteArrays : Invalid Native Object"); do { if (argc == 3) { @@ -62932,14 +62932,14 @@ bool js_cocos2dx_GLProgram_setUniformLocationWith1f(JSContext *cx, uint32_t argc } bool js_cocos2dx_GLProgram_initWithFilenames(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgram* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgram* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgram_initWithFilenames : Invalid Native Object"); do { if (argc == 3) { @@ -63007,14 +63007,14 @@ bool js_cocos2dx_GLProgram_setUniformLocationWith3f(JSContext *cx, uint32_t argc } bool js_cocos2dx_GLProgram_setUniformsForBuiltins(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::GLProgram* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::GLProgram* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::GLProgram *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLProgram_setUniformsForBuiltins : Invalid Native Object"); do { if (argc == 1) { @@ -64087,14 +64087,14 @@ bool js_cocos2dx_Pass_unbind(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_Pass_bind(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Pass* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Pass* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Pass *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Pass *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Pass_bind : Invalid Native Object"); do { if (argc == 2) { @@ -65234,14 +65234,14 @@ bool js_cocos2dx_TextureCache_getCachedTextureInfo(JSContext *cx, uint32_t argc, } bool js_cocos2dx_TextureCache_addImage(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TextureCache* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TextureCache* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TextureCache *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TextureCache *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TextureCache_addImage : Invalid Native Object"); do { if (argc == 2) { @@ -67027,14 +67027,14 @@ bool js_cocos2dx_SpriteFrameCache_addSpriteFrame(JSContext *cx, uint32_t argc, j } bool js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::SpriteFrameCache* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::SpriteFrameCache* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::SpriteFrameCache *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::SpriteFrameCache *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile : Invalid Native Object"); do { if (argc == 2) { @@ -67441,14 +67441,14 @@ bool js_cocos2dx_TextFieldTTF_getColorSpaceHolder(JSContext *cx, uint32_t argc, } bool js_cocos2dx_TextFieldTTF_initWithPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TextFieldTTF* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TextFieldTTF* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TextFieldTTF *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TextFieldTTF *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TextFieldTTF_initWithPlaceHolder : Invalid Native Object"); do { if (argc == 3) { @@ -67499,14 +67499,14 @@ bool js_cocos2dx_TextFieldTTF_initWithPlaceHolder(JSContext *cx, uint32_t argc, } bool js_cocos2dx_TextFieldTTF_setColorSpaceHolder(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TextFieldTTF* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TextFieldTTF* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TextFieldTTF *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TextFieldTTF *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TextFieldTTF_setColorSpaceHolder : Invalid Native Object"); do { if (argc == 1) { @@ -67812,14 +67812,14 @@ JSObject *jsb_cocos2d_ParallaxNode_prototype; bool js_cocos2dx_ParallaxNode_getParallaxArray(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ParallaxNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ParallaxNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_getParallaxArray : Invalid Native Object"); do { if (argc == 0) { @@ -68138,14 +68138,14 @@ bool js_cocos2dx_TMXObjectGroup_getObject(JSContext *cx, uint32_t argc, jsval *v } bool js_cocos2dx_TMXObjectGroup_getObjects(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXObjectGroup* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXObjectGroup* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXObjectGroup *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXObjectGroup *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXObjectGroup_getObjects : Invalid Native Object"); do { if (argc == 0) { @@ -68192,14 +68192,14 @@ bool js_cocos2dx_TMXObjectGroup_setGroupName(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_TMXObjectGroup_getProperties(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXObjectGroup* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXObjectGroup* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXObjectGroup *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXObjectGroup *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXObjectGroup_getProperties : Invalid Native Object"); do { if (argc == 0) { @@ -68818,14 +68818,14 @@ bool js_cocos2dx_TMXMapInfo_parseXMLString(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_TMXMapInfo_getLayers(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXMapInfo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXMapInfo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXMapInfo_getLayers : Invalid Native Object"); do { if (argc == 0) { @@ -68852,14 +68852,14 @@ bool js_cocos2dx_TMXMapInfo_getLayers(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_TMXMapInfo_getTilesets(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXMapInfo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXMapInfo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXMapInfo_getTilesets : Invalid Native Object"); do { if (argc == 0) { @@ -69022,14 +69022,14 @@ bool js_cocos2dx_TMXMapInfo_getTileProperties(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_TMXMapInfo_getObjectGroups(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXMapInfo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXMapInfo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXMapInfo_getObjectGroups : Invalid Native Object"); do { if (argc == 0) { @@ -69232,14 +69232,14 @@ bool js_cocos2dx_TMXMapInfo_setTilesets(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_TMXMapInfo_getProperties(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXMapInfo* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXMapInfo* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXMapInfo *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXMapInfo_getProperties : Invalid Native Object"); do { if (argc == 0) { @@ -69792,14 +69792,14 @@ bool js_cocos2dx_TMXLayer_setupTiles(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_TMXLayer_setTileGID(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXLayer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXLayer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setTileGID : Invalid Native Object"); do { if (argc == 3) { @@ -69968,14 +69968,14 @@ bool js_cocos2dx_TMXLayer_getTileSet(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_TMXLayer_getProperties(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXLayer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXLayer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getProperties : Invalid Native Object"); do { if (argc == 0) { @@ -70307,14 +70307,14 @@ bool js_cocos2dx_TMXTiledMap_getObjectGroup(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_TMXTiledMap_getObjectGroups(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXTiledMap* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXTiledMap* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getObjectGroups : Invalid Native Object"); do { if (argc == 0) { @@ -70441,14 +70441,14 @@ bool js_cocos2dx_TMXTiledMap_getProperties(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_TMXTiledMap_getPropertiesForGID(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::TMXTiledMap* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::TMXTiledMap* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : Invalid Native Object"); do { if (argc == 2) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp index 0383de1337..ce258ff6e2 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.cpp @@ -1430,11 +1430,11 @@ bool js_cocos2dx_builder_CCBReader_setResolutionScale(JSContext *cx, uint32_t ar bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocosbuilder::CCBReader* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocosbuilder::CCBReader* cobj = NULL; do { if (argc == 1) { cocosbuilder::CCBReader* arg0 = nullptr; @@ -1453,6 +1453,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1488,6 +1489,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1534,6 +1536,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1591,6 +1594,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1659,6 +1663,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1683,6 +1688,7 @@ bool js_cocos2dx_builder_CCBReader_constructor(JSContext *cx, uint32_t argc, jsv if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp index 43f375f676..b09d1927b3 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp @@ -1191,14 +1191,14 @@ bool js_cocos2dx_extension_ControlButton_setMargins(JSContext *cx, uint32_t argc } bool js_cocos2dx_extension_ControlButton_getCurrentTitle(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::extension::ControlButton* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::extension::ControlButton* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::ControlButton *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::extension::ControlButton *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_extension_ControlButton_getCurrentTitle : Invalid Native Object"); do { if (argc == 0) { @@ -3241,14 +3241,14 @@ bool js_cocos2dx_extension_ControlSlider_getMaximumAllowedValue(JSContext *cx, u } bool js_cocos2dx_extension_ControlSlider_initWithSprites(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::extension::ControlSlider* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::extension::ControlSlider* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::ControlSlider *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::extension::ControlSlider *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_extension_ControlSlider_initWithSprites : Invalid Native Object"); do { if (argc == 4) { @@ -4676,14 +4676,14 @@ JSObject *jsb_cocos2d_extension_ControlSwitch_prototype; bool js_cocos2dx_extension_ControlSwitch_setOn(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::extension::ControlSwitch* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::extension::ControlSwitch* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::ControlSwitch *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::extension::ControlSwitch *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_extension_ControlSwitch_setOn : Invalid Native Object"); do { if (argc == 1) { @@ -4760,14 +4760,14 @@ bool js_cocos2dx_extension_ControlSwitch_isOn(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_extension_ControlSwitch_initWithMaskSprite(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::extension::ControlSwitch* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::extension::ControlSwitch* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::ControlSwitch *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::extension::ControlSwitch *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_extension_ControlSwitch_initWithMaskSprite : Invalid Native Object"); do { if (argc == 6) { @@ -5837,14 +5837,14 @@ bool js_cocos2dx_extension_ScrollView_minContainerOffset(JSContext *cx, uint32_t } bool js_cocos2dx_extension_ScrollView_setZoomScale(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::extension::ScrollView* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::extension::ScrollView* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::extension::ScrollView *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::extension::ScrollView *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_extension_ScrollView_setZoomScale : Invalid Native Object"); do { if (argc == 2) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp index 9796ae84f5..7ab2db992e 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp @@ -764,14 +764,14 @@ bool js_cocos2dx_physics3d_Physics3DRigidBody_getFriction(JSContext *cx, uint32_ } bool js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Physics3DRigidBody* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Physics3DRigidBody* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_setAngularFactor : Invalid Native Object"); do { if (argc == 1) { @@ -1445,14 +1445,14 @@ bool js_cocos2dx_physics3d_Physics3DRigidBody_setInvInertiaDiagLocal(JSContext * } bool js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Physics3DRigidBody* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Physics3DRigidBody* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Physics3DRigidBody *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DRigidBody_removeConstraint : Invalid Native Object"); do { if (argc == 1) { @@ -3350,14 +3350,14 @@ bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_getPivotPointInB(JSCo } bool js_cocos2dx_physics3d_Physics3DPointToPointConstraint_init(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Physics3DPointToPointConstraint* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Physics3DPointToPointConstraint* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Physics3DPointToPointConstraint *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DPointToPointConstraint_init : Invalid Native Object"); do { if (argc == 4) { @@ -3646,14 +3646,14 @@ JSObject *jsb_cocos2d_Physics3DHingeConstraint_prototype; bool js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Physics3DHingeConstraint* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Physics3DHingeConstraint* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_getHingeAngle : Invalid Native Object"); do { if (argc == 2) { @@ -4038,14 +4038,14 @@ bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setLimit(JSContext *cx, uint } bool js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::Physics3DHingeConstraint* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::Physics3DHingeConstraint* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::Physics3DHingeConstraint *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DHingeConstraint_setMotorTarget : Invalid Native Object"); do { if (argc == 2) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp index 73cb0f4267..838d77a01c 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp @@ -85,14 +85,14 @@ bool js_cocos2dx_spine_SkeletonRenderer_getDebugSlotsEnabled(JSContext *cx, uint } bool js_cocos2dx_spine_SkeletonRenderer_setAttachment(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - spine::SkeletonRenderer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : NULL); + cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_setAttachment : Invalid Native Object"); do { if (argc == 2) { @@ -359,14 +359,14 @@ bool js_cocos2dx_spine_SkeletonRenderer_getTimeScale(JSContext *cx, uint32_t arg } bool js_cocos2dx_spine_SkeletonRenderer_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - spine::SkeletonRenderer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : NULL); + cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_initWithFile : Invalid Native Object"); do { if (argc == 2) { @@ -457,14 +457,14 @@ bool js_cocos2dx_spine_SkeletonRenderer_setBlendFunc(JSContext *cx, uint32_t arg } bool js_cocos2dx_spine_SkeletonRenderer_setSkin(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - spine::SkeletonRenderer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : NULL); + cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_setSkin : Invalid Native Object"); do { if (argc == 1) { @@ -620,11 +620,11 @@ bool js_cocos2dx_spine_SkeletonRenderer_createWithFile(JSContext *cx, uint32_t a } bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - spine::SkeletonRenderer* cobj = NULL; do { if (argc == 1) { spSkeletonData* arg0 = nullptr; @@ -636,6 +636,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -666,6 +667,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -690,6 +692,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -721,6 +724,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -755,6 +759,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -785,6 +790,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -818,6 +824,7 @@ bool js_cocos2dx_spine_SkeletonRenderer_constructor(JSContext *cx, uint32_t argc if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1553,11 +1560,11 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t } bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonAnimation* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - spine::SkeletonAnimation* cobj = NULL; do { if (argc == 1) { spSkeletonData* arg0 = nullptr; @@ -1569,6 +1576,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1599,6 +1607,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1623,6 +1632,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1654,6 +1664,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1688,6 +1699,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1718,6 +1730,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1751,6 +1764,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -1780,11 +1794,11 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg } bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + spine::SkeletonAnimation* cobj = nullptr; - JS::RootedObject obj(cx); - spine::SkeletonAnimation* cobj = NULL; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); do { if (argc == 1) { spSkeletonData* arg0 = nullptr; @@ -1796,17 +1810,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1826,17 +1830,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1850,17 +1844,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1881,17 +1865,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1915,17 +1889,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1945,17 +1909,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); @@ -1978,17 +1932,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; - js_type_class_t *typeClass = nullptr; - std::string typeName = t.s_name(); - auto typeMapIter = _js_global_type_map.find(typeName); - CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); - typeClass = typeMapIter->second; - CCASSERT(typeClass, "The value is null."); - // obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); - JS::RootedObject proto(cx, typeClass->proto.get()); - JS::RootedObject parent(cx, typeClass->parentProto.get()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); + js_proxy_t* p = jsb_new_proxy(cobj, obj); AddNamedObjectRoot(cx, &p->obj, "spine::SkeletonAnimation"); diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp index cd015ee7bc..d1c2b133f3 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp @@ -176,14 +176,14 @@ bool js_cocos2dx_studio_ActionObject_stop(JSContext *cx, uint32_t argc, jsval *v } bool js_cocos2dx_studio_ActionObject_play(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ActionObject* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ActionObject* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ActionObject *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ActionObject *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ActionObject_play : Invalid Native Object"); do { if (argc == 1) { @@ -656,14 +656,14 @@ bool js_cocos2dx_studio_ActionManagerEx_initWithBinary(JSContext *cx, uint32_t a } bool js_cocos2dx_studio_ActionManagerEx_playActionByName(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ActionManagerEx* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ActionManagerEx* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ActionManagerEx *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ActionManagerEx *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ActionManagerEx_playActionByName : Invalid Native Object"); do { if (argc == 3) { @@ -2602,14 +2602,14 @@ bool js_cocos2dx_studio_ColliderDetector_removeAll(JSContext *cx, uint32_t argc, } bool js_cocos2dx_studio_ColliderDetector_init(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ColliderDetector* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ColliderDetector* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ColliderDetector *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ColliderDetector *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ColliderDetector_init : Invalid Native Object"); do { if (argc == 1) { @@ -3304,14 +3304,14 @@ bool js_cocos2dx_studio_DisplayManager_getBoundingBox(JSContext *cx, uint32_t ar } bool js_cocos2dx_studio_DisplayManager_addDisplay(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::DisplayManager* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::DisplayManager* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::DisplayManager *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::DisplayManager *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_DisplayManager_addDisplay : Invalid Native Object"); do { if (argc == 2) { @@ -3362,14 +3362,14 @@ bool js_cocos2dx_studio_DisplayManager_addDisplay(JSContext *cx, uint32_t argc, } bool js_cocos2dx_studio_DisplayManager_containPoint(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::DisplayManager* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::DisplayManager* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::DisplayManager *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::DisplayManager *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_DisplayManager_containPoint : Invalid Native Object"); do { if (argc == 2) { @@ -4131,14 +4131,14 @@ bool js_cocos2dx_studio_Bone_setParentBone(JSContext *cx, uint32_t argc, jsval * } bool js_cocos2dx_studio_Bone_addDisplay(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::Bone* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::Bone* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::Bone *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::Bone *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_Bone_addDisplay : Invalid Native Object"); do { if (argc == 2) { @@ -5359,14 +5359,14 @@ bool js_cocos2dx_studio_ArmatureDataManager_addArmatureData(JSContext *cx, uint3 } bool js_cocos2dx_studio_ArmatureDataManager_addArmatureFileInfo(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ArmatureDataManager* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ArmatureDataManager* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ArmatureDataManager *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ArmatureDataManager *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ArmatureDataManager_addArmatureFileInfo : Invalid Native Object"); do { if (argc == 3) { @@ -6100,14 +6100,14 @@ bool js_cocos2dx_studio_Armature_getBatchNode(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_studio_Armature_init(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::Armature* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::Armature* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::Armature *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::Armature *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_Armature_init : Invalid Native Object"); do { if (argc == 2) { @@ -7399,14 +7399,14 @@ bool js_cocos2dx_studio_ComAudio_end(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_studio_ComAudio_stopBackgroundMusic(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ComAudio* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ComAudio* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ComAudio_stopBackgroundMusic : Invalid Native Object"); do { if (argc == 0) { @@ -7535,14 +7535,14 @@ bool js_cocos2dx_studio_ComAudio_preloadBackgroundMusic(JSContext *cx, uint32_t } bool js_cocos2dx_studio_ComAudio_playBackgroundMusic(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ComAudio* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ComAudio* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ComAudio_playBackgroundMusic : Invalid Native Object"); do { if (argc == 1) { @@ -7581,14 +7581,14 @@ bool js_cocos2dx_studio_ComAudio_playBackgroundMusic(JSContext *cx, uint32_t arg } bool js_cocos2dx_studio_ComAudio_playEffect(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ComAudio* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ComAudio* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::ComAudio *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ComAudio_playEffect : Invalid Native Object"); do { if (argc == 1) { @@ -8460,11 +8460,11 @@ bool js_cocos2dx_studio_ComRender_create(JSContext *cx, uint32_t argc, jsval *vp } bool js_cocos2dx_studio_ComRender_constructor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::ComRender* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::ComRender* cobj = NULL; do { if (argc == 2) { cocos2d::Node* arg0 = nullptr; @@ -8486,6 +8486,7 @@ bool js_cocos2dx_studio_ComRender_constructor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -8510,6 +8511,7 @@ bool js_cocos2dx_studio_ComRender_constructor(JSContext *cx, uint32_t argc, jsva if (_ccobj) { _ccobj->autorelease(); } + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); @@ -12585,14 +12587,14 @@ bool js_cocos2dx_studio_ActionTimeline_removeFrameEndCallFuncs(JSContext *cx, ui } bool js_cocos2dx_studio_ActionTimeline_gotoFrameAndPlay(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::ActionTimeline* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::ActionTimeline* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::ActionTimeline *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::ActionTimeline *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ActionTimeline_gotoFrameAndPlay : Invalid Native Object"); do { if (argc == 2) { @@ -12952,14 +12954,14 @@ bool js_cocos2dx_studio_BoneNode_getDebugDrawWidth(JSContext *cx, uint32_t argc, } bool js_cocos2dx_studio_BoneNode_getChildBones(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::BoneNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::BoneNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_BoneNode_getChildBones : Invalid Native Object"); do { if (argc == 0) { @@ -13098,14 +13100,14 @@ bool js_cocos2dx_studio_BoneNode_getAllSubSkins(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_studio_BoneNode_displaySkin(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::BoneNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::BoneNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_BoneNode_displaySkin : Invalid Native Object"); do { if (argc == 2) { @@ -13164,14 +13166,14 @@ bool js_cocos2dx_studio_BoneNode_isDebugDrawEnabled(JSContext *cx, uint32_t argc } bool js_cocos2dx_studio_BoneNode_addSkin(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::BoneNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::BoneNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_BoneNode_addSkin : Invalid Native Object"); do { if (argc == 3) { @@ -13267,14 +13269,14 @@ bool js_cocos2dx_studio_BoneNode_setDebugDrawLength(JSContext *cx, uint32_t argc } bool js_cocos2dx_studio_BoneNode_getSkins(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::BoneNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::BoneNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::BoneNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_BoneNode_getSkins : Invalid Native Object"); do { if (argc == 0) { @@ -13597,14 +13599,14 @@ bool js_cocos2dx_studio_SkeletonNode_getBoneNode(JSContext *cx, uint32_t argc, j } bool js_cocos2dx_studio_SkeletonNode_changeSkins(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocostudio::timeline::SkeletonNode* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocostudio::timeline::SkeletonNode* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocostudio::timeline::SkeletonNode *)(proxy ? proxy->ptr : NULL); + cobj = (cocostudio::timeline::SkeletonNode *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_SkeletonNode_changeSkins : Invalid Native Object"); do { if (argc == 1) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp index 860b86bdb0..db72cdaeef 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp @@ -1748,14 +1748,14 @@ bool js_cocos2dx_ui_Widget_requestFocus(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_ui_Widget_updateSizeAndPosition(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Widget* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Widget* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_updateSizeAndPosition : Invalid Native Object"); do { if (argc == 1) { @@ -2646,14 +2646,14 @@ bool js_cocos2dx_ui_Layout_setBackGroundImage(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_ui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Layout* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Layout* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColor : Invalid Native Object"); do { if (argc == 2) { @@ -3670,14 +3670,14 @@ bool js_cocos2dx_ui_Button_getCapInsetsNormalRenderer(JSContext *cx, uint32_t ar } bool js_cocos2dx_ui_Button_setTitleAlignment(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Button* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Button* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleAlignment : Invalid Native Object"); do { if (argc == 2) { @@ -5392,14 +5392,14 @@ bool js_cocos2dx_ui_RadioButtonGroup_setAllowedNoSelection(JSContext *cx, uint32 } bool js_cocos2dx_ui_RadioButtonGroup_setSelectedButtonWithoutEvent(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::RadioButtonGroup* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::RadioButtonGroup* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::RadioButtonGroup *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::RadioButtonGroup *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RadioButtonGroup_setSelectedButtonWithoutEvent : Invalid Native Object"); do { if (argc == 1) { @@ -5527,14 +5527,14 @@ bool js_cocos2dx_ui_RadioButtonGroup_addRadioButton(JSContext *cx, uint32_t argc } bool js_cocos2dx_ui_RadioButtonGroup_setSelectedButton(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::RadioButtonGroup* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::RadioButtonGroup* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::RadioButtonGroup *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::RadioButtonGroup *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RadioButtonGroup_setSelectedButton : Invalid Native Object"); do { if (argc == 1) { @@ -6160,14 +6160,14 @@ bool js_cocos2dx_ui_Text_getString(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_ui_Text_disableEffect(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Text* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Text* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_disableEffect : Invalid Native Object"); do { if (argc == 1) { @@ -9156,14 +9156,14 @@ bool js_cocos2dx_ui_ListView_removeItem(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_ui_ListView_scrollToItem(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::ListView* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::ListView* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_scrollToItem : Invalid Native Object"); do { if (argc == 4) { @@ -11455,14 +11455,14 @@ bool js_cocos2dx_ui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_ui_TextField_setPlaceHolderColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::TextField* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::TextField* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setPlaceHolderColor : Invalid Native Object"); do { if (argc == 1) { @@ -13749,14 +13749,14 @@ bool js_cocos2dx_ui_RichText_formatText(JSContext *cx, uint32_t argc, jsval *vp) } bool js_cocos2dx_ui_RichText_removeElement(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::RichText* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::RichText* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::RichText *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::RichText *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RichText_removeElement : Invalid Native Object"); do { if (argc == 1) { @@ -14476,14 +14476,14 @@ bool js_cocos2dx_ui_Scale9Sprite_disableCascadeColor(JSContext *cx, uint32_t arg } bool js_cocos2dx_ui_Scale9Sprite_updateWithSprite(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Scale9Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Scale9Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_updateWithSprite : Invalid Native Object"); do { if (argc == 6) { @@ -14735,14 +14735,14 @@ bool js_cocos2dx_ui_Scale9Sprite_setInsetBottom(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Scale9Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Scale9Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrameName : Invalid Native Object"); do { if (argc == 1) { @@ -14823,14 +14823,14 @@ bool js_cocos2dx_ui_Scale9Sprite_setInsetTop(JSContext *cx, uint32_t argc, jsval } bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Scale9Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Scale9Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_init : Invalid Native Object"); do { if (argc == 3) { @@ -15102,14 +15102,14 @@ bool js_cocos2dx_ui_Scale9Sprite_getOriginalSize(JSContext *cx, uint32_t argc, j } bool js_cocos2dx_ui_Scale9Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Scale9Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Scale9Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_initWithFile : Invalid Native Object"); do { if (argc == 2) { @@ -15238,14 +15238,14 @@ bool js_cocos2dx_ui_Scale9Sprite_setInsetLeft(JSContext *cx, uint32_t argc, jsva } bool js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::Scale9Sprite* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::Scale9Sprite* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrame : Invalid Native Object"); do { if (argc == 1) { @@ -15924,14 +15924,14 @@ bool js_cocos2dx_ui_EditBox_setInputMode(JSContext *cx, uint32_t argc, jsval *vp } bool js_cocos2dx_ui_EditBox_setPlaceholderFontColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::EditBox* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::EditBox* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_EditBox_setPlaceholderFontColor : Invalid Native Object"); do { if (argc == 1) { @@ -15960,14 +15960,14 @@ bool js_cocos2dx_ui_EditBox_setPlaceholderFontColor(JSContext *cx, uint32_t argc } bool js_cocos2dx_ui_EditBox_setFontColor(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::EditBox* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::EditBox* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_EditBox_setFontColor : Invalid Native Object"); do { if (argc == 1) { @@ -16018,14 +16018,14 @@ bool js_cocos2dx_ui_EditBox_setPlaceholderFont(JSContext *cx, uint32_t argc, jsv } bool js_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite(JSContext *cx, uint32_t argc, jsval *vp) { - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; + cocos2d::ui::EditBox* cobj = nullptr; + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx); - cocos2d::ui::EditBox* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::ui::EditBox *)(proxy ? proxy->ptr : nullptr); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_EditBox_initWithSizeAndBackgroundSprite : Invalid Native Object"); do { if (argc == 2) {