From 419473b77e37b84c268bb1cf6b570ad9041b986f Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 13 Dec 2021 22:46:07 +0100 Subject: [PATCH] Introduce `ACTORCAT_MAX` --- include/z64.h | 2 +- include/z64actor.h | 3 ++- src/code/z_actor.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/z64.h b/include/z64.h index 49d97ff98c..709351cb10 100644 --- a/include/z64.h +++ b/include/z64.h @@ -245,7 +245,7 @@ typedef struct { /* 0x0004 */ char unk_04[0x04]; /* 0x0008 */ u8 total; // total number of actors loaded /* 0x0009 */ char unk_09[0x03]; - /* 0x000C */ ActorListEntry actorLists[12]; + /* 0x000C */ ActorListEntry actorLists[ACTORCAT_MAX]; /* 0x006C */ TargetContext targetCtx; struct { /* 0x0104 */ u32 swch; diff --git a/include/z64actor.h b/include/z64actor.h index fe0ffe20f0..f79791f10a 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -334,7 +334,8 @@ typedef enum { /* 0x08 */ ACTORCAT_MISC, /* 0x09 */ ACTORCAT_BOSS, /* 0x0A */ ACTORCAT_DOOR, - /* 0x0B */ ACTORCAT_CHEST + /* 0x0B */ ACTORCAT_CHEST, + /* 0x0C */ ACTORCAT_MAX } ActorCategory; #define DEFINE_ACTOR(_0, enum, _2) enum, diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4f23e2c789..9f675c1d77 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1982,7 +1982,7 @@ void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry* func_8002FA60(globalCtx); } -u32 D_80116068[] = { +u32 D_80116068[ACTORCAT_MAX] = { 0x100000C0, 0x100000C0, 0x00000000, 0x100004C0, 0x00000080, 0x300000C0, 0x10000080, 0x00000000, 0x300000C0, 0x100004C0, 0x00000000, 0x100000C0, };