summaryrefslogtreecommitdiff
path: root/src/fios_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-31 19:39:09 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch)
tree161f0e6ac300e604de61b8203b5a58279637f9eb /src/fios_gui.cpp
parente740c24eb7a90bc771f5976d64d80639ee7576e5 (diff)
downloadopenttd-0f64ee5ce1548d9cda69917f27c5b1a3cb91823d.tar.xz
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 9d7ab70d8..73315edf0 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -27,6 +27,7 @@
#include "core/geometry_func.hpp"
#include "gamelog.h"
#include "stringfilter_type.h"
+#include "misc_cmd.h"
#include "widgets/fios_widget.h"
@@ -358,7 +359,7 @@ public:
/* pause is only used in single-player, non-editor mode, non-menu mode. It
* will be unpaused in the WE_DESTROY event handler. */
if (_game_mode != GM_MENU && !_networking && _game_mode != GM_EDITOR) {
- DoCommandP(CMD_PAUSE, 0, PM_PAUSED_SAVELOAD, 1);
+ Command<CMD_PAUSE>::Post(0, PM_PAUSED_SAVELOAD, 1, {});
}
SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
@@ -402,7 +403,7 @@ public:
{
/* pause is only used in single-player, non-editor mode, non menu mode */
if (!_networking && _game_mode != GM_EDITOR && _game_mode != GM_MENU) {
- DoCommandP(CMD_PAUSE, 0, PM_PAUSED_SAVELOAD, 0);
+ Command<CMD_PAUSE>::Post(0, PM_PAUSED_SAVELOAD, 0, {});
}
this->Window::Close();
}