diff --git a/spine-c/spine-c/src/spine/Animation.c b/spine-c/spine-c/src/spine/Animation.c index 30158fd87..a60f6e22c 100644 --- a/spine-c/spine-c/src/spine/Animation.c +++ b/spine-c/spine-c/src/spine/Animation.c @@ -85,7 +85,7 @@ void spAnimation_apply(const spAnimation *self, spSkeleton *skeleton, float last direction); } -static search(spFloatArray +static int search(spFloatArray *values, float time) { int i, n; @@ -98,7 +98,7 @@ static search(spFloatArray return values->size - 1; } -static search2(spFloatArray +static int search2(spFloatArray *values, float time, int step) { @@ -1628,8 +1628,7 @@ void spRGB2Timeline_setFrame(spRGB2Timeline *self, int frame, float time, float static void _spSetAttachment(spAttachmentTimeline *timeline, spSkeleton *skeleton, spSlot *slot, const char *attachmentName) { - slot->attachment = - attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, timeline->slotIndex, attachmentName); + spSlot_setAttachment(slot, attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, timeline->slotIndex, attachmentName)); } void _spAttachmentTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, diff --git a/spine-c/spine-c/src/spine/AnimationState.c b/spine-c/spine-c/src/spine/AnimationState.c index edcacceca..f15dfa3bb 100644 --- a/spine-c/spine-c/src/spine/AnimationState.c +++ b/spine-c/spine-c/src/spine/AnimationState.c @@ -456,8 +456,7 @@ int spAnimationState_apply(spAnimationState *self, spSkeleton *skeleton) { slot = slots[i]; if (slot->attachmentState == setupState) { attachmentName = slot->data->attachmentName; - slot->attachment = - attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, slot->data->index, attachmentName); + spSlot_setAttachment(slot, attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, slot->data->index, attachmentName)); } } self->unkeyedState += 2; @@ -588,7 +587,7 @@ float _spAnimationState_applyMixingFrom(spAnimationState *self, spTrackEntry *to static void _spAnimationState_setAttachment(spAnimationState *self, spSkeleton *skeleton, spSlot *slot, const char *attachmentName, int /*bool*/ attachments) { - slot->attachment = attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, slot->data->index, attachmentName); + spSlot_setAttachment(slot, attachmentName == NULL ? NULL : spSkeleton_getAttachmentForSlotIndex(skeleton, slot->data->index, attachmentName)); if (attachments) slot->attachmentState = self->unkeyedState + CURRENT; }