equal
deleted
inserted
replaced
193 }; |
193 }; |
194 |
194 |
195 static inline bool CmdFailed(CommandCost cost) { return cost.Failed(); } |
195 static inline bool CmdFailed(CommandCost cost) { return cost.Failed(); } |
196 static inline bool CmdSucceeded(CommandCost cost) { return cost.Succeeded(); } |
196 static inline bool CmdSucceeded(CommandCost cost) { return cost.Succeeded(); } |
197 |
197 |
198 static const CommandCost CMD_ERROR = CommandCost((StringID)INVALID_STRING_ID); |
198 static const CommandCost CMD_ERROR = CommandCost(INVALID_STRING_ID); |
199 |
199 |
200 #define return_cmd_error(errcode) do { return CommandCost((StringID)(errcode)); } while (0) |
200 #define return_cmd_error(errcode) do { return CommandCost(errcode); } while (0) |
201 |
201 |
202 /* command.cpp */ |
202 /* command.cpp */ |
203 typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2); |
203 typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2); |
204 CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); |
204 CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); |
205 bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd, bool my_cmd = true); |
205 bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd, bool my_cmd = true); |