(svn r11839) -Codechange: move some variables from variables.h to a more logical location.
--- a/src/blitter/factory.hpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/blitter/factory.hpp Sun Jan 13 21:41:24 2008 +0000
@@ -130,4 +130,6 @@
const char *GetName();
};
+extern char _ini_blitter[32];
+
#endif /* BLITTER_FACTORY_HPP */
--- a/src/command.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/command.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -24,6 +24,7 @@
#include "table/strings.h"
const char *_cmd_text = NULL;
+StringID _error_message;
/**
* Helper macro to define the header of all command handler macros.
--- a/src/command_func.h Sun Jan 13 17:55:00 2008 +0000
+++ b/src/command_func.h Sun Jan 13 21:41:24 2008 +0000
@@ -77,6 +77,7 @@
*/
extern const char *_cmd_text;
extern Money _additional_cash_required;
+extern StringID _error_message;
/**
* Checks if a integer value belongs to a command.
--- a/src/driver.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/driver.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -11,9 +11,19 @@
#include "music/music_driver.hpp"
#include "video/video_driver.hpp"
+VideoDriver *_video_driver;
+char _ini_videodriver[32];
+int _num_resolutions;
+uint16 _resolutions[32][2];
+uint16 _cur_resolution[2];
+
SoundDriver *_sound_driver;
+char _ini_sounddriver[32];
+
MusicDriver *_music_driver;
-VideoDriver *_video_driver;
+char _ini_musicdriver[32];
+
+char _ini_blitter[32];
static const char* GetDriverParam(const char* const* parm, const char* name)
{
--- a/src/music/music_driver.hpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/music/music_driver.hpp Sun Jan 13 21:41:24 2008 +0000
@@ -31,5 +31,6 @@
};
extern MusicDriver *_music_driver;
+extern char _ini_musicdriver[32];
#endif /* MUSIC_MUSIC_DRIVER_HPP */
--- a/src/newgrf_industries.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/newgrf_industries.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -21,6 +21,7 @@
#include "town.h"
#include "player_func.h"
#include "player_base.h"
+#include "command_func.h"
#include "table/strings.h"
--- a/src/newgrf_industrytiles.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/newgrf_industrytiles.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -22,6 +22,7 @@
#include "transparency.h"
#include "functions.h"
#include "town.h"
+#include "command_func.h"
#include "table/sprites.h"
#include "table/strings.h"
--- a/src/settings.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/settings.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -51,6 +51,10 @@
#include "string_func.h"
#include "gui.h"
#include "town.h"
+#include "video/video_driver.hpp"
+#include "sound/sound_driver.hpp"
+#include "music/music_driver.hpp"
+#include "blitter/factory.hpp"
#include "table/strings.h"
--- a/src/sound/sound_driver.hpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/sound/sound_driver.hpp Sun Jan 13 21:41:24 2008 +0000
@@ -23,5 +23,6 @@
};
extern SoundDriver *_sound_driver;
+extern char _ini_sounddriver[32];
#endif /* SOUND_SOUND_DRIVER_HPP */
--- a/src/station.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/station.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -30,6 +30,7 @@
#include "date_func.h"
#include "variables.h"
#include "settings_type.h"
+#include "command_func.h"
#include "table/sprites.h"
#include "table/strings.h"
--- a/src/strings.cpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/strings.cpp Sun Jan 13 21:41:24 2008 +0000
@@ -36,6 +36,7 @@
#include "player_base.h"
#include "fios.h"
#include "settings_type.h"
+#include "video/video_driver.hpp"
#include "table/strings.h"
#include "table/control_codes.h"
--- a/src/variables.h Sun Jan 13 17:55:00 2008 +0000
+++ b/src/variables.h Sun Jan 13 21:41:24 2008 +0000
@@ -79,8 +79,6 @@
VARDEF byte _display_opt;
VARDEF int _caret_timer;
-VARDEF StringID _error_message;
-
VARDEF bool _rightclick_emulate;
/* IN/OUT parameters to commands */
@@ -91,19 +89,12 @@
VARDEF byte _switch_mode;
VARDEF StringID _switch_mode_errorstr;
-VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32], _ini_blitter[32];
-
-VARDEF int _num_resolutions;
-VARDEF uint16 _resolutions[32][2];
-VARDEF uint16 _cur_resolution[2];
-
VARDEF char _savegame_format[8];
VARDEF char *_config_file;
VARDEF char *_highscore_file;
VARDEF char *_log_file;
-
/* landscape.cpp */
extern const byte _tileh_to_sprite[32];
--- a/src/video/video_driver.hpp Sun Jan 13 17:55:00 2008 +0000
+++ b/src/video/video_driver.hpp Sun Jan 13 21:41:24 2008 +0000
@@ -31,5 +31,9 @@
};
extern VideoDriver *_video_driver;
+extern char _ini_videodriver[32];
+extern int _num_resolutions;
+extern uint16 _resolutions[32][2];
+extern uint16 _cur_resolution[2];
#endif /* VIDEO_VIDEO_DRIVER_HPP */