Эх сурвалжийг харах

[c] Fix compilation errors due to new type hierarchy.

Mario Zechner 3 жил өмнө
parent
commit
5a541597cc

+ 2 - 3
spine-c/spine-c/src/spine/SkeletonBinary.c

@@ -1418,9 +1418,8 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const
 			_spSkeletonBinary_setError(self, "Parent mesh not found: ", linkedMesh->parent);
 			return NULL;
 		}
-		linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? SUB_CAST(spVertexAttachment, parent)
-																			   : SUB_CAST(spVertexAttachment,
-																						linkedMesh->mesh);
+		linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? parent
+																			   : SUPER(SUPER(linkedMesh->mesh));
 		spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent));
 		spMeshAttachment_updateRegion(linkedMesh->mesh);
 		spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh)));

+ 2 - 3
spine-c/spine-c/src/spine/SkeletonJson.c

@@ -1514,9 +1514,8 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
 			_spSkeletonJson_setError(self, 0, "Parent mesh not found: ", linkedMesh->parent);
 			return NULL;
 		}
-		linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? SUB_CAST(spVertexAttachment, parent)
-																			   : SUB_CAST(spVertexAttachment,
-																						linkedMesh->mesh);
+		linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? parent
+																			   : SUPER(SUPER(linkedMesh->mesh));
 		spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent));
 		spMeshAttachment_updateRegion(linkedMesh->mesh);
 		spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh)));

+ 1 - 1
spine-c/spine-c/src/spine/VertexAttachment.c

@@ -35,7 +35,7 @@ static int nextID = 0;
 
 void _spVertexAttachment_init(spVertexAttachment *attachment) {
 	attachment->id = nextID++;
-	attachment->timelineAttachment = attachment;
+	attachment->timelineAttachment = SUPER(attachment);
 }
 
 void _spVertexAttachment_deinit(spVertexAttachment *attachment) {