diff options
author | rubidium <rubidium@openttd.org> | 2006-05-22 09:59:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-05-22 09:59:09 +0000 |
commit | 928fbe34f21d91052f3446df9d7e9773bdf32d47 (patch) | |
tree | b788c7edb4172ca828ca014a8c90ff94c47974a9 | |
parent | 58458812a46ba4beec0aca3875d640c26c152eb5 (diff) | |
download | openttd-928fbe34f21d91052f3446df9d7e9773bdf32d47.tar.xz |
(svn r4944) Codechange: make _patches_newgame available via settings.h and remove instances of extern Patches _patches_newgame in .c files
-rw-r--r-- | intro_gui.c | 2 | ||||
-rw-r--r-- | settings.h | 3 | ||||
-rw-r--r-- | settings_gui.c | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/intro_gui.c b/intro_gui.c index b3206efa0..3ebe9b361 100644 --- a/intro_gui.c +++ b/intro_gui.c @@ -10,6 +10,7 @@ #include "player.h" #include "network.h" #include "variables.h" +#include "settings.h" extern void SwitchMode(int new_mode); @@ -54,7 +55,6 @@ static void SelectGameWndProc(Window *w, WindowEvent *e) { /* We do +/- 6 for the map_xy because 64 is 2^6, but it is the lowest available element */ static const StringID mapsizes[] = {STR_64, STR_128, STR_256, STR_512, STR_1024, STR_2048, INVALID_STRING_ID}; - extern Patches _patches_newgame; switch (e->event) { case WE_PAINT: diff --git a/settings.h b/settings.h index d8d83c6e2..f837ee835 100644 --- a/settings.h +++ b/settings.h @@ -74,6 +74,9 @@ static inline void *ini_get_variable(const SaveLoad *sld, const void *object) return (object == NULL) ? sld->address : (byte*)object + (ptrdiff_t)sld->address; } +/** The patch values that are used for new games and/or modified in config file */ +extern Patches _patches_newgame; + void IConsoleSetPatchSetting(const char *name, const char *value); void IConsoleGetPatchSetting(const char *name); const SettingDesc *GetPatchFromName(const char *name, uint *i); diff --git a/settings_gui.c b/settings_gui.c index 47f0b37c5..0e018ed14 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -675,7 +675,6 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e) switch (e->event) { case WE_CREATE: { - extern Patches _patches_newgame; static bool first_time = true; patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; |