From 87e5a8b52bf2f200467d65c1e17fd79548d31129 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 28 Dec 2008 14:37:19 +0000 Subject: (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. --- src/command_func.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/command_func.h') diff --git a/src/command_func.h b/src/command_func.h index 888468429..b3370d9b1 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -53,29 +53,21 @@ static const CommandCost CMD_ERROR = CommandCost(INVALID_STRING_ID); /** * Execute a command */ -CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 procc); +CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 cmd, const char *text = NULL); /** * Execute a network safe DoCommand function */ -bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd, bool my_cmd = true); +bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback = NULL, const char *text = NULL, bool my_cmd = true); #ifdef ENABLE_NETWORK /** * Send a command over the network */ -void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback); +void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text); #endif /* ENABLE_NETWORK */ -/** - * Text, which gets sent with a command - * - * This variable contains a string (be specific a pointer of the first - * char of this string) which will be send with a command. This is - * used for user input data like names or chat messages. - */ -extern const char *_cmd_text; extern Money _additional_cash_required; extern StringID _error_message; -- cgit v1.2.3-54-g00ecf