Skip to content

Commit

Permalink
DisableCountdownTimer: fix wrong name used in code, add SOUND_CMD def
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Jun 10, 2024
1 parent 4576640 commit c2c5a7f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down
9 changes: 9 additions & 0 deletions src/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/hooks_bugfixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/hooks_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 (...) {}
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c2c5a7f

Please sign in to comment.