Qt client - fixed downcast of XXX which does not point to an object of type chat_listener
[freeciv.git] / client / goto.h
blob69d57def59309eeb08ae55348c7c3b3fac116065
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.
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
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 struct pf_path;
21 struct tile;
22 struct unit;
23 struct unit_list;
25 enum goto_tile_state {
26 GTS_TURN_STEP,
27 GTS_MP_LEFT,
28 GTS_EXHAUSTED_MP,
30 GTS_COUNT
33 void init_client_goto(void);
34 void free_client_goto(void);
36 void enter_goto_state(struct unit_list *punits);
37 void exit_goto_state(void);
39 void goto_unit_killed(struct unit *punit);
41 bool goto_is_active(void);
42 bool goto_get_turns(int *min, int *max);
43 bool goto_tile_state(const struct tile *ptile, enum goto_tile_state *state,
44 int *turns, bool *waypoint);
45 bool goto_add_waypoint(void);
46 bool goto_pop_waypoint(void);
48 bool is_valid_goto_destination(const struct tile *ptile);
49 bool is_valid_goto_draw_line(struct tile *dest_tile);
51 void request_orders_cleared(struct unit *punit);
52 void send_goto_path(struct unit *punit, struct pf_path *path,
53 struct unit_order *last_order);
54 bool send_goto_tile(struct unit *punit, struct tile *ptile);
55 bool send_attack_tile(struct unit *punit, struct tile *ptile);
56 void send_patrol_route(void);
57 void send_goto_route(void);
58 void send_connect_route(enum unit_activity activity,
59 struct extra_type *tgt);
61 struct pf_path *path_to_nearest_allied_city(struct unit *punit);
62 struct tile *tile_before_end_path(struct unit *punit, struct tile *ptile);
64 #ifdef __cplusplus
66 #endif /* __cplusplus */
68 #endif /* FC__GOTO_H */