diff options
author | rubidium <rubidium@openttd.org> | 2008-01-13 21:41:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-13 21:41:24 +0000 |
commit | 3ca95f2a85d2347f28424a479fa3323f4a86bca7 (patch) | |
tree | 11608a1c774c5961fb6f16b3536041e440426e8c | |
parent | 27e5deb719f91bc26e8bf39a11acff6367062417 (diff) | |
download | openttd-3ca95f2a85d2347f28424a479fa3323f4a86bca7.tar.xz |
(svn r11839) -Codechange: move some variables from variables.h to a more logical location.
-rw-r--r-- | src/blitter/factory.hpp | 2 | ||||
-rw-r--r-- | src/command.cpp | 1 | ||||
-rw-r--r-- | src/command_func.h | 1 | ||||
-rw-r--r-- | src/driver.cpp | 12 | ||||
-rw-r--r-- | src/music/music_driver.hpp | 1 | ||||
-rw-r--r-- | src/newgrf_industries.cpp | 1 | ||||
-rw-r--r-- | src/newgrf_industrytiles.cpp | 1 | ||||
-rw-r--r-- | src/settings.cpp | 4 | ||||
-rw-r--r-- | src/sound/sound_driver.hpp | 1 | ||||
-rw-r--r-- | src/station.cpp | 1 | ||||
-rw-r--r-- | src/strings.cpp | 1 | ||||
-rw-r--r-- | src/variables.h | 9 | ||||
-rw-r--r-- | src/video/video_driver.hpp | 4 |
13 files changed, 29 insertions, 10 deletions
diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index 5197104d0..6b4a71a72 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -130,4 +130,6 @@ public: const char *GetName(); }; +extern char _ini_blitter[32]; + #endif /* BLITTER_FACTORY_HPP */ diff --git a/src/command.cpp b/src/command.cpp index 8587e8a52..cf25d13bf 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -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. diff --git a/src/command_func.h b/src/command_func.h index ccb9c2155..888468429 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -77,6 +77,7 @@ void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, Comma */ extern const char *_cmd_text; extern Money _additional_cash_required; +extern StringID _error_message; /** * Checks if a integer value belongs to a command. diff --git a/src/driver.cpp b/src/driver.cpp index dc7b23978..35f4b5ce9 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -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) { diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index b9e0ec065..a8b6ab479 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -31,5 +31,6 @@ public: }; extern MusicDriver *_music_driver; +extern char _ini_musicdriver[32]; #endif /* MUSIC_MUSIC_DRIVER_HPP */ diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index f4e504945..a79efad21 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -21,6 +21,7 @@ #include "town.h" #include "player_func.h" #include "player_base.h" +#include "command_func.h" #include "table/strings.h" diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index d9e12ef22..fcf4105bc 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -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" diff --git a/src/settings.cpp b/src/settings.cpp index d077f1ab9..41615cff0 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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" diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp index 04c9e9224..55cc20be8 100644 --- a/src/sound/sound_driver.hpp +++ b/src/sound/sound_driver.hpp @@ -23,5 +23,6 @@ public: }; extern SoundDriver *_sound_driver; +extern char _ini_sounddriver[32]; #endif /* SOUND_SOUND_DRIVER_HPP */ diff --git a/src/station.cpp b/src/station.cpp index fce6626db..a09727b55 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -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" diff --git a/src/strings.cpp b/src/strings.cpp index 1c48f99d6..7849f4f5b 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -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" diff --git a/src/variables.h b/src/variables.h index cfba96391..6045b686c 100644 --- a/src/variables.h +++ b/src/variables.h @@ -79,8 +79,6 @@ VARDEF int _autosave_ctr; 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 bool _generating_world; 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]; diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index 423ab92e1..2cd81154e 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -31,5 +31,9 @@ public: }; 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 */ |