From a2260d9e4f95f3d0d97c878283a6e4e578b451f7 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 31 Oct 2022 14:59:13 -0400 Subject: [PATCH] Match CGameOptions::SetScreenBrightness Former-commit-id: 4fc17cf0f5e36df3fa4be5f5210c56842d0089e5 --- include/MetroidPrime/Player/CGameOptions.hpp | 5 ++--- src/MetroidPrime/Player/CGameOptions.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/MetroidPrime/Player/CGameOptions.hpp b/include/MetroidPrime/Player/CGameOptions.hpp index 03644059..b07778ad 100644 --- a/include/MetroidPrime/Player/CGameOptions.hpp +++ b/include/MetroidPrime/Player/CGameOptions.hpp @@ -7,11 +7,10 @@ #include "rstl/reserved_vector.hpp" #include "rstl/vector.hpp" -#include "Kyoto/SObjectTag.hpp" #include "Kyoto/Audio/CAudioSys.hpp" +#include "Kyoto/SObjectTag.hpp" #include "MetroidPrime/TGameTypes.hpp" - class CInputStream; class CMemoryStreamOut; @@ -62,7 +61,7 @@ private: bool x68_24_hudLag : 1; bool x68_25_invertY : 1; bool x68_26_rumble : 1; - uchar x68_27_swapBeamsControls : 1; + bool x68_27_swapBeamsControls : 1; bool x68_28_hintSystem : 1; rstl::vector< rstl::pair< CAssetId, CAssetId > > x6c_controlTxtrMap; }; diff --git a/src/MetroidPrime/Player/CGameOptions.cpp b/src/MetroidPrime/Player/CGameOptions.cpp index a9f63aba..8076b17f 100644 --- a/src/MetroidPrime/Player/CGameOptions.cpp +++ b/src/MetroidPrime/Player/CGameOptions.cpp @@ -125,7 +125,6 @@ void CGameOptions::PutTo(CMemoryStreamOut& out) { WriteValue(out, x5c_musicVol, 0x7f); WriteValue(out, x60_hudAlpha, 0xff); WriteValue(out, x64_helmetAlpha, 0xff); - out.WriteBits(x68_24_hudLag != false, 1); out.WriteBits(x68_28_hintSystem != false, 1); @@ -178,7 +177,7 @@ void CGameOptions::SetScreenBrightness(int value, bool apply) { float CGameOptions::TuneScreenBrightness() { float f = x48_screenBrightness - 4; - return f * 0.25f * 0.375f + 1.f; + return f / 4.f * 0.375f + 1.f; } void CGameOptions::SetScreenPositionX(int position, bool apply) {