Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Variables
world_object.h File Reference
#include "map_types.h"
#include "spechash.h"

Go to the source code of this file.

Data Structures

struct  world
 

Macros

#define SPECHASH_TAG   city
 
#define SPECHASH_INT_KEY_TYPE
 
#define SPECHASH_IDATA_TYPE   struct city *
 
#define SPECHASH_TAG   unit
 
#define SPECHASH_INT_KEY_TYPE
 
#define SPECHASH_IDATA_TYPE   struct unit *
 
#define MAP_IS_ISOMETRIC   (CURRENT_TOPOLOGY & (TF_ISO + TF_HEX))
 
#define CURRENT_TOPOLOGY   (wld.map.topology_id)
 
#define CURRENT_WRAP   (wld.map.wrap_id)
 
#define MAP_INDEX_SIZE   (wld.map.xsize * wld.map.ysize)
 
#define MAP_NATIVE_WIDTH   wld.map.xsize
 
#define MAP_NATIVE_HEIGHT   wld.map.ysize
 
#define MAP_NATURAL_WIDTH   (MAP_IS_ISOMETRIC ? 2 * wld.map.xsize : wld.map.xsize)
 
#define MAP_NATURAL_HEIGHT   wld.map.ysize
 
#define MAP_CARDINAL_DIRS   wld.map.cardinal_dirs
 
#define MAP_NUM_CARDINAL_DIRS   wld.map.num_cardinal_dirs
 
#define MAP_VALID_DIRS   wld.map.valid_dirs
 
#define MAP_NUM_VALID_DIRS   wld.map.num_valid_dirs
 
#define MAP_ITERATE_OUTWARDS_INDICES   wld.map.iterate_outwards_indices
 
#define MAP_NUM_ITERATE_OUTWARDS_INDICES   wld.map.num_iterate_outwards_indices
 

Variables

struct world wld
 

Macro Definition Documentation

◆ CURRENT_TOPOLOGY

#define CURRENT_TOPOLOGY   (wld.map.topology_id)

Definition at line 48 of file world_object.h.

◆ CURRENT_WRAP

#define CURRENT_WRAP   (wld.map.wrap_id)

Definition at line 49 of file world_object.h.

◆ MAP_CARDINAL_DIRS

#define MAP_CARDINAL_DIRS   wld.map.cardinal_dirs

Definition at line 62 of file world_object.h.

◆ MAP_INDEX_SIZE

#define MAP_INDEX_SIZE   (wld.map.xsize * wld.map.ysize)

Definition at line 52 of file world_object.h.

◆ MAP_IS_ISOMETRIC

#define MAP_IS_ISOMETRIC   (CURRENT_TOPOLOGY & (TF_ISO + TF_HEX))

Definition at line 46 of file world_object.h.

◆ MAP_ITERATE_OUTWARDS_INDICES

#define MAP_ITERATE_OUTWARDS_INDICES   wld.map.iterate_outwards_indices

Definition at line 66 of file world_object.h.

◆ MAP_NATIVE_HEIGHT

#define MAP_NATIVE_HEIGHT   wld.map.ysize

Definition at line 56 of file world_object.h.

◆ MAP_NATIVE_WIDTH

#define MAP_NATIVE_WIDTH   wld.map.xsize

Definition at line 55 of file world_object.h.

◆ MAP_NATURAL_HEIGHT

#define MAP_NATURAL_HEIGHT   wld.map.ysize

Definition at line 60 of file world_object.h.

◆ MAP_NATURAL_WIDTH

#define MAP_NATURAL_WIDTH   (MAP_IS_ISOMETRIC ? 2 * wld.map.xsize : wld.map.xsize)

Definition at line 59 of file world_object.h.

◆ MAP_NUM_CARDINAL_DIRS

#define MAP_NUM_CARDINAL_DIRS   wld.map.num_cardinal_dirs

Definition at line 63 of file world_object.h.

◆ MAP_NUM_ITERATE_OUTWARDS_INDICES

#define MAP_NUM_ITERATE_OUTWARDS_INDICES   wld.map.num_iterate_outwards_indices

Definition at line 67 of file world_object.h.

◆ MAP_NUM_VALID_DIRS

#define MAP_NUM_VALID_DIRS   wld.map.num_valid_dirs

Definition at line 65 of file world_object.h.

◆ MAP_VALID_DIRS

#define MAP_VALID_DIRS   wld.map.valid_dirs

Definition at line 64 of file world_object.h.

◆ SPECHASH_IDATA_TYPE [1/2]

