summaryrefslogtreecommitdiff
path: root/src/highscore_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 22:46:17 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 22:46:17 +0000
commitf11300d1f95afd4aef64f994aecaaa5af446bf04 (patch)
treee1ae57a53d4852b46ae40e594822c459c6ed726a /src/highscore_gui.cpp
parentce513b46b7d69e2ff53982341b214da07c9a8a1e (diff)
downloadopenttd-f11300d1f95afd4aef64f994aecaaa5af446bf04.tar.xz
(svn r15794) -Codechange: remove the DoDrawString part of the old text drawing API
Diffstat (limited to 'src/highscore_gui.cpp')
-rw-r--r--src/highscore_gui.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp
index 095e973c0..1aca9dcf5 100644
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -140,6 +140,8 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
this->SetupHighScoreEndWindow(&x, &y);
+ const int right = this->left + this->width - 1;
+
SetDParam(0, ORIGINAL_END_YEAR);
SetDParam(1, this->window_number + STR_6801_EASY);
DrawStringMultiCenter(x + (640 / 2), y + 62, !_networking ? STR_0211_TOP_COMPANIES_WHO_REACHED : STR_TOP_COMPANIES_NETWORK_GAME, 500);
@@ -147,15 +149,15 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
/* Draw Highscore peepz */
for (uint8 i = 0; i < lengthof(_highscore_table[0]); i++) {
SetDParam(0, i + 1);
- DrawString(x + 40, y + 140 + (i * 55), STR_0212, TC_BLACK);
+ DrawString(x + 40, right, y + 140 + (i * 55), STR_0212, TC_BLACK);
if (hs[i].company[0] != '\0') {
TextColour colour = (this->rank == i) ? TC_RED : TC_BLACK; // draw new highscore in red
- DoDrawString(hs[i].company, x + 71, y + 140 + (i * 55), colour);
+ DrawString(x + 71, right, y + 140 + (i * 55), hs[i].company, colour);
SetDParam(0, hs[i].title);
SetDParam(1, hs[i].score);
- DrawString(x + 71, y + 160 + (i * 55), STR_HIGHSCORE_STATS, colour);
+ DrawString(x + 71, right, y + 160 + (i * 55), STR_HIGHSCORE_STATS, colour);
}
}
}