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

This commit is contained in:
Mario Zechner 2022-01-12 09:05:34 +01:00
parent 4a01ee2333
commit 5a541597cc
3 changed files with 5 additions and 7 deletions

View File

@ -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)));

View File

@ -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)));

View File

@ -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) {