Spine conversion should use pointer instead of reference since it probably returns nullptr.

This commit is contained in:
James Chen
2017-10-20 10:01:04 +08:00
parent b7ac034385
commit 8ae6d54df3
5 changed files with 176 additions and 121 deletions
@@ -340,7 +340,7 @@ static bool js_cocos2dx_spine_SkeletonRenderer_getAttachment(se::State& s)
ok &= seval_to_std_string(args[1], &arg1);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_getAttachment : Error processing arguments");
spAttachment* result = cobj->getAttachment(arg0, arg1);
ok &= spattachment_to_seval(*result, &s.rval());
ok &= spattachment_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_getAttachment : Error processing arguments");
return true;
}
@@ -486,7 +486,7 @@ static bool js_cocos2dx_spine_SkeletonRenderer_findSlot(se::State& s)
ok &= seval_to_std_string(args[0], &arg0);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_findSlot : Error processing arguments");
spSlot* result = cobj->findSlot(arg0);
ok &= spslot_to_seval(*result, &s.rval());
ok &= spslot_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_findSlot : Error processing arguments");
return true;
}
@@ -504,7 +504,7 @@ static bool js_cocos2dx_spine_SkeletonRenderer_getSkeleton(se::State& s)
CC_UNUSED bool ok = true;
if (argc == 0) {
spSkeleton* result = cobj->getSkeleton();
ok &= spskeleton_to_seval(*result, &s.rval());
ok &= spskeleton_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_getSkeleton : Error processing arguments");
return true;
}
@@ -525,7 +525,7 @@ static bool js_cocos2dx_spine_SkeletonRenderer_findBone(se::State& s)
ok &= seval_to_std_string(args[0], &arg0);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_findBone : Error processing arguments");
spBone* result = cobj->findBone(arg0);
ok &= spbone_to_seval(*result, &s.rval());
ok &= spbone_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonRenderer_findBone : Error processing arguments");
return true;
}
@@ -816,7 +816,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setAnimation(se::State& s)
ok &= seval_to_boolean(args[2], &arg2);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_setAnimation : Error processing arguments");
spTrackEntry* result = cobj->setAnimation(arg0, arg1, arg2);
ok &= sptrackentry_to_seval(*result, &s.rval());
ok &= sptrackentry_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_setAnimation : Error processing arguments");
return true;
}
@@ -837,7 +837,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_findAnimation(se::State& s)
ok &= seval_to_std_string(args[0], &arg0);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Error processing arguments");
spAnimation* result = cobj->findAnimation(arg0);
ok &= spanimation_to_seval(*result, &s.rval());
ok &= spanimation_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_findAnimation : Error processing arguments");
return true;
}
@@ -891,7 +891,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setDisposeListener(se::State& s)
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(1);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -959,7 +959,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setEndListener(se::State& s)
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(1);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -994,7 +994,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_getState(se::State& s)
CC_UNUSED bool ok = true;
if (argc == 0) {
spAnimationState* result = cobj->getState();
ok &= spanimationstate_to_seval(*result, &s.rval());
ok &= spanimationstate_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_getState : Error processing arguments");
return true;
}
@@ -1025,7 +1025,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setCompleteListener(se::State& s
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(1);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -1060,7 +1060,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_getCurrent(se::State& s)
CC_UNUSED bool ok = true;
if (argc == 0) {
spTrackEntry* result = cobj->getCurrent();
ok &= sptrackentry_to_seval(*result, &s.rval());
ok &= sptrackentry_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_getCurrent : Error processing arguments");
return true;
}
@@ -1069,7 +1069,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_getCurrent(se::State& s)
ok &= seval_to_int32(args[0], (int32_t*)&arg0);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_getCurrent : Error processing arguments");
spTrackEntry* result = cobj->getCurrent(arg0);
ok &= sptrackentry_to_seval(*result, &s.rval());
ok &= sptrackentry_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_getCurrent : Error processing arguments");
return true;
}
@@ -1100,8 +1100,8 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setEventListener(se::State& s)
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(2);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= spevent_to_seval(*larg1, &args[1]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
ok &= spevent_to_seval(larg1, &args[1]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -1172,7 +1172,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setInterruptListener(se::State&
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(1);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -1214,7 +1214,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_addAnimation(se::State& s)
ok &= seval_to_boolean(args[2], &arg2);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_addAnimation : Error processing arguments");
spTrackEntry* result = cobj->addAnimation(arg0, arg1, arg2);
ok &= sptrackentry_to_seval(*result, &s.rval());
ok &= sptrackentry_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_addAnimation : Error processing arguments");
return true;
}
@@ -1229,7 +1229,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_addAnimation(se::State& s)
ok &= seval_to_float(args[3], &arg3);
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_addAnimation : Error processing arguments");
spTrackEntry* result = cobj->addAnimation(arg0, arg1, arg2, arg3);
ok &= sptrackentry_to_seval(*result, &s.rval());
ok &= sptrackentry_to_seval(result, &s.rval());
SE_PRECONDITION2(ok, false, "js_cocos2dx_spine_SkeletonAnimation_addAnimation : Error processing arguments");
return true;
}
@@ -1275,7 +1275,7 @@ static bool js_cocos2dx_spine_SkeletonAnimation_setStartListener(se::State& s)
CC_UNUSED bool ok = true;
se::ValueArray args;
args.resize(1);
ok &= sptrackentry_to_seval(*larg0, &args[0]);
ok &= sptrackentry_to_seval(larg0, &args[0]);
se::Value rval;
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
se::Object* funcObj = jsFunc.toObject();
@@ -1745,178 +1745,218 @@ bool DownloadTask_to_seval(const cocos2d::network::DownloadTask& v, se::Value* r
}
// Spine conversions
bool speventdata_to_seval(const spEventData& v, se::Value* ret)
bool speventdata_to_seval(const spEventData* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("name", se::Value(v.name));
obj->setProperty("intValue", se::Value(v.intValue));
obj->setProperty("floatValue", se::Value(v.floatValue));
obj->setProperty("stringValue", se::Value(v.stringValue));
obj->setProperty("name", se::Value(v->name));
obj->setProperty("intValue", se::Value(v->intValue));
obj->setProperty("floatValue", se::Value(v->floatValue));
obj->setProperty("stringValue", se::Value(v->stringValue));
ret->setObject(obj);
return true;
}
bool spevent_to_seval(const spEvent& v, se::Value* ret)
bool spevent_to_seval(const spEvent* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
se::Value dataVal;
SE_PRECONDITION3(speventdata_to_seval(*v.data, &dataVal), false, ret->setUndefined());
SE_PRECONDITION3(speventdata_to_seval(v->data, &dataVal), false, ret->setUndefined());
obj->setProperty("data", dataVal);
obj->setProperty("time", se::Value(v.time));
obj->setProperty("intValue", se::Value(v.intValue));
obj->setProperty("floatValue", se::Value(v.floatValue));
obj->setProperty("stringValue", se::Value(v.stringValue));
obj->setProperty("time", se::Value(v->time));
obj->setProperty("intValue", se::Value(v->intValue));
obj->setProperty("floatValue", se::Value(v->floatValue));
obj->setProperty("stringValue", se::Value(v->stringValue));
ret->setObject(obj);
return true;
}
bool spbonedata_to_seval(const spBoneData& v, se::Value* ret)
bool spbonedata_to_seval(const spBoneData* v, se::Value* ret)
{
assert(ret != nullptr);
se::HandleObject obj(se::Object::createPlainObject());
// root haven't parent
se::Value parentVal;
if (0 != strcmp(v.name, "root") && v.parent)
if (v == nullptr)
{
SE_PRECONDITION3(spbonedata_to_seval(*v.parent, &parentVal), false, ret->setUndefined());
ret->setNull();
return true;
}
obj->setProperty("index", se::Value(v.index));
obj->setProperty("name", se::Value(v.name));
se::HandleObject obj(se::Object::createPlainObject());
// root haven't parent
se::Value parentVal;
if (0 != strcmp(v->name, "root") && v->parent)
{
SE_PRECONDITION3(spbonedata_to_seval(v->parent, &parentVal), false, ret->setUndefined());
}
obj->setProperty("index", se::Value(v->index));
obj->setProperty("name", se::Value(v->name));
obj->setProperty("parent", parentVal);
obj->setProperty("length", se::Value(v.length));
obj->setProperty("x", se::Value(v.x));
obj->setProperty("y", se::Value(v.y));
obj->setProperty("rotation", se::Value(v.rotation));
obj->setProperty("scaleX", se::Value(v.scaleX));
obj->setProperty("scaleY", se::Value(v.scaleY));
obj->setProperty("shearX", se::Value(v.shearX));
obj->setProperty("shearY", se::Value(v.shearY));
obj->setProperty("transformMode", se::Value(v.transformMode));
obj->setProperty("length", se::Value(v->length));
obj->setProperty("x", se::Value(v->x));
obj->setProperty("y", se::Value(v->y));
obj->setProperty("rotation", se::Value(v->rotation));
obj->setProperty("scaleX", se::Value(v->scaleX));
obj->setProperty("scaleY", se::Value(v->scaleY));
obj->setProperty("shearX", se::Value(v->shearX));
obj->setProperty("shearY", se::Value(v->shearY));
obj->setProperty("transformMode", se::Value(v->transformMode));
ret->setObject(obj);
return true;
}
bool spbone_to_seval(const spBone& v, se::Value* ret)
bool spbone_to_seval(const spBone* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
// root haven't parent
se::Value parentVal;
if (0 != strcmp(v.data->name, "root") && v.parent)
if (0 != strcmp(v->data->name, "root") && v->parent)
{
SE_PRECONDITION3(spbone_to_seval(*v.parent, &parentVal), false, ret->setUndefined());
SE_PRECONDITION3(spbone_to_seval(v->parent, &parentVal), false, ret->setUndefined());
}
se::Value data;
SE_PRECONDITION3(spbonedata_to_seval(*v.data, &data), false, ret->setUndefined());
SE_PRECONDITION3(spbonedata_to_seval(v->data, &data), false, ret->setUndefined());
obj->setProperty("data", data);
obj->setProperty("parent", parentVal);
obj->setProperty("x", se::Value(v.x));
obj->setProperty("y", se::Value(v.y));
obj->setProperty("rotation", se::Value(v.rotation));
obj->setProperty("scaleX", se::Value(v.scaleX));
obj->setProperty("scaleY", se::Value(v.scaleY));
obj->setProperty("shearX", se::Value(v.shearX));
obj->setProperty("shearY", se::Value(v.shearY));
obj->setProperty("m00", se::Value(v.a));
obj->setProperty("m01", se::Value(v.b));
obj->setProperty("m10", se::Value(v.c));
obj->setProperty("m11", se::Value(v.d));
obj->setProperty("worldX", se::Value(v.worldX));
obj->setProperty("worldY", se::Value(v.worldY));
obj->setProperty("x", se::Value(v->x));
obj->setProperty("y", se::Value(v->y));
obj->setProperty("rotation", se::Value(v->rotation));
obj->setProperty("scaleX", se::Value(v->scaleX));
obj->setProperty("scaleY", se::Value(v->scaleY));
obj->setProperty("shearX", se::Value(v->shearX));
obj->setProperty("shearY", se::Value(v->shearY));
obj->setProperty("m00", se::Value(v->a));
obj->setProperty("m01", se::Value(v->b));
obj->setProperty("m10", se::Value(v->c));
obj->setProperty("m11", se::Value(v->d));
obj->setProperty("worldX", se::Value(v->worldX));
obj->setProperty("worldY", se::Value(v->worldY));
ret->setObject(obj);
return true;
}
bool spskeleton_to_seval(const spSkeleton& v, se::Value* ret)
bool spskeleton_to_seval(const spSkeleton* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("x", se::Value(v.x));
obj->setProperty("y", se::Value(v.y));
obj->setProperty("flipX", se::Value(v.flipX));
obj->setProperty("flipY", se::Value(v.flipY));
obj->setProperty("time", se::Value(v.time));
obj->setProperty("boneCount", se::Value(v.bonesCount));
obj->setProperty("slotCount", se::Value(v.slotsCount));
obj->setProperty("x", se::Value(v->x));
obj->setProperty("y", se::Value(v->y));
obj->setProperty("flipX", se::Value(v->flipX));
obj->setProperty("flipY", se::Value(v->flipY));
obj->setProperty("time", se::Value(v->time));
obj->setProperty("boneCount", se::Value(v->bonesCount));
obj->setProperty("slotCount", se::Value(v->slotsCount));
ret->setObject(obj);
return true;
}
bool spattachment_to_seval(const spAttachment& v, se::Value* ret)
bool spattachment_to_seval(const spAttachment* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("name", se::Value(v.name));
obj->setProperty("type", se::Value((int32_t)v.type));
obj->setProperty("name", se::Value(v->name));
obj->setProperty("type", se::Value((int32_t)v->type));
ret->setObject(obj);
return true;
}
bool spslotdata_to_seval(const spSlotData& v, se::Value* ret)
bool spslotdata_to_seval(const spSlotData* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
se::Value boneData;
SE_PRECONDITION3(spbonedata_to_seval(*v.boneData, &boneData), false, ret->setUndefined());
SE_PRECONDITION3(spbonedata_to_seval(v->boneData, &boneData), false, ret->setUndefined());
obj->setProperty("name", se::Value(v.name));
obj->setProperty("attachmentName", se::Value(v.attachmentName));
obj->setProperty("r", se::Value(v.r));
obj->setProperty("g", se::Value(v.g));
obj->setProperty("b", se::Value(v.b));
obj->setProperty("a", se::Value(v.a));
obj->setProperty("blendMode", se::Value((int32_t)v.blendMode));
obj->setProperty("name", se::Value(v->name));
obj->setProperty("attachmentName", se::Value(v->attachmentName));
obj->setProperty("r", se::Value(v->r));
obj->setProperty("g", se::Value(v->g));
obj->setProperty("b", se::Value(v->b));
obj->setProperty("a", se::Value(v->a));
obj->setProperty("blendMode", se::Value((int32_t)v->blendMode));
obj->setProperty("boneData", boneData);
ret->setObject(obj);
return true;
}
bool spslot_to_seval(const spSlot& v, se::Value* ret)
bool spslot_to_seval(const spSlot* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
se::Value bone;
SE_PRECONDITION3(spbone_to_seval(*v.bone, &bone), false, ret->setUndefined());
SE_PRECONDITION3(spbone_to_seval(v->bone, &bone), false, ret->setUndefined());
se::Value attachment;
SE_PRECONDITION3(spattachment_to_seval(*v.attachment, &attachment), false, ret->setUndefined());
SE_PRECONDITION3(spattachment_to_seval(v->attachment, &attachment), false, ret->setUndefined());
se::Value data;
SE_PRECONDITION3(spslotdata_to_seval(*v.data, &data), false, ret->setUndefined());
SE_PRECONDITION3(spslotdata_to_seval(v->data, &data), false, ret->setUndefined());
obj->setProperty("r", se::Value(v.r));
obj->setProperty("g", se::Value(v.g));
obj->setProperty("b", se::Value(v.b));
obj->setProperty("a", se::Value(v.a));
obj->setProperty("r", se::Value(v->r));
obj->setProperty("g", se::Value(v->g));
obj->setProperty("b", se::Value(v->b));
obj->setProperty("a", se::Value(v->a));
obj->setProperty("bone", bone);
obj->setProperty("attachment", attachment);
obj->setProperty("data", data);
@@ -1926,52 +1966,67 @@ bool spslot_to_seval(const spSlot& v, se::Value* ret)
return true;
}
bool sptimeline_to_seval(const spTimeline& v, se::Value* ret)
bool sptimeline_to_seval(const spTimeline* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("type", se::Value((int32_t)v.type));
obj->setProperty("type", se::Value((int32_t)v->type));
ret->setObject(obj);
return true;
}
bool spanimationstate_to_seval(const spAnimationState& v, se::Value* ret)
bool spanimationstate_to_seval(const spAnimationState* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
obj->setProperty("timeScale", se::Value(v.timeScale));
obj->setProperty("trackCount", se::Value(v.tracksCount));
obj->setProperty("timeScale", se::Value(v->timeScale));
obj->setProperty("trackCount", se::Value(v->tracksCount));
ret->setObject(obj);
return true;
}
bool spanimation_to_seval(const spAnimation& v, se::Value* ret)
bool spanimation_to_seval(const spAnimation* v, se::Value* ret)
{
assert(ret != nullptr);
if (v == nullptr)
{
ret->setNull();
return true;
}
se::HandleObject obj(se::Object::createPlainObject());
se::Value timelines;
SE_PRECONDITION3(sptimeline_to_seval(**v.timelines, &timelines), false, ret->setUndefined());
SE_PRECONDITION3(sptimeline_to_seval(*v->timelines, &timelines), false, ret->setUndefined());
obj->setProperty("name", se::Value(v.name));
obj->setProperty("duration", se::Value(v.duration));
obj->setProperty("timelineCount", se::Value(v.timelinesCount));
obj->setProperty("name", se::Value(v->name));
obj->setProperty("duration", se::Value(v->duration));
obj->setProperty("timelineCount", se::Value(v->timelinesCount));
obj->setProperty("timelines", timelines);
ret->setObject(obj);
return true;
}
bool sptrackentry_to_seval(const spTrackEntry& v, se::Value* ret)
bool sptrackentry_to_seval(const spTrackEntry* v, se::Value* ret)
{
return native_ptr_to_rooted_seval<spTrackEntry>((spTrackEntry*)&v, ret);
return native_ptr_to_rooted_seval<spTrackEntry>((spTrackEntry*)v, ret);
}
// Box2d
@@ -529,18 +529,18 @@ bool Map_string_key_to_seval(const cocos2d::Map<std::string, T*>& v, se::Value*
}
// Spine conversions
bool speventdata_to_seval(const spEventData& v, se::Value* ret);
bool spevent_to_seval(const spEvent& v, se::Value* ret);
bool spbonedata_to_seval(const spBoneData& v, se::Value* ret);
bool spbone_to_seval(const spBone& v, se::Value* ret);
bool spskeleton_to_seval(const spSkeleton& v, se::Value* ret);
bool spattachment_to_seval(const spAttachment& v, se::Value* ret);
bool spslotdata_to_seval(const spSlotData& v, se::Value* ret);
bool spslot_to_seval(const spSlot& v, se::Value* ret);
bool sptimeline_to_seval(const spTimeline& v, se::Value* ret);
bool spanimationstate_to_seval(const spAnimationState& v, se::Value* ret);
bool spanimation_to_seval(const spAnimation& v, se::Value* ret);
bool sptrackentry_to_seval(const spTrackEntry& v, se::Value* ret);
bool speventdata_to_seval(const spEventData* v, se::Value* ret);
bool spevent_to_seval(const spEvent* v, se::Value* ret);
bool spbonedata_to_seval(const spBoneData* v, se::Value* ret);
bool spbone_to_seval(const spBone* v, se::Value* ret);
bool spskeleton_to_seval(const spSkeleton* v, se::Value* ret);
bool spattachment_to_seval(const spAttachment* v, se::Value* ret);
bool spslotdata_to_seval(const spSlotData* v, se::Value* ret);
bool spslot_to_seval(const spSlot* v, se::Value* ret);
bool sptimeline_to_seval(const spTimeline* v, se::Value* ret);
bool spanimationstate_to_seval(const spAnimationState* v, se::Value* ret);
bool spanimation_to_seval(const spAnimation* v, se::Value* ret);
bool sptrackentry_to_seval(const spTrackEntry* v, se::Value* ret);
// Box2d
bool b2Vec2_to_seval(const b2Vec2& v, se::Value* ret);
@@ -42,7 +42,7 @@ static bool jsb_spine_TrackEntry_get_mixingFrom(se::State& s)
spTrackEntry* cobj = (spTrackEntry*) s.nativeThisObject();
if (cobj->mixingFrom)
{
bool ok = sptrackentry_to_seval(*cobj->mixingFrom, &s.rval());
bool ok = sptrackentry_to_seval(cobj->mixingFrom, &s.rval());
SE_PRECONDITION2(ok, false, "Converting track entry failed!");
return true;
}
@@ -56,7 +56,7 @@ static bool jsb_spine_TrackEntry_get_next(se::State& s)
spTrackEntry* cobj = (spTrackEntry*) s.nativeThisObject();
if (cobj->next)
{
bool ok = sptrackentry_to_seval(*cobj->next, &s.rval());
bool ok = sptrackentry_to_seval(cobj->next, &s.rval());
SE_PRECONDITION2(ok, false, "Converting track entry failed!");
return true;
}
@@ -237,7 +237,7 @@ static bool jsb_spine_TrackEntry_get_animation(se::State& s)
{
spTrackEntry* cobj = (spTrackEntry*) s.nativeThisObject();
SE_PRECONDITION2(spanimation_to_seval(*cobj->animation, &s.rval()), false, "Converting spAnimation failed!");
SE_PRECONDITION2(spanimation_to_seval(cobj->animation, &s.rval()), false, "Converting spAnimation failed!");
return true;
}
SE_BIND_PROP_GET(jsb_spine_TrackEntry_get_animation)
Submodule native/tools/bindings-generator updated: a38d3dcf0e...bf6fba80ce