Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
temperature_map.c File Reference
#include "log.h"
#include "map.h"
#include "height_map.h"
#include "mapgen_topology.h"
#include "mapgen_utils.h"
#include "temperature_map.h"

Go to the source code of this file.

Macros

#define tmap(_tile)   (temperature_map[tile_index(_tile)])
 

Functions

bool temperature_is_initialized (void)
 
bool tmap_is (const struct tile *ptile, temperature_type tt)
 
bool is_temperature_type_near (const struct tile *ptile, temperature_type tt)
 
void destroy_tmap (void)
 
void create_tmap (bool real)
 

Variables

static inttemperature_map
 

Macro Definition Documentation

◆ tmap

#define tmap (   _tile)    (temperature_map[tile_index(_tile)])

Definition at line 33 of file temperature_map.c.

Function Documentation

◆ create_tmap()

void create_tmap ( bool  real)

Initialize the temperature_map if arg is FALSE, create a dummy tmap == map_colatitude to be used if hmap or oceans are not placed gen 2-4

Definition at line 119 of file temperature_map.c.

Referenced by create_start_positions(), make_land(), and map_fractal_generate().

◆ destroy_tmap()

void destroy_tmap ( void  )

Free the tmap

Definition at line 107 of file temperature_map.c.

Referenced by create_start_positions(), make_land(), and map_fractal_generate().

◆ is_temperature_type_near()

bool is_temperature_type_near ( const struct tile ptile,
temperature_type  tt 
)

Return true if at least one tile has tt temperature type

Definition at line 93 of file temperature_map.c.

Referenced by make_land(), make_polar(), and make_polar_land().

◆ temperature_is_initialized()

bool temperature_is_initialized ( void  )

Returns one line (given by the y coordinate) of the temperature map. Return TRUE if temperateure_map is initialized

Definition at line 77 of file temperature_map.c.

Referenced by create_start_positions(), and map_fractal_generate().

◆ tmap_is()

bool tmap_is ( const struct tile ptile,
temperature_type  tt 
)

Return true if the tile has tt temperature type

Definition at line 85 of file temperature_map.c.

Referenced by condition_filter(), fill_island(), is_valid_start_pos(), make_land(), make_plain(), make_polar(), make_polar_land(), make_relief(), and place_terrain().

Variable Documentation

◆ temperature_map

int* temperature_map
static

Definition at line 31 of file temperature_map.c.

Referenced by create_tmap(), destroy_tmap(), and temperature_is_initialized().