diff options
author | alberth <alberth@openttd.org> | 2015-04-11 18:41:41 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2015-04-11 18:41:41 +0000 |
commit | 8e2b3d170bbd51533f7a39289f08d4967405c18a (patch) | |
tree | f7b0a8295e8fa1d13a918c1db01d738d8fe96778 /src | |
parent | 3576d803f52ace554f18ace7560ecaff46f86ef4 (diff) | |
download | openttd-8e2b3d170bbd51533f7a39289f08d4967405c18a.tar.xz |
(svn r27227) -Codechange: Initialise map at level 0 instead of -32k (chillcore)
Diffstat (limited to 'src')
-rw-r--r-- | src/tgp.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp index 50b2b8083..2583da9c2 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -155,7 +155,6 @@ /** Fixed point type for heights */ typedef int16 height_t; static const int height_decimal_bits = 4; -static const height_t _invalid_height = -32768; /** Fixed point array for amplitudes (and percent values) */ typedef int amplitude_t; @@ -315,8 +314,8 @@ static inline bool AllocHeightMap() _height_map.dim_x = _height_map.size_x + 1; _height_map.h = CallocT<height_t>(_height_map.total_size); - /* Iterate through height map initialize values */ - FOR_ALL_TILES_IN_HEIGHT(h) *h = _invalid_height; + /* Iterate through height map and initialise values. */ + FOR_ALL_TILES_IN_HEIGHT(h) *h = 0; return true; } |