85 :
static_cast<double>(ntl_x))
89 :
static_cast<double>(ntl_y))
163 * (1.5 * (x * x * y + x * y * y) - 0.5 * (x * x * x + y * y * y)
164 + 1.5 * (x * x + y * y));
210 sqrt(
static_cast<float>(
size)
211 /
static_cast<float>(Xratio * Yratio * iso * even * even))
233 qCritical(
"Requested size of %d is too big for this topology.",
244 qInfo(
_(
"Creating a map of size %d x %d = %d tiles (%d requested)."),
246 static_cast<int>(
size));
294 int x_ratio, y_ratio;
303 qInfo(
_(
"Creating a map of size %d x %d = %d tiles (map size: "
317 qInfo(
_(
"Map size calculated for %d (land) tiles per player "
318 "and %d player(s) too small. Setting map size to the "
325 qInfo(
_(
"Map size calculated for %d (land) tiles per player "
326 "and %d player(s) too large. Setting map size to the "
332 qInfo(
_(
"Setting map size to %d (approx. %d (land) tiles for "
333 "each of the %d player(s))."),
403 return MAX(1, sqsize);
#define CITY_MAP_DEFAULT_RADIUS
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
int map_num_tiles()
Returns the total number of (real) positions (or tiles) on the map.
void map_init_topology()
map_init_topology needs to be called after map.topology_id is changed.
bool is_singular_tile(const struct tile *ptile, int dist)
A "SINGULAR" position is any map position that has an abnormal number of tiles in the radius of dist.
#define current_topo_has_flag(flag)
#define MAP_MAX_LINEAR_SIZE
#define do_in_natural_pos(ntl_x, ntl_y, map_x, map_y)
#define MAP_MIN_LINEAR_SIZE
#define do_in_natural_pos_end
#define index_to_map_pos(pmap_x, pmap_y, mindex)
int get_sqsize()
An estimate of the linear (1-dimensional) size of the map.
static void get_ratios(int *x_ratio, int *y_ratio)
Return the default ratios for known topologies.
void generator_init_topology(bool autosize)
This function sets sizes in a topology-specific way then calls map_init_topology().
static void set_sizes(double size, int Xratio, int Yratio)
Set the map xsize and ysize based on a base size and ratio (in natural coordinates).
int map_colatitude(const struct tile *ptile)
Returns the colatitude of this map position.
bool near_singularity(const struct tile *ptile)
Return TRUE if the map in a typical city radius is SINGULAR.
int player_count()
Return the number of players.
#define CLIP(lower, current, upper)
struct civ_map::@39::@41 server