Mercurial > hg > openttd
changeset 16964:e0aa0398e8ae draft
(svn r21700) -Codechange: GetDrawStringCompanyColour returns a TextColour
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 03 Jan 2011 11:55:08 +0000 |
parents | cf56e44138b6 |
children | db80544f73f9 |
files | src/company_cmd.cpp src/company_gui.h |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -116,10 +116,10 @@ * @param company Company to get the colour of. * @return Colour of \a company. */ -uint16 GetDrawStringCompanyColour(CompanyID company) +TextColour GetDrawStringCompanyColour(CompanyID company) { - if (!Company::IsValidID(company)) return _colour_gradient[COLOUR_WHITE][4] | TC_IS_PALETTE_COLOUR; - return (_colour_gradient[_company_colours[company]][4]) | TC_IS_PALETTE_COLOUR; + if (!Company::IsValidID(company)) return (TextColour)_colour_gradient[COLOUR_WHITE][4] | TC_IS_PALETTE_COLOUR; + return (TextColour)_colour_gradient[_company_colours[company]][4] | TC_IS_PALETTE_COLOUR; } /**
--- a/src/company_gui.h +++ b/src/company_gui.h @@ -13,8 +13,9 @@ #define COMPANY_GUI_H #include "company_type.h" +#include "gfx_type.h" -uint16 GetDrawStringCompanyColour(CompanyID company); +TextColour GetDrawStringCompanyColour(CompanyID company); void DrawCompanyIcon(CompanyID c, int x, int y); void ShowCompanyStations(CompanyID company);