summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-13 16:28:47 +0000
committerdarkvater <darkvater@openttd.org>2005-01-13 16:28:47 +0000
commit06cc62f40d84c91bba41510bbeab0ba8df7106b9 (patch)
tree3e1729e6f6d4e134ab87140f082b967a21b9cfd7 /misc_gui.c
parent0074496ea45c30c387092b29c5a8d868daf62f57 (diff)
downloadopenttd-06cc62f40d84c91bba41510bbeab0ba8df7106b9.tar.xz
(svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
-Fix: fixed some compiler warnings -Added PF_NETWORK_ONLY flag to settings. Such a setting can only be modified in a network game.
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 28bb9ad16..804b5eaba 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -207,14 +207,14 @@ static void AboutWindowProc(Window *w, WindowEvent *e)
{
switch(e->event) {
case WE_CREATE: /* Set up window counter and start position of scroller */
- WP(w, general_d).i = 0;
- WP(w, general_d).j = w->height - 40;
+ WP(w, scroller_d).counter = 0;
+ WP(w, scroller_d).height = w->height - 40;
break;
case WE_PAINT: {
const char *str;
char buffer[100];
uint i;
- int y = WP(w, general_d).j;
+ int y = WP(w, scroller_d).height;
DrawWindowWidgets(w);
// Show original copyright and revision version
@@ -239,13 +239,13 @@ static void AboutWindowProc(Window *w, WindowEvent *e)
}
// If the last text has scrolled start anew from the start
- if (y < 50) WP(w, general_d).j = w->height - 40;
+ if (y < 50) WP(w, scroller_d).height = w->height - 40;
DrawStringMultiCenter(200, w->height - 15, STR_00BA_COPYRIGHT_OPENTTD, 398);
} break;
case WE_MOUSELOOP: /* Timer to scroll the text and adjust the new top */
- if (WP(w, general_d).i++ % 3 == 0) {
- WP(w, general_d).j--;
+ if (WP(w, scroller_d).counter++ % 3 == 0) {
+ WP(w, scroller_d).height--;
SetWindowDirty(w);
}
break;