diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2022-02-20 11:33:47 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-20 00:33:47 +0000 |
| commit | fa069535d0fe06966dec592c592b8a292aef0628 (patch) | |
| tree | edd3c247901bed09a2e35b48a827674ed4a295ea /src/code/z_snap.c | |
| parent | 71c0120fbd7191a6c543b547946573a347bad749 (diff) | |
Camera Preparation (#644)
* Copy progress from z_camera
* cleanup functions.h
* Oops
* Revert `SUB16` and `ADD16` back to original names
* PR Suggestions
* PR Suggestions
* Fix merge with master
Diffstat (limited to 'src/code/z_snap.c')
| -rw-r--r-- | src/code/z_snap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/code/z_snap.c b/src/code/z_snap.c index 639505aec..bce1f67d7 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -114,21 +114,19 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, s16 y; f32 distance; CollisionPoly* poly; - Camera* camera; + Camera* camera = GET_ACTIVE_CAM(globalCtx); Actor* actors[2]; s32 ret = 0; s32 bgId; - camera = GET_ACTIVE_CAM(globalCtx); - distance = OLib_Vec3fDist(pos, &camera->eye); if ((distance < distanceMin) || (distanceMax < distance)) { func_8013A41C(0x3F); ret = 0x3F; } - x = func_8013A504(func_800DFCB4(camera) + rot->x); - y = func_8013A504(func_800DFCDC(camera) - (s16)(rot->y - 0x7FFF)); + x = func_8013A504(Camera_GetCamDirPitch(camera) + rot->x); + y = func_8013A504(Camera_GetCamDirYaw(camera) - BINANG_SUB(rot->y, 0x7FFF)); if ((0 < angleError) && ((angleError < x) || (angleError < y))) { func_8013A41C(0x3E); ret |= 0x3E; |
