Comment fix: OS is not excluded from permissive.
[freeciv.git] / common / aicore / pf_tools.h
blobd13d374e867e022f7aaf453044f008995f8d2025
1 /***********************************************************************
2 Freeciv - Copyright (C) 2003 - 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.
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__PF_TOOLS_H
14 #define FC__PF_TOOLS_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
21 /* common/aicore */
22 #include "path_finding.h"
24 /*
25 * Use to create 'amphibious' paths. An amphibious path starts on a sea tile,
26 * perhaps goes over some other sea tiles, then perhaps goes over some land
27 * tiles. This is suitable for a land unit riding on a ferry.
28 * If you want, you can use different call-backs for the land and sea legs,
29 * by changing the 'land' and 'sea' fields.
30 * Initialise the 'land' and 'sea' fields as you like, then initialise the
31 * other fields using using pft_fill_amphibious_parameter().
32 * Give the 'combined' field to pf_create_map to create a map
33 * for finding the path.
35 struct pft_amphibious
37 /* The caller must initialize these. */
38 struct pf_parameter land, sea;
40 /* Initialized in pft_fill_amphibious_parameter; do not touch. */
41 int land_scale, sea_scale;
42 struct pf_parameter combined;
46 void pft_fill_unit_parameter(struct pf_parameter *parameter,
47 const struct unit *punit);
48 void pft_fill_unit_overlap_param(struct pf_parameter *parameter,
49 const struct unit *punit);
50 void pft_fill_unit_attack_param(struct pf_parameter *parameter,
51 const struct unit *punit);
53 void pft_fill_utype_parameter(struct pf_parameter *parameter,
54 const struct unit_type *punittype,
55 struct tile *pstart_tile,
56 struct player *pplayer);
57 void pft_fill_utype_overlap_param(struct pf_parameter *parameter,
58 const struct unit_type *punittype,
59 struct tile *pstart_tile,
60 struct player *pplayer);
61 void pft_fill_utype_attack_param(struct pf_parameter *parameter,
62 const struct unit_type *punittype,
63 struct tile *pstart_tile,
64 struct player *pplayer);
65 void pft_fill_reverse_parameter(struct pf_parameter *parameter,
66 struct tile *target_tile);
68 void pft_fill_amphibious_parameter(struct pft_amphibious *parameter);
69 enum tile_behavior no_fights_or_unknown(const struct tile *ptile,
70 enum known_type known,
71 const struct pf_parameter *param);
72 enum tile_behavior no_fights(const struct tile *ptile, enum known_type known,
73 const struct pf_parameter *param);
74 enum tile_behavior no_intermediate_fights(const struct tile *ptile,
75 enum known_type known,
76 const struct pf_parameter *param);
78 #ifdef __cplusplus
80 #endif /* __cplusplus */
82 #endif /* FC__PF_TOOLS_H */