summaryrefslogtreecommitdiff
path: root/command.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-05-15 18:50:55 +0000
committertron <tron@openttd.org>2005-05-15 18:50:55 +0000
commitfea596567944fba8d9d4ead62d948db14690fdf1 (patch)
treead6dc27f46725e511e93e061f51683311027ec65 /command.h
parent6cd410afbb3cedff9f6d86fc30dbd4e67817ebc9 (diff)
downloadopenttd-fea596567944fba8d9d4ead62d948db14690fdf1.tar.xz
(svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
Diffstat (limited to 'command.h')
-rw-r--r--command.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/command.h b/command.h
index 8bb649d28..21b15fb23 100644
--- a/command.h
+++ b/command.h
@@ -190,6 +190,8 @@ static inline bool CmdFailed(int32 res)
int32 DoCommand(int x, int y, uint32 p1, uint32 p2, uint32 flags, uint procc);
int32 DoCommandByTile(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
+extern const char* _cmd_text; // Text, which gets sent with a command
+
bool IsValidCommand(uint cmd);
byte GetCommandFlags(uint cmd);
int32 GetAvailableMoneyForCommand(void);