gfx.c
changeset 4428 0b0ee542d5b6
parent 4425 cff9af513dec
child 4429 1bb01569940c
equal deleted inserted replaced
4427:cacdecf56fdf 4428:0b0ee542d5b6
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #include "stdafx.h"
     3 #include "stdafx.h"
     4 #include "openttd.h"
     4 #include "openttd.h"
     5 #include "functions.h"
     5 #include "functions.h"
     6 #include "player.h"
     6 #include "macros.h"
     7 #include "spritecache.h"
     7 #include "spritecache.h"
     8 #include "strings.h"
     8 #include "strings.h"
     9 #include "string.h"
     9 #include "string.h"
    10 #include "gfx.h"
    10 #include "gfx.h"
    11 #include "table/palettes.h"
    11 #include "table/palettes.h"
  1996 
  1996 
  1997 void SortResolutions(int count)
  1997 void SortResolutions(int count)
  1998 {
  1998 {
  1999 	qsort(_resolutions, count, sizeof(_resolutions[0]), compare_res);
  1999 	qsort(_resolutions, count, sizeof(_resolutions[0]), compare_res);
  2000 }
  2000 }
  2001 
       
  2002 uint16 GetDrawStringPlayerColor(PlayerID player)
       
  2003 {
       
  2004 	// Get the color for DrawString-subroutines which matches the color
       
  2005 	//  of the player
       
  2006 	if (player == OWNER_SPECTATOR || player == OWNER_SPECTATOR - 1) return 1;
       
  2007 	return (_color_list[_player_colors[player]].window_color_1b) | IS_PALETTE_COLOR;
       
  2008 }