make model count a define so it's easier to change in case you need memory

This commit is contained in:
someone2639 committed 2021-05-27 00:21:37 -04:00
1 parent 2da776c9c0
commit bd79934f00
5 files changed
+10 -7

No files matched your search

+3 -3
View File
@@ -379,7 +379,7 @@ static void level_cmd_load_model_from_dl(void) {
s16 layer = CMD_GET(u16, 0x8);
void *dl_ptr = CMD_GET(void *, 4);
if (model < ARRAY_COUNT(gLoadedGraphNodes)) {
if (model < ARRAY_COUNT(gGraphNodePointers)) {
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(gLoadedGraphNodes)) {
if (model < ARRAY_COUNT(gGraphNodePointers)) {
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(gLoadedGraphNodes)) {
if (model < ARRAY_COUNT(gGraphNodePointers)) {
// GraphNodeScale has a GraphNode at the top. This
// is being stored to the array, so cast the pointer.
gLoadedGraphNodes[model] =