summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2022-05-09 13:45:53 -0400
committerGitHub <noreply@github.com>2022-05-09 13:45:53 -0400
commit2efd00863a1a7ec7c56e6d03dcd8b60fc838ccf3 (patch)
treeb6207b7673efeb15e9d12e8d028a3054c7ebc86f /src/code/z_actor.c
parent95b431793182bd021cb4234255f90b996edd8d4d (diff)
Introduce DEFINE_ENTRANCE for entrance table and create entrance enum (#1213)
* entrance table OK * entrance enum fixed * most entrances using enum, still need to do conditionals * more entrances * entrance_table.h cleanups * some review * remove _0 from first entrance in a group of setups * change table description * typo * wens spellcheck in vscode * remove extra line
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 6da4ff122..44685c632 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -5550,7 +5550,8 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += arg4;
- if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
+ if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
+ (gSaveContext.entranceIndex == ENTR_SPOT04_0))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -5559,7 +5560,8 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
}
}
- if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
+ if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
+ (gSaveContext.entranceIndex == ENTR_SPOT04_0)) {
sp2C = globalCtx->view.eye;
} else {
sp2C = player->actor.focus.pos;
@@ -5579,7 +5581,8 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = arg4;
- if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
+ if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
+ (gSaveContext.entranceIndex == ENTR_SPOT04_0))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -5588,7 +5591,8 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
}
}
- if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
+ if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) &&
+ (gSaveContext.entranceIndex == ENTR_SPOT04_0)) {
sp24 = globalCtx->view.eye;
} else {
sp24 = player->actor.focus.pos;