From 886d95173698549692913ffd489e77b54a3da4be Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 11 Apr 2020 14:32:43 -0400 Subject: [PATCH] CCameraShakeData: Make use of boolean literals where applicable in LoadCameraShakeData Same behavior, minus the implicit conversions to bool. --- Runtime/Camera/CCameraShakeData.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Runtime/Camera/CCameraShakeData.cpp b/Runtime/Camera/CCameraShakeData.cpp index 6de888378..490b3c9de 100644 --- a/Runtime/Camera/CCameraShakeData.cpp +++ b/Runtime/Camera/CCameraShakeData.cpp @@ -100,24 +100,24 @@ float CCameraShakeData::GetMaxFMComponent() const { } CCameraShakeData CCameraShakeData::LoadCameraShakeData(CInputStream& in) { - float xMag = in.readFloatBig(); + const float xMag = in.readFloatBig(); in.readFloatBig(); - float yMag = in.readFloatBig(); + const float yMag = in.readFloatBig(); in.readFloatBig(); - float zMag = in.readFloatBig(); + const float zMag = in.readFloatBig(); in.readFloatBig(); - float duration = in.readFloatBig(); + const float duration = in.readFloatBig(); - SCameraShakePoint xAM(0, 0.f, 0.f, duration, 2.f * xMag); - SCameraShakePoint yAM(0, 0.f, 0.f, duration, 2.f * yMag); - SCameraShakePoint zAM(0, 0.f, 0.f, duration, 2.f * zMag); - SCameraShakePoint xFM(0, 0.f, 0.f, 0.5f * duration, 3.f); - SCameraShakePoint yFM(0, 0.f, 0.f, 0.5f * duration, 0.f); - SCameraShakePoint zFM(0, 0.f, 0.f, 0.5f * duration, 3.f); + const SCameraShakePoint xAM(false, 0.f, 0.f, duration, 2.f * xMag); + const SCameraShakePoint yAM(false, 0.f, 0.f, duration, 2.f * yMag); + const SCameraShakePoint zAM(false, 0.f, 0.f, duration, 2.f * zMag); + const SCameraShakePoint xFM(false, 0.f, 0.f, 0.5f * duration, 3.f); + const SCameraShakePoint yFM(false, 0.f, 0.f, 0.5f * duration, 0.f); + const SCameraShakePoint zFM(false, 0.f, 0.f, 0.5f * duration, 3.f); - CCameraShakerComponent shakerX(1, xAM, xFM); - CCameraShakerComponent shakerY; - CCameraShakerComponent shakerZ(1, zAM, zFM); + const CCameraShakerComponent shakerX(true, xAM, xFM); + const CCameraShakerComponent shakerY; + const CCameraShakerComponent shakerZ(true, zAM, zFM); return {duration, 100.f, 0, zeus::skZero3f, shakerX, shakerY, shakerZ}; }