Freeciv-3.1
|
Go to the source code of this file.
Macros | |
#define | can_unit_do_activity_client(_punit_, _act_) can_unit_do_activity(&(wld.map), _punit_, _act_) |
#define | can_unit_do_activity_targeted_client(_punit_, _act_, _tgt_) can_unit_do_activity_targeted(&(wld.map), _punit_, _act_, _tgt_) |
#define | can_units_do_activity_client(_punits_, _act_) can_units_do_activity(&(wld.map), _punits_, _act_) |
#define | can_units_do_activity_targeted_client(_punits_, _act_, _tgt_) can_units_do_activity_targeted(&(wld.map), _punits_, _act_, _tgt_) |
#define | SPECENUM_NAME unit_select_type_mode |
#define | SPECENUM_VALUE0 SELTYPE_SINGLE |
#define | SPECENUM_VALUE1 SELTYPE_SAME |
#define | SPECENUM_VALUE2 SELTYPE_ALL |
#define | SPECENUM_NAME unit_select_location_mode |
#define | SPECENUM_VALUE0 SELLOC_UNITS /* Units on tile. */ |
#define | SPECENUM_VALUE1 SELLOC_TILE /* Tile. */ |
#define | SPECENUM_VALUE2 SELLOC_CONT /* Continent. */ |
#define | SPECENUM_VALUE3 SELLOC_LAND /* Move type: land. */ |
#define | SPECENUM_VALUE4 SELLOC_SEA /* Move type: sea. */ |
#define | SPECENUM_VALUE5 SELLOC_BOTH /* Move type: both. */ |
#define | SPECENUM_VALUE6 SELLOC_WORLD /* World. */ |
#define | SPECENUM_COUNT SELLOC_COUNT |
#define | MAX_NUM_UNITS_BELOW 4 |
Enumerations | |
enum | cursor_hover_state { HOVER_NONE = 0 , HOVER_GOTO , HOVER_PARADROP , HOVER_CONNECT , HOVER_PATROL , HOVER_ACT_SEL_TGT , HOVER_GOTO_SEL_TGT } |
enum | quickselect_type { SELECT_POPUP = 0 , SELECT_SEA , SELECT_LAND , SELECT_APPEND , SELECT_FOCUS } |
Variables | |
enum cursor_hover_state | hover_state |
enum unit_activity | connect_activity |
struct extra_type * | connect_tgt |
action_id | goto_last_action |
int | goto_last_tgt |
int | goto_last_sub_tgt |
enum unit_orders | goto_last_order |
bool | non_ai_unit_focus |
int | num_units_below |
#define can_unit_do_activity_client | ( | _punit_, | |
_act_ | |||
) | can_unit_do_activity(&(wld.map), _punit_, _act_) |
#define can_unit_do_activity_targeted_client | ( | _punit_, | |
_act_, | |||
_tgt_ | |||
) | can_unit_do_activity_targeted(&(wld.map), _punit_, _act_, _tgt_) |
#define can_units_do_activity_client | ( | _punits_, | |
_act_ | |||
) | can_units_do_activity(&(wld.map), _punits_, _act_) |
#define can_units_do_activity_targeted_client | ( | _punits_, | |
_act_, | |||
_tgt_ | |||
) | can_units_do_activity_targeted(&(wld.map), _punits_, _act_, _tgt_) |
#define SPECENUM_NAME unit_select_type_mode |
#define SPECENUM_NAME unit_select_location_mode |
#define SPECENUM_VALUE3 SELLOC_LAND /* Move type: land. */ |
#define SPECENUM_VALUE5 SELLOC_BOTH /* Move type: both. */ |
enum cursor_hover_state |
enum quickselect_type |
void action_decision_clear_want | ( | const int | old_actor_id | ) |
Have the server record that a decision no longer is wanted for the specified unit.
Definition at line 1079 of file control.c.
Referenced by act_sel_done_primary(), action_decision_maybe_auto(), diplomat_queue_handle_primary(), diplomat_queue_handle_primary(), handle_city_sabotage_list(), handle_unit_action_answer(), and handle_unit_actions().
void action_decision_request | ( | struct unit * | actor_unit | ) |
Request that the player makes a decision for the specified unit.
Definition at line 1109 of file control.c.
Referenced by action_decision_handle(), and action_decision_maybe_auto().
void action_selection_next_in_focus | ( | const int | old_actor_id | ) |
Move on to the next unit in focus that needs an action decision.
Definition at line 1091 of file control.c.
Referenced by act_sel_done_primary(), diplomat_queue_handle_primary(), diplomat_queue_handle_primary(), handle_city_sabotage_list(), handle_unit_action_answer(), handle_unit_actions(), and handle_unit_remove().
void action_selection_no_longer_in_progress | ( | const int | old_actor_id | ) |
The action selection process is no longer in progress for the specified unit. It is safe to let another unit enter action selection.
Definition at line 1050 of file control.c.
Referenced by act_sel_done_primary(), diplomat_queue_handle_primary(), diplomat_queue_handle_primary(), handle_city_sabotage_list(), handle_unit_action_answer(), handle_unit_actions(), tgt_extra_change_callback(), and tgt_unit_change_callback().
void auto_center_on_focus_unit | ( | void | ) |
Center on the focus unit, if off-screen and auto_center_on_unit is true.
Definition at line 435 of file control.c.
Referenced by handle_new_year(), popup_action_selection(), popup_bribe_dialog(), popup_incite_dialog(), popup_sabotage_dialog(), and unit_focus_set().
double blink_active_unit | ( | void | ) |
Blink the active unit (if necessary). Return the time until the next blink (in seconds).
Definition at line 893 of file control.c.
Referenced by real_timer_callback().
double blink_turn_done_button | ( | void | ) |
Blink the turn done button (if necessary). Return the time until the next blink (in seconds).
Definition at line 925 of file control.c.
Referenced by real_timer_callback().
bool can_unit_do_connect | ( | struct unit * | punit, |
enum unit_activity | activity, | ||
struct extra_type * | tgt | ||
) |
Return whether the unit can connect with given activity (or with any activity if activity arg is set to ACTIVITY_IDLE)
This function is client-specific.
Definition at line 1410 of file control.c.
Referenced by can_units_do_connect(), and real_menus_update().
void cancel_city | ( | struct tile * | ptile | ) |
Do not build city after all. Cancel city building mark from all units prepared for it.
Definition at line 3988 of file control.c.
Referenced by name_new_city_popup_callback(), newcity_cancel_callback(), and popup_newcity_dialog().
int check_recursive_road_connect | ( | struct tile * | ptile, |
const struct extra_type * | pextra, | ||
const struct unit * | punit, | ||
const struct player * | pplayer, | ||
int | rec | ||
) |
Fill orders to build recursive roads. This modifies ptile, so virtual copy of the real tile should be passed.
Definition at line 1332 of file control.c.
Referenced by can_unit_do_connect(), check_recursive_road_connect(), and get_activity_time().
void clear_hover_state | ( | void | ) |
Clear current hover state (go to HOVER_NONE).
Definition at line 328 of file control.c.
Referenced by control_free(), control_unit_killed(), do_map_click(), do_move_unit(), do_unit_connect(), do_unit_patrol_to(), handle_game_info(), key_cancel_action(), key_unit_action_select_tgt(), paradrop_here_callback(), release_goto_button(), map_view::shortcut_pressed(), unit_focus_add(), unit_focus_advance(), unit_focus_remove(), and unit_focus_set().
void clear_unit_orders | ( | struct unit * | punit | ) |
Clear all orders for the given unit.
Definition at line 482 of file control.c.
Referenced by current_focus_append(), request_unit_move_done(), and send_goto_route().
void control_free | ( | void | ) |
Called only by client_game_free() in client/client_main.c
Definition at line 154 of file control.c.
Referenced by client_game_free(), and client_game_reset().
void control_init | ( | void | ) |
Called only by client_game_init() in client/client_main.c
Definition at line 137 of file control.c.
Referenced by client_game_init(), and client_game_reset().
void control_mouse_cursor | ( | struct tile * | ptile | ) |
Determines which mouse cursor should be used, according to hover_state, and the information gathered from the tile which is under the mouse cursor (ptile).
Definition at line 1214 of file control.c.
Referenced by anim_cursor_cb(), leave_mapcanvas(), main_mouse_motion_handler(), mouse_scroll_mapcanvas(), mouse_scroll_mapcanvas(), map_view::mouseMoveEvent(), move_mapcanvas(), move_mapcanvas(), request_unit_connect(), request_unit_goto(), set_server_busy(), and mr_menu::slot_delayed_goto().
void control_unit_killed | ( | struct unit * | punit | ) |
Called when a unit is killed; this removes it from the control lists.
Definition at line 226 of file control.c.
Referenced by client_remove_unit().
void do_map_click | ( | struct tile * | ptile, |
enum quickselect_type | qtype | ||
) |
Handles everything when the user clicked a tile
Definition at line 2795 of file control.c.
Referenced by action_button_pressed(), butt_down_overviewcanvas(), and left_butt_down_overviewcanvas().
Called to have the client move a unit from one location to another, updating the graphics if necessary. The caller must redraw the target location after the move.
Definition at line 2689 of file control.c.
Referenced by handle_unit_packet_common().
void do_unit_connect | ( | struct tile * | ptile, |
enum unit_activity | activity, | ||
struct extra_type * | tgt | ||
) |
"Connect" to the given location.
Definition at line 3083 of file control.c.
Referenced by do_map_click().
void do_unit_goto | ( | struct tile * | ptile | ) |
Finish the goto mode and let the units stored in goto_map_list move to a given location.
Definition at line 3005 of file control.c.
Referenced by do_map_click(), and release_goto_button().
Paradrop to a location.
Definition at line 3027 of file control.c.
Referenced by do_map_click(), and paradrop_here_callback().
void do_unit_patrol_to | ( | struct tile * | ptile | ) |
Patrol to a location.
Definition at line 3067 of file control.c.
Referenced by do_map_click(), and patrol_here_callback().
Return a pointer to a visible unit, if there is one.
Definition at line 823 of file control.c.
Referenced by clipboard_copy_production(), control_mouse_cursor(), get_drawable_unit(), inputline_make_chat_link(), chatwdg::make_link(), overview_tile_color(), popit(), popit(), popit(), popup_info_text(), and fc_client::popup_tile_info().
void finish_city | ( | struct tile * | ptile, |
const char * | name | ||
) |
All units ready to build city to the tile should now proceed.
Definition at line 3969 of file control.c.
Referenced by name_new_city_popup_callback(), newcity_ok_callback(), and popup_newcity_dialog().
Return TRUE iff a unit on this tile is in focus.
Definition at line 397 of file control.c.
Referenced by city_packet_common(), client_remove_unit(), find_a_focus_unit_tile_to_center_on(), find_best_focus_candidate(), handle_city_remove(), handle_tile_info(), and handle_unit_packet_common().
int get_num_units_in_focus | ( | void | ) |
Return the number of units currently in focus (0 or more).
Definition at line 185 of file control.c.
Referenced by blink_active_unit(), center_on_something(), client_remove_unit(), control_unit_killed(), do_map_click(), find_a_focus_unit_tile_to_center_on(), handle_unit_packet_common(), maybe_activate_keyboardless_goto(), mr_menu::menus_sensitive(), popup_airlift_dialog(), popup_goto_dialog(), real_menus_update(), real_timer_callback(), request_unit_move_done(), reset_unit_table(), store_previous_focus(), toggle_unit_info_window_callback(), unit_focus_advance(), unit_focus_remove(), unit_focus_set(), unit_focus_update(), unit_goto_city_callback(), unit_goto_city_callback(), and usdlg_tab_append_units().
struct unit_list * get_units_in_focus | ( | void | ) |
Returns list of units currently in focus.
Definition at line 177 of file control.c.
Referenced by action_selection_next_in_focus(), goto_dialog::airlift_to(), base_callback(), base_callback(), blink_active_unit(), build_city_callback(), build_city_callback(), build_road_callback(), build_road_callback(), clean_menu_callback(), clean_pollution_callback(), client_remove_unit(), control_mouse_cursor(), control_unit_killed(), do_map_click(), do_move_unit(), do_unit_act_sel_vs(), fill_grid_sprite_array(), goto_dialog::fill_tab(), find_visible_unit(), focus_units_changed(), fortify_callback(), fortify_callback(), get_focus_unit_on_tile(), goto_dialog::go_to_city(), goto_cmd_callback(), handle_city_info(), handle_new_year(), handle_unit_packet_common(), irrigation_callback(), is_valid_goto_draw_line(), goto_dialog::item_selected(), key_cancel_action(), key_unit_action_select(), key_unit_action_select_tgt(), key_unit_airbase(), key_unit_assign_battlegroup(), key_unit_auto_explore(), key_unit_auto_settle(), key_unit_build_city(), key_unit_build_wonder(), key_unit_clean(), key_unit_convert(), key_unit_cultivate(), key_unit_extra(), key_unit_fortify(), key_unit_fortress(), key_unit_gen_clean(), key_unit_homecity(), key_unit_move(), key_unit_paradrop(), key_unit_pillage(), key_unit_plant(), key_unit_road(), key_unit_sentry(), key_unit_trade_route(), key_unit_transform(), key_unit_unload_all(), key_unit_wait(), key_unit_wakeup_others(), leave_mapcanvas(), leave_mapcanvas(), mr_menu::menus_sensitive(), mine_callback(), overview_update_line(), paradrop_here_callback(), patrol_here_callback(), popup_info_text(), real_menus_update(), real_resize_window_callback(), real_set_client_page(), refresh_airlift_button(), refresh_airlift_column(), release_goto_button(), request_unit_connect(), request_unit_goto(), request_unit_move_done(), request_unit_patrol(), request_units_wait(), reset_unit_table(), road_callback(), road_callback(), select_all_on_tile_callback(), select_all_on_tile_callback(), select_same_type_callback(), select_same_type_callback(), select_same_type_cont_callback(), select_same_type_cont_callback(), select_same_type_tile_callback(), select_same_type_tile_callback(), select_single_callback(), select_single_callback(), set_client_state(), set_turn_done_button_state(), mr_menu::slot_board(), mr_menu::slot_build_base(), mr_menu::slot_build_city(), mr_menu::slot_build_path(), mr_menu::slot_build_road(), mr_menu::slot_clean_pollution(), mr_menu::slot_deboard(), mr_menu::slot_delayed_goto(), mr_menu::slot_disband(), mr_menu::slot_return_to_city(), mr_menu::slot_select_all_tile(), mr_menu::slot_select_one(), mr_menu::slot_select_same_continent(), mr_menu::slot_select_same_everywhere(), mr_menu::slot_select_same_tile(), mr_menu::slot_upgrade(), store_previous_focus(), tileset_changed(), toggle_unit_info_window_callback(), unit_board_callback(), unit_board_callback(), unit_deboard_callback(), unit_deboard_callback(), unit_disband_callback(), unit_disband_callback(), unit_focus_advance(), unit_focus_update(), unit_is_in_focus(), unit_order_callback(), unit_return_callback(), unit_return_callback(), unit_upgrade_callback(), unit_upgrade_callback(), go_act_menu::update(), hud_units::update_actions(), mr_menu::update_bases_menu(), update_line(), mr_menu::update_roads_menu(), and update_source_label().
struct unit * head_of_units_in_focus | ( | void | ) |
Return head of focus units list.
Definition at line 411 of file control.c.
Referenced by center_on_something(), goto_dialog::fill_tab(), find_a_focus_unit_tile_to_center_on(), find_best_focus_candidate(), goto_city_callback(), goto_here_callback(), unit_hud_selector::island_filter(), main_key_down_handler(), popup_advanced_terrain_dialog(), quickselect(), reset_unit_table(), mr_menu::slot_autocaravan(), toggle_map_window_callback(), unit_focus_advance(), unit_focus_set(), unit_hud_selector::unit_hud_selector(), unit_order_callback(), unit_select_dialog_popup(), unit_actions::update_actions(), hud_units::update_actions(), fc_client::update_info_label(), units_select::update_units(), and usdlg_tile().
void key_bases_toggle | ( | void | ) |
Handle user 'toggle bases display' input
Definition at line 3862 of file control.c.
Referenced by show_bases_callback(), and show_bases_callback().
void key_cancel_action | ( | void | ) |
The 'Escape' key.
Definition at line 3100 of file control.c.
Referenced by button_down_on_map(), key_press_map_canvas(), key_press_map_canvas(), map_view::keyPressEvent(), and map_event_handler().
void key_center_capital | ( | void | ) |
Center the mapview on the player's named capital, or print a failure message.
Definition at line 3136 of file control.c.
Referenced by fc_client::create_game_page(), key_press_map_canvas(), and key_press_map_canvas().
void key_cities_toggle | ( | void | ) |
Handle user 'toggle cities display' input
Definition at line 3894 of file control.c.
Referenced by show_cities_callback(), and show_cities_callback().
void key_city_buycost_toggle | ( | void | ) |
Toggles the showing of the buy cost of the current production in the city descriptions.
Definition at line 3789 of file control.c.
Referenced by show_city_buy_cost_callback(), show_city_buy_cost_callback(), and mr_menu::slot_city_buycost().
void key_city_full_bar_toggle | ( | void | ) |
Toggle the "Draw the city bar" option.
Definition at line 3763 of file control.c.
Referenced by show_city_full_bar_callback(), show_city_full_bar_callback(), and mr_menu::slot_fullbar().
void key_city_growth_toggle | ( | void | ) |
Toggles the "show city growth turns" option by passing off the request to another function...
Definition at line 3780 of file control.c.
Referenced by map_event_handler(), show_city_growth_callback(), show_city_growth_callback(), and mr_menu::slot_city_growth().
void key_city_names_toggle | ( | void | ) |
Handle user 'toggle city names display' input
Definition at line 3771 of file control.c.
Referenced by map_event_handler(), show_city_names_callback(), show_city_names_callback(), and mr_menu::slot_city_names().
void key_city_outlines_toggle | ( | void | ) |
Toggle drawing of city outlines.
Definition at line 3723 of file control.c.
Referenced by map_event_handler(), show_city_outlines_callback(), show_city_outlines_callback(), and mr_menu::slot_city_outlines().
void key_city_output_toggle | ( | void | ) |
Toggle drawing of city output produced by workers of the city.
Definition at line 3731 of file control.c.
Referenced by map_event_handler(), show_city_output_callback(), show_city_output_callback(), and mr_menu::slot_city_output().
void key_city_productions_toggle | ( | void | ) |
Handle user 'toggle city production display' input
Definition at line 3797 of file control.c.
Referenced by map_event_handler(), show_city_productions_callback(), show_city_productions_callback(), and mr_menu::slot_city_production().
void key_city_trade_routes_toggle | ( | void | ) |
Handle client request to toggle drawing of trade route information by the city name for cities visible on the main map view.
Definition at line 3806 of file control.c.
Referenced by map_event_handler(), show_city_trade_routes_callback(), show_city_trade_routes_callback(), and mr_menu::slot_city_trade_routes().
void key_coastline_toggle | ( | void | ) |
Handle user 'toggle coastline display' input
Definition at line 3830 of file control.c.
Referenced by show_coastline_callback(), and show_coastline_callback().
void key_editor_recalculate_borders | ( | void | ) |
Recalculate borders.
Definition at line 3950 of file control.c.
Referenced by recalc_borders_callback().
void key_editor_toggle | ( | void | ) |
Toggle editor mode in the server.
Definition at line 3942 of file control.c.
Referenced by edit_mode_callback(), and edit_mode_callback().
void key_editor_toggle_fogofwar | ( | void | ) |
Send a request to the server to toggle fog-of-war for the current player (only applies in edit mode).
Definition at line 3959 of file control.c.
Referenced by toggle_fog_callback(), and toggle_fog_callback().
void key_end_turn | ( | void | ) |
Handle user 'end turn' input.
Definition at line 3153 of file control.c.
Referenced by end_turn_callback(), map_view::keyPressEvent(), main_key_down_handler(), side_finish_turn(), toplevel_key_press_handler(), toplevel_key_press_handler(), and unit_focus_advance().
void key_focus_unit_toggle | ( | void | ) |
Handle user 'toggle key units display' input
Definition at line 3926 of file control.c.
Referenced by show_focus_unit_callback(), and show_focus_unit_callback().
void key_fog_of_war_toggle | ( | void | ) |
Handle user 'toggle fog of war display' input
Definition at line 3934 of file control.c.
Referenced by map_event_handler(), show_fog_of_war_callback(), and show_fog_of_war_callback().
void key_huts_toggle | ( | void | ) |
Handle user 'toggle huts display' input
Definition at line 3878 of file control.c.
Referenced by map_event_handler(), show_huts_callback(), and show_huts_callback().
void key_irrigation_toggle | ( | void | ) |
Handle user 'toggle irrigation display' input
Definition at line 3846 of file control.c.
Referenced by map_event_handler(), show_irrigation_callback(), and show_irrigation_callback().
void key_map_borders_toggle | ( | void | ) |
Toggle map borders on the mapview on/off based on a keypress.
Definition at line 3747 of file control.c.
Referenced by map_event_handler(), show_national_borders_callback(), show_national_borders_callback(), and mr_menu::slot_borders().
void key_map_grid_toggle | ( | void | ) |
Handle user 'toggle map grid' input
Definition at line 3739 of file control.c.
Referenced by map_event_handler(), show_map_grid_callback(), show_map_grid_callback(), and mr_menu::slot_map_grid().
void key_map_native_toggle | ( | void | ) |
Toggle native tiles on the mapview on/off based on a keypress.
Definition at line 3755 of file control.c.
Referenced by map_event_handler(), show_native_tiles_callback(), show_native_tiles_callback(), and mr_menu::slot_native_tiles().
void key_mines_toggle | ( | void | ) |
Handle user 'toggle mine display' input
Definition at line 3854 of file control.c.
Referenced by map_event_handler(), show_mine_callback(), and show_mines_callback().
void key_pollution_toggle | ( | void | ) |
Handle user 'toggle pollution display' input
Definition at line 3886 of file control.c.
Referenced by map_event_handler(), show_pollution_callback(), and show_pollution_callback().
void key_recall_previous_focus_unit | ( | void | ) |
Recall the previous focus unit(s). See store_previous_focus().
Definition at line 3161 of file control.c.
Referenced by key_press_map_canvas(), key_press_map_canvas(), map_view::keyPressEvent(), and map_event_handler().
void key_resources_toggle | ( | void | ) |
Handle user 'toggle resources display' input
Definition at line 3870 of file control.c.
Referenced by map_event_handler(), show_resources_callback(), and show_resources_callback().
void key_roads_rails_toggle | ( | void | ) |
Handle user 'toggle road/railroad display' input
Definition at line 3838 of file control.c.
Referenced by show_paths_callback(), and show_road_rails_callback().
void key_terrain_toggle | ( | void | ) |
Handle user 'toggle terrain display' input
Definition at line 3822 of file control.c.
Referenced by map_event_handler(), show_terrain_callback(), and show_terrain_callback().
void key_unit_action_select | ( | void | ) |
Handle user 'Do...' input
Definition at line 3225 of file control.c.
Referenced by key_unit_action_select_tgt().
void key_unit_action_select_tgt | ( | void | ) |
Have the user select what action the unit(s) in focus should perform to the targets at the tile the user will specify by clicking on it.
Will stop asking for a target tile and have each actor unit act against its own tile if called twice.
Definition at line 3247 of file control.c.
Referenced by diplomat_action_callback(), do_action_callback(), mr_menu::slot_action(), and unit_order_callback().
void key_unit_airbase | ( | void | ) |
Handle user 'build base of class airbase' input
Definition at line 3393 of file control.c.
Referenced by build_airbase_callback(), build_airbase_callback(), mr_menu::slot_unit_airbase(), and unit_order_callback().
void key_unit_assign_battlegroup | ( | int | battlegroup, |
bool | append | ||
) |
Assign all focus units to this battlegroup.
Definition at line 3658 of file control.c.
Referenced by bg_append0_callback(), bg_append1_callback(), bg_append2_callback(), bg_append3_callback(), bg_append_callback(), bg_assign0_callback(), bg_assign1_callback(), bg_assign2_callback(), bg_assign3_callback(), bg_assign_callback(), mr_menu::slot_bg1append(), mr_menu::slot_bg1assign(), mr_menu::slot_bg2append(), mr_menu::slot_bg2assign(), mr_menu::slot_bg3append(), mr_menu::slot_bg3assign(), mr_menu::slot_bg4append(), and mr_menu::slot_bg4assign().
void key_unit_auto_explore | ( | void | ) |
Handle user 'autoexplore' input
Definition at line 3410 of file control.c.
Referenced by mr_menu::slot_unit_explore(), unit_explore_callback(), unit_explore_callback(), and unit_order_callback().
void key_unit_auto_settle | ( | void | ) |
Call to request (from the server) that the focus unit is put into autosettler mode.
Definition at line 3423 of file control.c.
Referenced by auto_settle_callback(), auto_settle_callback(), and mr_menu::slot_auto_settler().
void key_unit_build_city | ( | void | ) |
Handle use 'build city' input.
Definition at line 3194 of file control.c.
Referenced by unit_order_callback().
void key_unit_build_wonder | ( | void | ) |
Handle user 'help build wonder' input
Definition at line 3204 of file control.c.
Referenced by unit_order_callback().
void key_unit_clean | ( | void | ) |
Handle user 'clean' input
Definition at line 3580 of file control.c.
Referenced by clean_callback().
void key_unit_connect | ( | enum unit_activity | activity, |
struct extra_type * | tgt | ||
) |
Handle user pressing key for 'Connect' command
Definition at line 3216 of file control.c.
Referenced by connect_irrigation_callback(), connect_irrigation_callback(), connect_maglev_callback(), connect_maglev_callback(), connect_rail_callback(), connect_rail_callback(), connect_road_callback(), connect_road_callback(), mr_menu::slot_conn_irrigation(), mr_menu::slot_conn_maglev(), mr_menu::slot_conn_rail(), mr_menu::slot_conn_road(), and unit_order_callback().
void key_unit_convert | ( | void | ) |
Unit convert key pressed or respective menu entry selected.
Definition at line 3435 of file control.c.
Referenced by mr_menu::slot_convert(), unit_convert_callback(), unit_convert_callback(), and unit_order_callback().
void key_unit_cultivate | ( | void | ) |
Handle user 'cultivate' input
Definition at line 3536 of file control.c.
Referenced by cultivate_callback(), cultivate_callback(), mr_menu::slot_cultivate(), and unit_order_callback().
void key_unit_done | ( | void | ) |
Handle user 'unit done' input
Definition at line 3304 of file control.c.
Referenced by mr_menu::slot_done_moving(), unit_done_callback(), unit_done_callback(), and unit_order_callback().
void key_unit_fallout | ( | void | ) |
Handle user 'clean fallout' input
Definition at line 3445 of file control.c.
Referenced by clean_fallout_callback(), mr_menu::slot_clean_fallout(), and unit_order_callback().
void key_unit_fortify | ( | void | ) |
Handle user 'fortify' input
Definition at line 3453 of file control.c.
Referenced by mr_menu::slot_unit_fortify(), and unit_order_callback().
void key_unit_fortress | ( | void | ) |
Handle user 'build base of class fortress' input
Definition at line 3465 of file control.c.
Referenced by build_fortress_callback(), build_fortress_callback(), mr_menu::slot_unit_fortress(), and unit_order_callback().
void key_unit_goto | ( | void | ) |
Handle user 'unit goto' input
Definition at line 3312 of file control.c.
Referenced by button_down_on_map(), finger_down_on_map(), mr_menu::slot_unit_goto(), unit_goto_callback(), unit_goto_callback(), and unit_order_callback().
void key_unit_homecity | ( | void | ) |
Handle user 'change homecity' input
Definition at line 3482 of file control.c.
Referenced by mr_menu::slot_set_home(), unit_homecity_callback(), unit_homecity_callback(), and unit_order_callback().
void key_unit_irrigate | ( | void | ) |
Handle user 'irrigate' input
Definition at line 3528 of file control.c.
Referenced by build_irrigation_callback(), build_irrigation_callback(), mr_menu::slot_build_irrigation(), and unit_order_callback().
void key_unit_mine | ( | void | ) |
Handle user 'build mine' input
Definition at line 3548 of file control.c.
Referenced by build_mine_callback(), build_mine_callback(), mr_menu::slot_build_mine(), and unit_order_callback().
void key_unit_move | ( | enum direction8 | gui_dir | ) |
Move the focus unit in the given direction. Here directions are defined according to the GUI, so that north is "up" in the interface.
Definition at line 3182 of file control.c.
Referenced by key_press_map_canvas(), key_press_map_canvas(), map_view::keyPressEvent(), and map_event_handler().
void key_unit_paradrop | ( | void | ) |
Handle user 'paradrop' input
Definition at line 3320 of file control.c.
Referenced by do_paradrop_callback(), paradrop_callback(), mr_menu::slot_clean_pollution(), and unit_order_callback().
void key_unit_patrol | ( | void | ) |
Handle user 'patrol' input
Definition at line 3328 of file control.c.
Referenced by mr_menu::slot_patrol(), unit_order_callback(), unit_patrol_callback(), and unit_patrol_callback().
void key_unit_pillage | ( | void | ) |
Handle user 'pillage' input
Definition at line 3568 of file control.c.
Referenced by do_pillage_callback(), pillage_callback(), mr_menu::slot_pillage(), and unit_order_callback().
void key_unit_plant | ( | void | ) |
Handle user 'plant' input
Definition at line 3556 of file control.c.
Referenced by plant_callback(), plant_callback(), mr_menu::slot_plant(), and unit_order_callback().
void key_unit_pollution | ( | void | ) |
Handle user 'clean pollution' input
Definition at line 3608 of file control.c.
Referenced by unit_order_callback().
void key_unit_road | ( | void | ) |
Handle user 'build road or railroad' input
Definition at line 3616 of file control.c.
Referenced by unit_order_callback().
void key_unit_select_battlegroup | ( | int | battlegroup, |
bool | append | ||
) |
Bring this battlegroup into focus.
Definition at line 3697 of file control.c.
Referenced by bg_select0_callback(), bg_select1_callback(), bg_select2_callback(), bg_select3_callback(), bg_select_callback(), mr_menu::slot_bg1select(), mr_menu::slot_bg2select(), mr_menu::slot_bg3select(), and mr_menu::slot_bg4select().
void key_unit_sentry | ( | void | ) |
Handle user 'sentry' input
Definition at line 3634 of file control.c.
Referenced by mr_menu::slot_unit_sentry(), unit_order_callback(), unit_sentry_callback(), and unit_sentry_callback().
void key_unit_shields_toggle | ( | void | ) |
Toggle the "Draw shield graphics for units" option.
Definition at line 3918 of file control.c.
Referenced by show_unit_shields_callback(), and show_unit_shields_callback().
void key_unit_solid_bg_toggle | ( | void | ) |
Toggle the "Solid unit background color" option.
Definition at line 3910 of file control.c.
Referenced by show_unit_solid_bg_callback(), and show_unit_solid_bg_callback().
void key_unit_stack_size_toggle | ( | void | ) |
Handle client request to toggle drawing of unit stack size information
Definition at line 3814 of file control.c.
Referenced by show_stack_size_callback(), show_stack_size_callback(), and mr_menu::slot_stack_size().
void key_unit_trade_route | ( | void | ) |
Handle user 'establish trade route' input
Definition at line 3336 of file control.c.
Referenced by unit_order_callback().
void key_unit_transform | ( | void | ) |
Handle user 'transform unit' input
Definition at line 3646 of file control.c.
Referenced by mr_menu::slot_transform(), transform_terrain_callback(), transform_terrain_callback(), and unit_order_callback().
void key_unit_unload_all | ( | void | ) |
Handle user 'unload all' input
Definition at line 3350 of file control.c.
Referenced by mr_menu::slot_unload_all(), unit_order_callback(), unit_unload_transporter_callback(), and unit_unload_transporter_callback().
void key_unit_wait | ( | void | ) |
Handle user 'wait' input
Definition at line 3375 of file control.c.
Referenced by act_sel_wait(), act_sel_wait_callback(), act_sel_wait_callback(), fc_client::create_game_page(), mr_menu::slot_wait(), unit_info_window_callback(), unit_order_callback(), unit_wait_callback(), and unit_wait_callback().
void key_unit_wakeup_others | ( | void | ) |
Handle user 'wakeup others' input
Definition at line 3383 of file control.c.
Referenced by mr_menu::slot_unsentry(), unit_order_callback(), unit_unsentry_callback(), and unsentry_all_callback().
void key_units_toggle | ( | void | ) |
Handle user 'toggle units display' input
Definition at line 3902 of file control.c.
Referenced by map_event_handler(), show_units_callback(), and show_units_callback().
void request_action_details | ( | action_id | action, |
int | actor_id, | ||
int | target_id | ||
) |
Request data for follow up questions about an action the unit can perform.
Definition at line 1721 of file control.c.
Referenced by diplomat_bribe(), diplomat_bribe_callback(), diplomat_incite(), diplomat_incite_callback(), diplomat_incite_escape(), request_action_details_callback(), spy_incite_callback(), spy_request_sabotage_esc_list(), spy_request_sabotage_list(), spy_request_strike_bld_list(), spy_sabotage_esc_request(), spy_sabotage_request(), and spy_strike_bld_request().
void request_center_focus_unit | ( | void | ) |
Center to focus unit.
Definition at line 2637 of file control.c.
Referenced by center_on_unit(), map_event_handler(), click_label::on_clicked(), side_center_unit(), mr_menu::slot_center_view(), and unit_info_window_callback().
void request_do_action | ( | action_id | action, |
int | actor_id, | ||
int | target_id, | ||
int | sub_tgt, | ||
const char * | name | ||
) |
Request an actor unit to do a specific action.
Definition at line 1701 of file control.c.
Referenced by action_decision_maybe_auto(), airlift(), attack(), base(), bombard(), bombard2(), bombard3(), bribe_response(), capture_units(), caravan_establish_trade(), caravan_help_build(), caravan_marketplace(), clean_fallout(), clean_pollution(), conquer_city(), conquer_city2(), conquer_extras(), conquer_extras2(), convert_unit(), cultivate(), destroy_city(), diplomat_bribe_yes_callback(), diplomat_embassy(), diplomat_incite_yes_callback(), diplomat_investigate(), diplomat_sabotage(), diplomat_sabotage_esc(), diplomat_steal(), diplomat_steal_esc(), disband_unit(), disembark1(), disembark2(), do_disband_alternative(), do_unit_paradrop_to(), enter_hut(), enter_hut2(), expel_unit(), finish_city(), fortify(), frighten_hut(), frighten_hut2(), handle_city_name_suggestion_info(), heal_unit(), heal_unit2(), homeless(), incite_response(), irrigate(), join_city(), mine(), nuke(), nuke_city(), nuke_units(), paradrop(), paradrop_conquer(), paradrop_enter(), paradrop_enter_conquer(), paradrop_frighten(), paradrop_frighten_conquer(), pillage(), plant(), popup_action_selection(), popup_bribe_dialog(), popup_incite_dialog(), regular_move(), request_unit_airlift(), request_unit_build_city(), request_unit_caravan_action(), request_unit_change_homecity(), request_unit_load(), request_unit_unload(), request_unit_upgrade(), road(), sabotage_impr_callback(), simple_action_callback(), simple_action_callback(), spy_advances_response(), spy_embassy(), spy_improvements_response(), spy_investigate(), spy_nuke_city(), spy_nuke_city_esc(), spy_poison(), spy_poison_esc(), spy_sabotage(), spy_sabotage_unit(), spy_sabotage_unit_esc(), spy_steal_callback(), spy_steal_gold(), spy_steal_gold_esc(), spy_steal_maps(), spy_steal_maps_esc(), spy_steal_popup_shared(), spy_steal_something(), suicide_attack(), transform_terrain(), transport_alight(), transport_board(), transport_embark(), transport_embark2(), transport_embark3(), transport_unload(), unit_disband_recover(), and unit_home_city().
void request_move_unit_direction | ( | struct unit * | punit, |
int | dir | ||
) |
This function is called whenever the player pressed an arrow key.
We do NOT take into account that punit might be a caravan or a diplomat trying to move into a city, or a diplomat going into a tile with a unit; the server will catch those cases and send the client a package to pop up a dialog. (the server code has to be there anyway as goto's are entirely in the server)
Definition at line 1803 of file control.c.
Referenced by key_unit_move(), and mr_menu::slot_execute_orders().
void request_new_unit_activity | ( | struct unit * | punit, |
enum unit_activity | act | ||
) |
Send request for unit activity changing to server. If activity has target, use request_new_unit_activity_targeted() instead.
Definition at line 1854 of file control.c.
Referenced by activate_all_units(), adv_unit_select_callback(), adv_unit_sentry_idle_callback(), clear_unit_orders(), focus_units_info_callback(), handle_player_diplstate(), key_unit_cultivate(), key_unit_fortify(), key_unit_plant(), key_unit_sentry(), key_unit_transform(), request_unit_convert(), request_unit_fortify(), request_unit_sentry(), unit_select_callback(), usdlg_cmd_exec_unit(), and wakeup_sentried_units().
void request_new_unit_activity_targeted | ( | struct unit * | punit, |
enum unit_activity | act, | ||
struct extra_type * | tgt | ||
) |
Send request for unit activity changing to server. This is for activities that are targeted to certain special or base type.
Definition at line 1863 of file control.c.
Referenced by base_callback(), base_callback(), build_road_callback(), build_road_callback(), clean_menu_callback(), clean_pollution_callback(), irrigation_callback(), key_unit_airbase(), key_unit_clean(), key_unit_extra(), key_unit_fortress(), key_unit_gen_clean(), key_unit_road(), mine_callback(), pillage_callback(), pillage_callback(), pillage_something(), request_new_unit_activity(), request_unit_pillage(), road_callback(), road_callback(), mr_menu::slot_build_base(), mr_menu::slot_build_path(), mr_menu::slot_build_road(), and mr_menu::slot_clean_pollution().
void request_toggle_bases | ( | void | ) |
Toggle display of bases
Definition at line 2506 of file control.c.
Referenced by key_bases_toggle(), and map_event_handler().
void request_toggle_cities | ( | void | ) |
Toggle display of cities
Definition at line 2558 of file control.c.
Referenced by key_cities_toggle(), and map_event_handler().
void request_toggle_city_buycost | ( | void | ) |
Toggle display of city buycost
Definition at line 2402 of file control.c.
Referenced by key_city_buycost_toggle().
void request_toggle_city_full_bar | ( | void | ) |
Toggle display of city full bar.
Definition at line 2350 of file control.c.
Referenced by key_city_full_bar_toggle().
void request_toggle_city_growth | ( | void | ) |
Toggle display of city growth (turns-to-grow)
Definition at line 2376 of file control.c.
Referenced by key_city_growth_toggle().
void request_toggle_city_names | ( | void | ) |
Toggle display of city names
Definition at line 2363 of file control.c.
Referenced by key_city_names_toggle().
void request_toggle_city_outlines | ( | void | ) |
Toggle display of city outlines on the map
Definition at line 2285 of file control.c.
Referenced by key_city_outlines_toggle().
void request_toggle_city_output | ( | void | ) |
Toggle display of worker output of cities on the map
Definition at line 2298 of file control.c.
Referenced by key_city_output_toggle().
void request_toggle_city_productions | ( | void | ) |
Toggle display of city productions
Definition at line 2389 of file control.c.
Referenced by key_city_productions_toggle().
void request_toggle_city_trade_routes | ( | void | ) |
Toggle display of city trade routes
Definition at line 2415 of file control.c.
Referenced by key_city_trade_routes_toggle().
void request_toggle_coastline | ( | void | ) |
Toggle display of coastline
Definition at line 2454 of file control.c.
Referenced by key_coastline_toggle().
void request_toggle_focus_unit | ( | void | ) |
Toggle display of focus unit
Definition at line 2610 of file control.c.
Referenced by key_focus_unit_toggle().
void request_toggle_fog_of_war | ( | void | ) |
Toggle display of fog of war
Definition at line 2623 of file control.c.
Referenced by key_fog_of_war_toggle().
void request_toggle_huts | ( | void | ) |
void request_toggle_irrigation | ( | void | ) |
Toggle display of irrigation
Definition at line 2480 of file control.c.
Referenced by key_irrigation_toggle().
void request_toggle_map_borders | ( | void | ) |
Toggle display of national borders on the map
Definition at line 2324 of file control.c.
Referenced by key_map_borders_toggle().
void request_toggle_map_grid | ( | void | ) |
Toggle display of grid lines on the map
Definition at line 2311 of file control.c.
Referenced by key_map_grid_toggle().
void request_toggle_map_native | ( | void | ) |
Toggle display of native tiles on the map
Definition at line 2337 of file control.c.
Referenced by key_map_native_toggle().
void request_toggle_mines | ( | void | ) |
Toggle display of mines
Definition at line 2493 of file control.c.
Referenced by key_mines_toggle().
void request_toggle_pollution | ( | void | ) |
Toggle display of pollution
Definition at line 2545 of file control.c.
Referenced by key_pollution_toggle().
void request_toggle_resources | ( | void | ) |
Toggle display of resources
Definition at line 2519 of file control.c.
Referenced by key_resources_toggle().
void request_toggle_roads_rails | ( | void | ) |
Toggle display of roads and rails
Definition at line 2467 of file control.c.
Referenced by key_roads_rails_toggle().
void request_toggle_terrain | ( | void | ) |
Toggle display of terrain
Definition at line 2441 of file control.c.
Referenced by key_terrain_toggle().
void request_toggle_unit_shields | ( | void | ) |
Toggle display of unit shields.
Definition at line 2597 of file control.c.
Referenced by key_unit_shields_toggle().
void request_toggle_unit_solid_bg | ( | void | ) |
Toggle display of unit solid background.
Definition at line 2584 of file control.c.
Referenced by key_unit_solid_bg_toggle().
void request_toggle_unit_stack_size | ( | void | ) |
Toggle display of unit stack sizes
Definition at line 2428 of file control.c.
Referenced by key_unit_stack_size_toggle().
void request_toggle_units | ( | void | ) |
Toggle display of units
Definition at line 2571 of file control.c.
Referenced by key_units_toggle().
Send unit airlift request to server.
Definition at line 1538 of file control.c.
Referenced by goto_dialog::airlift_to(), goto_city_callback(), goto_cmd_callback(), and multiairlift().
void request_unit_autosettlers | ( | const struct unit * | punit | ) |
Call to request (from the server) that the settler unit is put into autosettler mode.
Definition at line 2068 of file control.c.
Referenced by key_unit_auto_settle(), and unit_order_callback().
void request_unit_build_city | ( | struct unit * | punit | ) |
Player pressed 'b' or otherwise instructed unit to build or add to city. If the unit can build a city, we popup the appropriate dialog. Otherwise, we just send a packet to the server. If this action is not appropriate, the server will respond with an appropriate message. (This is to avoid duplicating all the server checks and messages here.)
Definition at line 1740 of file control.c.
Referenced by build_city_callback(), build_city_callback(), key_unit_build_city(), and mr_menu::slot_build_city().
Send request to do caravan action - establishing trade route or helping in wonder building - to server.
Definition at line 2148 of file control.c.
Referenced by build_city_callback(), build_city_callback(), build_road_callback(), build_road_callback(), key_unit_build_wonder(), key_unit_trade_route(), mr_menu::slot_build_city(), and mr_menu::slot_build_road().
void request_unit_change_homecity | ( | struct unit * | punit | ) |
Send request to change unit homecity to server.
Definition at line 2021 of file control.c.
Referenced by unit_item::change_homecity(), homecity_units_orders_city_dlg_callback(), key_unit_homecity(), unit_homecity_callback(), and unit_homecity_callback().
void request_unit_connect | ( | enum unit_activity | activity, |
struct extra_type * | tgt | ||
) |
Prompt player for entering destination point for unit connect (e.g. connecting with roads)
Definition at line 1477 of file control.c.
Referenced by key_unit_connect().
void request_unit_convert | ( | struct unit * | punit | ) |
Sends unit convert packet.
Definition at line 2045 of file control.c.
Referenced by key_unit_convert().
void request_unit_disband | ( | struct unit * | punit | ) |
Send request to disband unit to server.
Definition at line 2002 of file control.c.
Referenced by disband_all_units(), disband_box::disband_clicked(), ok_disband_unit_window_callback(), and popup_disband_dialog().
void request_unit_fortify | ( | struct unit * | punit | ) |
Try to fortify unit.
Definition at line 2240 of file control.c.
Referenced by fortify_callback(), fortify_callback(), unit_item::fortify_unit(), fortify_units_orders_city_dlg_callback(), unit_fortify_callback(), and unit_fortify_callback().
void request_unit_goto | ( | enum unit_orders | last_order, |
action_id | act_id, | ||
int | sub_tgt_id | ||
) |
Do a goto with an order at the end (or ORDER_LAST).
Definition at line 1129 of file control.c.
Referenced by key_unit_goto(), maybe_activate_keyboardless_goto(), go_act_menu::start_go_act(), unit_goto_and_callback(), unit_goto_and_callback(), and unit_order_callback().
Send a request to the server that the cargo be loaded into the transporter.
If ptransporter is NULL a suitable transporter will be chosen.
Definition at line 2083 of file control.c.
Referenced by qtg_request_transport(), request_transport(), hud_unit_loader::selection_changed(), transport_response_callback(), and unit_order_callback().
void request_unit_move_done | ( | void | ) |
Set focus units to FOCUS_DONE state.
Definition at line 2663 of file control.c.
Referenced by key_unit_done().
void request_unit_paradrop | ( | struct unit_list * | punits | ) |
Have the player select what tile to paradrop to. Once selected a paradrop request will be sent to server.
Definition at line 2171 of file control.c.
Referenced by key_unit_paradrop().
void request_unit_patrol | ( | void | ) |
Either start new patrol route planning, or add waypoint to current one.
Definition at line 2206 of file control.c.
Referenced by key_unit_patrol().
void request_unit_pillage | ( | struct unit * | punit | ) |
Send pillage request to server.
Definition at line 2251 of file control.c.
Referenced by key_unit_pillage().
void request_unit_return | ( | struct unit * | punit | ) |
Return-and-recover for a particular unit. This sets the unit to GOTO the nearest city.
Definition at line 1547 of file control.c.
Referenced by mr_menu::slot_return_to_city(), unit_order_callback(), unit_return_callback(), and unit_return_callback().
void request_unit_select | ( | struct unit_list * | punits, |
enum unit_select_type_mode | seltype, | ||
enum unit_select_location_mode | selloc | ||
) |
Select all units based on the given list of units and the selection modes.
Definition at line 1616 of file control.c.
Referenced by select_all_on_tile_callback(), select_all_on_tile_callback(), select_same_type_callback(), select_same_type_callback(), select_same_type_cont_callback(), select_same_type_cont_callback(), select_same_type_tile_callback(), select_same_type_tile_callback(), select_single_callback(), select_single_callback(), mr_menu::slot_select_all_tile(), mr_menu::slot_select_one(), mr_menu::slot_select_same_continent(), mr_menu::slot_select_same_everywhere(), and mr_menu::slot_select_same_tile().
void request_unit_sentry | ( | struct unit * | punit | ) |
Try to sentry unit.
Definition at line 2229 of file control.c.
Referenced by unit_item::sentry_unit(), sentry_units_orders_city_dlg_callback(), unit_sentry_callback(), and unit_sentry_callback().
void request_unit_ssa_set | ( | const struct unit * | punit, |
enum server_side_agent | agent | ||
) |
Call to request (from the server) that the unit is put under the control of the specified server side agent or - if agent is SSA_NONE - under client control.
Definition at line 2055 of file control.c.
Referenced by key_unit_auto_explore(), request_do_action(), request_move_unit_direction(), request_new_unit_activity_targeted(), request_orders_cleared(), request_unit_autosettlers(), request_unit_non_action_move(), send_connect_route(), and send_path_orders().
void request_unit_unload | ( | struct unit * | pcargo | ) |
Send a request to the server that the cargo be unloaded from its current transporter.
Definition at line 2119 of file control.c.
Referenced by request_unit_unload_all(), mr_menu::slot_deboard(), unit_deboard_callback(), unit_deboard_callback(), unit_order_callback(), unit_unload_callback(), unit_unload_callback(), and unit_item::unload_unit().
Returns one of the unit of the transporter which can have focus next.
Definition at line 1506 of file control.c.
Referenced by key_unit_unload_all(), and unit_item::unload_all().
void request_unit_upgrade | ( | struct unit * | punit | ) |
Send request to upgrade unit to server.
Definition at line 2033 of file control.c.
Referenced by ok_upgrade_unit_window_callback(), and popup_upgrade_dialog().
void request_unit_wakeup | ( | struct unit * | punit | ) |
(RP:) un-sentry all my own sentried units on punit's tile
Definition at line 1595 of file control.c.
Referenced by key_unit_wakeup_others().
void request_units_wait | ( | struct unit_list * | punits | ) |
Set units in list to waiting focus. If they are current focus units, advance focus.
Definition at line 2650 of file control.c.
Referenced by key_unit_wait().
void set_hover_state | ( | struct unit_list * | punits, |
enum cursor_hover_state | state, | ||
enum unit_activity | activity, | ||
struct extra_type * | tgt, | ||
int | last_tgt, | ||
int | last_sub_tgt, | ||
action_id | action, | ||
enum unit_orders | order | ||
) |
Enter the given hover state.
activity => The connect activity (ACTIVITY_IRRIGATE, etc.) order => The last order (ORDER_PERFORM_ACTION, ORDER_LAST, etc.)
Definition at line 290 of file control.c.
Referenced by clear_hover_state(), key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), paradrop_here_callback(), patrol_here_callback(), request_unit_connect(), request_unit_goto(), request_unit_paradrop(), request_unit_patrol(), mr_menu::slot_delayed_goto(), and update_line().
Adjusts way combatants are displayed suitable for combat.
Definition at line 1031 of file control.c.
Referenced by decrease_unit_hp_smooth(), and handle_unit_combat_info().
Returns TRUE iff the client should ask the server about what actions a unit can perform.
Definition at line 339 of file control.c.
Referenced by action_selection_next_in_focus(), current_focus_append(), fill_unit_sprite_array(), handle_unit_packet_common(), and unit_focus_advance().
void unit_change_battlegroup | ( | struct unit * | punit, |
int | battlegroup | ||
) |
Change the battlegroup for this unit.
Definition at line 255 of file control.c.
Referenced by handle_unit_packet_common().
void unit_focus_add | ( | struct unit * | punit | ) |
Adds this unit to the list of units in focus.
Definition at line 562 of file control.c.
Referenced by define_tiles_within_rectangle(), do_map_click(), key_recall_previous_focus_unit(), key_unit_assign_battlegroup(), key_unit_select_battlegroup(), request_unit_select(), unit_hud_selector::uhs_select(), and usdlg_cmd_exec_unit().
void unit_focus_advance | ( | bool | accept_current | ) |
This function may be called from packhand.c, via unit_focus_update(), as a result of packets indicating change in activity for a unit. Also called when user press the "Wait" command.
FIXME: Add feature to focus only units of a certain category.
accept_current | The current focus can be kept if no other candidates |
Definition at line 689 of file control.c.
Referenced by client_remove_unit(), control_unit_killed(), request_unit_move_done(), request_units_wait(), unit_focus_remove(), and unit_focus_update().
void unit_focus_remove | ( | struct unit * | punit | ) |
Removes this unit from the list of units in focus.
Definition at line 592 of file control.c.
Referenced by usdlg_cmd_exec_unit().
void unit_focus_set | ( | struct unit * | punit | ) |
Sets the focus unit directly. The unit given will be given the focus; if NULL the focus will be cleared.
This function is called for several reasons. Sometimes a fast-focus happens immediately as a result of a client action. Other times it happens because of a server-sent packet that wakes up a unit.
Definition at line 507 of file control.c.
Referenced by activate_all_units(), unit_item::activate_and_close_dialog(), activate_and_exit_units_orders_city_dlg_callback(), unit_item::activate_unit(), activate_units_orders_city_dlg_callback(), adv_unit_select_callback(), define_tiles_within_rectangle(), focus_units_info_callback(), handle_city_sabotage_list(), handle_unit_action_answer(), key_recall_previous_focus_unit(), key_unit_select_battlegroup(), key_unit_unload_all(), middle_present_unit_release(), middle_supported_unit_release(), unit_item::mousePressEvent(), units_select::mousePressEvent(), present_unit_activate_close_callback(), present_unit_activate_close_callback(), present_unit_middle_callback(), request_unit_select(), right_unit_release(), select_unit_image_callback(), select_unit_pic_callback(), set_client_state(), supported_unit_activate_close_callback(), supported_unit_activate_close_callback(), supported_unit_middle_callback(), unit_activate_callback(), unit_activate_callback(), unit_focus_advance(), unit_focus_set_and_select(), unit_select_callback(), units_orders_city_dlg_callback(), and usdlg_cmd_focus_real().
void unit_focus_set_and_select | ( | struct unit * | punit | ) |
The only difference is that here we draw the "cross".
Definition at line 637 of file control.c.
Referenced by do_map_click(), units_report_command_callback(), and unittype_item::wheelEvent().
void unit_focus_update | ( | void | ) |
If there is no unit currently in focus, or if the current unit in focus should not be in focus, then get a new focus unit. We let GOTO-ing units stay in focus, so that if they have moves left at the end of the goto, then they are still in focus.
Definition at line 790 of file control.c.
Referenced by handle_game_info(), handle_new_year(), handle_unit_packet_common(), real_set_client_page(), set_client_state(), and usdlg_cmd_exec().
void unit_focus_urgent | ( | struct unit * | punit | ) |
Store a priority focus unit.
Definition at line 207 of file control.c.
Referenced by action_decision_request(), and handle_unit_packet_common().
Return TRUE iff this unit is in focus.
Definition at line 389 of file control.c.
Referenced by action_decision_request(), control_unit_killed(), do_move_unit(), fill_sprite_array(), find_best_focus_candidate(), get_drawable_unit(), goto_map_unit(), handle_unit_packet_common(), key_unit_assign_battlegroup(), quickselect(), select_unit_image_callback(), select_unit_pic_callback(), set_units_in_combat(), unit_drawn_with_city_outline(), unit_focus_add(), unit_focus_remove(), usdlg_cmd_cursor_changed(), usdlg_cmd_exec_unit(), and usdlg_tab_append_units().
void unit_register_battlegroup | ( | struct unit * | punit | ) |
Call this on new units to enter them in the battlegroup lists.
Definition at line 275 of file control.c.
Referenced by handle_unit_packet_common().
void update_unit_pix_label | ( | struct unit_list * | punitlist | ) |
Update unit icons (and arrow) in the information display, for specified punit as the active unit and other units on the same square. In practice punit is almost always (or maybe strictly always?) the focus unit.
Static vars store some info on current (ie previous) state, to avoid unnecessary redraws; initialise to "flag" values to always redraw first time. In principle we might need more info (eg ai.control, connecting), but in practice this is enough?
Used to store unit_ids for below units, to use for callbacks (now done inside gui-dep set_unit_icon()), but even with ids here they would not be enough information to know whether to redraw – instead redraw every time. (Could store enough info to know, but is it worth it?)
Definition at line 984 of file control.c.
Referenced by client_remove_unit(), reset_unit_table(), and update_unit_info_label().
void wakeup_sentried_units | ( | struct tile * | ptile | ) |
Wakes all owned sentried units on tile.
Definition at line 1578 of file control.c.
Referenced by request_unit_wakeup(), and wakeup_button_pressed().
|
extern |
Definition at line 90 of file control.c.
Referenced by do_map_click(), get_activity_time(), get_connect_road(), goto_fill_parameter_full(), key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), request_unit_connect(), set_hover_state(), and update_line().
|
extern |
Definition at line 91 of file control.c.
Referenced by do_map_click(), get_activity_time(), get_connect_road(), key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), request_unit_connect(), set_hover_state(), and update_line().
|
extern |
Definition at line 93 of file control.c.
Referenced by control_mouse_cursor(), do_map_click(), goto_fill_parameter_full(), key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), send_goto_route(), set_hover_state(), and update_line().
|
extern |
Definition at line 96 of file control.c.
Referenced by key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), send_goto_route(), set_hover_state(), and update_line().
|
extern |
Definition at line 95 of file control.c.
Referenced by key_cancel_action(), key_unit_action_select_tgt(), overview_update_line(), send_goto_route(), set_hover_state(), and update_line().
|
extern |
Definition at line 94 of file control.c.
Referenced by key_cancel_action(), key_unit_action_select_tgt(), send_goto_route(), and set_hover_state().
|
extern |
Definition at line 89 of file control.c.
Referenced by base_set_mapview_origin(), butt_down_mapcanvas(), butt_release_mapcanvas(), control_mouse_cursor(), do_map_click(), do_move_unit(), do_unit_goto(), get_activity_time(), get_unit_info_label_text2(), goto_fill_parameter_full(), goto_get_turns(), goto_map_free(), goto_tile_state(), key_cancel_action(), key_unit_action_select_tgt(), mouse_scroll_mapcanvas(), mouse_scroll_mapcanvas(), map_view::mouseMoveEvent(), move_mapcanvas(), move_mapcanvas(), overview_update_line(), release_goto_button(), request_unit_connect(), request_unit_goto(), request_unit_patrol(), right_butt_down_mapcanvas(), right_butt_up_mapcanvas(), set_hover_state(), mr_menu::slot_delayed_goto(), unit_focus_add(), unit_focus_remove(), update_last_part(), and update_line().
|
extern |
Definition at line 125 of file control.c.
Referenced by handle_start_phase(), and unit_focus_advance().
|
extern |
Definition at line 76 of file control.c.
Referenced by free_unit_table(), populate_unit_image_table(), populate_unit_pic_table(), set_unit_icon(), and update_unit_pix_label().