src/ai/core/ai_object.hpp
author truelight
Thu, 15 Mar 2007 16:29:46 +0000
branchnoai
changeset 9416 432e904ce0e1
parent 9414 a7f7bbec08da
permissions -rw-r--r--
(svn r9214) [NoAI] -Documentation: wrong @file flag
/* $Id$ */

/** @file ai_object.hpp declaration of class for AIObject class */

#ifndef AI_OBJECT_HPP
#define AI_OBJECT_HPP

#include "../../stdafx.h"    // Needed for functions.h
#include "../../functions.h" // Needed for command.h
#include "../../command.h"   // Needed for CommandCallback

class AIObject {
protected:
	/**
	 * Executes a raw DoCommandCc for the AI.
	 */
	int32 DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback *callback);

	/**
	 * Executes a raw DoCommand for the AI.
	 */
	int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc) { return this->DoCommandCc(tile, p1, p2, flags, procc, NULL); }

	/**
	 * Checks if the result of a DoCommand went wrong.
	 */
	bool CmdFailed(int32 res);

	/**
	 * Checks if the result of a DoCommand went okay.
	 */
	bool CmdSucceeded(int32 res);
};

#endif /* AI_OBJECT_HPP */