summaryrefslogtreecommitdiff
path: root/src/code/z_scene_table.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-02-21 10:35:53 +1100
committerGitHub <noreply@github.com>2022-02-20 18:35:53 -0500
commit85ce3d3ca4dfd8df696b5b67476f6c59481e35fd (patch)
tree64aa2f89e010bbaccd12e1433556a3c2d4a0859b /src/code/z_scene_table.c
parent267e20dd4c89cb9a813424990d54e1602dff5872 (diff)
Document Distortions from z_camera and z_view (#1102)
* Document Distortions * cleanup * cleanup hot-room comment * small swap * PR Review 1 * Missed a small thing * Add fishing case * PR Feedback * dirRot -> orientation * `UpdateWater` and `UpdateHotRoom`
Diffstat (limited to 'src/code/z_scene_table.c')
-rw-r--r--src/code/z_scene_table.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c
index da0505731..8aff9fcd2 100644
--- a/src/code/z_scene_table.c
+++ b/src/code/z_scene_table.c
@@ -2312,12 +2312,14 @@ void func_8009FE58(GlobalContext* globalCtx) {
D_8012A3A0 += 1820;
temp = 0.020000001f;
- func_800AA76C(&globalCtx->view, ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
- ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
- ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
- func_800AA78C(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
- 1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C)));
- func_800AA7AC(&globalCtx->view, 0.95f);
+ View_SetDistortionOrientation(&globalCtx->view,
+ ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
+ ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
+ ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
+ View_SetDistortionScale(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
+ 1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)),
+ 1.f + (1 * temp * Math_CosS(D_8012A39C)));
+ View_SetDistortionSpeed(&globalCtx->view, 0.95f);
switch (globalCtx->roomCtx.unk_74[0]) {
case 0: