From b0d618c66b637b0b700159ffaef700d1c6a8c9fe Mon Sep 17 00:00:00 2001 From: truelight Date: Mon, 23 Jul 2007 19:30:36 +0000 Subject: (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) --- src/smallmap_gui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/smallmap_gui.cpp') 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; -- cgit v1.2.3-54-g00ecf