equal
deleted
inserted
replaced
174 CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only |
174 CMD_OFFLINE = 0x2, ///< the command cannot be executed in a multiplayer game; single-player only |
175 }; |
175 }; |
176 |
176 |
177 typedef int32 CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2); |
177 typedef int32 CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2); |
178 |
178 |
179 typedef struct Command { |
179 struct Command { |
180 CommandProc *proc; |
180 CommandProc *proc; |
181 byte flags; |
181 byte flags; |
182 } Command; |
182 }; |
183 |
183 |
184 //#define return_cmd_error(errcode) do { _error_message=(errcode); return CMD_ERROR; } while(0) |
184 //#define return_cmd_error(errcode) do { _error_message=(errcode); return CMD_ERROR; } while(0) |
185 #define return_cmd_error(errcode) do { return CMD_ERROR | (errcode); } while (0) |
185 #define return_cmd_error(errcode) do { return CMD_ERROR | (errcode); } while (0) |
186 |
186 |
187 /** |
187 /** |
207 |
207 |
208 extern const char* _cmd_text; ///< Text, which gets sent with a command |
208 extern const char* _cmd_text; ///< Text, which gets sent with a command |
209 |
209 |
210 bool IsValidCommand(uint cmd); |
210 bool IsValidCommand(uint cmd); |
211 byte GetCommandFlags(uint cmd); |
211 byte GetCommandFlags(uint cmd); |
212 int32 GetAvailableMoneyForCommand(void); |
212 int32 GetAvailableMoneyForCommand(); |
213 |
213 |
214 #endif /* COMMAND_H */ |
214 #endif /* COMMAND_H */ |