Freeciv-3.3: /fast/freeciv/nightly/main/server/generator/height_map.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
height_map.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996-2007 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__HEIGHT_MAP_H
14#define FC__HEIGHT_MAP_H
15
16/* Wrappers for easy access. They are a macros so they can be lvalues.*/
17#define hmap(_tile) (height_map[tile_index(_tile)])
18
19/* shore_level safe unit of height */
20#define H_UNIT MIN(1, (hmap_max_level - hmap_shore_level) / 100)
21
22/*
23 * Height map information
24 *
25 * height_map[] stores the height of each tile
26 * hmap_max_level is the maximum height (heights will range from
27 * [0, hmap_max_level).
28 * hmap_shore_level is the level of ocean. Any tile at this height or
29 * above is land; anything below is ocean.
30 * hmap_mount_level is the level of mountains and hills. Any tile above
31 * this height will usually be a mountain or hill.
32 */
33#define hmap_max_level 1000
34extern int *height_map;
35 extern int hmap_shore_level, hmap_mountain_level;
36
37void normalize_hmap_poles(void);
38void renormalize_hmap_poles(void);
39void make_random_hmap(int smooth);
40void make_pseudofractal1_hmap(int extra_div);
41
42bool area_is_too_flat(struct tile *ptile, int thill, int my_height);
43
44void height_map_to_map(void);
45
46#endif /* FC__HEIGHT__MAP_H */
incite_cost
char * incite_cost
Definition comments.c:74
renormalize_hmap_poles
void renormalize_hmap_poles(void)
Definition height_map.c:81
hmap_mountain_level
int hmap_mountain_level
Definition height_map.h:35
height_map_to_map
void height_map_to_map(void)
Definition height_map.c:300
normalize_hmap_poles
void normalize_hmap_poles(void)
Definition height_map.c:65
hmap_shore_level
int hmap_shore_level
Definition height_map.c:30
area_is_too_flat
bool area_is_too_flat(struct tile *ptile, int thill, int my_height)
Definition height_map.c:271
make_pseudofractal1_hmap
void make_pseudofractal1_hmap(int extra_div)
Definition height_map.c:198
make_random_hmap
void make_random_hmap(int smooth)
Definition height_map.c:101
height_map
int * height_map
Definition height_map.c:29
tile
Definition tile.h:50