Skip to content

Commit

Permalink
Various Options and Launcher fixes (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
mercury501 authored Aug 23, 2024
1 parent 0d90f0d commit 9e409fb
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 35 deletions.
3 changes: 0 additions & 3 deletions Common/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,6 @@ void UpdateConfigDefaults()
// Set Input Tweaks default
EnableInputTweaks = (EnableToggleSprint || EnableEnhancedMouse || EnableMouseWheelSwap || MemoScreenFix || EnhanceMouseCursor || AutoHideMouseCursor || CenterPuzzleCursor);

// Lock Speaker config is disabled if Master Volume is enabled
LockSpeakerConfig = LockSpeakerConfig && (!EnableMasterVolume);

// Set FogFix
if (FogFix == 0xFFFF)
{
Expand Down
2 changes: 1 addition & 1 deletion Launcher/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ LRESULT CALLBACK TabProc(HWND hWndd, UINT Msg, WPARAM wParam, LPARAM lParam)
wnd->SetConfigValue(sel);
SetChanges();

if (wnd->GetConfigValue() > 0 && sel > 0)
if (wnd->cValue->name == speedrunOptionName && wnd->GetConfigValue() > 0 && sel > 0)
{
SetOptionsDefaults(false, true);
UpdateTab(hTab.GetCurSel());
Expand Down
6 changes: 3 additions & 3 deletions Launcher/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@
<Title>Fix specific sound looping bugs</Title>
<Description>Fixes specific, unique sound looping bugs with the chainsaw and moth attack sounds.</Description>
<Choices type="check">
<Value name="Disable" speedrun-default="true">0</Value>
<Value name="Enable" default="true">1</Value>
<Value name="Disable">0</Value>
<Value name="Enable" speedrun-default="true" default="true">1</Value>
</Choices>
</Feature>

Expand Down Expand Up @@ -795,7 +795,7 @@
<Description>Prevents the chainsaw from spawning on a first playthrough, which is a developer-intended design choice.</Description>
<Choices type="check">
<Value name="Disable">0</Value>
<Value name="Enable" default="true">1</Value>
<Value name="Enable" default="true" speedrun-default="true">1</Value>
</Choices>
</Feature>

Expand Down
6 changes: 3 additions & 3 deletions Launcher/config_br.xml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
<Description>Corrige erros específicos e exclusivos de loop de áudio com os sons de ataque de motosserra e mariposas.</Description>
<Choices type="check">
<Value name="Desativar">0</Value>
<Value name="Ativar" default="true">1</Value>
<Value name="Ativar" speedrun-default="true" default="true">1</Value>
</Choices>
</Feature>

Expand Down Expand Up @@ -794,8 +794,8 @@
<Title>Motosserra apenas em Novo Jogo+</Title>
<Description>Impede que a motosserra apareça na primeira jogada, que é uma escolha de design pretendida pela desenvolvedora.</Description>
<Choices type="check">
<Value name="Desativar" speedrun-default="true">0</Value>
<Value name="Ativar" default="true">1</Value>
<Value name="Desativar">0</Value>
<Value name="Ativar" default="true" speedrun-default="true">1</Value>
</Choices>
</Feature>

Expand Down
8 changes: 4 additions & 4 deletions Launcher/config_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@
<Title>Corregir fallos concretos en los sonidos en bucle</Title>
<Description>Corrige fallos específicos de ciertos sonidos en bucle, como los de la motosierra y los ataques de las polillas.</Description>
<Choices type="check">
<Value name="No" speedrun-default="true">0</Value>
<Value name="" default="true">1</Value>
<Value name="No">0</Value>
<Value name="" speedrun-default="true" default="true">1</Value>
</Choices>
</Feature>

Expand Down Expand Up @@ -794,8 +794,8 @@
<Title>Activar la motosierra solo en una Nueva partida+</Title>
<Description>Evita que aparezca la motosierra en una partida inicial, lo que es una decisión de diseño intencionada de los desarrolladores.</Description>
<Choices type="check">
<Value name="No" speedrun-default="true">0</Value>
<Value name="" default="true">1</Value>
<Value name="No">0</Value>
<Value name="" default="true" speedrun-default="true">1</Value>
</Choices>
</Feature>

Expand Down
18 changes: 9 additions & 9 deletions Launcher/config_it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</Choices>
</Feature>

<Feature name="ForceTopMost">
<Feature name="ForceTopMost" speedrun="true">
<Title>Finestra di gioco sempre in primo piano</Title>
<Description>Forza la finestra di gioco ad essere sempre sopra tutte le altre finestre, inclusa la barra del menu Start.&#x0a;&#x0a;Nota: Funziona soltanto in modalità finestra.</Description>
<Choices type="check">
Expand Down Expand Up @@ -407,7 +407,7 @@
<Description>Corregge specifici problemi di loop audio inerenti i suoni della motosega e delle falene.</Description>
<Choices type="check">
<Value name="Disabilitato">0</Value>
<Value name="Abilitato" default="true">1</Value>
<Value name="Abilitato" speedrun-default="true" default="true">1</Value>
</Choices>
</Feature>

Expand Down Expand Up @@ -795,7 +795,7 @@
<Description>Impedisce alla motosega di comparire durante la prima giocata, che è una scelta di design degli sviluppatori originali.</Description>
<Choices type="check">
<Value name="Disabilitato">0</Value>
<Value name="Abilitato" default="true">1</Value>
<Value name="Abilitato" default="true" speedrun-default="true">1</Value>
</Choices>
</Feature>

Expand Down Expand Up @@ -997,18 +997,18 @@
</Choices>
</Feature>

<Feature name="FmvSubtitlesSyncFix">
<Title>Sincronizza i sottotitoli con la frequenza degli FMV</Title>
<Description>Regola la velocità di riproduzione dei sottotitoli per seguire la frequenza di aggiornamento degli FMV.</Description>
<Feature name="SwapLightHeavyAttack" speedrun="true">
<Title>Scambia gli input per attacco pesante e leggero</Title>
<Description>Scambia gli input per attacco pesante e leggero sulle armi corpo a corpo. Premendo velocemente il tasto di attacco effettua un attacco leggero. Tenendo premuto il tasto di attacco effettua un attacco pesante.</Description>
<Choices type="check">
<Value name="Disabilitato">0</Value>
<Value name="Abilitato" default="true">1</Value>
</Choices>
</Feature>

<Feature name="SwapLightHeavyAttack" speedrun="true">
<Title>Scambia gli input per attacco pesante e leggero</Title>
<Description>Scambia gli input per attacco pesante e leggero sulle armi corpo a corpo. Premendo velocemente il tasto di attacco effettua un attacco leggero. Tenendo premuto il tasto di attacco effettua un attacco pesante.</Description>
<Feature name="FmvSubtitlesSyncFix">
<Title>Sincronizza i sottotitoli con la frequenza degli FMV</Title>
<Description>Regola la velocità di riproduzione dei sottotitoli per seguire la frequenza di aggiornamento degli FMV.</Description>
<Choices type="check">
<Value name="Disabilitato">0</Value>
<Value name="Abilitato" default="true">1</Value>
Expand Down
4 changes: 2 additions & 2 deletions Patches/OptionsMenuTweaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ void MasterVolume::HandleConfirmOptions(bool ConfirmChange)

void MasterVolume::HandleMasterVolume(LPDIRECT3DDEVICE8 ProxyInterface)
{
DirectXInterface = ProxyInterface;

if (!EnableMasterVolume)
return;

DirectXInterface = ProxyInterface;

if (DiscardOptions)
{
this->HandleConfirmOptions(false);
Expand Down
2 changes: 1 addition & 1 deletion Patches/Resolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ void PatchSpeakerConfigLock()
WriteJMPtoMemory((BYTE*)SpkSelectorAddr, SpkSelectorAddrExit, 5);

// Update speaker config description string
if (UseCustomExeStr)
if (CustomExeStrSet)
{
WriteCalltoMemory(((BYTE*)DSpkAddrB + 0x125), *printSpkDescStr, 5);
}
Expand Down
25 changes: 16 additions & 9 deletions dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,6 @@ void DelayedStart()
PatchBestGraphics();
}

// Disables changing the speaker configuration in the game's options menu
if (LockSpeakerConfig && CustomExeStrSet)
{
PatchSpeakerConfigLock();
}

// Fog Fix
if (FogFix)
{
Expand Down Expand Up @@ -697,10 +691,23 @@ void DelayedStart()
}

// Patch master volume slider and strings
if (EnableMasterVolume && CustomExeStrSet)
if (EnableMasterVolume)
{
PatchSpeakerConfigText();
PatchMasterVolumeSlider();
if (!CustomExeStrSet)
{
EnableMasterVolume = false;
}
else
{
PatchSpeakerConfigText();
PatchMasterVolumeSlider();
}
}

// Disables changing the speaker configuration in the game's options menu
if (LockSpeakerConfig && !EnableMasterVolume)
{
PatchSpeakerConfigLock();
}

// Patch swap light and heavy melee attacks
Expand Down

0 comments on commit 9e409fb

Please sign in to comment.