From 6beb1dfa9ee9790a5dbe51165b39f1f6ae62c2ef Mon Sep 17 00:00:00 2001 From: someone2639 Date: Thu, 27 May 2021 01:21:05 -0400 Subject: [PATCH] made the level script code more clear in what it was comparing --- src/engine/level_script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/level_script.c b/src/engine/level_script.c index cb8598ba..24c83bb0 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -379,7 +379,7 @@ static void level_cmd_load_model_from_dl(void) { s16 layer = CMD_GET(u32, 0x8); void *dl_ptr = CMD_GET(void *, 4); - if (model < ARRAY_COUNT(gGraphNodePointers)) { + if (model < MODEL_ID_COUNT) { gLoadedGraphNodes[model] = (struct GraphNode *) init_graph_node_display_list(sLevelPool, 0, layer, dl_ptr); } @@ -391,7 +391,7 @@ static void level_cmd_load_model_from_geo(void) { ModelID model = CMD_GET(ModelID, 8); void *geo = CMD_GET(void *, 4); - if (model < ARRAY_COUNT(gGraphNodePointers)) { + if (model < MODEL_ID_COUNT) { gLoadedGraphNodes[model] = process_geo_layout(sLevelPool, geo); } @@ -410,7 +410,7 @@ static void level_cmd_23(void) { // load an f32, but using an integer load instruction for some reason (hence the union) arg2.i = CMD_GET(s32, 8); - if (model < ARRAY_COUNT(gGraphNodePointers)) { + if (model < MODEL_ID_COUNT) { // GraphNodeScale has a GraphNode at the top. This // is being stored to the array, so cast the pointer. gLoadedGraphNodes[model] =