Codechange: enum-class-ify Commands

This commit is contained in:
Rubidium
2026-01-28 23:32:51 +01:00
committed by rubidium42
parent 014bf7e750
commit 4adf494ebc
139 changed files with 890 additions and 890 deletions
+4 -4
View File
@@ -108,7 +108,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
EndGameWindow(WindowDesc &desc) : EndGameHighScoreBaseWindow(desc)
{
/* Pause in single-player to have a look at the highscore at your own leisure */
if (!_networking) Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
if (!_networking) Command<Commands::Pause>::Post(PauseMode::Normal, true);
this->background_img = SPR_TYCOON_IMG1_BEGIN;
@@ -136,7 +136,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
void Close([[maybe_unused]] int data = 0) override
{
if (!_networking) Command<CMD_PAUSE>::Post(PauseMode::Normal, false); // unpause
if (!_networking) Command<Commands::Pause>::Post(PauseMode::Normal, false); // unpause
if (_game_mode != GM_MENU && !_exit_game) ShowHighscoreTable(this->window_number, this->rank);
this->EndGameHighScoreBaseWindow::Close();
}
@@ -170,7 +170,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
{
/* pause game to show the chart */
this->game_paused_by_player = _pause_mode == PauseMode::Normal;
if (!_networking && !this->game_paused_by_player) Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
if (!_networking && !this->game_paused_by_player) Command<Commands::Pause>::Post(PauseMode::Normal, true);
/* Close all always on-top windows to get a clean screen */
if (_game_mode != GM_MENU) HideVitalWindows();
@@ -185,7 +185,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
{
if (_game_mode != GM_MENU && !_exit_game) ShowVitalWindows();
if (!_networking && !this->game_paused_by_player) Command<CMD_PAUSE>::Post(PauseMode::Normal, false); // unpause
if (!_networking && !this->game_paused_by_player) Command<Commands::Pause>::Post(PauseMode::Normal, false); // unpause
this->EndGameHighScoreBaseWindow::Close();
}