From 98259a128d82f32fc5ba0d7ce6e5b45eb532d1ef Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 17 Jan 2022 21:30:30 +0100 Subject: Misc. doc/cleanup 4 (#1093) * Cleanup parameters passed to `Actor_SpawnFloorDustRing` * `10` -> `ARROW_NUT` for spawning EnArrow * Missing empty line after declaration * Introduce `ACTORCAT_MAX` * Minor cleanup * Run formatter * `sgiDrawIds` -> `giDrawIds` * `sDmaMgrDataExistError` -> `sDmaMgrIsRomCompressed` bool * Add Makefile dependencies to rebuild some files when editing actor, object and effect tables in `include/tables/` * Run formatter * Revert "Add Makefile dependencies to rebuild some files when editing actor, object and effect tables in `include/tables/`" This reverts commit c6b9a92139056f52aea908411d0264e41f116a4a. --- src/code/z_actor.c | 3 ++- src/code/z_play.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/code') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 0fbba750b..2d1e06c30 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, }; @@ -2762,6 +2762,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext* globalCtx, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params) { Actor* spawnedActor = Actor_Spawn(actorCtx, globalCtx, actorId, posX, posY, posZ, rotX, rotY, rotZ, params); + if (spawnedActor == NULL) { return NULL; } diff --git a/src/code/z_play.c b/src/code/z_play.c index 672eb0b14..daacbe019 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -208,7 +208,7 @@ void Gameplay_Init(GameState* thisx) { Audio_SetExtraFilter(0); Quake_Init(); - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(globalCtx->cameraPtrs); i++) { globalCtx->cameraPtrs[i] = NULL; } -- cgit v1.2.3