diff options
author | smatz <smatz@openttd.org> | 2009-06-23 09:46:29 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-23 09:46:29 +0000 |
commit | 5ef0745254f8fe94f608ac5e1f31c8bb47f1a336 (patch) | |
tree | 37c0ca7ee380f05275d53e07a748be2d9e9de1ba /src/saveload | |
parent | 70f6cee9ce04d2635e6622aa94c8d48a75d549b8 (diff) | |
download | openttd-5ef0745254f8fe94f608ac5e1f31c8bb47f1a336.tar.xz |
(svn r16631) -Fix (r1826)(r1881)(r9613): loading of some town data from old savegames was broken
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 42 | ||||
-rw-r--r-- | src/saveload/town_sl.cpp | 6 |
2 files changed, 24 insertions, 24 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 3ce4fc81b..c2c2d8ccf 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -523,36 +523,36 @@ static const OldChunks town_chunk[] = { OCL_NULL( 2 ), ///< population, no longer in use OCL_SVAR( OC_UINT16, Town, townnametype ), OCL_SVAR( OC_UINT32, Town, townnameparts ), - OCL_SVAR( OC_UINT8, Town, grow_counter ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Town, grow_counter ), OCL_NULL( 1 ), ///< sort_index, no longer in use OCL_NULL( 4 ), ///< sign-coordinates, no longer in use OCL_NULL( 2 ), ///< namewidth, no longer in use - OCL_SVAR( OC_UINT16, Town, flags12 ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U8, Town, flags12 ), OCL_NULL( 10 ), ///< radius, no longer in use - OCL_SVAR( OC_UINT16, Town, ratings[0] ), - OCL_SVAR( OC_UINT16, Town, ratings[1] ), - OCL_SVAR( OC_UINT16, Town, ratings[2] ), - OCL_SVAR( OC_UINT16, Town, ratings[3] ), - OCL_SVAR( OC_UINT16, Town, ratings[4] ), - OCL_SVAR( OC_UINT16, Town, ratings[5] ), - OCL_SVAR( OC_UINT16, Town, ratings[6] ), - OCL_SVAR( OC_UINT16, Town, ratings[7] ), + OCL_SVAR( OC_INT16, Town, ratings[0] ), + OCL_SVAR( OC_INT16, Town, ratings[1] ), + OCL_SVAR( OC_INT16, Town, ratings[2] ), + OCL_SVAR( OC_INT16, Town, ratings[3] ), + OCL_SVAR( OC_INT16, Town, ratings[4] ), + OCL_SVAR( OC_INT16, Town, ratings[5] ), + OCL_SVAR( OC_INT16, Town, ratings[6] ), + OCL_SVAR( OC_INT16, Town, ratings[7] ), OCL_SVAR( OC_FILE_U32 | OC_VAR_U16, Town, have_ratings ), OCL_SVAR( OC_FILE_U32 | OC_VAR_U16, Town, statues ), OCL_NULL( 2 ), ///< num_houses, no longer in use - OCL_SVAR( OC_UINT8, Town, time_until_rebuild ), - OCL_SVAR( OC_UINT8, Town, growth_rate ), - - OCL_SVAR( OC_UINT16, Town, new_max_pass ), - OCL_SVAR( OC_UINT16, Town, new_max_mail ), - OCL_SVAR( OC_UINT16, Town, new_act_pass ), - OCL_SVAR( OC_UINT16, Town, new_act_mail ), - OCL_SVAR( OC_UINT16, Town, max_pass ), - OCL_SVAR( OC_UINT16, Town, max_mail ), - OCL_SVAR( OC_UINT16, Town, act_pass ), - OCL_SVAR( OC_UINT16, Town, act_mail ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Town, time_until_rebuild ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_I16, Town, growth_rate ), + + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, new_max_pass ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, new_max_mail ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, new_act_pass ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, new_act_mail ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, max_pass ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, max_mail ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, act_pass ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Town, act_mail ), OCL_SVAR( OC_UINT8, Town, pct_pass_transported ), OCL_SVAR( OC_UINT8, Town, pct_mail_transported ), diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 2528be2a6..d249840e0 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -110,9 +110,9 @@ static const SaveLoad _town_desc[] = { SLE_VAR(Town, new_act_food, SLE_UINT16), SLE_VAR(Town, new_act_water, SLE_UINT16), - SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT8, 0, 53), - SLE_CONDVAR(Town, grow_counter, SLE_UINT8, 0, 53), - SLE_CONDVAR(Town, growth_rate, SLE_UINT8, 0, 53), + SLE_CONDVAR(Town, time_until_rebuild, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), + SLE_CONDVAR(Town, grow_counter, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), + SLE_CONDVAR(Town, growth_rate, SLE_FILE_U8 | SLE_VAR_I16, 0, 53), SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT16, 54, SL_MAX_VERSION), SLE_CONDVAR(Town, grow_counter, SLE_UINT16, 54, SL_MAX_VERSION), |