(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.

This commit is contained in:
rubidium
2007-06-18 10:48:15 +00:00
parent f6be61bb34
commit 966e2738b9
45 changed files with 337 additions and 331 deletions

View File

@@ -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