From c5ffedab4ee4c08c2101ffb14a342e8853f2b47f Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Sun, 31 Mar 2013 03:24:05 +0200 Subject: [PATCH] Minor cleanup. --- spine-c/include/spine/Animation.h | 2 +- spine-c/src/spine/Animation.c | 2 +- spine-c/src/spine/Slot.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spine-c/include/spine/Animation.h b/spine-c/include/spine/Animation.h index cc9bc72a4..fc4474886 100644 --- a/spine-c/include/spine/Animation.h +++ b/spine-c/include/spine/Animation.h @@ -72,7 +72,7 @@ void CurveTimeline_setStepped (CurveTimeline* timeline, int frameIndex); * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of * the difference between the keyframe's values. */ void CurveTimeline_setCurve (CurveTimeline* timeline, int frameIndex, float cx1, float cy1, float cx2, float cy2); -float CurveTimeline_getCurvePercent (CurveTimeline* timeline, int frameIndex, float percent); +float CurveTimeline_getCurvePercent (const CurveTimeline* timeline, int frameIndex, float percent); /**/ diff --git a/spine-c/src/spine/Animation.c b/spine-c/src/spine/Animation.c index 2ae8e3273..4f5c8c4d9 100644 --- a/spine-c/src/spine/Animation.c +++ b/spine-c/src/spine/Animation.c @@ -119,7 +119,7 @@ void CurveTimeline_setCurve (CurveTimeline* self, int frameIndex, float cx1, flo self->curves[i + 5] = tmp2y * pre5; } -float CurveTimeline_getCurvePercent (CurveTimeline* self, int frameIndex, float percent) { +float CurveTimeline_getCurvePercent (const CurveTimeline* self, int frameIndex, float percent) { int curveIndex = frameIndex * 6; float dfx = self->curves[curveIndex]; if (dfx == CURVE_LINEAR) return percent; diff --git a/spine-c/src/spine/Slot.c b/spine-c/src/spine/Slot.c index b144d4744..ee1fd99ae 100644 --- a/spine-c/src/spine/Slot.c +++ b/spine-c/src/spine/Slot.c @@ -30,10 +30,10 @@ typedef struct { Slot slot; float attachmentTime; -} Internal; +} SlotInternal; Slot* Slot_create (SlotData* data, Skeleton* skeleton, Bone* bone) { - Internal* internal = CALLOC(Internal, 1) + SlotInternal* internal = CALLOC(SlotInternal, 1) Slot* self = &internal->slot; CAST(SlotData*, self->data) = data; CAST(Skeleton*, self->skeleton) = skeleton; @@ -52,15 +52,15 @@ void Slot_dispose (Slot* self) { /* @param attachment May be null. */ void Slot_setAttachment (Slot* self, Attachment* attachment) { CAST(Attachment*, self->attachment) = attachment; - ((Internal*)self)->attachmentTime = self->skeleton->time; + ((SlotInternal*)self)->attachmentTime = self->skeleton->time; } void Slot_setAttachmentTime (Slot* self, float time) { - ((Internal*)self)->attachmentTime = self->skeleton->time - time; + ((SlotInternal*)self)->attachmentTime = self->skeleton->time - time; } float Slot_getAttachmentTime (const Slot* self) { - return self->skeleton->time - ((Internal*)self)->attachmentTime; + return self->skeleton->time - ((SlotInternal*)self)->attachmentTime; } void Slot_setToBindPose (Slot* self) {