(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.
This commit is contained in:
rubidium
2008-08-31 08:46:43 +00:00
parent d452683aa6
commit 915a09e4c6
9 changed files with 382 additions and 104 deletions

View File

@@ -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 */