Freeciv-3.3
Loading...
Searching...
No Matches
pf_tools.h
Go to the documentation of this file.
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.
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__PF_TOOLS_H
14#define FC__PF_TOOLS_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20
21/* common/aicore */
22#include "path_finding.h"
23
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.
34 */
36{
37 /* The caller must initialize these. */
39
40 /* Initialized in pft_fill_amphibious_parameter; do not touch. */
43};
44
45
46void pft_fill_unit_parameter(struct pf_parameter *parameter,
47 const struct civ_map *nmap,
48 const struct unit *punit);
49void pft_fill_unit_overlap_param(struct pf_parameter *parameter,
50 const struct civ_map *nmap,
51 const struct unit *punit);
52void pft_fill_unit_attack_param(struct pf_parameter *parameter,
53 const struct civ_map *nmap,
54 const struct unit *punit);
55
56void pft_fill_utype_parameter(struct pf_parameter *parameter,
57 const struct civ_map *nmap,
58 const struct unit_type *punittype,
59 struct tile *pstart_tile,
60 struct player *pplayer);
61void pft_fill_utype_overlap_param(struct pf_parameter *parameter,
62 const struct civ_map *nmap,
63 const struct unit_type *punittype,
64 struct tile *pstart_tile,
65 struct player *pplayer);
66void pft_fill_utype_attack_param(struct pf_parameter *parameter,
67 const struct civ_map *nmap,
68 const struct unit_type *punittype,
69 struct tile *pstart_tile,
70 struct player *pplayer);
71void pft_fill_reverse_parameter(const struct civ_map *nmap,
72 struct pf_parameter *parameter,
73 struct tile *target_tile);
74
75void pft_fill_amphibious_parameter(struct pft_amphibious *parameter);
76enum tile_behavior no_fights_or_unknown(const struct tile *ptile,
77 enum known_type known,
78 const struct pf_parameter *param);
79enum tile_behavior no_fights(const struct tile *ptile, enum known_type known,
80 const struct pf_parameter *param);
81enum tile_behavior no_intermediate_fights(const struct tile *ptile,
82 enum known_type known,
83 const struct pf_parameter *param);
84
85#ifdef __cplusplus
86}
87#endif /* __cplusplus */
88
89#endif /* FC__PF_TOOLS_H */
char * incite_cost
Definition comments.c:76
struct unit struct city struct unit struct tile * target_tile
Definition dialogs_g.h:57
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:74
tile_behavior
void pft_fill_unit_parameter(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit *punit)
Definition pf_tools.c:843
void pft_fill_unit_attack_param(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit *punit)
Definition pf_tools.c:952
void pft_fill_unit_overlap_param(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit *punit)
Definition pf_tools.c:894
void pft_fill_reverse_parameter(const struct civ_map *nmap, struct pf_parameter *parameter, struct tile *target_tile)
Definition pf_tools.c:963
void pft_fill_utype_attack_param(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit_type *punittype, struct tile *pstart_tile, struct player *pplayer)
Definition pf_tools.c:936
enum tile_behavior no_fights(const struct tile *ptile, enum known_type known, const struct pf_parameter *param)
Definition pf_tools.c:510
void pft_fill_utype_overlap_param(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit_type *punittype, struct tile *pstart_tile, struct player *pplayer)
Definition pf_tools.c:879
enum tile_behavior no_intermediate_fights(const struct tile *ptile, enum known_type known, const struct pf_parameter *param)
Definition pf_tools.c:526
enum tile_behavior no_fights_or_unknown(const struct tile *ptile, enum known_type known, const struct pf_parameter *param)
Definition pf_tools.c:493
void pft_fill_amphibious_parameter(struct pft_amphibious *parameter)
Definition pf_tools.c:997
void pft_fill_utype_parameter(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit_type *punittype, struct tile *pstart_tile, struct player *pplayer)
Definition pf_tools.c:829
struct pf_parameter combined
Definition pf_tools.h:42
struct pf_parameter land sea
Definition pf_tools.h:38
Definition tile.h:50
Definition unit.h:140
known_type
Definition tile.h:35