summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-07-19 17:11:09 +0000
committerrubidium <rubidium@openttd.org>2010-07-19 17:11:09 +0000
commiteb30ebe1a4b5b6b5fef98331ec91c1d23b4a00cc (patch)
tree048f55dc7bb47f2f254ad5935353ad6b68f9a32c /src
parent5a836cdec79cea79ff3ef69c08f13a0546c6dacd (diff)
downloadopenttd-eb30ebe1a4b5b6b5fef98331ec91c1d23b4a00cc.tar.xz
(svn r20188) -Codechange: unVARDEF the _[config|log|highscore]_file variables and move them to a more logical location
Diffstat (limited to 'src')
-rw-r--r--src/dedicated.cpp2
-rw-r--r--src/fileio.cpp4
-rw-r--r--src/highscore.cpp1
-rw-r--r--src/openttd.cpp1
-rw-r--r--src/settings.cpp1
-rw-r--r--src/variables.h4
6 files changed, 9 insertions, 4 deletions
diff --git a/src/dedicated.cpp b/src/dedicated.cpp
index bdfbf2c54..1de4d3a49 100644
--- a/src/dedicated.cpp
+++ b/src/dedicated.cpp
@@ -11,6 +11,8 @@
#include "stdafx.h"
+char *_log_file; ///< File to reroute output of a forked OpenTTD to
+
#ifdef ENABLE_NETWORK
#if defined(UNIX) && !defined(__MORPHOS__)
diff --git a/src/fileio.cpp b/src/fileio.cpp
index f3d57fb72..f1f8faae1 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -56,6 +56,10 @@ static Fio _fio;
/** Whether the working directory should be scanned. */
static bool _do_scan_working_directory = true;
+extern char *_config_file;
+extern char *_highscore_file;
+extern char *_log_file;
+
/* Get current position in file */
size_t FioGetPos()
{
diff --git a/src/highscore.cpp b/src/highscore.cpp
index d56e2f511..beb4d1356 100644
--- a/src/highscore.cpp
+++ b/src/highscore.cpp
@@ -22,6 +22,7 @@
#include "debug.h"
HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
+char *_highscore_file; ///< The file to store the highscore data in.
static const StringID _endgame_perf_titles[] = {
STR_HIGHSCORE_PERFORMANCE_TITLE_BUSINESSMAN,
diff --git a/src/openttd.cpp b/src/openttd.cpp
index b6d20e937..c17d15652 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -91,6 +91,7 @@ extern void SetDifficultyLevel(int mode, DifficultySettings *gm_opt);
extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY);
extern void ShowOSErrorBox(const char *buf, bool system);
extern bool _dedicated_forks;
+extern char *_config_file;
/**
* Error handling for fatal user errors.
diff --git a/src/settings.cpp b/src/settings.cpp
index a9f40756d..0f2ab8a6c 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -77,6 +77,7 @@ ClientSettings _settings_client;
GameSettings _settings_game;
GameSettings _settings_newgame;
VehicleDefaultSettings _old_vds; ///< Used for loading default vehicles settings from old savegames
+char *_config_file; ///< Configuration file of OpenTTD
typedef void SettingDescProc(IniFile *ini, const SettingDesc *desc, const char *grpname, void *object);
typedef void SettingDescProcList(IniFile *ini, const char *grpname, StringList *list);
diff --git a/src/variables.h b/src/variables.h
index 1cd6b14a1..f6aceaf5a 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -24,8 +24,4 @@ VARDEF byte _display_opt;
/* IN/OUT parameters to commands */
VARDEF bool _generating_world;
-VARDEF char *_config_file;
-VARDEF char *_highscore_file;
-VARDEF char *_log_file;
-
#endif /* VARIABLES_H */