summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-03 11:55:08 +0000
committerrubidium <rubidium@openttd.org>2011-01-03 11:55:08 +0000
commit1c2d56d314d5be9d228b08ca6eea8d988f2a389f (patch)
tree18928003f29d70c1d0ad405db0bdb5e417685303 /src
parent6b5992788c2dc3932d6707497c67700fd01267dc (diff)
downloadopenttd-1c2d56d314d5be9d228b08ca6eea8d988f2a389f.tar.xz
(svn r21700) -Codechange: GetDrawStringCompanyColour returns a TextColour
Diffstat (limited to 'src')
-rw-r--r--src/company_cmd.cpp6
-rw-r--r--src/company_gui.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index b39bed5fc..3cec65c44 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -116,10 +116,10 @@ void SetLocalCompany(CompanyID new_company)
* @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;
}
/**
diff --git a/src/company_gui.h b/src/company_gui.h
index 30e58becf..31033d4ba 100644
--- 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);