66#define pmap(_tile) (placed_map[tile_index(_tile)])
125 bool (*filter)(
const struct tile *ptile,
193 static const float weight_standard[5] = { 0.13, 0.19, 0.37, 0.19, 0.13 };
300 const struct terrain *pterrain;
304#ifndef FREECIV_NDEBUG
373 log_verbose(
"Ruleset has more than %d %s lake types, ignoring %s",
375 frozen ?
"frozen" :
"unfrozen",
612 log_debug(
"Replacing %s by %s at (%d, %d) "
613 "to have shallow ocean on coast.",
629 log_debug(
"Replacing %s by %s at (%d, %d) "
630 "to smooth the ocean types.",
701 if (avoid !=
MG_UNUSED && pterrain->property[avoid] > 0) {
704 if (prefer !=
MG_UNUSED && pterrain->property[prefer] == 0) {
724 if (avoid !=
MG_UNUSED && pterrain->property[avoid] > 0) {
727 if (prefer !=
MG_UNUSED && pterrain->property[prefer] == 0) {
732 property = pterrain->property[target];
746 log_debug(
"pick_terrain(target: %s, [dropping prefer: %s], avoid: %s)",
752 log_debug(
"pick_terrain(target: %s, prefer: MG_UNUSED, [dropping avoid: %s])",
757 log_debug(
"pick_terrain([dropping target: %s], prefer: MG_UNUSED, avoid: MG_UNUSED)",
781 if (
res->generated &&
freq > 0) {
signed short Continent_id
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
bool is_normal_map_pos(int x, int y)
struct terrain_misc terrain_control
int map_vector_to_real_distance(int dx, int dy)
#define square_iterate(nmap, center_tile, radius, tile_itr)
#define adjc_iterate(nmap, center_tile, itr_tile)
#define NATIVE_TO_MAP_POS(pmap_x, pmap_y, nat_x, nat_y)
#define square_iterate_end
#define whole_map_iterate(_map, _tile)
#define square_dxy_iterate(nmap, center_tile, radius, tile_itr, dx_itr, dy_itr)
#define whole_map_iterate_end
#define square_dxy_iterate_end
static void recalculate_surrounders(void)
struct extra_type * pick_resource(const struct terrain *pterrain)
static struct terrain * most_adjacent_ocean_type(const struct tile *ptile)
void smooth_int_map(int *int_map, bool zeroes_at_edges)
void set_all_ocean_tiles_placed(void)
void create_placed_map(void)
static int real_distance_to_land(const struct tile *ptile, int max)
void map_set_placed(struct tile *ptile)
void destroy_placed_map(void)
void adjust_int_map_filtered(int *int_map, int int_map_min, int int_map_max, void *data, bool(*filter)(const struct tile *ptile, const void *data))
bool not_placed(const struct tile *ptile)
struct terrain * pick_terrain_by_flag(enum terrain_flag_id flag)
void assign_continent_numbers(void)
void regenerate_lakes(void)
void set_placed_near_pos(struct tile *ptile, int dist)
void generator_free(void)
void smooth_water_depth(void)
bool placed_map_is_initialized(void)
bool is_normal_nat_pos(int x, int y)
struct terrain * pick_terrain(enum mapgen_terrain_property target, enum mapgen_terrain_property prefer, enum mapgen_terrain_property avoid)
struct terrain * most_shallow_ocean(bool frozen)
struct terrain * pick_ocean(int depth, bool frozen)
static void assign_continent_flood(struct tile *ptile, bool is_land, int nr)
void map_unset_placed(struct tile *ptile)
#define whole_map_iterate_filtered(_tile, pdata, pfilter)
#define axis_iterate(nmap, center_tile, _tile, _index, dist, is_X_axis)
#define whole_map_iterate_filtered_end
#define fc_calloc(n, esz)
#define fc_realloc(ptr, sz)
#define INITIALIZE_ARRAY(array, size, value)
Continent_id num_continents
Continent_id * island_surrounders
Continent_id * lake_surrounders
struct civ_map::@44::@46 server
Terrain_type_id terrain_count(void)
Terrain_type_id terrain_index(const struct terrain *pterrain)
const char * terrain_rule_name(const struct terrain *pterrain)
enum terrain_class terrain_type_terrain_class(const struct terrain *pterrain)
#define terrain_type_iterate(_p)
#define is_ocean(pterrain)
#define is_ocean_tile(ptile)
#define terrain_type_iterate_end
#define TERRAIN_OCEAN_DEPTH_MAXIMUM
#define terrain_has_flag(terr, flag)
#define terrain_resources_iterate_end
#define terrain_resources_iterate(pterrain, _res, _freq)
void tile_set_terrain(struct tile *ptile, struct terrain *pterrain)
void tile_change_terrain(struct tile *ptile, struct terrain *pterrain)
void tile_set_continent(struct tile *ptile, Continent_id val)
#define tile_terrain(_tile)
#define tile_continent(_tile)
#define MAP_NUM_VALID_DIRS