Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/goto.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
goto.h
Go to the documentation of this file.
1/**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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__GOTO_H
14#define FC__GOTO_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20struct pf_path;
21struct tile;
22struct unit;
23struct unit_list;
24
25 enum goto_tile_state {
26 GTS_TURN_STEP,
27 GTS_MP_LEFT,
28 GTS_EXHAUSTED_MP,
29
30 GTS_COUNT
31};
32
33void init_client_goto(void);
34void free_client_goto(void);
35
36void enter_goto_state(struct unit_list *punits);
37void exit_goto_state(void);
38
39void goto_unit_killed(struct unit *punit);
40
41bool goto_is_active(void);
42bool goto_get_turns(int *min, int *max);
43bool goto_tile_state(const struct tile *ptile, enum goto_tile_state *state,
44 int *turns, bool *waypoint);
45bool goto_add_waypoint(void);
46bool goto_pop_waypoint(void);
47
48bool is_valid_goto_destination(const struct tile *ptile);
49bool is_valid_goto_draw_line(struct tile *dest_tile);
50
51void request_orders_cleared(struct unit *punit);
52void send_goto_path(struct unit *punit, struct pf_path *path,
53 struct unit_order *last_order);
54 //void send_rally_path(struct city *pcity, struct unit *punit,
55 // struct pf_path *path, struct unit_order *final_order);
56bool send_goto_tile(struct unit *punit, struct tile *ptile);
57bool send_rally_tile(struct city *pcity, struct tile *ptile, bool persistent);
58bool send_attack_tile(struct unit *punit, struct tile *ptile);
59void send_patrol_route(void);
60void send_goto_route(void);
61void send_connect_route(enum unit_activity activity,
62 struct extra_type *tgt);
63
64struct pf_path *path_to_nearest_allied_city(struct unit *punit);
65struct tile *tile_before_end_path(struct unit *punit, struct tile *ptile);
66
67#ifdef __cplusplus
68}
69#endif /* __cplusplus */
70
71#endif /* FC__GOTO_H */
incite_cost
char * incite_cost
Definition comments.c:74
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:74
exit_goto_state
void exit_goto_state(void)
Definition goto.c:1022
tile_before_end_path
struct tile * tile_before_end_path(struct unit *punit, struct tile *ptile)
Definition goto.c:2011
goto_is_active
bool goto_is_active(void)
Definition goto.c:1059
send_attack_tile
bool send_attack_tile(struct unit *punit, struct tile *ptile)
Definition goto.c:1621
path_to_nearest_allied_city
struct pf_path * path_to_nearest_allied_city(struct unit *punit)
Definition goto.c:1982
init_client_goto
void init_client_goto(void)
Definition goto.c:152
send_patrol_route
void send_patrol_route(void)
Definition goto.c:1647
send_goto_path
void send_goto_path(struct unit *punit, struct pf_path *path, struct unit_order *last_order)
Definition goto.c:1530
send_rally_tile
bool send_rally_tile(struct city *pcity, struct tile *ptile, bool persistent)
Definition goto.c:1575
is_valid_goto_draw_line
bool is_valid_goto_draw_line(struct tile *dest_tile)
Definition goto.c:1338
goto_tile_state
goto_tile_state
Definition goto.h:25
GTS_EXHAUSTED_MP
@ GTS_EXHAUSTED_MP
Definition goto.h:28
GTS_MP_LEFT
@ GTS_MP_LEFT
Definition goto.h:27
GTS_TURN_STEP
@ GTS_TURN_STEP
Definition goto.h:26
GTS_COUNT
@ GTS_COUNT
Definition goto.h:30
goto_add_waypoint
bool goto_add_waypoint(void)
Definition goto.c:487
send_goto_tile
bool send_goto_tile(struct unit *punit, struct tile *ptile)
Definition goto.c:1551
goto_pop_waypoint
bool goto_pop_waypoint(void)
Definition goto.c:524
send_connect_route
void send_connect_route(enum unit_activity activity, struct extra_type *tgt)
Definition goto.c:1713
goto_unit_killed
void goto_unit_killed(struct unit *punit)
Definition goto.c:1040
free_client_goto
void free_client_goto(void)
Definition goto.c:162
enter_goto_state
void enter_goto_state(struct unit_list *punits)
Definition goto.c:1001
send_goto_route
void send_goto_route(void)
Definition goto.c:1869
is_valid_goto_destination
bool is_valid_goto_destination(const struct tile *ptile)
Definition goto.c:179
goto_get_turns
bool goto_get_turns(int *min, int *max)
Definition goto.c:1068
request_orders_cleared
void request_orders_cleared(struct unit *punit)
Definition goto.c:1363
persistent
static GtkWidget * persistent
Definition rallypointdlg.c:40
city
Definition city.h:320
extra_type
Definition extras.h:88
pf_path
Definition path_finding.h:344
tile
Definition tile.h:50
unit_order
Definition unit.h:92
unit
Definition unit.h:138