diff options
author | smatz <smatz@openttd.org> | 2008-01-22 21:01:35 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-01-22 21:01:35 +0000 |
commit | 3a423a8747408d63343cca83b06675dd927c0ae6 (patch) | |
tree | 625d6bf01c3627169b993e4e39808c400b3c0b7a /src | |
parent | 39f61734011f4e27fe1ad36dbbbc9e9dbd002ac3 (diff) | |
download | openttd-3a423a8747408d63343cca83b06675dd927c0ae6.tar.xz |
(svn r11951) -Fix (r11279): loading of very old savegames was broken
Diffstat (limited to 'src')
-rw-r--r-- | src/settings.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 6b4918f1b..5f18f3c5c 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1324,8 +1324,10 @@ static const SettingDesc _gameopt_settings[] = { * same-sized members * XXX - To save file-space and since values are never bigger than about 10? only * save the first 16 bits in the savegame. Question is why the values are still int32 - * and why not byte for example? */ - SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, SLE_UINT16, 0, 0, GameOptions, diff, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 0, 3), + * and why not byte for example? + * 'SLE_FILE_I16 | SLE_VAR_U16' in "diff_custom" is needed to get around SlArray() hack + * for savegames version 0 - though it is an array, it has to go through the byteswap process */ + SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, SLE_FILE_I16 | SLE_VAR_U16, 0, 0, GameOptions, diff, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 0, 3), SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, SLE_UINT16, 0, 0, GameOptions, diff, 18, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 4, SL_MAX_VERSION), SDT_VAR(GameOptions, diff_level, SLE_UINT8, 0, 0, 0, 0, 3, 0, STR_NULL, NULL), SDT_OMANY(GameOptions, currency, SLE_UINT8, N, 0, 0, CUSTOM_CURRENCY_ID, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SIT|SEK|YTL|SKK|BRR|custom", STR_NULL, NULL, NULL), |