diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-01-17 21:30:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-17 21:30:30 +0100 |
| commit | 98259a128d82f32fc5ba0d7ce6e5b45eb532d1ef (patch) | |
| tree | c4293923df8cadd59ba52febdf83bf6586444af5 /src/code | |
| parent | 9b67778a000940e00609146f7510738527d54818 (diff) | |
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.
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 3 | ||||
| -rw-r--r-- | src/code/z_play.c | 2 |
2 files changed, 3 insertions, 2 deletions
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; } |
