diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-14 15:43:37 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-14 15:43:37 +0000 |
commit | 975442040d27fc83cf143ec3d6d5b59aebd03e6d (patch) | |
tree | 128e17c7b5fd106f884f2af8b541f5e3aa329d0b /smallmap_gui.c | |
parent | 2dcdeb985d481ca44208d8d675eda31db7d4c9ff (diff) | |
download | openttd-975442040d27fc83cf143ec3d6d5b59aebd03e6d.tar.xz |
(svn r6772) -Codechange: Do not abuse OWNER_SPECTATOR as the "owner" of the industry for
the minimap. This also saves us from having this huge _owner_colors table.
Diffstat (limited to 'smallmap_gui.c')
-rw-r--r-- | smallmap_gui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c index b58fb2c00..d808519fd 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -507,7 +507,7 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile) } -static uint32 _owner_colors[256]; +static uint32 _owner_colors[OWNER_END + 1]; /** * Return the color a tile would be displayed with in the small map in mode "Owner". @@ -520,7 +520,7 @@ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile) Owner o; switch (GetTileType(tile)) { - case MP_INDUSTRY: o = OWNER_SPECTATOR; break; + case MP_INDUSTRY: o = OWNER_END; break; case MP_HOUSE: o = OWNER_TOWN; break; default: o = GetTileOwner(tile); break; } @@ -606,7 +606,7 @@ static void DrawSmallMap(DrawPixelInfo *dpi, Window *w, int type, bool show_town _owner_colors[OWNER_TOWN] = MKCOLOR(0xB4B4B4B4); _owner_colors[OWNER_NONE] = MKCOLOR(0x54545454); _owner_colors[OWNER_WATER] = MKCOLOR(0xCACACACA); - _owner_colors[OWNER_SPECTATOR] = MKCOLOR(0x20202020); /* industry */ + _owner_colors[OWNER_END+1] = MKCOLOR(0x20202020); /* industry */ /* now fill with the player colors */ FOR_ALL_PLAYERS(p) { |