mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed FfdTimeline for spine-c.
This commit is contained in:
parent
ab6e07765c
commit
53437a6159
@ -66,7 +66,7 @@ public class FfdTimeline extends CurveTimeline {
|
|||||||
var vertexCount:int = frameVertices[0].length;
|
var vertexCount:int = frameVertices[0].length;
|
||||||
|
|
||||||
var vertices:Vector.<Number> = slot.attachmentVertices;
|
var vertices:Vector.<Number> = slot.attachmentVertices;
|
||||||
if (vertices.length != vertexCount) alpha = 1;
|
if (vertices.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||||
vertices.length = vertexCount;
|
vertices.length = vertexCount;
|
||||||
|
|
||||||
var i:int;
|
var i:int;
|
||||||
|
|||||||
@ -664,15 +664,15 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
|
|||||||
return; /* Time is before first frame. */
|
return; /* Time is before first frame. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slot->attachmentVerticesCount == 0) alpha = 1;
|
if (slot->attachmentVerticesCount != self->frameVerticesCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||||
if (slot->attachmentVerticesCount < self->frameVerticesCount) {
|
if (slot->attachmentVerticesCount < self->frameVerticesCount) {
|
||||||
if (slot->attachmentVerticesCapacity < self->frameVerticesCount) {
|
if (slot->attachmentVerticesCapacity < self->frameVerticesCount) {
|
||||||
FREE(slot->attachmentVertices);
|
FREE(slot->attachmentVertices);
|
||||||
slot->attachmentVertices = MALLOC(float, self->frameVerticesCount);
|
slot->attachmentVertices = MALLOC(float, self->frameVerticesCount);
|
||||||
slot->attachmentVerticesCapacity = self->frameVerticesCount;
|
slot->attachmentVerticesCapacity = self->frameVerticesCount;
|
||||||
}
|
}
|
||||||
slot->attachmentVerticesCount = self->frameVerticesCount;
|
|
||||||
}
|
}
|
||||||
|
slot->attachmentVerticesCount = self->frameVerticesCount;
|
||||||
|
|
||||||
if (time >= self->frames[self->framesCount - 1]) {
|
if (time >= self->frames[self->framesCount - 1]) {
|
||||||
/* Time is after last frame. */
|
/* Time is after last frame. */
|
||||||
|
|||||||
@ -580,7 +580,7 @@ namespace Spine {
|
|||||||
int vertexCount = frameVertices[0].Length;
|
int vertexCount = frameVertices[0].Length;
|
||||||
|
|
||||||
float[] vertices = slot.attachmentVertices;
|
float[] vertices = slot.attachmentVertices;
|
||||||
if (vertices.Length != vertexCount) alpha = 1;
|
if (vertices.Length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||||
if (vertices.Length < vertexCount) {
|
if (vertices.Length < vertexCount) {
|
||||||
vertices = new float[vertexCount];
|
vertices = new float[vertexCount];
|
||||||
slot.attachmentVertices = vertices;
|
slot.attachmentVertices = vertices;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user