From 47a980c0c8c93b135e49de6ed1cf5872cd841e16 Mon Sep 17 00:00:00 2001 From: CocosRobot#Set Date: Tue, 11 Oct 2016 18:03:42 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically --- .../auto/api/jsb_cocos2dx_spine_auto_api.js | 292 ++-- .../auto/jsb_cocos2dx_spine_auto.cpp | 1219 ++++++++--------- .../auto/jsb_cocos2dx_spine_auto.hpp | 37 +- .../auto/api/SkeletonAnimation.lua | 32 +- .../auto/api/SkeletonRenderer.lua | 30 +- .../auto/lua_cocos2dx_spine_auto.cpp | 556 +++++--- .../auto/lua_cocos2dx_spine_auto.hpp | 2 + templates/cocos2dx_files.json | 3 + 8 files changed, 1182 insertions(+), 989 deletions(-) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_spine_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_spine_auto_api.js index 1f7dc528d7..a9f440e0b0 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_spine_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_spine_auto_api.js @@ -72,6 +72,20 @@ bool { }, +/** + * @method initWithJsonFile +* @param {String|String} str +* @param {String|spAtlas} str +* @param {float|float} float +*/ +initWithJsonFile : function( +str, +spatlas, +float +) +{ +}, + /** * @method setSlotsToSetupPose */ @@ -80,6 +94,20 @@ setSlotsToSetupPose : function ( { }, +/** + * @method initWithBinaryFile +* @param {String|String} str +* @param {String|spAtlas} str +* @param {float|float} float +*/ +initWithBinaryFile : function( +str, +spatlas, +float +) +{ +}, + /** * @method setToSetupPose */ @@ -144,20 +172,6 @@ getTimeScale : function ( return 0; }, -/** - * @method initWithFile -* @param {String|String} str -* @param {String|spAtlas} str -* @param {float|float} float -*/ -initWithFile : function( -str, -spatlas, -float -) -{ -}, - /** * @method setBlendFunc * @param {cc.BlendFunc} arg0 @@ -243,29 +257,15 @@ float sp.SkeletonAnimation = { /** - * @method setTrackCompleteListener - * @param {spTrackEntry} arg0 - * @param {function} arg1 + * @method setStartListener + * @param {function} arg0 */ -setTrackCompleteListener : function ( -sptrackentry, +setStartListener : function ( func ) { }, -/** - * @method findAnimation - * @param {String} arg0 - * @return {spAnimation} - */ -findAnimation : function ( -str -) -{ - return spAnimation; -}, - /** * @method setTrackEventListener * @param {spTrackEntry} arg0 @@ -278,58 +278,6 @@ func { }, -/** - * @method setMix - * @param {String} arg0 - * @param {String} arg1 - * @param {float} arg2 - */ -setMix : function ( -str, -str, -float -) -{ -}, - -/** - * @method setTrackStartListener - * @param {spTrackEntry} arg0 - * @param {function} arg1 - */ -setTrackStartListener : function ( -sptrackentry, -func -) -{ -}, - -/** - * @method setEndListener - * @param {function} arg0 - */ -setEndListener : function ( -func -) -{ -}, - -/** - * @method onAnimationStateEvent - * @param {int} arg0 - * @param {spEventType} arg1 - * @param {spEvent} arg2 - * @param {int} arg3 - */ -onAnimationStateEvent : function ( -int, -speventtype, -spevent, -int -) -{ -}, - /** * @method getState * @return {spAnimationState} @@ -341,51 +289,17 @@ getState : function ( }, /** - * @method update - * @param {float} arg0 + * @method setTrackCompleteListener + * @param {spTrackEntry} arg0 + * @param {function} arg1 */ -update : function ( -float -) -{ -}, - -/** - * @method setEventListener - * @param {function} arg0 - */ -setEventListener : function ( +setTrackCompleteListener : function ( +sptrackentry, func ) { }, -/** - * @method setCompleteListener - * @param {function} arg0 - */ -setCompleteListener : function ( -func -) -{ -}, - -/** - * @method clearTrack - */ -clearTrack : function ( -) -{ -}, - -/** - * @method initialize - */ -initialize : function ( -) -{ -}, - /** * @method onTrackEntryEvent * @param {int} arg0 @@ -403,9 +317,35 @@ int }, /** - * @method clearTracks + * @method setTrackStartListener + * @param {spTrackEntry} arg0 + * @param {function} arg1 */ -clearTracks : function ( +setTrackStartListener : function ( +sptrackentry, +func +) +{ +}, + +/** + * @method findAnimation + * @param {String} arg0 + * @return {spAnimation} + */ +findAnimation : function ( +str +) +{ + return spAnimation; +}, + +/** + * @method setCompleteListener + * @param {function} arg0 + */ +setCompleteListener : function ( +func ) { }, @@ -423,25 +363,107 @@ func }, /** - * @method setStartListener + * @method setEventListener * @param {function} arg0 */ -setStartListener : function ( +setEventListener : function ( func ) { }, /** - * @method createWithFile + * @method setMix + * @param {String} arg0 + * @param {String} arg1 + * @param {float} arg2 + */ +setMix : function ( +str, +str, +float +) +{ +}, + +/** + * @method setEndListener + * @param {function} arg0 + */ +setEndListener : function ( +func +) +{ +}, + +/** + * @method clearTracks + */ +clearTracks : function ( +) +{ +}, + +/** + * @method clearTrack + */ +clearTrack : function ( +) +{ +}, + +/** + * @method onAnimationStateEvent + * @param {int} arg0 + * @param {spEventType} arg1 + * @param {spEvent} arg2 + * @param {int} arg3 + */ +onAnimationStateEvent : function ( +int, +speventtype, +spevent, +int +) +{ +}, + +/** + * @method createWithBinaryFile * @param {String|String} str -* @param {spAtlas|String} spatlas +* @param {String|spAtlas} str * @param {float|float} float -* @return {sp.SkeletonAnimation|sp.SkeletonAnimation|sp.SkeletonAnimation} +* @return {sp.SkeletonAnimation|sp.SkeletonAnimation} */ -createWithFile : function( +createWithBinaryFile : function( str, +spatlas, +float +) +{ + return sp.SkeletonAnimation; +}, + +/** + * @method create + * @return {sp.SkeletonAnimation} + */ +create : function ( +) +{ + return sp.SkeletonAnimation; +}, + +/** + * @method createWithJsonFile +* @param {String|String} str +* @param {String|spAtlas} str +* @param {float|float} float +* @return {sp.SkeletonAnimation|sp.SkeletonAnimation} +*/ +createWithJsonFile : function( str, +spatlas, float ) { @@ -451,14 +473,8 @@ float /** * @method SkeletonAnimation * @constructor -* @param {spSkeletonData|String|String} spskeletondata -* @param {bool|spAtlas|String} bool -* @param {float|float} float -*/ -SkeletonAnimation : function( -str, -str, -float + */ +SkeletonAnimation : function ( ) { }, 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 7465ee72f5..36b7a1b9f0 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp @@ -175,6 +175,84 @@ bool js_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled(JSContext *cx, uint JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_spine_SkeletonRenderer_initWithJsonFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx); + obj.set(args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_initWithJsonFile : Invalid Native Object"); + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cobj->initWithJsonFile(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + cobj->initWithJsonFile(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + cobj->initWithJsonFile(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + cobj->initWithJsonFile(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_initWithJsonFile : wrong number of arguments"); + return false; +} bool js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -191,6 +269,84 @@ bool js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(JSContext *cx, uint3 JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + bool ok = true; + spine::SkeletonRenderer* cobj = nullptr; + + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx); + obj.set(args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile : Invalid Native Object"); + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + cobj->initWithBinaryFile(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + cobj->initWithBinaryFile(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + cobj->initWithBinaryFile(arg0, arg1); + args.rval().setUndefined(); + return true; + } + } while(0); + + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + cobj->initWithBinaryFile(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile : wrong number of arguments"); + return false; +} bool js_cocos2dx_spine_SkeletonRenderer_setToSetupPose(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -313,84 +469,6 @@ bool js_cocos2dx_spine_SkeletonRenderer_getTimeScale(JSContext *cx, uint32_t arg JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_getTimeScale : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_spine_SkeletonRenderer_initWithFile(JSContext *cx, uint32_t argc, jsval *vp) -{ - bool ok = true; - spine::SkeletonRenderer* cobj = nullptr; - - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx); - obj.set(args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (spine::SkeletonRenderer *)(proxy ? proxy->ptr : nullptr); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonRenderer_initWithFile : Invalid Native Object"); - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cobj->initWithFile(arg0, arg1); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj->initWithFile(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - cobj->initWithFile(arg0, arg1); - args.rval().setUndefined(); - return true; - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj->initWithFile(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonRenderer_initWithFile : wrong number of arguments"); - return false; -} bool js_cocos2dx_spine_SkeletonRenderer_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -785,7 +863,9 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject JS_FN("setBonesToSetupPose", js_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initWithData", js_cocos2dx_spine_SkeletonRenderer_initWithData, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setDebugSlotsEnabled", js_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithJsonFile", js_cocos2dx_spine_SkeletonRenderer_initWithJsonFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setSlotsToSetupPose", js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithBinaryFile", js_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setToSetupPose", js_cocos2dx_spine_SkeletonRenderer_setToSetupPose, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getBlendFunc", js_cocos2dx_spine_SkeletonRenderer_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("updateWorldTransform", js_cocos2dx_spine_SkeletonRenderer_updateWorldTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -793,7 +873,6 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject JS_FN("setDebugBonesEnabled", js_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDebugBonesEnabled", js_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTimeScale", js_cocos2dx_spine_SkeletonRenderer_getTimeScale, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initWithFile", js_cocos2dx_spine_SkeletonRenderer_initWithFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setBlendFunc", js_cocos2dx_spine_SkeletonRenderer_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setSkin", js_cocos2dx_spine_SkeletonRenderer_setSkin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getSkeleton", js_cocos2dx_spine_SkeletonRenderer_getSkeleton, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -829,72 +908,46 @@ void js_register_cocos2dx_spine_SkeletonRenderer(JSContext *cx, JS::HandleObject JSClass *jsb_spine_SkeletonAnimation_class; JSObject *jsb_spine_SkeletonAnimation_prototype; -bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Invalid Native Object"); - if (argc == 2) { - spTrackEntry* arg0 = nullptr; - std::function arg1; - #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* - ok = false; + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Invalid Native Object"); + if (argc == 1) { + std::function arg0; do { - if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) { JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull()); - std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(1), args.thisv())); - auto lambda = [=](int larg0, int larg1) -> void { + std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv())); + auto lambda = [=](int larg0) -> void { JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[2]; + jsval largv[1]; largv[0] = int32_to_jsval(cx, larg0); - largv[1] = int32_to_jsval(cx, larg1); JS::RootedValue rval(cx); - bool succeed = func->invoke(2, &largv[0], &rval); + bool succeed = func->invoke(1, &largv[0], &rval); if (!succeed && JS_IsExceptionPending(cx)) { JS_ReportPendingException(cx); } }; - arg1 = lambda; + arg0 = lambda; } else { - arg1 = nullptr; + arg0 = nullptr; } } while(0) ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Error processing arguments"); - cobj->setTrackCompleteListener(arg0, arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Error processing arguments"); + cobj->setStartListener(arg0); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 2); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Invalid Native Object"); - if (argc == 1) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Error processing arguments"); - spAnimation* ret = cobj->findAnimation(arg0); - jsval jsret = JSVAL_NULL; - jsret = spanimation_to_jsval(cx, *ret); - args.rval().set(jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, uint32_t argc, jsval *vp) @@ -943,28 +996,95 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, ui JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_getState : Invalid Native Object"); + if (argc == 0) { + spAnimationState* ret = cobj->getState(); + jsval jsret = JSVAL_NULL; + jsret = spanimationstate_to_jsval(cx, *ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_getState : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Invalid Native Object"); - if (argc == 3) { - std::string arg0; - std::string arg1; - double arg2 = 0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Error processing arguments"); - cobj->setMix(arg0, arg1, arg2); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Invalid Native Object"); + if (argc == 2) { + spTrackEntry* arg0 = nullptr; + std::function arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spTrackEntry* + ok = false; + do { + if(JS_TypeOfValue(cx, args.get(1)) == JSTYPE_FUNCTION) + { + JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull()); + std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(1), args.thisv())); + auto lambda = [=](int larg0, int larg1) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[2]; + largv[0] = int32_to_jsval(cx, larg0); + largv[1] = int32_to_jsval(cx, larg1); + JS::RootedValue rval(cx); + bool succeed = func->invoke(2, &largv[0], &rval); + if (!succeed && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg1 = lambda; + } + else + { + arg1 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : Error processing arguments"); + cobj->setTrackCompleteListener(arg0, arg1); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setMix : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Invalid Native Object"); + if (argc == 4) { + int arg0 = 0; + spEventType arg1; + spEvent* arg2 = nullptr; + int arg3 = 0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + #pragma warning NO CONVERSION TO NATIVE FOR spEvent* + ok = false; + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Error processing arguments"); + cobj->onTrackEntryEvent(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : wrong number of arguments: %d, was expecting %d", argc, 4); return false; } bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, uint32_t argc, jsval *vp) @@ -1012,154 +1132,26 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, ui JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Invalid Native Object"); if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull()); - std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv())); - auto lambda = [=](int larg0) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[1]; - largv[0] = int32_to_jsval(cx, larg0); - JS::RootedValue rval(cx); - bool succeed = func->invoke(1, &largv[0], &rval); - if (!succeed && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Error processing arguments"); - cobj->setEndListener(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Invalid Native Object"); - if (argc == 4) { - int arg0 = 0; - spEventType arg1; - spEvent* arg2 = nullptr; - int arg3 = 0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - #pragma warning NO CONVERSION TO NATIVE FOR spEvent* - ok = false; - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Error processing arguments"); - cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_getState : Invalid Native Object"); - if (argc == 0) { - spAnimationState* ret = cobj->getState(); + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Error processing arguments"); + spAnimation* ret = cobj->findAnimation(arg0); jsval jsret = JSVAL_NULL; - jsret = spanimationstate_to_jsval(cx, *ret); + jsret = spanimation_to_jsval(cx, *ret); args.rval().set(jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_getState : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_update(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_update : Invalid Native Object"); - if (argc == 1) { - double arg0 = 0; - ok &= JS::ToNumber( cx, args.get(0), &arg0) && !std::isnan(arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_update : Error processing arguments"); - cobj->update(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_update : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Invalid Native Object"); - if (argc == 1) { - std::function arg0; - do { - if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) - { - JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull()); - std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv())); - auto lambda = [=](int larg0, spEvent* larg1) -> void { - JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET - jsval largv[2]; - largv[0] = int32_to_jsval(cx, larg0); - largv[1] = spevent_to_jsval(cx, *larg1); - JS::RootedValue rval(cx); - bool succeed = func->invoke(2, &largv[0], &rval); - if (!succeed && JS_IsExceptionPending(cx)) { - JS_ReportPendingException(cx); - } - }; - arg0 = lambda; - } - else - { - arg0 = nullptr; - } - } while(0) - ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Error processing arguments"); - cobj->setEventListener(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint32_t argc, jsval *vp) @@ -1205,90 +1197,6 @@ bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setCompleteListener : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Invalid Native Object"); - if (argc == 0) { - cobj->clearTrack(); - args.rval().setUndefined(); - return true; - } - if (argc == 1) { - int arg0 = 0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Error processing arguments"); - cobj->clearTrack(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_initialize(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_initialize : Invalid Native Object"); - if (argc == 0) { - cobj->initialize(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_initialize : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Invalid Native Object"); - if (argc == 4) { - int arg0 = 0; - spEventType arg1; - spEvent* arg2 = nullptr; - int arg3 = 0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - #pragma warning NO CONVERSION TO NATIVE FOR spEvent* - ok = false; - ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : Error processing arguments"); - cobj->onTrackEntryEvent(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : Invalid Native Object"); - if (argc == 0) { - cobj->clearTracks(); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -1334,14 +1242,81 @@ bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Invalid Native Object"); + if (argc == 1) { + std::function arg0; + do { + if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION) + { + JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull()); + std::shared_ptr func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv())); + auto lambda = [=](int larg0, spEvent* larg1) -> void { + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + jsval largv[2]; + largv[0] = int32_to_jsval(cx, larg0); + largv[1] = spevent_to_jsval(cx, *larg1); + JS::RootedValue rval(cx); + bool succeed = func->invoke(2, &largv[0], &rval); + if (!succeed && JS_IsExceptionPending(cx)) { + JS_ReportPendingException(cx); + } + }; + arg0 = lambda; + } + else + { + arg0 = nullptr; + } + } while(0) + ; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : Error processing arguments"); + cobj->setEventListener(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEventListener : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Invalid Native Object"); + if (argc == 3) { + std::string arg0; + std::string arg1; + double arg2 = 0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setMix : Error processing arguments"); + cobj->setMix(arg0, arg1, arg2); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setMix : wrong number of arguments: %d, was expecting %d", argc, 3); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Invalid Native Object"); if (argc == 1) { std::function arg0; do { @@ -1367,16 +1342,84 @@ bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_ } } while(0) ; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : Error processing arguments"); - cobj->setStartListener(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : Error processing arguments"); + cobj->setEndListener(arg0); args.rval().setUndefined(); return true; } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setStartListener : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_setEndListener : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : Invalid Native Object"); + if (argc == 0) { + cobj->clearTracks(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTracks : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Invalid Native Object"); + if (argc == 0) { + cobj->clearTrack(); + args.rval().setUndefined(); + return true; + } + if (argc == 1) { + int arg0 = 0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : Error processing arguments"); + cobj->clearTrack(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_clearTrack : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + spine::SkeletonAnimation* cobj = (spine::SkeletonAnimation *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Invalid Native Object"); + if (argc == 4) { + int arg0 = 0; + spEventType arg1; + spEvent* arg2 = nullptr; + int arg3 = 0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + #pragma warning NO CONVERSION TO NATIVE FOR spEvent* + ok = false; + ok &= jsval_to_int32(cx, args.get(3), (int32_t *)&arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : Error processing arguments"); + cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; @@ -1386,11 +1429,10 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1); + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1); jsval jsret = JSVAL_NULL; if (ret) { jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); @@ -1406,28 +1448,13 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } double arg2 = 0; ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); if (!ok) { ok = true; break; } - spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1, arg2); - jsval jsret = JSVAL_NULL; - if (ret) { - jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); - } else { - jsret = JSVAL_NULL; - }; - args.rval().set(jsret); - return true; - } - } while (0); - - do { - if (argc == 0) { - spine::SkeletonAnimation* ret = spine::SkeletonAnimation::create(); + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1, arg2); jsval jsret = JSVAL_NULL; if (ret) { jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); @@ -1439,6 +1466,72 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t } } while (0); + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile : wrong number of arguments"); + return false; +} +bool js_cocos2dx_spine_SkeletonAnimation_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + + auto ret = spine::SkeletonAnimation::create(); + js_type_class_t *typeClass = js_get_type_from_native(ret); + JS::RootedObject jsret(cx, jsb_ref_autoreleased_create_jsobject(cx, ret, typeClass, "spine::SkeletonAnimation")); + args.rval().set(OBJECT_TO_JSVAL(jsret)); + return true; + } + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_spine_SkeletonAnimation_createWithJsonFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + do { if (argc == 2) { std::string arg0; @@ -1447,7 +1540,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t std::string arg1; ok &= jsval_to_std_string(cx, args.get(1), &arg1); if (!ok) { ok = true; break; } - spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1); + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1); jsval jsret = JSVAL_NULL; if (ret) { jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); @@ -1469,7 +1562,7 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t double arg2 = 0; ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); if (!ok) { ok = true; break; } - spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithFile(arg0, arg1, arg2); + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1, arg2); jsval jsret = JSVAL_NULL; if (ret) { jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); @@ -1480,280 +1573,80 @@ bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t return true; } } while (0); - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_createWithFile : wrong number of arguments"); + + do { + if (argc == 2) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); + do { + if (argc == 3) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + if (!ok) { ok = true; break; } + spAtlas* arg1 = nullptr; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { ok = true; break; } + double arg2 = 0; + ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); + if (!ok) { ok = true; break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + if (ret) { + jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject(cx, (spine::SkeletonAnimation*)ret)); + } else { + jsret = JSVAL_NULL; + }; + args.rval().set(jsret); + return true; + } + } while (0); + JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_createWithJsonFile : wrong number of arguments"); return false; } bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t argc, jsval *vp) { - bool ok = true; - spine::SkeletonAnimation* cobj = nullptr; - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx); - do { - if (argc == 1) { - spSkeletonData* arg0 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spSkeletonData* - ok = false; - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - spSkeletonData* arg0 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spSkeletonData* - ok = false; - if (!ok) { ok = true; break; } - bool arg1; - arg1 = JS::ToBoolean(args.get(1)); - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 0) { - cobj = new (std::nothrow) spine::SkeletonAnimation(); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1, arg2); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1, arg2); - - js_type_class_t *typeClass = js_get_type_from_native(cobj); - JS::RootedObject proto(cx, typeClass->proto.ref()); - JS::RootedObject parent(cx, typeClass->parentProto.ref()); - obj = JS_NewObject(cx, typeClass->jsclass, proto, parent); - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - if (cobj) { - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - - args.rval().set(OBJECT_TO_JSVAL(obj)); - return true; - } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_constructor : wrong number of arguments"); - return false; -} -bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ bool ok = true; - spine::SkeletonAnimation* cobj = nullptr; + spine::SkeletonAnimation* cobj = new (std::nothrow) spine::SkeletonAnimation(); + js_type_class_t *typeClass = js_get_type_from_native(cobj); + + // link the native object with the javascript object + JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, cobj, typeClass, "spine::SkeletonAnimation")); + args.rval().set(OBJECT_TO_JSVAL(jsobj)); + if (JS_HasProperty(cx, jsobj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(jsobj), "_ctor", args); + return true; +} +static bool js_cocos2dx_spine_SkeletonAnimation_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - do { - if (argc == 1) { - spSkeletonData* arg0 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spSkeletonData* - ok = false; - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - spSkeletonData* arg0 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spSkeletonData* - ok = false; - if (!ok) { ok = true; break; } - bool arg1; - arg1 = JS::ToBoolean(args.get(1)); - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 0) { - cobj = new (std::nothrow) spine::SkeletonAnimation(); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - spAtlas* arg1 = nullptr; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1, arg2); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 2) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - do { - if (argc == 3) { - std::string arg0; - ok &= jsval_to_std_string(cx, args.get(0), &arg0); - if (!ok) { ok = true; break; } - std::string arg1; - ok &= jsval_to_std_string(cx, args.get(1), &arg1); - if (!ok) { ok = true; break; } - double arg2 = 0; - ok &= JS::ToNumber( cx, args.get(2), &arg2) && !std::isnan(arg2); - if (!ok) { ok = true; break; } - cobj = new (std::nothrow) spine::SkeletonAnimation(arg0, arg1, arg2); - - js_proxy_t* p = jsb_new_proxy(cobj, obj); - jsb_ref_init(cx, &p->obj, cobj, "spine::SkeletonAnimation"); - } - } while(0); - - if (cobj) { - if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - - args.rval().set(OBJECT_TO_JSVAL(obj)); - return true; - } - JS_ReportError(cx, "js_cocos2dx_spine_SkeletonAnimation_ctor : wrong number of arguments"); - return false; + spine::SkeletonAnimation *nobj = new (std::nothrow) spine::SkeletonAnimation(); + auto newproxy = jsb_new_proxy(nobj, obj); + jsb_ref_init(cx, &newproxy->obj, nobj, "spine::SkeletonAnimation"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; } @@ -1777,29 +1670,29 @@ void js_register_cocos2dx_spine_SkeletonAnimation(JSContext *cx, JS::HandleObjec }; static JSFunctionSpec funcs[] = { - JS_FN("setTrackCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("findAnimation", js_cocos2dx_spine_SkeletonAnimation_findAnimation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTrackEventListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMix", js_cocos2dx_spine_SkeletonAnimation_setMix, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTrackStartListener", js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEndListener", js_cocos2dx_spine_SkeletonAnimation_setEndListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("onAnimationStateEvent", js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getState", js_cocos2dx_spine_SkeletonAnimation_getState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("update", js_cocos2dx_spine_SkeletonAnimation_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEventListener", js_cocos2dx_spine_SkeletonAnimation_setEventListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setCompleteListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clearTrack", js_cocos2dx_spine_SkeletonAnimation_clearTrack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("initialize", js_cocos2dx_spine_SkeletonAnimation_initialize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("onTrackEntryEvent", js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clearTracks", js_cocos2dx_spine_SkeletonAnimation_clearTracks, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTrackEndListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setStartListener", js_cocos2dx_spine_SkeletonAnimation_setStartListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTrackEventListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getState", js_cocos2dx_spine_SkeletonAnimation_getState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTrackCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("onTrackEntryEvent", js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTrackStartListener", js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("findAnimation", js_cocos2dx_spine_SkeletonAnimation_findAnimation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCompleteListener", js_cocos2dx_spine_SkeletonAnimation_setCompleteListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTrackEndListener", js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEventListener", js_cocos2dx_spine_SkeletonAnimation_setEventListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMix", js_cocos2dx_spine_SkeletonAnimation_setMix, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEndListener", js_cocos2dx_spine_SkeletonAnimation_setEndListener, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clearTracks", js_cocos2dx_spine_SkeletonAnimation_clearTracks, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clearTrack", js_cocos2dx_spine_SkeletonAnimation_clearTrack, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("onAnimationStateEvent", js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("ctor", js_cocos2dx_spine_SkeletonAnimation_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_spine_SkeletonAnimation_createWithFile, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithBinaryFile", js_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_spine_SkeletonAnimation_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithJsonFile", js_cocos2dx_spine_SkeletonAnimation_createWithJsonFile, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp index 908acc68f5..eb28a94ba8 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp @@ -18,7 +18,9 @@ bool js_cocos2dx_spine_SkeletonRenderer_setAttachment(JSContext *cx, uint32_t ar bool js_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_initWithData(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonRenderer_initWithJsonFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_setToSetupPose(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_updateWorldTransform(JSContext *cx, uint32_t argc, jsval *vp); @@ -26,7 +28,6 @@ bool js_cocos2dx_spine_SkeletonRenderer_initialize(JSContext *cx, uint32_t argc, bool js_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_getTimeScale(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonRenderer_initWithFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_setSkin(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonRenderer_getSkeleton(JSContext *cx, uint32_t argc, jsval *vp); @@ -41,24 +42,24 @@ bool js_cocos2dx_spine_SkeletonAnimation_constructor(JSContext *cx, uint32_t arg void js_cocos2dx_spine_SkeletonAnimation_finalize(JSContext *cx, JSObject *obj); void js_register_cocos2dx_spine_SkeletonAnimation(JSContext *cx, JS::HandleObject global); void register_all_cocos2dx_spine(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_update(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_initialize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_spine_SkeletonAnimation_createWithFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setTrackEventListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_getState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setTrackCompleteListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_onTrackEntryEvent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setTrackStartListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setTrackEndListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setMix(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_clearTracks(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_clearTrack(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_spine_SkeletonAnimation_createWithJsonFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_spine_SkeletonAnimation_SkeletonAnimation(JSContext *cx, uint32_t argc, jsval *vp); #endif // __cocos2dx_spine_h__ diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua index 3e1b995bbd..52e686107c 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua @@ -80,12 +80,6 @@ -- @param #function listener -- @return SkeletonAnimation#SkeletonAnimation self (return value: sp.SkeletonAnimation) --------------------------------- --- --- @function [parent=#SkeletonAnimation] initialize --- @param self --- @return SkeletonAnimation#SkeletonAnimation self (return value: sp.SkeletonAnimation) - -------------------------------- -- -- @function [parent=#SkeletonAnimation] clearTracks @@ -98,10 +92,36 @@ -- @param self -- @return SkeletonAnimation#SkeletonAnimation self (return value: sp.SkeletonAnimation) +-------------------------------- +-- @overload self, string, string, float +-- @overload self, string, spAtlas, float +-- @function [parent=#SkeletonAnimation] createWithBinaryFile +-- @param self +-- @param #string skeletonBinaryFile +-- @param #spAtlas atlas +-- @param #float scale +-- @return SkeletonAnimation#SkeletonAnimation ret (return value: sp.SkeletonAnimation) + -------------------------------- -- -- @function [parent=#SkeletonAnimation] create -- @param self -- @return SkeletonAnimation#SkeletonAnimation ret (return value: sp.SkeletonAnimation) +-------------------------------- +-- @overload self, string, string, float +-- @overload self, string, spAtlas, float +-- @function [parent=#SkeletonAnimation] createWithJsonFile +-- @param self +-- @param #string skeletonJsonFile +-- @param #spAtlas atlas +-- @param #float scale +-- @return SkeletonAnimation#SkeletonAnimation ret (return value: sp.SkeletonAnimation) + +-------------------------------- +-- +-- @function [parent=#SkeletonAnimation] initialize +-- @param self +-- @return SkeletonAnimation#SkeletonAnimation self (return value: sp.SkeletonAnimation) + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua index 3332dd54c2..9ba3985902 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua @@ -38,12 +38,32 @@ -- @param #bool enabled -- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonRenderer) +-------------------------------- +-- @overload self, string, string, float +-- @overload self, string, spAtlas, float +-- @function [parent=#SkeletonRenderer] initWithJsonFile +-- @param self +-- @param #string skeletonDataFile +-- @param #spAtlas atlas +-- @param #float scale +-- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonRenderer) + -------------------------------- -- -- @function [parent=#SkeletonRenderer] setSlotsToSetupPose -- @param self -- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonRenderer) +-------------------------------- +-- @overload self, string, string, float +-- @overload self, string, spAtlas, float +-- @function [parent=#SkeletonRenderer] initWithBinaryFile +-- @param self +-- @param #string skeletonDataFile +-- @param #spAtlas atlas +-- @param #float scale +-- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonRenderer) + -------------------------------- -- -- @function [parent=#SkeletonRenderer] setToSetupPose @@ -81,16 +101,6 @@ -- @param self -- @return float#float ret (return value: float) --------------------------------- --- @overload self, string, string, float --- @overload self, string, spAtlas, float --- @function [parent=#SkeletonRenderer] initWithFile --- @param self --- @param #string skeletonDataFile --- @param #spAtlas atlas --- @param #float scale --- @return SkeletonRenderer#SkeletonRenderer self (return value: sp.SkeletonRenderer) - -------------------------------- -- -- @function [parent=#SkeletonRenderer] setBlendFunc diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp index be2a6564b9..a9b7caa879 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp @@ -266,6 +266,111 @@ int lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled(lua_State* tolua_S) return 0; } +int lua_cocos2dx_spine_SkeletonRenderer_initWithJsonFile(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithJsonFile'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + cobj->initWithJsonFile(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + cobj->initWithJsonFile(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + + if (!ok) { break; } + cobj->initWithJsonFile(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithJsonFile"); + + if (!ok) { break; } + cobj->initWithJsonFile(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:initWithJsonFile",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithJsonFile'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(lua_State* tolua_S) { int argc = 0; @@ -313,6 +418,111 @@ int lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose(lua_State* tolua_S) return 0; } +int lua_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile(lua_State* tolua_S) +{ + int argc = 0; + spine::SkeletonRenderer* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + cobj->initWithBinaryFile(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + cobj->initWithBinaryFile(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + + if (!ok) { break; } + cobj->initWithBinaryFile(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithBinaryFile"); + + if (!ok) { break; } + cobj->initWithBinaryFile(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:initWithBinaryFile",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose(lua_State* tolua_S) { int argc = 0; @@ -598,111 +808,6 @@ int lua_cocos2dx_spine_SkeletonRenderer_getTimeScale(lua_State* tolua_S) return 0; } -int lua_cocos2dx_spine_SkeletonRenderer_initWithFile(lua_State* tolua_S) -{ - int argc = 0; - spine::SkeletonRenderer* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithFile'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - cobj->initWithFile(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - cobj->initWithFile(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - spAtlas* arg1; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - - if (!ok) { break; } - cobj->initWithFile(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - spAtlas* arg1; - #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* - ok = false; - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonRenderer:initWithFile"); - - if (!ok) { break; } - cobj->initWithFile(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonRenderer:initWithFile",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_initWithFile'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_spine_SkeletonRenderer_setBlendFunc(lua_State* tolua_S) { int argc = 0; @@ -1154,14 +1259,15 @@ int lua_register_cocos2dx_spine_SkeletonRenderer(lua_State* tolua_S) tolua_function(tolua_S,"setBonesToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setBonesToSetupPose); tolua_function(tolua_S,"initWithData",lua_cocos2dx_spine_SkeletonRenderer_initWithData); tolua_function(tolua_S,"setDebugSlotsEnabled",lua_cocos2dx_spine_SkeletonRenderer_setDebugSlotsEnabled); + tolua_function(tolua_S,"initWithJsonFile",lua_cocos2dx_spine_SkeletonRenderer_initWithJsonFile); tolua_function(tolua_S,"setSlotsToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setSlotsToSetupPose); + tolua_function(tolua_S,"initWithBinaryFile",lua_cocos2dx_spine_SkeletonRenderer_initWithBinaryFile); tolua_function(tolua_S,"setToSetupPose",lua_cocos2dx_spine_SkeletonRenderer_setToSetupPose); tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_spine_SkeletonRenderer_getBlendFunc); tolua_function(tolua_S,"initialize",lua_cocos2dx_spine_SkeletonRenderer_initialize); tolua_function(tolua_S,"setDebugBonesEnabled",lua_cocos2dx_spine_SkeletonRenderer_setDebugBonesEnabled); tolua_function(tolua_S,"getDebugBonesEnabled",lua_cocos2dx_spine_SkeletonRenderer_getDebugBonesEnabled); tolua_function(tolua_S,"getTimeScale",lua_cocos2dx_spine_SkeletonRenderer_getTimeScale); - tolua_function(tolua_S,"initWithFile",lua_cocos2dx_spine_SkeletonRenderer_initWithFile); tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_spine_SkeletonRenderer_setBlendFunc); tolua_function(tolua_S,"setSkin",lua_cocos2dx_spine_SkeletonRenderer_setSkin); tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_spine_SkeletonRenderer_getSkeleton); @@ -1728,53 +1834,6 @@ int lua_cocos2dx_spine_SkeletonAnimation_setEndListener(lua_State* tolua_S) return 0; } -int lua_cocos2dx_spine_SkeletonAnimation_initialize(lua_State* tolua_S) -{ - int argc = 0; - spine::SkeletonAnimation* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_initialize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_spine_SkeletonAnimation_initialize'", nullptr); - return 0; - } - cobj->initialize(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "sp.SkeletonAnimation:initialize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_initialize'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_spine_SkeletonAnimation_clearTracks(lua_State* tolua_S) { int argc = 0; @@ -1883,6 +1942,100 @@ int lua_cocos2dx_spine_SkeletonAnimation_clearTrack(lua_State* tolua_S) return 0; } +int lua_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonAnimation:createWithBinaryFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithBinaryFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "sp.SkeletonAnimation:createWithBinaryFile",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile'.",&tolua_err); +#endif + return 0; +} int lua_cocos2dx_spine_SkeletonAnimation_create(lua_State* tolua_S) { int argc = 0; @@ -1917,6 +2070,100 @@ int lua_cocos2dx_spine_SkeletonAnimation_create(lua_State* tolua_S) #endif return 0; } +int lua_cocos2dx_spine_SkeletonAnimation_createWithJsonFile(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 3) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + spAtlas* arg1; + #pragma warning NO CONVERSION TO NATIVE FOR spAtlas* + ok = false; + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "sp.SkeletonAnimation:createWithJsonFile"); + if (!ok) { break; } + spine::SkeletonAnimation* ret = spine::SkeletonAnimation::createWithJsonFile(arg0, arg1, arg2); + object_to_luaval(tolua_S, "sp.SkeletonAnimation",(spine::SkeletonAnimation*)ret); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "sp.SkeletonAnimation:createWithJsonFile",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_createWithJsonFile'.",&tolua_err); +#endif + return 0; +} static int lua_cocos2dx_spine_SkeletonAnimation_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (SkeletonAnimation)"); @@ -1939,10 +2186,11 @@ int lua_register_cocos2dx_spine_SkeletonAnimation(lua_State* tolua_S) tolua_function(tolua_S,"setEventListener",lua_cocos2dx_spine_SkeletonAnimation_setEventListener); tolua_function(tolua_S,"setMix",lua_cocos2dx_spine_SkeletonAnimation_setMix); tolua_function(tolua_S,"setEndListener",lua_cocos2dx_spine_SkeletonAnimation_setEndListener); - tolua_function(tolua_S,"initialize",lua_cocos2dx_spine_SkeletonAnimation_initialize); tolua_function(tolua_S,"clearTracks",lua_cocos2dx_spine_SkeletonAnimation_clearTracks); tolua_function(tolua_S,"clearTrack",lua_cocos2dx_spine_SkeletonAnimation_clearTrack); + tolua_function(tolua_S,"createWithBinaryFile", lua_cocos2dx_spine_SkeletonAnimation_createWithBinaryFile); tolua_function(tolua_S,"create", lua_cocos2dx_spine_SkeletonAnimation_create); + tolua_function(tolua_S,"createWithJsonFile", lua_cocos2dx_spine_SkeletonAnimation_createWithJsonFile); tolua_endmodule(tolua_S); std::string typeName = typeid(spine::SkeletonAnimation).name(); g_luaType[typeName] = "sp.SkeletonAnimation"; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp index 25e81cd89b..251b669d3a 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp @@ -44,6 +44,8 @@ int register_all_cocos2dx_spine(lua_State* tolua_S); + + diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 83d5a90c02..5f41fe98b6 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -818,6 +818,8 @@ "cocos/editor-support/spine/SkeletonAnimation.h", "cocos/editor-support/spine/SkeletonBatch.cpp", "cocos/editor-support/spine/SkeletonBatch.h", + "cocos/editor-support/spine/SkeletonBinary.c", + "cocos/editor-support/spine/SkeletonBinary.h", "cocos/editor-support/spine/SkeletonBounds.c", "cocos/editor-support/spine/SkeletonBounds.h", "cocos/editor-support/spine/SkeletonData.c", @@ -840,6 +842,7 @@ "cocos/editor-support/spine/VertexAttachment.h", "cocos/editor-support/spine/extension.c", "cocos/editor-support/spine/extension.h", + "cocos/editor-support/spine/kvec.h", "cocos/editor-support/spine/proj.win10/libSpine.vcxproj", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj", "cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters",