diff options
author | rubidium <rubidium@openttd.org> | 2007-06-18 10:48:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-18 10:48:15 +0000 |
commit | 3ccc83e64062b95f8ae1d6a7c7afde3224b03b63 (patch) | |
tree | e8ff8f3847b0d29507eeef3450ff752e9b318604 /src/command.h | |
parent | fd2cee18642307140aeb64822cc63287b8efff8f (diff) | |
download | openttd-3ccc83e64062b95f8ae1d6a7c7afde3224b03b63.tar.xz |
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
Diffstat (limited to 'src/command.h')
-rw-r--r-- | src/command.h | 6 |
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 |