(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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user