Freeciv-3.1: /fast/freeciv/nightly/S3_1/ai/default/aiguard.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
aiguard.h
Go to the documentation of this file.
1/**********************************************************************
2 Freeciv - Copyright (C) 2002 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__AIGUARD_H
14#define FC__AIGUARD_H
15
16#include "support.h" /* bool type */
17
18#include "fc_types.h"
19
20#ifndef FREECIV_NDEBUG
21#define CHECK_GUARD(ait, guard) aiguard_check_guard(ait, guard)
22#define CHECK_CHARGE_UNIT(ait, charge) aiguard_check_charge_unit(ait, charge)
23#else /* FREECIV_NDEBUG */
24#define CHECK_GUARD(ait, guard) (void)0
25#define CHECK_CHARGE_UNIT(ait, charge) (void)0
26#endif /* FREECIV_NDEBUG */
27
28void aiguard_check_guard(struct ai_type *ait, const struct unit *guard);
29void aiguard_check_charge_unit(struct ai_type *ait, const struct unit *charge);
30void aiguard_clear_charge(struct ai_type *ait, struct unit *guard);
31void aiguard_clear_guard(struct ai_type *ait, struct unit *charge);
32void aiguard_assign_guard_unit(struct ai_type *ait, struct unit *charge,
33 struct unit *guard);
34void aiguard_assign_guard_city(struct ai_type *ait, struct city *charge,
35 struct unit *guard);
36void aiguard_request_guard(struct ai_type *ait, struct unit *punit);
37bool aiguard_wanted(struct ai_type *ait, struct unit *charge);
38bool aiguard_has_charge(struct ai_type *ait, struct unit *charge);
39bool aiguard_has_guard(struct ai_type *ait, struct unit *charge);
40struct unit *aiguard_guard_of(struct ai_type *ait, struct unit *charge);
41struct unit *aiguard_charge_unit(struct ai_type *ait, struct unit *guard);
42struct city *aiguard_charge_city(struct ai_type *ait, struct unit *guard);
43void aiguard_update_charge(struct ai_type *ait, struct unit *guard);
44
45#endif /* FC__AIGUARD_H */
aiguard_charge_city
struct city * aiguard_charge_city(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:290
aiguard_clear_charge
void aiguard_clear_charge(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:118
aiguard_request_guard
void aiguard_request_guard(struct ai_type *ait, struct unit *punit)
Definition aiguard.c:228
aiguard_has_guard
bool aiguard_has_guard(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:260
aiguard_assign_guard_unit
void aiguard_assign_guard_unit(struct ai_type *ait, struct unit *charge, struct unit *guard)
Definition aiguard.c:174
aiguard_wanted
bool aiguard_wanted(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:242
aiguard_assign_guard_city
void aiguard_assign_guard_city(struct ai_type *ait, struct city *charge, struct unit *guard)
Definition aiguard.c:197
aiguard_charge_unit
struct unit * aiguard_charge_unit(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:280
aiguard_clear_guard
void aiguard_clear_guard(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:147
aiguard_guard_of
struct unit * aiguard_guard_of(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:270
aiguard_has_charge
bool aiguard_has_charge(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:251
aiguard_update_charge
void aiguard_update_charge(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:300
aiguard_check_charge_unit
void aiguard_check_charge_unit(struct ai_type *ait, const struct unit *charge)
Definition aiguard.c:91
aiguard_check_guard
void aiguard_check_guard(struct ai_type *ait, const struct unit *guard)
Definition aiguard.c:49
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:73
fc_types.h
ai_type
Definition ai.h:50
city
Definition city.h:309
unit
Definition unit.h:138
support.h