diff options
author | PeterN <peter@fuzzle.org> | 2019-04-16 20:30:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 20:30:07 +0100 |
commit | 671a310d219cb0e12270578d0e63cd66701eae02 (patch) | |
tree | d237419733b3614610cb7f4b3ddf15d93a3e7f44 /src/bitmap_type.h | |
parent | 8ae15d9797194c3b30ab562ae6688d73a5a95159 (diff) | |
download | openttd-671a310d219cb0e12270578d0e63cd66701eae02.tar.xz |
Fix #7235: Ensure catchment area of neutral station covers entire industry. (#7518)
Diffstat (limited to 'src/bitmap_type.h')
-rw-r--r-- | src/bitmap_type.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bitmap_type.h b/src/bitmap_type.h index 3c9c4afbd..655c8f3ba 100644 --- a/src/bitmap_type.h +++ b/src/bitmap_type.h @@ -57,7 +57,7 @@ public: * Initialize the BitmapTileArea with the specified Rect. * @param rect Rect to use. */ - void Initialize(Rect r) + void Initialize(const Rect &r) { this->tile = TileXY(r.left, r.top); this->w = r.right - r.left + 1; @@ -66,6 +66,15 @@ public: this->data.resize(Index(w, h)); } + void Initialize(const TileArea &ta) + { + this->tile = ta.tile; + this->w = ta.w; + this->h = ta.h; + this->data.clear(); + this->data.resize(Index(w, h)); + } + /** * Add a tile as part of the tile area. * @param tile Tile to add. |