From bda5b83346773bdf2111c890f58feb37dee75b28 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sun, 10 Jan 2021 04:04:36 -0500 Subject: MacOS ZAPD fixes (#606) * Adding -Wno-return-type to GCC check for MacOS * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0325ec161" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0325ec161" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "605f6972e" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "605f6972e" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "6e6ad445a" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "6e6ad445a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Rewrote func to avoid returns without values --- src/code/z_camera.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/code') diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 3b0a98d3c..4f56fdf80 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7160,26 +7160,24 @@ s32 Camera_CheckWater(Camera* camera) { if (camera->unk_150 > 0) { camera->unk_150--; camera->unk_152 |= 8; - return; } else if (camera->globalCtx->sceneNum == 0x49) { camera->unk_152 |= 0x10; - return; } else { camera->unk_152 |= 2; - return; } - } - if (camera->unk_14C & 0x100) { - camera->unk_14C &= ~0x100; - osSyncPrintf("kankyo changed water off, sound off\n"); - func_800706A0(camera->globalCtx); - if (*quakeId != 0) { - Quake_RemoveFromIdx(*quakeId); + } else { + if (camera->unk_14C & 0x100) { + camera->unk_14C &= ~0x100; + osSyncPrintf("kankyo changed water off, sound off\n"); + func_800706A0(camera->globalCtx); + if (*quakeId != 0) { + Quake_RemoveFromIdx(*quakeId); + } + camera->unk_150 = 0; + camera->unk_152 = 0; } - camera->unk_150 = 0; - camera->unk_152 = 0; + func_800F6828(0); } - func_800F6828(0); // @BUG: doesn't always return a value, but sometimes does. } -- cgit v1.2.3