Geo bones

This commit is contained in:
Fazana committed 2021-09-20 16:40:02 +01:00
1 parent 7c4eaf8002
commit a648505f6b
6 files changed
+154 -1

No files matched your search

+22
View File
@@ -365,6 +365,28 @@ struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool
return graphNode;
}
/**
* Allocates and returns a newly created bone node with initial rotation/translation
*/
struct GraphNodeBone *init_graph_node_bone(struct AllocOnlyPool *pool,
struct GraphNodeBone *graphNode,
s32 drawingLayer, void *displayList,
Vec3s translation, Vec3s rotation) {
if (pool != NULL) {
graphNode = alloc_only_pool_alloc(pool, sizeof(struct GraphNodeBone));
}
if (graphNode != NULL) {
init_scene_graph_node_links(&graphNode->node, GRAPH_NODE_TYPE_BONE);
vec3s_copy(graphNode->translation, translation);
vec3s_copy(graphNode->rotation, rotation);
graphNode->node.flags = (drawingLayer << 8) | (graphNode->node.flags & 0xFF);
graphNode->displayList = displayList;
}
return graphNode;
}
/**
* Allocates and returns a newly created billboard node
*/