From c2c5a7fa953425ad681d46584e865415c9ebe7dd Mon Sep 17 00:00:00 2001 From: emoose Date: Mon, 10 Jun 2024 13:30:43 +0100 Subject: [PATCH] DisableCountdownTimer: fix wrong name used in code, add `SOUND_CMD` def --- src/dllmain.cpp | 4 ++-- src/game.hpp | 9 +++++++++ src/hooks_bugfixes.cpp | 4 ++-- src/hooks_misc.cpp | 6 +++--- src/plugin.hpp | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index e054dc2..9f59b4a 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -70,7 +70,7 @@ namespace Settings spdlog::info(" - FixZBufferPrecision: {}", FixZBufferPrecision); spdlog::info(" - SkipIntroLogos: {}", SkipIntroLogos); - spdlog::info(" - CountdownTimerDisable: {}", CountdownTimerDisable); + spdlog::info(" - DisableCountdownTimer: {}", DisableCountdownTimer); spdlog::info(" - FixPegasusClopping: {}", FixPegasusClopping); spdlog::info(" - FixC2CRankings: {}", FixC2CRankings); @@ -117,7 +117,7 @@ namespace Settings FixZBufferPrecision = ini.Get("Graphics", "FixZBufferPrecision", std::move(FixZBufferPrecision)); SkipIntroLogos = ini.Get("Misc", "SkipIntroLogos", std::move(SkipIntroLogos)); - CountdownTimerDisable = ini.Get("Misc", "CountdownTimerDisable", std::move(CountdownTimerDisable)); + DisableCountdownTimer = ini.Get("Misc", "DisableCountdownTimer", std::move(DisableCountdownTimer)); FixPegasusClopping = ini.Get("Bugfixes", "FixPegasusClopping", std::move(FixPegasusClopping)); FixC2CRankings = ini.Get("Bugfixes", "FixC2CRankings", std::move(FixC2CRankings)); diff --git a/src/game.hpp b/src/game.hpp index 0902d1e..ed9f3a6 100644 --- a/src/game.hpp +++ b/src/game.hpp @@ -45,6 +45,15 @@ enum GameState STATE_SUMOREWARD = 0x24, }; +enum SOUND_CMD +{ + /* 0x0800 */ SND_LOOP = (1 << 11), + /* 0x1000 */ SND_PAN_LEFT = (1 << 12), + /* 0x2000 */ SND_PAN_RIGHT = (1 << 13), + /* 0x4000 */ SND_PAN_LEFTRIGHT = (1 << 14), + /* 0x8000 */ SND_STOP = (1 << 15), +}; + typedef struct tagSphere { float f0; diff --git a/src/hooks_bugfixes.cpp b/src/hooks_bugfixes.cpp index d45bc20..b86d6f3 100644 --- a/src/hooks_bugfixes.cpp +++ b/src/hooks_bugfixes.cpp @@ -14,8 +14,8 @@ class FixPegasusClopping : public Hook { SndOff_PEGA.call(); - const int SND_STOP = 0x8000; - Game::PrjSndRequest(SND_STOP | 0x8D); // 0x8D = clop + constexpr int SfxClop = 0x8D; + Game::PrjSndRequest(SND_STOP | SfxClop); } public: diff --git a/src/hooks_misc.cpp b/src/hooks_misc.cpp index e7c8f79..f2a60cf 100644 --- a/src/hooks_misc.cpp +++ b/src/hooks_misc.cpp @@ -77,8 +77,8 @@ class CommandLineArguments : public Hook } else if (!wcsicmp(argv[i], L"-OuttaTime")) // same arg as FXT wrapper { - spdlog::info("CommandLineArguments: CountdownTimerDisable = true"); - Settings::CountdownTimerDisable = true; + spdlog::info("CommandLineArguments: DisableCountdownTimer = true"); + Settings::DisableCountdownTimer = true; } } catch (...) {} @@ -113,7 +113,7 @@ class GameDefaultConfigOverride : public Hook if (Settings::SkipIntroLogos) *Game::Sumo_IntroLogosEnable = false; - if (Settings::CountdownTimerDisable) + if (Settings::DisableCountdownTimer) *Game::Sumo_CountdownTimerEnable = false; if (Settings::AutoDetectResolution) diff --git a/src/plugin.hpp b/src/plugin.hpp index e69bd2e..6da8bc3 100644 --- a/src/plugin.hpp +++ b/src/plugin.hpp @@ -55,7 +55,7 @@ namespace Settings inline bool FixZBufferPrecision = true; inline bool SkipIntroLogos = false; - inline bool CountdownTimerDisable = false; + inline bool DisableCountdownTimer = false; inline bool FixPegasusClopping = true; inline bool FixC2CRankings = true;