![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "fc_types.h"
Include dependency graph for goto.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Enumerations | |
| enum | goto_tile_state { GTS_TURN_STEP , GTS_MP_LEFT , GTS_EXHAUSTED_MP , GTS_COUNT , GTS_INVALID = -1 } |
Functions | |
| void | init_client_goto () |
| Called only by handle_map_info() in client/packhand.c. More... | |
| void | free_client_goto () |
| Called above, and by control_done() in client/control.c. More... | |
| void | enter_goto_state (const std::vector< unit * > &units) |
| Enter the goto state: activate, prepare PF-template and add the initial part. More... | |
| void | exit_goto_state () |
| Tidy up and deactivate goto state. More... | |
| void | goto_unit_killed (struct unit *punit) |
| Called from control_unit_killed() in client/control.c. More... | |
| bool | goto_is_active () |
| Is goto state active? More... | |
| bool | goto_tile_state (const struct tile *ptile, enum goto_tile_state *state, int *turns, bool *waypoint) |
| Returns the state of 'ptile': turn number to print, and whether 'ptile' is a waypoint. More... | |
| void | goto_add_waypoint () |
| Inserts a waypoint at the end of the current goto line. More... | |
| bool | goto_pop_waypoint () |
| Returns whether there were any waypoint popped (we don't remove the initial position) More... | |
| bool | is_valid_goto_destination (const struct tile *ptile) |
| Determines if a goto to the destination tile is allowed. More... | |
| bool | is_valid_goto_draw_line (struct tile *dest_tile) |
| Puts a line to dest_tile on the map according to the current goto_map. More... | |
| void | request_orders_cleared (struct unit *punit) |
| Send a packet to the server to request that the current orders be cleared. More... | |
| void | send_rally_path (city *pcity, unit *punit, const PFPath &path, unit_order *final_order) |
| Send an arbitrary rally path for the city to the server. More... | |
| bool | send_goto_tile (struct unit *punit, struct tile *ptile) |
| Send orders for the unit to move it to the arbitrary tile. More... | |
| bool | send_rally_tile (struct city *pcity, struct tile *ptile) |
| Send rally orders for the city to move new units to the arbitrary tile. More... | |
| bool | send_attack_tile (struct unit *punit, struct tile *ptile) |
| Send orders for the unit to move it to the arbitrary tile and attack everything it approaches. More... | |
| void | send_patrol_route () |
| Send the current patrol route (i.e., the one generated via HOVER_STATE) to the server. More... | |
| void | send_goto_route () |
| Send the current goto route (i.e., the one generated via HOVER_STATE) to the server. More... | |
| void | send_connect_route (enum unit_activity activity, struct extra_type *tgt) |
| Send the current connect route (i.e., the one generated via HOVER_STATE) to the server. More... | |
| struct tile * | tile_before_end_path (struct unit *punit, struct tile *ptile) |
| Finds penultimate tile on path for given unit going to ptile. More... | |
| bool | can_unit_move_now (const struct unit *punit) |
| Returns if unit can move now. More... | |
| enum goto_tile_state |
| bool can_unit_move_now | ( | const struct unit * | punit | ) |
Returns if unit can move now.
Definition at line 56 of file goto.cpp.
Referenced by find_best_focus_candidate(), get_units_waiting_data(), and popup_info_text().
| void enter_goto_state | ( | const std::vector< unit * > & | units | ) |
Enter the goto state: activate, prepare PF-template and add the initial part.
Definition at line 247 of file goto.cpp.
Referenced by request_unit_connect(), request_unit_goto(), request_unit_patrol(), and mr_menu::slot_delayed_goto().
| void exit_goto_state | ( | ) |
Tidy up and deactivate goto state.
Definition at line 269 of file goto.cpp.
Referenced by send_goto_route(), set_hover_state(), and map_view::shortcut_pressed().
| void free_client_goto | ( | ) |
Called above, and by control_done() in client/control.c.
Definition at line 87 of file goto.cpp.
Referenced by control_free().
| void goto_add_waypoint | ( | ) |
Inserts a waypoint at the end of the current goto line.
Definition at line 104 of file goto.cpp.
Referenced by request_unit_connect(), request_unit_goto(), and request_unit_patrol().
| bool goto_is_active | ( | ) |
Is goto state active?
Definition at line 302 of file goto.cpp.
Referenced by do_unit_goto(), enter_goto_state(), exit_goto_state(), freeciv::layer_goto::fill_sprite_array(), goto_tile_state(), goto_unit_killed(), is_valid_goto_draw_line(), request_unit_connect(), request_unit_goto(), request_unit_patrol(), send_connect_route(), send_goto_route(), map_view::shortcut_pressed(), map_view::shortcut_released(), and unit_actions::update_actions().
| bool goto_pop_waypoint | ( | ) |
Returns whether there were any waypoint popped (we don't remove the initial position)
Definition at line 126 of file goto.cpp.
Referenced by key_cancel_action().
| bool goto_tile_state | ( | const struct tile * | ptile, |
| enum goto_tile_state * | state, | ||
| int * | turns, | ||
| bool * | waypoint | ||
| ) |
| void goto_unit_killed | ( | struct unit * | punit | ) |
Called from control_unit_killed() in client/control.c.
Definition at line 284 of file goto.cpp.
Referenced by control_unit_killed().
| void init_client_goto | ( | ) |
Called only by handle_map_info() in client/packhand.c.
Definition at line 79 of file goto.cpp.
Referenced by handle_map_info().
| bool is_valid_goto_destination | ( | const struct tile * | ptile | ) |
Determines if a goto to the destination tile is allowed.
Definition at line 96 of file goto.cpp.
Referenced by control_mouse_cursor().
| bool is_valid_goto_draw_line | ( | struct tile * | dest_tile | ) |
Puts a line to dest_tile on the map according to the current goto_map.
If there is no route to the dest then don't draw anything.
Definition at line 383 of file goto.cpp.
Referenced by do_unit_connect(), do_unit_goto(), do_unit_patrol_to(), goto_add_waypoint(), and update_line().
| void request_orders_cleared | ( | struct unit * | punit | ) |
Send a packet to the server to request that the current orders be cleared.
Definition at line 442 of file goto.cpp.
Referenced by clear_unit_orders().
Send orders for the unit to move it to the arbitrary tile and attack everything it approaches.
Returns FALSE if no path is found.
Definition at line 694 of file goto.cpp.
Referenced by mr_menu::slot_execute_orders().
| void send_connect_route | ( | enum unit_activity | activity, |
| struct extra_type * | tgt | ||
| ) |
Send the current connect route (i.e., the one generated via HOVER_STATE) to the server.
Definition at line 724 of file goto.cpp.
Referenced by do_unit_connect().
| void send_goto_route | ( | ) |
Send the current goto route (i.e., the one generated via HOVER_STATE) to the server.
The route might involve more than one part if waypoints were used.
Definition at line 836 of file goto.cpp.
Referenced by do_unit_goto(), key_unit_action_select_tgt(), and send_patrol_route().
Send orders for the unit to move it to the arbitrary tile.
Returns FALSE if no path is found.
Definition at line 630 of file goto.cpp.
Referenced by goto_dialog::go_to_city(), and mr_menu::slot_autocaravan().
| void send_patrol_route | ( | ) |
Send the current patrol route (i.e., the one generated via HOVER_STATE) to the server.
Definition at line 718 of file goto.cpp.
Referenced by do_unit_patrol_to().
| void send_rally_path | ( | city * | pcity, |
| unit * | punit, | ||
| const PFPath & | path, | ||
| unit_order * | final_order | ||
| ) |
Send an arbitrary rally path for the city to the server.
Definition at line 620 of file goto.cpp.
Referenced by send_rally_tile().
Send rally orders for the city to move new units to the arbitrary tile.
Returns FALSE if no path is found for the currently produced unit type.
Definition at line 652 of file goto.cpp.
Referenced by map_view::shortcut_pressed().