Freeciv21
Develop your civilization from humble roots to a global empire
mapgen.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  __ __ part of Freeciv21. Freeciv21 is free software: you can
4 / \\..// \ redistribute it and/or modify it under the terms of the GNU
5  ( oo ) General Public License as published by the Free Software
6  \__/ Foundation, either version 3 of the License, or (at your
7  option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10 **************************************************************************/
11 #pragma once
12 
13 #include "fc_types.h"
14 
15 #define HAS_POLES \
16  (wld.map.server.temperature < 70 && !wld.map.server.alltemperate)
17 
21 // WETNESS
22 
23 // necessary condition of deserts placement
24 #define map_pos_is_dry(ptile) \
25  (map_colatitude((ptile)) <= DRY_MAX_LEVEL \
26  && map_colatitude((ptile)) > DRY_MIN_LEVEL \
27  && count_terrain_class_near_tile((ptile), false, true, TC_OCEAN) <= 35)
28 typedef enum { WC_ALL = 200, WC_DRY, WC_NDRY } wetness_c;
29 
30 extern int forest_pct;
31 extern int desert_pct;
32 extern int swamp_pct;
33 extern int mountain_pct;
34 extern int jungle_pct;
35 extern int river_pct;
36 
37 extern struct extra_type *river_types[MAX_ROAD_TYPES];
38 extern int river_type_count;
39 
40 void make_plains();
41 void make_polar();
42 
43 bool test_wetness(const struct tile *ptile, wetness_c c);
44 
45 bool map_generate(bool autosize, struct unit_type *initial_unit);
#define MAX_ROAD_TYPES
Definition: fc_types.h:44
wetness_c
Definition: mapgen.h:28
@ WC_NDRY
Definition: mapgen.h:28
@ WC_ALL
Definition: mapgen.h:28
@ WC_DRY
Definition: mapgen.h:28
int jungle_pct
Definition: mapgen.cpp:97
int mountain_pct
Definition: mapgen.cpp:96
void make_polar()
Add frozen tiles in the arctic zone.
Definition: mapgen.cpp:258
int desert_pct
Definition: mapgen.cpp:94
int forest_pct
Definition: mapgen.cpp:93
struct extra_type * river_types[MAX_ROAD_TYPES]
Definition: mapgen.cpp:43
int river_type_count
Definition: mapgen.cpp:44
bool test_wetness(const struct tile *ptile, wetness_c c)
These functions test for conditions used in rand_map_pos_characteristic.
Definition: mapgen.cpp:122
int swamp_pct
Definition: mapgen.cpp:95
bool map_generate(bool autosize, struct unit_type *initial_unit)
See stdinhand.c for information on map generation methods.
Definition: mapgen.cpp:1232
int river_pct
Definition: mapgen.cpp:98
void make_plains()
Make_plains converts all not yet placed terrains to plains (tundra, grass) used by generators 2-4.
Definition: mapgen.cpp:377
Definition: tile.h:42