mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
CGameOptions: Give all function prototype parameters a name
Makes the interface more self-documenting and also allows better IDE introspection.
This commit is contained in:
@@ -271,11 +271,14 @@ float CGameOptions::TuneScreenBrightness() const { return (0.375f * 1.f) + (floa
|
||||
void CGameOptions::InitSoundMode() { /* If system is mono, force x44 to mono, otherwise honor user preference */
|
||||
}
|
||||
static float BrightnessCopyFilter = 0.f;
|
||||
void CGameOptions::SetScreenBrightness(s32 val, bool apply) {
|
||||
x48_screenBrightness = zeus::clamp(0, val, 8);
|
||||
void CGameOptions::SetScreenBrightness(s32 value, bool apply) {
|
||||
x48_screenBrightness = zeus::clamp(0, value, 8);
|
||||
|
||||
if (apply)
|
||||
BrightnessCopyFilter = TuneScreenBrightness();
|
||||
if (!apply) {
|
||||
return;
|
||||
}
|
||||
|
||||
BrightnessCopyFilter = TuneScreenBrightness();
|
||||
}
|
||||
|
||||
void CGameOptions::ApplyGamma() {
|
||||
@@ -287,51 +290,60 @@ void CGameOptions::ApplyGamma() {
|
||||
CGraphics::g_BooFactory->setDisplayGamma(gammaT);
|
||||
}
|
||||
|
||||
void CGameOptions::SetGamma(s32 val, bool apply) {
|
||||
m_gamma = zeus::clamp(-100, val, 100);
|
||||
void CGameOptions::SetGamma(s32 value, bool apply) {
|
||||
m_gamma = zeus::clamp(-100, value, 100);
|
||||
|
||||
if (apply)
|
||||
ApplyGamma();
|
||||
if (!apply) {
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyGamma();
|
||||
}
|
||||
|
||||
void CGameOptions::SetScreenPositionX(s32 pos, bool apply) {
|
||||
x4c_screenXOffset = zeus::clamp(-30, pos, 30);
|
||||
void CGameOptions::SetScreenPositionX(s32 position, bool apply) {
|
||||
x4c_screenXOffset = zeus::clamp(-30, position, 30);
|
||||
|
||||
if (apply) {
|
||||
/* TOOD: CGraphics related funcs */
|
||||
}
|
||||
}
|
||||
|
||||
void CGameOptions::SetScreenPositionY(s32 pos, bool apply) {
|
||||
x50_screenYOffset = zeus::clamp(-30, pos, 30);
|
||||
void CGameOptions::SetScreenPositionY(s32 position, bool apply) {
|
||||
x50_screenYOffset = zeus::clamp(-30, position, 30);
|
||||
|
||||
if (apply) {
|
||||
/* TOOD: CGraphics related funcs */
|
||||
}
|
||||
}
|
||||
|
||||
void CGameOptions::SetScreenStretch(s32 st, bool apply) {
|
||||
x54_screenStretch = zeus::clamp(-10, st, 10);
|
||||
void CGameOptions::SetScreenStretch(s32 stretch, bool apply) {
|
||||
x54_screenStretch = zeus::clamp(-10, stretch, 10);
|
||||
|
||||
if (apply) {
|
||||
/* TOOD: CGraphics related funcs */
|
||||
}
|
||||
}
|
||||
|
||||
void CGameOptions::SetSfxVolume(s32 vol, bool apply) {
|
||||
x58_sfxVol = zeus::clamp(0, vol, 0x7f);
|
||||
void CGameOptions::SetSfxVolume(s32 volume, bool apply) {
|
||||
x58_sfxVol = zeus::clamp(0, volume, 0x7f);
|
||||
|
||||
if (apply) {
|
||||
CAudioSys::SysSetSfxVolume(x58_sfxVol, 1, true, true);
|
||||
CStreamAudioManager::SetSfxVolume(x58_sfxVol);
|
||||
CMoviePlayer::SetSfxVolume(x58_sfxVol);
|
||||
if (!apply) {
|
||||
return;
|
||||
}
|
||||
|
||||
CAudioSys::SysSetSfxVolume(x58_sfxVol, 1, true, true);
|
||||
CStreamAudioManager::SetSfxVolume(x58_sfxVol);
|
||||
CMoviePlayer::SetSfxVolume(x58_sfxVol);
|
||||
}
|
||||
|
||||
void CGameOptions::SetMusicVolume(s32 vol, bool apply) {
|
||||
x5c_musicVol = zeus::clamp(0, vol, 0x7f);
|
||||
if (apply)
|
||||
CStreamAudioManager::SetMusicVolume(x5c_musicVol);
|
||||
void CGameOptions::SetMusicVolume(s32 volume, bool apply) {
|
||||
x5c_musicVol = zeus::clamp(0, volume, 0x7f);
|
||||
|
||||
if (!apply) {
|
||||
return;
|
||||
}
|
||||
|
||||
CStreamAudioManager::SetMusicVolume(x5c_musicVol);
|
||||
}
|
||||
|
||||
void CGameOptions::SetHUDAlpha(u32 alpha) { x60_hudAlpha = alpha; }
|
||||
|
||||
Reference in New Issue
Block a user