diff options
author | tron <tron@openttd.org> | 2006-08-30 14:30:26 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-30 14:30:26 +0000 |
commit | 747f9cf80a8466b17f64bc2447113970efdec339 (patch) | |
tree | 88d661470c962c65ecca4c1da6fc80a7838e26e9 | |
parent | b9f47dda4ef1708c6c3c9b192ef2916d3fe227ac (diff) | |
download | openttd-747f9cf80a8466b17f64bc2447113970efdec339.tar.xz |
(svn r6238) Use the colour stored in _colour_gradient[] instead of explicitly retrieving it with GetNonSprite()
-rw-r--r-- | smallmap_gui.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c index c1d17501c..0f540e826 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -6,7 +6,6 @@ #include "bridge_map.h" #include "clear_map.h" #include "industry_map.h" -#include "spritecache.h" #include "station_map.h" #include "table/strings.h" #include "table/sprites.h" @@ -558,9 +557,6 @@ static const byte _vehicle_type_colors[6] = { 184, 191, 152, 15, 215, 184 }; -static inline uint32 dup_byte32(byte b) { - return b + (b << 8) + (b << 16) + (b << 24); -} static void DrawVertMapIndicator(int x, int y, int x2, int y2) { @@ -617,7 +613,7 @@ static void DrawSmallMap(DrawPixelInfo *dpi, Window *w, int type, bool show_town FOR_ALL_PLAYERS(p) { if (p->is_active) { _owner_colors[p->index] = - dup_byte32(GetNonSprite(PALETTE_RECOLOR_START + p->player_color)[0xCB]); // XXX - magic pixel + _colour_gradient[p->player_color][5] * 0x01010101; } } } |