diff options
author | darkvater <darkvater@openttd.org> | 2004-08-10 21:29:47 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-08-10 21:29:47 +0000 |
commit | 637a567acb18e22b18e3df329f7f14e14ef3bc88 (patch) | |
tree | 1115827be2b1dcc54ccdcae40b740e8b5254cce9 /graph_gui.c | |
parent | 9c4abb643cc0d9db718dc2c2deb6ce016bd06c33 (diff) | |
download | openttd-637a567acb18e22b18e3df329f7f14e14ef3bc88.tar.xz |
(svn r17) -Fix Player window fixes, Getstring id0 fixes, Finances window is now ok
Diffstat (limited to 'graph_gui.c')
-rw-r--r-- | graph_gui.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/graph_gui.c b/graph_gui.c index f0ae98eab..2e3c13e39 100644 --- a/graph_gui.c +++ b/graph_gui.c @@ -824,7 +824,13 @@ static void CompanyLeagueWndProc(Window *w, WindowEvent *e) SET_DPARAM32(2, p->name_2); SET_DPARAM16(3, GetPlayerNameString(p->index, 4)); - SET_DPARAM16(5, GetPerformanceTitleFromValue(p->old_economy[1].performance_history)); + /* WARNING ugly hack! + GetPlayerNameString sets up (Player #) if the player is human in an extra DPARAM16 + It seems that if player is non-human, nothing is set up, so param is 0. GetString doesn't like + that because there is another param after it. + So we'll just shift the rating one back if player is AI and all is fine + */ + SET_DPARAM16((IS_HUMAN_PLAYER(i) ? 5 : 4), GetPerformanceTitleFromValue(p->old_economy[1].performance_history)); DrawString(2, 15 + i * 10, i == 0 ? STR_7054 : STR_7055, 0); DrawPlayerIcon(p->index, 27, 16 + i * 10); |