@@ -75,28 +75,29 @@ extern StringID _error_message;
/**
* Checks if a integer value belongs to a command.
*/
bool IsValidCommand(uint32 cmd);
* Returns the flags from a given command.
byte GetCommandFlags(uint32 cmd);
* Returns the current money available which can be used for a command.
Money GetAvailableMoneyForCommand();
* Extracts the DC flags needed for DoCommand from the flags returned by GetCommandFlags
* @param cmd_flags Flags from GetCommandFlags
* @return flags for DoCommand
static inline uint32 CommandFlagsToDCFlags(uint cmd_flags)
{
uint32 flags = 0;
if (cmd_flags & CMD_NO_WATER) flags |= DC_NO_WATER;
if (cmd_flags & CMD_AUTO) flags |= DC_AUTO;
if (cmd_flags & CMD_ALL_TILES) flags |= DC_ALL_TILES;
return flags;
}
#endif /* COMMAND_FUNC_H */