From 55dfe128bc81295dd0dcfa285130739faeeb036c Mon Sep 17 00:00:00 2001 From: Reonu Date: Fri, 2 Jul 2021 21:26:34 +0100 Subject: [PATCH] made far into a u16 --- src/engine/geo_layout.c | 2 +- src/engine/graph_node.c | 2 +- src/engine/graph_node.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/geo_layout.c b/src/engine/geo_layout.c index d071d1a6..0e3103b1 100644 --- a/src/engine/geo_layout.c +++ b/src/engine/geo_layout.c @@ -258,7 +258,7 @@ void geo_layout_cmd_node_perspective(void) { GraphNodeFunc frustumFunc = NULL; s16 fov = cur_geo_cmd_s16(0x02); s16 near = cur_geo_cmd_s16(0x04); - s16 far = cur_geo_cmd_s16(0x06); + u16 far = cur_geo_cmd_s16(0x06); if (cur_geo_cmd_u8(0x01) != 0) { // optional asm function diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index 8edf7f8f..e22ddcd0 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -79,7 +79,7 @@ init_graph_node_ortho_projection(struct AllocOnlyPool *pool, struct GraphNodeOrt */ struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *pool, struct GraphNodePerspective *graphNode, - f32 fov, s16 near, s16 far, + f32 fov, s16 near, u16 far, GraphNodeFunc nodeFunc, s32 unused) { if (pool != NULL) { graphNode = alloc_only_pool_alloc(pool, sizeof(struct GraphNodePerspective)); diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index e20064c3..c8d48f89 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -108,7 +108,7 @@ struct GraphNodePerspective /*0x18*/ s32 unused; /*0x1C*/ f32 fov; // horizontal field of view in degrees /*0x20*/ s16 near; // near clipping plane - /*0x22*/ s16 far; // far clipping plane + /*0x22*/ u16 far; // far clipping plane }; /** An entry in the master list. It is a linked list of display lists @@ -368,7 +368,7 @@ struct GraphNodeRoot *init_graph_node_root(struct AllocOnlyPool *pool, struct Gr s16 areaIndex, s16 x, s16 y, s16 width, s16 height); struct GraphNodeOrthoProjection *init_graph_node_ortho_projection(struct AllocOnlyPool *pool, struct GraphNodeOrthoProjection *graphNode, f32 scale); struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *pool, struct GraphNodePerspective *graphNode, - f32 fov, s16 near, s16 far, GraphNodeFunc nodeFunc, s32 unused); + f32 fov, s16 near, u16 far, GraphNodeFunc nodeFunc, s32 unused); struct GraphNodeStart *init_graph_node_start(struct AllocOnlyPool *pool, struct GraphNodeStart *graphNode); struct GraphNodeMasterList *init_graph_node_master_list(struct AllocOnlyPool *pool, struct GraphNodeMasterList *graphNode, s16 on); struct GraphNodeLevelOfDetail *init_graph_node_render_range(struct AllocOnlyPool *pool, struct GraphNodeLevelOfDetail *graphNode,