diff options
author | rubidium <rubidium@openttd.org> | 2008-12-24 09:53:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-24 09:53:15 +0000 |
commit | d1bb5e5f3632ada5336cd0408e11a6d17f43a5b7 (patch) | |
tree | 04c454a456e353e63a9ba8a438b575b0902b93e0 /src/town_cmd.cpp | |
parent | 5b26afbd6b0446373a9f21ec80ee8bac82c11f0b (diff) | |
download | openttd-d1bb5e5f3632ada5336cd0408e11a6d17f43a5b7.tar.xz |
(svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 19cc2ec05..de3531557 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2682,14 +2682,18 @@ static const SaveLoad _town_desc[] = { SLE_CONDSTR(Town, name, SLE_STR, 0, 84, SL_MAX_VERSION), SLE_VAR(Town, flags12, SLE_UINT8), - SLE_VAR(Town, statues, SLE_UINT8), + SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDVAR(Town, statues, SLE_UINT16, 104, SL_MAX_VERSION), SLE_CONDNULL(1, 0, 1), ///< sort_index, no longer in use - SLE_VAR(Town, have_ratings, SLE_UINT8), - SLE_ARR(Town, ratings, SLE_INT16, 8), + SLE_CONDVAR(Town, have_ratings, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDVAR(Town, have_ratings, SLE_UINT16, 104, SL_MAX_VERSION), + SLE_CONDARR(Town, ratings, SLE_INT16, 8, 0, 103), + SLE_CONDARR(Town, ratings, SLE_INT16, MAX_COMPANIES, 104, SL_MAX_VERSION), /* failed bribe attempts are stored since savegame format 4 */ - SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4, SL_MAX_VERSION), + SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4, 103), + SLE_CONDARR(Town, unwanted, SLE_INT8, MAX_COMPANIES, 104, SL_MAX_VERSION), SLE_CONDVAR(Town, max_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), SLE_CONDVAR(Town, max_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), |