summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-14 22:56:22 +0000
committerDarkvater <darkvater@openttd.org>2006-03-14 22:56:22 +0000
commit76a7d159db39e005ff33314f824fe475d766d256 (patch)
tree778678e40fef32b3ab0f6d26b2058972884012d7
parent54f5cf4ec9867cae67ef1cbadf4674678cca6a44 (diff)
downloadopenttd-76a7d159db39e005ff33314f824fe475d766d256.tar.xz
(svn r3874) - Codechange: move the extern decleration of _patches_newgame inside the WE_CREATE event because it is only used there.
-rw-r--r--settings_gui.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/settings_gui.c b/settings_gui.c
index 7d28dfc4e..8995a7eca 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -581,8 +581,6 @@ static const PatchPage _patches_page[] = {
{_patches_ai, lengthof(_patches_ai)},
};
-extern Patches _patches_newgame;
-
/** The main patches window. Shows a number of categories on top and
* a selection of patches in that category.
* Uses WP(w, def_d) macro - data_1, data_2, data_3 */
@@ -591,9 +589,10 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
static Patches *patches_ptr;
switch (e->event) {
- case WE_CREATE:
+ case WE_CREATE: {
+ extern Patches _patches_newgame;
patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches;
- break;
+ } break;
case WE_PAINT: {
int x, y;