reverted geo bone (#474)
This commit is contained in:
1 parent
d5019ffd78
commit
c09f178df0
6 files changed
+3
-131
No files matched your search
@@ -42,7 +42,6 @@ GeoLayoutCommandProc GeoLayoutJumpTable[] = {
|
||||
/*GEO_CMD_NOP_1E */ geo_layout_cmd_nop2,
|
||||
/*GEO_CMD_NOP_1F */ geo_layout_cmd_nop3,
|
||||
/*GEO_CMD_NODE_CULLING_RADIUS */ geo_layout_cmd_node_culling_radius,
|
||||
/*GEO_CMD_NODE_BONE */ geo_layout_cmd_bone,
|
||||
};
|
||||
|
||||
struct GraphNode gObjParentGraphNode;
|
||||
@@ -751,30 +750,6 @@ void geo_layout_cmd_node_culling_radius(void) {
|
||||
gGeoLayoutCommand += 0x04 << CMD_SIZE_SHIFT;
|
||||
}
|
||||
|
||||
/*
|
||||
Create a scene graph node that is rotated by the object's animation + an initial rotation.
|
||||
*/
|
||||
void geo_layout_cmd_bone(void) {
|
||||
struct GraphNodeBone *graphNode;
|
||||
Vec3s translation;
|
||||
Vec3s rotation;
|
||||
s32 drawingLayer = cur_geo_cmd_u8(0x01);
|
||||
void *displayList;
|
||||
s16 *cmdPos = (s16 *) gGeoLayoutCommand;
|
||||
|
||||
cmdPos = read_vec3s(translation, &cmdPos[2]);
|
||||
cmdPos = read_vec3s(rotation, &cmdPos[0]);
|
||||
displayList = *(void **) &cmdPos[0];
|
||||
cmdPos += 2 << CMD_SIZE_SHIFT;
|
||||
|
||||
graphNode =
|
||||
init_graph_node_bone(gGraphNodePool, NULL, drawingLayer, displayList, translation, rotation);
|
||||
|
||||
register_scene_graph_node(&graphNode->node);
|
||||
|
||||
gGeoLayoutCommand = (u8 *) cmdPos;
|
||||
}
|
||||
|
||||
struct GraphNode *process_geo_layout(struct AllocOnlyPool *pool, void *segptr) {
|
||||
// set by register_scene_graph_node when gCurGraphNodeIndex is 0
|
||||
// and gCurRootGraphNode is NULL
|
||||
|
||||
@@ -82,7 +82,6 @@ void geo_layout_cmd_nop(void);
|
||||
void geo_layout_cmd_copy_view(void);
|
||||
void geo_layout_cmd_node_held_obj(void);
|
||||
void geo_layout_cmd_node_culling_radius(void);
|
||||
void geo_layout_cmd_bone(void);
|
||||
|
||||
struct GraphNode *process_geo_layout(struct AllocOnlyPool *pool, void *segptr);
|
||||
|
||||
|
||||
@@ -356,28 +356,6 @@ 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);
|
||||
SET_GRAPH_NODE_LAYER(graphNode->node.flags, drawingLayer);
|
||||
graphNode->displayList = displayList;
|
||||
}
|
||||
|
||||
return graphNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates and returns a newly created billboard node
|
||||
*/
|
||||
|
||||
+3
-13
@@ -64,7 +64,6 @@ enum GraphNodeTypes {
|
||||
GRAPH_NODE_TYPE_ROTATION,
|
||||
GRAPH_NODE_TYPE_OBJECT,
|
||||
GRAPH_NODE_TYPE_ANIMATED_PART,
|
||||
GRAPH_NODE_TYPE_BONE,
|
||||
GRAPH_NODE_TYPE_BILLBOARD,
|
||||
GRAPH_NODE_TYPE_DISPLAY_LIST,
|
||||
GRAPH_NODE_TYPE_SCALE,
|
||||
@@ -96,10 +95,9 @@ enum GraphNodeTypes {
|
||||
GRAPH_NODE_TYPE_ROTATION = 0x17,
|
||||
GRAPH_NODE_TYPE_OBJECT = 0x18,
|
||||
GRAPH_NODE_TYPE_ANIMATED_PART = 0x19,
|
||||
GRAPH_NODE_TYPE_BONE = 0x1A,
|
||||
GRAPH_NODE_TYPE_BILLBOARD = 0x1B,
|
||||
GRAPH_NODE_TYPE_DISPLAY_LIST = 0x1C,
|
||||
GRAPH_NODE_TYPE_SCALE = 0x1D,
|
||||
GRAPH_NODE_TYPE_BILLBOARD = 0x1A,
|
||||
GRAPH_NODE_TYPE_DISPLAY_LIST = 0x1B,
|
||||
GRAPH_NODE_TYPE_SCALE = 0x1C,
|
||||
GRAPH_NODE_TYPE_SHADOW = 0x28,
|
||||
GRAPH_NODE_TYPE_OBJECT_PARENT = 0x29,
|
||||
GRAPH_NODE_TYPE_GENERATED_LIST = (0x2A | GRAPH_NODE_TYPE_FUNCTIONAL),
|
||||
@@ -293,13 +291,6 @@ struct GraphNodeAnimatedPart {
|
||||
/*0x18*/ Vec3s translation;
|
||||
};
|
||||
|
||||
struct GraphNodeBone {
|
||||
struct GraphNode node;
|
||||
void *displayList;
|
||||
Vec3s translation;
|
||||
Vec3s rotation;
|
||||
};
|
||||
|
||||
/** A GraphNode that draws a display list rotated in a way to always face the
|
||||
* camera. Note that if the entire object is a billboard (like a coin or 1-up)
|
||||
* then it simply sets the billboard flag for the entire object, this node is
|
||||
@@ -424,7 +415,6 @@ struct GraphNodeScale *init_graph_node_scale (struct
|
||||
struct GraphNodeObject *init_graph_node_object (struct AllocOnlyPool *pool, struct GraphNodeObject *graphNode, struct GraphNode *sharedChild, Vec3f pos, Vec3s angle, Vec3f scale);
|
||||
struct GraphNodeCullingRadius *init_graph_node_culling_radius (struct AllocOnlyPool *pool, struct GraphNodeCullingRadius *graphNode, s16 radius);
|
||||
struct GraphNodeAnimatedPart *init_graph_node_animated_part (struct AllocOnlyPool *pool, struct GraphNodeAnimatedPart *graphNode, s32 drawingLayer, void *displayList, Vec3s translation);
|
||||
struct GraphNodeBone *init_graph_node_bone (struct AllocOnlyPool *pool, struct GraphNodeBone *graphNode, s32 drawingLayer, void *displayList, Vec3s translation, Vec3s rotation);
|
||||
struct GraphNodeBillboard *init_graph_node_billboard (struct AllocOnlyPool *pool, struct GraphNodeBillboard *graphNode, s32 drawingLayer, void *displayList, Vec3s translation);
|
||||
struct GraphNodeDisplayList *init_graph_node_display_list (struct AllocOnlyPool *pool, struct GraphNodeDisplayList *graphNode, s32 drawingLayer, void *displayList);
|
||||
struct GraphNodeShadow *init_graph_node_shadow (struct AllocOnlyPool *pool, struct GraphNodeShadow *graphNode, s16 shadowScale, u8 shadowSolidity, u8 shadowType);
|
||||
|
||||
Reference in new issue
Block a user