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/industry.h | |
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/industry.h')
-rw-r--r-- | src/industry.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/industry.h b/src/industry.h index 38d78a215..dd81cba72 100644 --- a/src/industry.h +++ b/src/industry.h @@ -22,6 +22,7 @@ #include "tile_type.h" #include "subsidy_type.h" #include "industry_map.h" +#include "tilearea_type.h" typedef Pool<Industry, IndustryID, 64, 64000> IndustryPool; @@ -33,9 +34,7 @@ extern IndustryPool _industry_pool; struct Industry : IndustryPool::PoolItem<&_industry_pool> { typedef PersistentStorageArray<uint32, 16> PersistentStorage; - TileIndex xy; ///< coordinates of the primary tile the industry is built one - byte width; - byte height; + TileArea location; ///< Location of the industry const Town *town; ///< Nearest town CargoID produced_cargo[2]; ///< 2 production cargo slots uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo @@ -69,7 +68,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { PersistentStorage psa; ///< Persistent storage for NewGRF industries. - Industry(TileIndex tile = INVALID_TILE) : xy(tile) {} + Industry(TileIndex tile = INVALID_TILE) : location(tile, 0, 0) {} ~Industry(); /** |