summaryrefslogtreecommitdiff
path: root/src/statusbar_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-30 20:39:50 +0000
committerrubidium <rubidium@openttd.org>2008-09-30 20:39:50 +0000
commit3b798599b63067c2e92aa49906ea66a07ae8de44 (patch)
tree69fb7ae1d9bdadb9e7386cb70b0a26621ad9b57f /src/statusbar_gui.cpp
parentcc1e761edab14f8264dba44d09f7272d931bdd93 (diff)
downloadopenttd-3b798599b63067c2e92aa49906ea66a07ae8de44.tar.xz
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
Diffstat (limited to 'src/statusbar_gui.cpp')
-rw-r--r--src/statusbar_gui.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp
index 47cac9ecb..692b0a8a5 100644
--- a/src/statusbar_gui.cpp
+++ b/src/statusbar_gui.cpp
@@ -78,15 +78,15 @@ struct StatusBarWindow : Window {
virtual void OnPaint()
{
- const Player *p = (_local_player == PLAYER_SPECTATOR) ? NULL : GetPlayer(_local_player);
+ const Company *c = (_local_company == COMPANY_SPECTATOR) ? NULL : GetCompany(_local_company);
this->DrawWidgets();
SetDParam(0, _date);
DrawStringCentered(70, 1, (_pause_game || _settings_client.gui.status_long_date) ? STR_00AF : STR_00AE, TC_FROMSTRING);
- if (p != NULL) {
- /* Draw player money */
- SetDParam(0, p->player_money);
+ if (c != NULL) {
+ /* Draw company money */
+ SetDParam(0, c->money);
DrawStringCentered(this->widget[2].left + 70, 1, STR_0004, TC_FROMSTRING);
}
@@ -101,16 +101,16 @@ struct StatusBarWindow : Window {
/* Draw the scrolling news text */
if (!DrawScrollingStatusText(&_statusbar_news_item, this->ticker_scroll, this->widget[1].right - this->widget[1].left - 2)) {
this->ticker_scroll = -1280;
- if (p != NULL) {
+ if (c != NULL) {
/* This is the default text */
- SetDParam(0, p->index);
+ SetDParam(0, c->index);
DrawStringCenteredTruncated(this->widget[1].left + 1, this->widget[1].right - 1, 1, STR_02BA, TC_FROMSTRING);
}
}
} else {
- if (p != NULL) {
+ if (c != NULL) {
/* This is the default text */
- SetDParam(0, p->index);
+ SetDParam(0, c->index);
DrawStringCenteredTruncated(this->widget[1].left + 1, this->widget[1].right - 1, 1, STR_02BA, TC_FROMSTRING);
}
}
@@ -133,7 +133,7 @@ struct StatusBarWindow : Window {
{
switch (widget) {
case 1: ShowLastNewsMessage(); break;
- case 2: if (_local_player != PLAYER_SPECTATOR) ShowPlayerFinances(_local_player); break;
+ case 2: if (_local_company != COMPANY_SPECTATOR) ShowCompanyFinances(_local_company); break;
default: ResetObjectToPlace();
}
}