Debian Codegraph @

engine/include/ai.h

raw
1 // ____ _ __
2 // / __ )____ _____ | | / /___ ___________
3 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
4 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
5 // /_____/\____/____/ |__/|__/\__,_/_/ /____/
6 //
7 // A futuristic real-time strategy game.
8 // This file is part of Bos Wars.
9 //
10 /**@name ai.h - The ai headerfile. */
11 //
12 // (c) Copyright 1998-2009 by Lutz Sammer and Jimmy Salmon
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; only version 2 of the License.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 // 02111-1307, USA.
27
28 #ifndef __AI_H__
29 #define __AI_H__
30
31 //@{
32
33 /*----------------------------------------------------------------------------
34 -- Declarations
35 ----------------------------------------------------------------------------*/
36
37 class CPlayer;
38 class CFile;
39 class CUnit;
40 class CUnitType;
41
42 /*----------------------------------------------------------------------------
43 -- Functions
44 ----------------------------------------------------------------------------*/
45
46 extern void AiEachCycle(CPlayer *player); /// Called each game cycle
47 extern void AiEachSecond(CPlayer *player); /// Called each second
48
49 extern void InitAiModule(); /// Init AI global structures
50 extern void AiInit(CPlayer *player); /// Init AI for this player
51 extern void CleanAi(); /// Cleanup the AI module
52 extern void FreeAi(); /// Free the AI resources
53 extern void SaveAi(CFile *file); /// Save the AI state
54
55 extern void AiCclRegister(); /// Register ccl features
56
57 /*--------------------------------------------------------
58 -- Callbacks/Triggers
59 --------------------------------------------------------*/
60
61 extern void AiHelpMe(const CUnit *attacker, CUnit *defender);
62 extern void AiUnitKilled(CUnit *unit);
63 extern void AiWorkComplete(CUnit *unit, CUnit *newUnit);
64 extern void AiCanNotBuild(CUnit *unit, const CUnitType *unitType);
65 extern void AiCanNotReach(CUnit *unit, const CUnitType *unitType);
66 extern void AiCanNotMove(CUnit *unit);
67 extern void AiTrainingComplete(CUnit *unit, CUnit *newUnit);
68
69 //@}
70
71 #endif // !__AI_H__