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.
This commit is contained in:
Michael Lutz
2021-10-31 19:39:09 +01:00
parent e740c24eb7
commit 0f64ee5ce1
47 changed files with 375 additions and 332 deletions

View File

@@ -28,6 +28,7 @@
#include "tile_map.h"
#include "newgrf.h"
#include "error.h"
#include "misc_cmd.h"
#include "widgets/cheat_widget.h"
@@ -54,7 +55,7 @@ static int32 _money_cheat_amount = 10000000;
*/
static int32 ClickMoneyCheat(int32 p1, int32 p2)
{
DoCommandP(CMD_MONEY_CHEAT, 0, (uint32)(p2 * _money_cheat_amount), 0);
Command<CMD_MONEY_CHEAT>::Post(0, (uint32)(p2 * _money_cheat_amount), 0, {});
return _money_cheat_amount;
}