(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings

- Fix: [ 1153926 ] All my settings in vain... IGNORED!
- Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
This commit is contained in:
Darkvater
2005-03-12 21:21:47 +00:00
parent c3f9f5efaf
commit 010d1a9be3
10 changed files with 172 additions and 186 deletions

View File

@@ -781,19 +781,18 @@ static const SettingDesc debug_settings[] = {
{NULL, 0, NULL, NULL, NULL}
};
/* The settings showed when opened in the intro-menu. These values also are saved to
* openttd.cfg, thus _opt_newgame is used here (not _opt which is used ingame with loaded games!) */
static const SettingDesc gameopt_settings[] = {
{"diff_level", SDT_UINT8, (void*)9, &_new_opt.diff_level, NULL},
{"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, &_new_opt.diff, NULL},
{"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.currency, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SEK|custom" },
{"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.kilometers, "imperial|metric" },
// XXX: Slovakish is an awful nonsense. It is either Slovak or
// Slovakian, I personally prefer the former. --pasky
{"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss" },
{"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.landscape, "normal|hilly|desert|candy" },
{"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.autosave, "off|monthly|quarterly|half year|yearly" },
{"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.road_side, "left|right" },
{NULL, 0, NULL, NULL, NULL}
{"diff_level", SDT_UINT8, (void*)9, &_opt_newgame.diff_level, NULL},
{"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, &_opt_newgame.diff, NULL},
{"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.currency, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SEK|custom" },
{"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.kilometers, "imperial|metric" },
{"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss" },
{"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_opt_newgame.landscape, "normal|hilly|desert|candy" },
{"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.autosave, "off|monthly|quarterly|half year|yearly" },
{"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_opt_newgame.road_side, "left|right" },
{NULL, 0, NULL, NULL, NULL}
};
// The player-based settings (are not send over the network)