diff options
author | truelight <truelight@openttd.org> | 2007-07-23 19:30:36 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-07-23 19:30:36 +0000 |
commit | 7031cc3c0bfc91ecb46af02a8aa2050977473230 (patch) | |
tree | bfad3a88dc72503d87b57da5c45379536699ab72 /src/smallmap_gui.cpp | |
parent | 2418db4c23e5422f678b465a9bef85b1c2bded01 (diff) | |
download | openttd-7031cc3c0bfc91ecb46af02a8aa2050977473230.tar.xz |
(svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
-Codechange: replace magic 13 with MAX_SNOWLINE_HEIGHT (bilbo)
-Codechange: assure _map_height_bits is always of correct size (Rubidium)
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r-- | src/smallmap_gui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 12ebeeba0..3a80677c0 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -193,8 +193,10 @@ static inline void WRITE_PIXELS_OR(void *d, uint32 val) #define MKCOLOR(x) TO_LE32X(x) -/* Height encodings; 16 levels XXX - needs updating for more/finer heights! */ -static const uint32 _map_height_bits[16] = { +/** + * Height encodings; MAX_TILE_HEIGHT + 1 levels, from 0 to MAX_TILE_HEIGHT + */ +static const uint32 _map_height_bits[] = { MKCOLOR(0x5A5A5A5A), MKCOLOR(0x5A5B5A5B), MKCOLOR(0x5B5B5B5B), @@ -212,6 +214,7 @@ static const uint32 _map_height_bits[16] = { MKCOLOR(0x27272727), MKCOLOR(0x27272727), }; +assert_compile(lengthof(_map_height_bits) == MAX_TILE_HEIGHT + 1); struct AndOr { uint32 mor; |