summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-31 08:46:43 +0000
committerrubidium <rubidium@openttd.org>2008-08-31 08:46:43 +0000
commitc3a9653c894ad597c35d41e6d8739c3330371c74 (patch)
tree161c58d24eacca85942713448990ad9d1280d8bd /src/openttd.cpp
parent1afa473d0f26f56750d899ceaacfcbfbae7d21e0 (diff)
downloadopenttd-c3a9653c894ad597c35d41e6d8739c3330371c74.tar.xz
(svn r14197) -Codechange: rework (original) base graphics determination methods. This yields in the following:
-Feature: make configuring the to-be-used base graphics via openttd.cfg and the command line possible. -Feature: allow both the German as well as non-German toyland graphics as "correct" and official graphics. -Feature: allow people to create their own base graphics easily and without requiring code changes.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 131ad9a0c..61f466056 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -515,7 +515,9 @@ int ttd_main(int argc, char *argv[])
CheckConfig();
LoadFromHighScore();
+
/* override config? */
+ if (!StrEmpty(graphics_set)) ttd_strlcpy(_ini_graphics_set, graphics_set, sizeof(_ini_graphics_set));
if (!StrEmpty(musicdriver)) ttd_strlcpy(_ini_musicdriver, musicdriver, sizeof(_ini_musicdriver));
if (!StrEmpty(sounddriver)) ttd_strlcpy(_ini_sounddriver, sounddriver, sizeof(_ini_sounddriver));
if (!StrEmpty(videodriver)) ttd_strlcpy(_ini_videodriver, videodriver, sizeof(_ini_videodriver));
@@ -558,10 +560,10 @@ int ttd_main(int argc, char *argv[])
/* This must be done early, since functions use the InvalidateWindow* calls */
InitWindowSystem();
- if (!SetGraphicsSet(graphics_set)) {
- StrEmpty(graphics_set) ?
+ if (!SetGraphicsSet(_ini_graphics_set)) {
+ StrEmpty(_ini_graphics_set) ?
usererror("Failed to find a graphics set. Please acquire a graphics set for OpenTTD.") :
- usererror("Failed to select requested graphics set '%s'", graphics_set);
+ usererror("Failed to select requested graphics set '%s'", _ini_graphics_set);
}
/* Initialize game palette */