Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

NathanSweet 9 gadi atpakaļ
vecāks
revīzija
9f15d1be4a

+ 6 - 2
spine-csharp/src/Attachments/VertexAttachment.cs

@@ -81,7 +81,9 @@ namespace Spine {
 			if (deformArray.Count == 0) {
 			if (deformArray.Count == 0) {
 				for (int w = offset, b = skip * 3; w < count; w += 2) {
 				for (int w = offset, b = skip * 3; w < count; w += 2) {
 					float wx = x, wy = y;
 					float wx = x, wy = y;
-					for (int n = bones[v++] + v; v < n; v++, b += 3) {
+					int n = bones[v++];
+					n += v;
+					for (; v < n; v++, b += 3) {
 						Bone bone = skeletonBones[bones[v]];
 						Bone bone = skeletonBones[bones[v]];
 						float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];
 						float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];
 						wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;
 						wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;
@@ -94,7 +96,9 @@ namespace Spine {
 				float[] deform = deformArray.Items;
 				float[] deform = deformArray.Items;
 				for (int w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {
 				for (int w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {
 					float wx = x, wy = y;
 					float wx = x, wy = y;
-					for (int n = bones[v++] + v; v < n; v++, b += 3, f += 2) {
+					int n = bones[v++];
+					n += v;
+					for (; v < n; v++, b += 3, f += 2) {
 						Bone bone = skeletonBones[bones[v]];
 						Bone bone = skeletonBones[bones[v]];
 						float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];
 						float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];
 						wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;
 						wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;

+ 1 - 1
spine-csharp/src/SkeletonJson.cs

@@ -450,7 +450,7 @@ namespace Spine {
 								frameIndex++;
 								frameIndex++;
 							}
 							}
 							timelines.Add(timeline);
 							timelines.Add(timeline);
-							duration = Math.Max(duration, timeline.frames[timeline.FrameCount -1] * ColorTimeline.ENTRIES);
+							duration = Math.Max(duration, timeline.frames[(timeline.FrameCount -1) * ColorTimeline.ENTRIES];
 
 
 						} else if (timelineName == "attachment") {
 						} else if (timelineName == "attachment") {
 							var timeline = new AttachmentTimeline(values.Count);
 							var timeline = new AttachmentTimeline(values.Count);

+ 6 - 2
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java

@@ -85,7 +85,9 @@ public class VertexAttachment extends Attachment {
 		if (deformArray.size == 0) {
 		if (deformArray.size == 0) {
 			for (int w = offset, b = skip * 3; w < count; w += 2) {
 			for (int w = offset, b = skip * 3; w < count; w += 2) {
 				float wx = x, wy = y;
 				float wx = x, wy = y;
-				for (int n = bones[v++] + v; v < n; v++, b += 3) {
+				int n = bones[v++];
+				n += v;
+				for (; v < n; v++, b += 3) {
 					Bone bone = (Bone)skeletonBones[bones[v]];
 					Bone bone = (Bone)skeletonBones[bones[v]];
 					float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];
 					float vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];
 					wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;
 					wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;
@@ -98,7 +100,9 @@ public class VertexAttachment extends Attachment {
 			float[] deform = deformArray.items;
 			float[] deform = deformArray.items;
 			for (int w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {
 			for (int w = offset, b = skip * 3, f = skip << 1; w < count; w += 2) {
 				float wx = x, wy = y;
 				float wx = x, wy = y;
-				for (int n = bones[v++] + v; v < n; v++, b += 3, f += 2) {
+				int n = bones[v++];
+				n += v;
+				for (; v < n; v++, b += 3, f += 2) {
 					Bone bone = (Bone)skeletonBones[bones[v]];
 					Bone bone = (Bone)skeletonBones[bones[v]];
 					float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];
 					float vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];
 					wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;
 					wx += (vx * bone.getA() + vy * bone.getB() + bone.getWorldX()) * weight;