summaryrefslogtreecommitdiff
path: root/src/command.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-18 10:48:15 +0000
committerrubidium <rubidium@openttd.org>2007-06-18 10:48:15 +0000
commit966e2738b9c97bb44276ec90ebfa4a202d67d715 (patch)
treee8ff8f3847b0d29507eeef3450ff752e9b318604 /src/command.h
parentf6be61bb3481419a388d9dcdede16c2b5f77c4a2 (diff)
downloadopenttd-966e2738b9c97bb44276ec90ebfa4a202d67d715.tar.xz
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command.h b/src/command.h
index d13638d2d..428dd32d6 100644
--- a/src/command.h
+++ b/src/command.h
@@ -184,7 +184,7 @@ enum {
CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only
};
-typedef int32 CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2);
+typedef CommandCost CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2);
struct Command {
CommandProc *proc;
@@ -199,7 +199,7 @@ struct Command {
* @param res the resulting value from the command to be checked
* @return Return true if the command failed, false otherwise
*/
-static inline bool CmdFailed(int32 res)
+static inline bool CmdFailed(CommandCost res)
{
/* lower 16bits are the StringID of the possible error */
return res <= (CMD_ERROR | INVALID_STRING_ID);
@@ -207,7 +207,7 @@ static inline bool CmdFailed(int32 res)
/* command.cpp */
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);
-int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
+CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd);
#ifdef ENABLE_NETWORK