From 3aeadb42b8a195b3d2f67ce71fcd184ddf26d856 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Wed, 13 Oct 2021 03:27:29 +1100 Subject: Macros: `PLAYER` -> `GET_PLAYER(globalCtx)` and `ACTIVE_CAM` -> `GET_ACTIVE_CAM(globalCtx)` (#283) * PLAYER -> GET_PLAYER(globalCtx), ACTIVE_CAM -> GET_ACTIVE_CAM(globalCtx) * formatter * PR Suggestions * `FIRST_ENEMY` -> `GET_FIRST_ENEMY(globalCtx)` * Fix merge conflicts --- src/code/z_snap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/code/z_snap.c') diff --git a/src/code/z_snap.c b/src/code/z_snap.c index b6538a685..120861ff5 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -119,7 +119,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, s32 ret = 0; u32 unk2; - camera = ACTIVE_CAM; + camera = GET_ACTIVE_CAM(globalCtx); distance = OLib_Vec3fDist(pos, &camera->eye); if ((distance < distanceMin) || (distanceMax < distance)) { @@ -148,7 +148,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, } actors[0] = actor; - actors[1] = &PLAYER->actor; + actors[1] = &GET_PLAYER(globalCtx)->actor; if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colChkCtx, pos, &camera->eye, actors, 2) != 0) { func_8013A41C(0x3b); ret |= 0x3b; -- cgit v1.2.3