diff options
author | rubidium <rubidium@openttd.org> | 2010-01-04 18:21:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-04 18:21:07 +0000 |
commit | 87466a4ed091035b758ef981e6600e2b03cbfe30 (patch) | |
tree | b5a79792fb0f12f7f3a96e400091c1fda26de9c5 /src/saveload/oldloader_sl.cpp | |
parent | 71f2789270ca091af14ab4cfd64a4f17234cf007 (diff) | |
download | openttd-87466a4ed091035b758ef981e6600e2b03cbfe30.tar.xz |
(svn r18717) -Codechange: use TileArea in industry instead of three separate variables. Also make use of TileArea functions for determining the 'width' and 'height' of an industry.
Diffstat (limited to 'src/saveload/oldloader_sl.cpp')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index d97038f8e..d24991b9e 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -776,10 +776,10 @@ static bool LoadOldStation(LoadgameState *ls, int num) } static const OldChunks industry_chunk[] = { - OCL_SVAR( OC_TILE, Industry, xy ), + OCL_SVAR( OC_TILE, Industry, location.tile ), OCL_VAR ( OC_UINT32, 1, &_old_town_index ), - OCL_SVAR( OC_UINT8, Industry, width ), - OCL_SVAR( OC_UINT8, Industry, height ), + OCL_SVAR( OC_UINT8, Industry, location.w ), + OCL_SVAR( OC_UINT8, Industry, location.h ), OCL_NULL( 2 ), ///< used to be industry's produced_cargo OCL_SVAR( OC_TTD | OC_UINT16, Industry, produced_cargo_waiting[0] ), @@ -825,7 +825,7 @@ static bool LoadOldIndustry(LoadgameState *ls, int num) Industry *i = new (num) Industry(); if (!LoadChunk(ls, i, industry_chunk)) return false; - if (i->xy != 0) { + if (i->location.tile != 0) { i->town = Town::Get(RemapTownIndex(_old_town_index)); if (_savegame_type == SGT_TTO) { |