summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-24 09:53:15 +0000
committerrubidium <rubidium@openttd.org>2008-12-24 09:53:15 +0000
commitbf6ec8b19f67d576a17ab10f1e810f6a57d1c266 (patch)
tree04c454a456e353e63a9ba8a438b575b0902b93e0 /src/engine.cpp
parent8a06e670673e6a01747e29db0d59cc615d003e45 (diff)
downloadopenttd-bf6ec8b19f67d576a17ab10f1e810f6a57d1c266.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/engine.cpp')
-rw-r--r--src/engine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 3d0907bfb..6df57c54c 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -633,7 +633,8 @@ static const SaveLoad _engine_desc[] = {
SLE_VAR(Engine, preview_company_rank,SLE_UINT8),
SLE_VAR(Engine, preview_wait, SLE_UINT8),
SLE_CONDNULL(1, 0, 44),
- SLE_VAR(Engine, company_avail, SLE_UINT8),
+ SLE_CONDVAR(Engine, company_avail, SLE_FILE_U8 | SLE_VAR_U16, 0, 103),
+ SLE_CONDVAR(Engine, company_avail, SLE_UINT16, 104, SL_MAX_VERSION),
SLE_CONDSTR(Engine, name, SLE_STR, 0, 84, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 16 bytes) */