Freeciv-3.1: /fast/freeciv/nightly/S3_1/server/generator/mapgen_topology.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions | Variables
mapgen_topology.h File Reference
`#include "support.h"`

Go to the source code of this file.

## Macros

#define | MAX_COLATITUDE 1000
#define | L_UNIT MAX(1, wld.map.server.size * MAX_COLATITUDE / (30 * get_sqsize()))
#define | COLD_LEVEL (MAX(0, MAX_COLATITUDE * (60*7 - wld.map.server.temperature * 6 ) / 700))
#define | TROPICAL_LEVEL
#define | DRY_MIN_LEVEL (MAX_COLATITUDE * (7300 - wld.map.server.temperature * 18 ) / 10000)
#define | DRY_MAX_LEVEL (MAX_COLATITUDE * (7300 + wld.map.server.temperature * 17 ) / 10000)
#define | ICE_BASE_LEVEL ice_base_colatitude

## Functions

int | get_sqsize (void)
int | map_colatitude (const struct tile *ptile)
bool | near_singularity (const struct tile *ptile)
void | generator_init_topology (bool autosize)

## Variables

int | ice_base_colatitude

## Macro Definition Documentation

## ◆ COLD_LEVEL

#define COLD_LEVEL (MAX(0, MAX_COLATITUDE * (60*7 - wld.map.server.temperature * 6 ) / 700))

Definition at line 36 of file mapgen_topology.h.

## ◆ DRY_MAX_LEVEL

#define DRY_MAX_LEVEL (MAX_COLATITUDE * (7300 + wld.map.server.temperature * 17 ) / 10000)

Definition at line 43 of file mapgen_topology.h.

## ◆ DRY_MIN_LEVEL

#define DRY_MIN_LEVEL (MAX_COLATITUDE * (7300 - wld.map.server.temperature * 18 ) / 10000)

Definition at line 41 of file mapgen_topology.h.

## ◆ ICE_BASE_LEVEL

#define ICE_BASE_LEVEL ice_base_colatitude

Definition at line 49 of file mapgen_topology.h.

## ◆ L_UNIT

#define L_UNIT MAX(1, wld.map.server.size * MAX_COLATITUDE / (30 * get_sqsize()))

Definition at line 28 of file mapgen_topology.h.

## ◆ MAX_COLATITUDE

#define MAX_COLATITUDE 1000

Definition at line 22 of file mapgen_topology.h.

## ◆ TROPICAL_LEVEL

#define TROPICAL_LEVEL

Value:
(MIN(MAX_COLATITUDE * 9 /10, \
MAX_COLATITUDE * (143*7 - wld.map.server.temperature * 10) / 700))
wld
struct world wld
Definition game.c:58
MAX_COLATITUDE
#define MAX_COLATITUDE
Definition mapgen_topology.h:22
MIN
#define MIN(x, y)
Definition shared.h:55
civ_map::server
struct civ_map::@41::@43 server
civ_map::temperature
int temperature
Definition map_types.h:102
world::map
struct civ_map map
Definition world_object.h:38

Definition at line 38 of file mapgen_topology.h.

## Function Documentation

## ◆ generator_init_topology()

void generator_init_topology | ( | bool | autosize | ) |

This function sets sizes in a topology-specific way then calls map_init_topology(). Set 'autosize' to TRUE if the xsize/ysize should be calculated.

Definition at line 317 of file mapgen_topology.c.

Referenced by map_fractal_generate().

## ◆ get_sqsize()

int get_sqsize | ( | void |  | ) |

An estimate of the linear (1-dimensional) size of the map.

Definition at line 418 of file mapgen_topology.c.

Referenced by generator_init_topology(), make_fracture_map(), and map_fractal_generate().

## ◆ map_colatitude()

int map_colatitude | ( | const struct tile * | ptile | ) |

Returns the colatitude of this map position. This is a value in the range of 0 to MAX_COLATITUDE (inclusive). This function is wanted to concentrate the topology information all generator code has to use colatitude and others topology safe functions instead (x,y) coordinate to place terrains colatitude is 0 at poles and MAX_COLATITUDE at equator

Definition at line 38 of file mapgen_topology.c.

Referenced by create_tmap(), hmap_pole_factor(), make_pseudofractal1_hmap(), make_river(), normalize_hmap_poles(), place_terrain(), and renormalize_hmap_poles().

## ◆ near_singularity()

bool near_singularity | ( | const struct tile * | ptile | ) |

Return TRUE if the map in a typical city radius is SINGULAR. This is used to avoid putting (non-polar) land near the edge of the map.

Definition at line 205 of file mapgen_topology.c.

Referenced by create_island(), hmap_pole_factor(), make_pseudofractal1_hmap(), and normalize_hmap_poles().

## Variable Documentation

## ◆ ice_base_colatitude

int ice_base_colatitude

extern

Definition at line 28 of file mapgen_topology.c.

Referenced by generator_init_topology().