# HG changeset patch # User tron # Date 1156948226 0 # Node ID f7e53dabbb72fda7fed451a9ec22742a61b0a6bc # Parent e76250abab97c0c32a63d2b93f62c5e7c890200f (svn r6238) Use the colour stored in _colour_gradient[] instead of explicitly retrieving it with GetNonSprite() diff -r e76250abab97 -r f7e53dabbb72 smallmap_gui.c --- a/smallmap_gui.c Wed Aug 30 13:41:53 2006 +0000 +++ b/smallmap_gui.c Wed Aug 30 14:30:26 2006 +0000 @@ -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 @@ 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 @@ 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; } } }