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 };
293 const struct terrain *pterrain;
297#ifndef FREECIV_NDEBUG
367 log_verbose(
"Ruleset has more than %d %s lake types, ignoring %s",
369 frozen ?
"frozen" :
"unfrozen",
633 log_debug(
"Replacing %s by %s at (%d, %d) "
634 "to have shallow ocean on coast.",
650 log_debug(
"Replacing %s by %s at (%d, %d) "
651 "to smooth the ocean types.",
734 if (avoid !=
MG_UNUSED && pterrain->property[avoid] > 0) {
737 if (prefer !=
MG_UNUSED && pterrain->property[prefer] == 0) {
757 if (avoid !=
MG_UNUSED && pterrain->property[avoid] > 0) {
760 if (prefer !=
MG_UNUSED && pterrain->property[prefer] == 0) {
765 property = pterrain->property[target];
779 log_debug(
"pick_terrain(target: %s, [dropping prefer: %s], avoid: %s)",
785 log_debug(
"pick_terrain(target: %s, prefer: MG_UNUSED, [dropping avoid: %s])",
790 log_debug(
"pick_terrain([dropping target: %s], prefer: MG_UNUSED, avoid: MG_UNUSED)",
814 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 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
int get_continent_size(Continent_id id)
struct extra_type * pick_resource(const struct terrain *pterrain)
static struct terrain * most_adjacent_ocean_type(const struct tile *ptile)
static int * continent_sizes
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)
static Continent_id * lake_surrounders
void regenerate_lakes(void)
static void recalculate_lake_surrounders(void)
void set_placed_near_pos(struct tile *ptile, int dist)
int get_ocean_size(Continent_id id)
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)
int get_lake_surrounders(Continent_id cont)
#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
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)