src/ai/api/ai_object.hpp
branchnoai
changeset 9441 03da911c8d5f
parent 9427 ef0c109c5661
child 9448 2a4c4340233d
equal deleted inserted replaced
9440:0986434f3af8 9441:03da911c8d5f
     3 /** @file ai_object.hpp declaration of class for AIObject class */
     3 /** @file ai_object.hpp declaration of class for AIObject class */
     4 
     4 
     5 #ifndef AI_OBJECT_HPP
     5 #ifndef AI_OBJECT_HPP
     6 #define AI_OBJECT_HPP
     6 #define AI_OBJECT_HPP
     7 
     7 
     8 #include "../../stdafx.h"    // Needed for functions.h
     8 #include "../../stdafx.h"
     9 #include "../../functions.h" // Needed for command.h
     9 #include "../../functions.h"
    10 #include "../../command.h"   // Needed for CommandCallback
       
    11 
    10 
    12 class AIObject {
    11 class AIObject {
    13 protected:
    12 protected:
    14 	/**
    13 	/**
    15 	 * Executes a raw DoCommandCc for the AI.
       
    16 	 */
       
    17 	int32 DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback *callback);
       
    18 
       
    19 	/**
       
    20 	 * Executes a raw DoCommand for the AI.
    14 	 * Executes a raw DoCommand for the AI.
    21 	 */
    15 	 */
    22 	int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc) { return this->DoCommandCc(tile, p1, p2, flags, procc, NULL); }
    16 	int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
    23 
    17 
    24 	/**
    18 	/**
    25 	 * Checks if the result of a DoCommand went wrong.
    19 	 * Checks if the result of a DoCommand went wrong.
    26 	 */
    20 	 */
    27 	bool CmdFailed(int32 res);
    21 	bool CmdFailed(int32 res);