mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Merge branch '3.7' into 3.8-beta
This commit is contained in:
commit
88e8253e4d
@ -812,7 +812,7 @@ void _spAttachmentTimeline_apply (const spTimeline* timeline, spSkeleton* skelet
|
|||||||
spSlot* slot = skeleton->slots[self->slotIndex];
|
spSlot* slot = skeleton->slots[self->slotIndex];
|
||||||
|
|
||||||
if (direction == SP_MIX_DIRECTION_OUT && blend == SP_MIX_BLEND_SETUP) {
|
if (direction == SP_MIX_DIRECTION_OUT && blend == SP_MIX_BLEND_SETUP) {
|
||||||
const char* attachmentName = slot->data->attachmentName;
|
attachmentName = slot->data->attachmentName;
|
||||||
spSlot_setAttachment(slot, attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0);
|
spSlot_setAttachment(slot, attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,7 +83,7 @@ void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, int /*bo
|
|||||||
sy = bone->ascaleY;
|
sy = bone->ascaleY;
|
||||||
if (compress || stretch) {
|
if (compress || stretch) {
|
||||||
float b = bone->data->length * sx, dd = SQRT(tx * tx + ty * ty);
|
float b = bone->data->length * sx, dd = SQRT(tx * tx + ty * ty);
|
||||||
if ((compress && dd < b) || (stretch && dd > b) && (b > 0.0001f)) {
|
if ((compress && dd < b) || ((stretch && dd > b) && (b > 0.0001f))) {
|
||||||
s = (dd / b - 1) * alpha + 1;
|
s = (dd / b - 1) * alpha + 1;
|
||||||
sx *= s;
|
sx *= s;
|
||||||
if (uniform) sy *= s;
|
if (uniform) sy *= s;
|
||||||
|
|||||||
@ -122,8 +122,8 @@ void spPathConstraint_apply (spPathConstraint* self) {
|
|||||||
spaces[++i] = 0;
|
spaces[++i] = 0;
|
||||||
} else if (percentSpacing) {
|
} else if (percentSpacing) {
|
||||||
if (scale) {
|
if (scale) {
|
||||||
float x = setupLength * bone->a, y = setupLength * bone->c;
|
x = setupLength * bone->a, y = setupLength * bone->c;
|
||||||
float length = SQRT(x * x + y * y);
|
length = SQRT(x * x + y * y);
|
||||||
lengths[i] = length;
|
lengths[i] = length;
|
||||||
}
|
}
|
||||||
spaces[++i] = spacing;
|
spaces[++i] = spacing;
|
||||||
|
|||||||
@ -308,9 +308,8 @@ static spAnimation* _spSkeletonBinary_readAnimation (spSkeletonBinary* self, con
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
int i;
|
for (iii = 0; iii < timelines->size; ++iii)
|
||||||
for (i = 0; i < timelines->size; ++i)
|
spTimeline_dispose(timelines->items[iii]);
|
||||||
spTimeline_dispose(timelines->items[i]);
|
|
||||||
spTimelineArray_dispose(timelines);
|
spTimelineArray_dispose(timelines);
|
||||||
_spSkeletonBinary_setError(self, "Invalid timeline type for a slot: ", skeletonData->slots[slotIndex]->name);
|
_spSkeletonBinary_setError(self, "Invalid timeline type for a slot: ", skeletonData->slots[slotIndex]->name);
|
||||||
return 0;
|
return 0;
|
||||||
@ -371,9 +370,8 @@ static spAnimation* _spSkeletonBinary_readAnimation (spSkeletonBinary* self, con
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
int i;
|
for (iii = 0; iii < timelines->size; ++iii)
|
||||||
for (i = 0; i < timelines->size; ++i)
|
spTimeline_dispose(timelines->items[iii]);
|
||||||
spTimeline_dispose(timelines->items[i]);
|
|
||||||
spTimelineArray_dispose(timelines);
|
spTimelineArray_dispose(timelines);
|
||||||
_spSkeletonBinary_setError(self, "Invalid timeline type for a bone: ", skeletonData->bones[boneIndex]->name);
|
_spSkeletonBinary_setError(self, "Invalid timeline type for a bone: ", skeletonData->bones[boneIndex]->name);
|
||||||
return 0;
|
return 0;
|
||||||
@ -650,7 +648,7 @@ static void _readVertices(spSkeletonBinary* self, _dataInput* input, spVertexAtt
|
|||||||
attachment->bonesCount = 0;
|
attachment->bonesCount = 0;
|
||||||
attachment->bones = 0;
|
attachment->bones = 0;
|
||||||
spFloatArray_dispose(weights);
|
spFloatArray_dispose(weights);
|
||||||
spFloatArray_dispose(bones);
|
spIntArray_dispose(bones);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user