#define SPECHASH_IDATA_TYPE   struct city *

Definition at line 27 of file world_object.h.

◆ SPECHASH_IDATA_TYPE [2/2]

#define SPECHASH_IDATA_TYPE   struct unit *

Definition at line 27 of file world_object.h.

◆ SPECHASH_INT_KEY_TYPE [1/2]

#define SPECHASH_INT_KEY_TYPE

Definition at line 26 of file world_object.h.

◆ SPECHASH_INT_KEY_TYPE [2/2]

#define SPECHASH_INT_KEY_TYPE

Definition at line 26 of file world_object.h.

◆ SPECHASH_TAG [1/2]

#define SPECHASH_TAG   city

Definition at line 25 of file world_object.h.

◆ SPECHASH_TAG [2/2]

#define SPECHASH_TAG   unit

Definition at line 25 of file world_object.h.

Variable Documentation

◆ wld

struct world wld
extern

Definition at line 62 of file game.c.

Referenced by achievement_check(), act_sel_new_extra_tgt_callback(), act_sel_new_unit_tgt_callback(), action_auto_perf_unit_do(), action_auto_perf_unit_prob(), action_sub_target_id_for_action(), action_tgt_tile(), add_global_worklist(), add_resources(), adjust_terrain_param(), adv_calc_transform(), adv_could_be_my_zoc(), adv_could_unit_move_to_tile(), adv_danger_at(), adv_data_get(), adv_data_phase_init(), adv_unit_move(), goto_dialog::airlift_to(), chatwdg::anchor_clicked(), api_edit_create_unit_full(), api_edit_perform_action_unit_vs_city(), api_edit_perform_action_unit_vs_city_impr(), api_edit_perform_action_unit_vs_city_tech(), api_edit_perform_action_unit_vs_self(), api_edit_perform_action_unit_vs_tile(), api_edit_perform_action_unit_vs_tile_extra(), api_edit_perform_action_unit_vs_unit(), api_edit_unit_move(), api_edit_unit_teleport(), api_find_city(), api_find_tile(), api_find_tile_by_index(), api_find_unit(), api_methods_private_tile_for_outward_index(), api_methods_private_tile_next_outward_index(), api_methods_tile_city_exists_within_max_city_map(), api_methods_unit_can_upgrade(), api_methods_unit_city_can_be_built_here(), api_methods_unit_transform_problem(), api_methods_unit_type_can_exist_at_tile(), apply_cmresult_to_city(), apply_result_on_server(), apply_solution(), area_is_too_flat(), assign_continent_flood(), assign_continent_numbers(), attack(), auto_workers_player(), auto_workers_speculate_can_act_at(), base(), base_city_queue_insert(), begin_phase(), best_role_unit(), bounce_unit(), bounce_units_on_terrain_change(), build_city_callback(), build_city_callback(), build_landarea_map(), build_tile_data(), building_advisor(), butt_down_overviewcanvas(), button_down_citymap(), cai_auto_settler_cont(), cai_auto_settler_run(), cai_split_by_civil_war(), calculate_city_clusters(), calculate_want_for_paratrooper(), can_city_build_now_client(), can_create_unit_at_tile(), can_unit_move_to_tile_with_notify(), canvas_pos_to_nearest_tile(), canvas_pos_to_tile(), center_on_something(), city_dialog::change_production(), check_city_migrations_player(), check_native_area(), check_recursive_road_connect(), check_terrain_change(), check_units_single_tile(), choose_build_target(), city_build_unit(), city_desirability(), city_dialog_update_building(), city_dialog_update_supported_units(), city_gold_worth(), city_increase_size(), city_landlocked_sell_coastal_improvements(), city_map_update_all(), city_map_update_radius_sq(), city_rally_point_receive(), city_reduce_workers(), city_refresh(), city_select_coastal_callback(), city_select_coastal_callback(), city_tc_effect_refresh(), city_toggle_worker(), city_worklist_commit(), citylog_map_workers(), citymap_free_city_spot(), citymap_reserve_city_spot(), citymap_turn_init(), cityresult_fill(), civil_war_possible(), clean(), client_change_all(), client_city_tile(), client_remove_city(), client_remove_unit(), climate_change(), clipboard_send_production_packet(), cm_print_city(), cm_query_result(), cm_result_copy(), collect_eventually_buildable_targets(), combat_odds_to_astr(), compat_load_020600(), compat_load_030200(), compute_max_stats_heuristic(), contemplate_new_city(), contemplate_terrain_improvements(), city_map::context_menu(), continent_adjacency_count(), count_card_adjc_elevated_tiles(), unit_item::create_actions(), create_animals(), create_barbarian_player(), create_city(), create_city_for_player(), create_island(), create_start_positions(), create_tmap(), create_unit_menu(), create_unit_surface(), cultivate(), dai_action_value_unit_vs_city(), dai_airlift(), dai_barbarian_choose_build(), dai_caravan_goto(), dai_choose_attacker(), dai_choose_attacker_air(), dai_choose_defender_versus(), dai_choose_diplomat_offensive(), dai_choose_paratrooper(), dai_city_choose_build(), dai_city_want(), dai_consider_tile_dangerous(), dai_diplomat_bribe_nearby(), dai_diplomat_city(), dai_do_first_activities(), dai_effect_value(), dai_evaluate_tile_for_air_attack(), dai_fill_unit_param(), dai_find_strategic_airbase(), dai_gained_control(), dai_hunter_guess_best(), dai_hunter_manage(), dai_hunter_missile_want(), dai_hunter_try_launch(), dai_manage_barbarian_leader(), dai_manage_caravan(), dai_manage_cities(), dai_manage_diplomat(), dai_manage_paratrooper(), dai_manage_taxes(), dai_military_attack_barbarian(), dai_military_findjob(), dai_plr_data_get(), dai_rampage_want(), dai_unit_attack(), dai_unit_can_strike_my_unit(), dai_unit_move(), dai_wants_role_unit(), dai_wonder_city_distance(), debug_command(), destroy_extra(), diplomat_charge_movement(), disable_fog_of_war_player(), disembark1(), disembark2(), city_widget::display_list_menu(), do_attack(), do_city_migration(), do_conquer_extras(), do_disband_alternative(), do_disembark(), do_nuclear_explosion(), do_paradrop(), do_team_placement(), do_unit_conquer_city(), do_unit_embark(), do_unit_hut(), do_unit_paradrop_to(), do_unit_teleport_to(), do_upgrade_effects(), edit_buffer_copy_square(), edit_buffer_paste(), editor_get_selection_center(), enable_fog_of_war_player(), end_turn(), enter_hut(), enter_hut2(), enter_war(), establish_new_connection(), evaluate_city_name_priority(), event_after(), event_after(), event_cache_load(), event_cache_save(), execute_call(), execute_orders(), exit_find_city_dlg_callback(), expl_act_not_enabl(), explain_why_no_action_enabled(), explorer_desirable(), explorer_goto(), fair_map_island_new(), fair_map_make_huts(), fair_map_make_resources(), fair_map_place_island_team(), fill_island(), fill_parameter_part(), fill_terrain_sprite_blending(), find_a_good_partisan_spot(), find_beachhead(), find_best_city_placement(), find_best_focus_candidate(), find_best_tile_to_paradrop_to(), find_city_or_settler_near_tile(), find_closest_city(), find_dispersed_position(), find_empty_tile_nearby(), find_nearest_airbase(), find_nearest_safe_city(), find_rampage_target(), find_something_to_bomb(), find_something_to_kill(), fmfill(), found_new_tech(), frighten_hut(), frighten_hut2(), game_city_by_number(), game_free(), game_init(), game_remove_city(), game_reset(), game_unit_by_number(), gen5rec(), generate_map_indices(), generator_init_topology(), get_airlift_text(), get_continent_size(), get_discounted_reward(), get_island_surrounder(), get_lake_surrounder(), get_ocean_size(), get_random_map_position_from_state(), get_units_upgrade_info(), give_citymap_from_player_to_player(), give_distorted_map(), give_map_from_player_to_player(), give_seamap_from_player_to_player(), give_shared_vision(), goto_cmd_callback(), goto_fill_parameter_base(), goto_here_callback(), goto_is_sane(), handle_chat_msg(), handle_city_change(), handle_city_info(), handle_city_make_specialist(), handle_city_make_worker(), handle_city_name_suggestion_req(), handle_city_short_info(), handle_diplomacy_cancel_pact(), handle_early_chat_msg(), handle_edit_city_create(), handle_edit_player_vision(), handle_edit_startpos(), handle_edit_startpos(), handle_edit_startpos_full(), handle_edit_startpos_full(), handle_edit_tile(), handle_edit_tile_extra(), handle_edit_tile_terrain(), handle_edit_unit_create(), handle_edit_unit_remove(), handle_map_info(), handle_nuke_tile_info(), handle_player_diplstate(), handle_player_place_infra(), handle_set_topology(), handle_tile_info(), handle_unit_action_answer(), handle_unit_action_query(), handle_unit_actions(), handle_unit_get_actions(), handle_unit_orders(), handle_unit_packet_common(), handle_unit_sscs_set(), handle_unit_type_upgrade(), handle_worker_task(), handle_worker_task(), height_map_to_map(), hmap_pole_factor(), hut_get_limited(), huts_action(), huts_help(), illegal_action(), illegal_action_msg(), img_createmap(), immediate_destination(), impr_allows_actions(), impr_provides_buildable_extras(), impr_provides_buildable_units(), init_new_game(), init_tile_lattice(), initialize_infrastructure_cache(), initialize_isle_data(), initworld(), invasion_funct(), irrigate(), is_city_surrounded_by_our_spies(), is_latitude_req_active(), is_my_turn(), is_near_land(), is_near_land(), is_non_allied_city_adjacent(), is_refuel_tile(), is_req_active(), is_req_knowable(), is_req_unchanging(), is_resource_close(), is_temperature_type_near(), is_terrain_ecologically_wet(), is_tile_seen_adj(), is_tile_seen_cadj(), is_tile_seen_city(), is_tiny_island(), island_river_mouth_suitability(), island_river_suitability(), goto_dialog::item_selected(), kill_player(), kill_something_with(), kill_unit(), left_butt_down_overviewcanvas(), likely_native(), link_mark_tile(), load_ruleset_terrain(), local_ave_elevation(), look_for_charge(), main_map_allocate(), main_map_free(), make_fracture_map(), make_fracture_relief(), make_island(), make_land(), make_path_orders(), make_plains(), make_polar(), make_polar_land(), make_pseudofractal1_hmap(), make_relief(), make_river(), make_rivers(), make_terrains(), manage_auto_explorer(), map_calculate_borders(), map_claim_border(), map_clear_border(), map_fractal_generate(), map_generate_fair_islands(), map_is_empty(), map_know_and_see_all(), map_set_border_vision(), map_show_all(), map_show_circle(), map_signed_latitude(), map_startpos_by_number(), map_startpos_count(), map_startpos_get(), map_startpos_iter_init(), map_startpos_new(), map_startpos_remove(), map_update_border(), map_vision_update(), mapdeco_add_gotoline(), mapdeco_clear_gotoroutes(), mapdeco_remove_gotoline(), mapdeco_set_gotoroute(), mapgenerator2(), mapgenerator3(), mapgenerator4(), mapstep(), max_tile_trade(), may_unit_act_vs_city(), may_unit_act_vs_tile_extra(), may_unit_act_vs_unit(), maybe_become_veteran_real(), maybe_cancel_patrol_due_to_enemy(), maybe_make_contact(), mr_menu::menus_sensitive(), min_food_surplus_for_fastest_growth(), mine(), minimap_window_callback(), most_adjacent_ocean_type(), minimap_view::mousePressEvent(), move_unit_map_canvas(), name_new_city_popup_callback(), naval_bonus(), near_safe_tiles(), normalize_hmap_poles(), notify_conn_packet(), nuke(), objtype_get_object_from_id(), ocean_to_land_fix_rivers(), ok_for_separate_poles(), overview_to_map_pos(), overview_update_line(), package_city(), packhand_free(), paradrop(), paradrop_conquer(), paradrop_enter(), paradrop_enter_conquer(), paradrop_frighten(), paradrop_frighten_conquer(), paradrop_here_callback(), patrol_here_callback(), pillage(), pixel_border_hexa(), pixel_border_isohexa(), pixel_border_rect(), place_animal(), place_island(), place_partisans(), place_pollution(), place_starting_unit(), place_terrain(), place_unit(), plant(), player_city_by_number(), player_clear(), player_in_city_map(), player_map_free(), player_map_init(), player_restore_units(), player_unit_by_number(), city_production_model::populate(), popup_advanced_terrain_dialog(), popup_newcity_dialog(), popup_unit_upgrade_dlg(), popup_worklist_editor(), present_unit_callback(), print_mapgen_map(), process_attacker_want(), property_page_create_objects(), rand_map_pos_characteristic(), rand_map_pos_filtered(), random_movements(), real_distance_to_land(), real_menus_update(), really_give_map_from_player_to_player(), recalculate_surrounders(), refresh_airlift_button(), refresh_overview_canvas(), regenerate_lakes(), regular_move(), reinforcements_cost_and_value(), remove_city(), remove_player_from_maps(), remove_shared_vision(), remove_tiny_islands(), renormalize_hmap_poles(), request_action_details_callback(), request_move_unit_direction(), request_unit_load(), request_unit_non_action_move(), request_unit_paradrop(), request_unit_teleport(), request_unit_unload(), research_tech_lost(), resolve_city_emergency(), resolve_stack_conflicts(), right_butt_down_overviewcanvas(), right_button_down_citymap(), river_blockmark(), river_test_adjacent_highlands(), river_test_adjacent_ocean(), river_test_adjacent_river(), river_test_adjacent_swamp(), river_test_blocked(), river_test_rivergrid(), road(), role_unit_cb(), save_terrain_ruleset(), sdl_get_chance_to_win(), city_widget::select_coastal(), send_all_known_cities(), send_all_known_tiles(), send_connect_route(), send_goto_route(), send_map_info(), server_remove_unit_full(), set_all_ocean_tiles_placed(), set_global_worklist(), set_placed_near_pos(), set_sizes(), sg_extras_set_bv(), sg_extras_set_bv(), sg_extras_set_dbv(), sg_extras_set_dbv(), sg_load_map(), sg_load_map(), sg_load_map_altitude(), sg_load_map_known(), sg_load_map_known(), sg_load_map_owner(), sg_load_map_owner(), sg_load_map_startpos(), sg_load_map_startpos(), sg_load_map_tiles(), sg_load_map_tiles(), sg_load_map_tiles_extras(), sg_load_map_tiles_resources(), sg_load_map_worked(), sg_load_map_worked(), sg_load_player_cities(), sg_load_player_cities(), sg_load_player_city(), sg_load_player_city(), sg_load_player_unit(), sg_load_player_unit(), sg_load_player_units(), sg_load_player_units(), sg_load_player_vision(), sg_load_player_vision(), sg_load_player_vision_city(), sg_load_player_vision_city(), sg_load_players(), sg_load_players(), sg_load_sanitycheck(), sg_load_sanitycheck(), sg_save_map(), sg_save_map_altitude(), sg_save_map_known(), sg_save_map_owner(), sg_save_map_tiles(), sg_save_map_worked(), sg_save_player_vision(), sg_save_settings(), sg_special_set_bv(), sg_special_set_dbv(), simple_action_callback(), simple_action_callback(), mr_menu::slot_build_city(), mr_menu::slot_execute_orders(), mr_menu::slot_paradrop(), smooth_int_map(), smooth_water_depth(), srv_ready(), suicide_attack(), terrain_change_bounce_single_unit(), terrain_info_callback(), terrain_is_too_high(), texai_city_worker_task_select(), texai_tile_worker_task_select(), texai_whole_map_copy(), text_tag_init_from_sequence(), text_tag_start_sequence(), texwai_auto_settler_cont(), texwai_auto_settler_run(), texwai_split_by_civil_war(), throw_units_from_illegal_cities(), tilespec_reread(), tilespec_reread_callback(), topology_action(), topology_callback(), transfer_city(), transfer_unit(), transform_terrain(), transform_unit(), tri_req_active(), try_summon_barbarians(), uclass_need_trans_between(), unit_activities_cancel_all_illegal_area(), unit_activities_cancel_all_illegal_plr(), unit_activities_cancel_all_illegal_tile(), unit_activity_handling(), unit_activity_handling_targeted(), unit_activity_internal(), unit_activity_targeted_internal(), unit_assign_specific_activity_target(), unit_bombard(), unit_bombs_unit(), unit_can_be_retired(), unit_change_homecity_handling(), unit_convert(), unit_do_disband_trad(), unit_do_regular_move(), unit_drawn_with_city_outline(), unit_move(), unit_move_consequences(), unit_move_handling(), unit_move_pay(), unit_nuke(), unit_ordering_apply(), unit_ordering_apply(), unit_ordering_calc(), unit_perform_action(), unit_server_side_agent_set(), unit_survive_autoattack(), unit_upgrades_to(), unit_versus_unit(), unittype_def_rating_squared(), universal_never_there(), unleash_barbarians(), unpackage_short_unit(), unpackage_unit(), unit_actions::update_actions(), update_continent_cache(), update_environmental_upset(), update_map_canvas(), city_dialog::update_units(), upgrade_unit_order_targets(), upgrade_unit_prod(), ur_transform_unit(), wakeup_neighbor_sentries(), wipe_unit_full(), worker_evaluate_city_requests(), worklist_change_build_target(), wrap_action(), and ysize_callback().