Hull length is no longer nonessential.

This commit is contained in:
NathanSweet 2014-05-10 15:33:00 +02:00
parent 728cc12c3e
commit 496466a1cc
8 changed files with 9 additions and 9 deletions

View File

@ -46,6 +46,7 @@ struct spMeshAttachment {
int verticesCount;
float* vertices;
int hullLength;
int uvsCount;
float* regionUVs;
@ -64,7 +65,6 @@ struct spMeshAttachment {
int/*bool*/regionRotate;
/* Nonessential. */
int hullLength;
int edgesCount;
int* edges;
float width, height;

View File

@ -55,6 +55,7 @@ struct spSkinnedMeshAttachment {
int uvsCount;
float* regionUVs;
float* uvs;
int hullLength;
float r, g, b, a;
@ -66,7 +67,6 @@ struct spSkinnedMeshAttachment {
int/*bool*/regionRotate;
/* Nonessential. */
int hullLength;
int edgesCount;
int* edges;
float width, height;

View File

@ -38,6 +38,7 @@ namespace Spine {
internal float regionOffsetX, regionOffsetY, regionWidth, regionHeight, regionOriginalWidth, regionOriginalHeight;
internal float r = 1, g = 1, b = 1, a = 1;
public int HullLength { get; set; }
public float[] Vertices { get { return vertices; } set { vertices = value; } }
public float[] RegionUVs { get { return regionUVs; } set { regionUVs = value; } }
public float[] UVs { get { return uvs; } set { uvs = value; } }
@ -63,7 +64,6 @@ namespace Spine {
public float RegionOriginalHeight { get { return regionOriginalHeight; } set { regionOriginalHeight = value; } } // Unrotated, unstripped size.
// Nonessential.
public int HullLength { get; set; }
public int[] Edges { get; set; }
public float Width { get; set; }
public float Height { get; set; }

View File

@ -40,6 +40,7 @@ namespace Spine {
internal float regionOffsetX, regionOffsetY, regionWidth, regionHeight, regionOriginalWidth, regionOriginalHeight;
internal float r = 1, g = 1, b = 1, a = 1;
public int HullLength { get; set; }
public int[] Bones { get { return bones; } set { bones = value; } }
public float[] Weights { get { return weights; } set { weights = value; } }
public float[] RegionUVs { get { return regionUVs; } set { regionUVs = value; } }
@ -66,7 +67,6 @@ namespace Spine {
public float RegionOriginalHeight { get { return regionOriginalHeight; } set { regionOriginalHeight = value; } } // Unrotated, unstripped size.
// Nonessential.
public int HullLength { get; set; }
public int[] Edges { get; set; }
public float Width { get; set; }
public float Height { get; set; }

View File

@ -234,9 +234,9 @@ public class SkeletonBinary {
mesh.setRegionUVs(uvs);
mesh.updateUVs();
Color.rgba8888ToColor(mesh.getColor(), input.readInt());
mesh.setHullLength(input.readInt(true) * 2);
if (nonessential) {
mesh.setEdges(readIntArray(input));
mesh.setHullLength(input.readInt(true) * 2);
mesh.setWidth(input.readFloat() * scale);
mesh.setHeight(input.readFloat() * scale);
}
@ -270,9 +270,9 @@ public class SkeletonBinary {
mesh.setRegionUVs(uvs);
mesh.updateUVs();
Color.rgba8888ToColor(mesh.getColor(), input.readInt());
mesh.setHullLength(input.readInt(true) * 2);
if (nonessential) {
mesh.setEdges(readIntArray(input));
mesh.setHullLength(input.readInt(true) * 2);
mesh.setWidth(input.readFloat() * scale);
mesh.setHeight(input.readFloat() * scale);
}

View File

@ -43,6 +43,6 @@ abstract public class Attachment {
}
public String toString () {
return name;
return getName();
}
}

View File

@ -48,9 +48,9 @@ public class MeshAttachment extends Attachment {
private short[] triangles;
private float[] worldVertices;
private final Color color = new Color(1, 1, 1, 1);
private int hullLength;
// Nonessential.
private int hullLength;
private int[] edges;
private float width, height;

View File

@ -49,11 +49,11 @@ public class SkinnedMeshAttachment extends Attachment {
private short[] triangles;
private float[] worldVertices;
private final Color color = new Color(1, 1, 1, 1);
private int hullLength;
// Nonessential.
private int[] edges;
private float width, height;
private int hullLength;
public SkinnedMeshAttachment (String name) {
super(name);