diff options
author | yexo <yexo@openttd.org> | 2010-03-06 13:38:46 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-06 13:38:46 +0000 |
commit | bf6167710f94f1ef7e704915253c4366ab2ecf14 (patch) | |
tree | a9d81d4274f80053801fef7cd72ca947b00b444e /src/station.cpp | |
parent | 6a3dbaf99a91aa223b2541c172f0ded06c55baf2 (diff) | |
download | openttd-bf6167710f94f1ef7e704915253c4366ab2ecf14.tar.xz |
(svn r19351) -Codechange: use TileArea for AfterRemoveRect
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station.cpp b/src/station.cpp index 416403048..320d6412a 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -483,13 +483,13 @@ bool StationRect::AfterRemoveTile(BaseStation *st, TileIndex tile) return false; // non-empty remaining rect } -bool StationRect::AfterRemoveRect(BaseStation *st, TileIndex tile, int w, int h) +bool StationRect::AfterRemoveRect(BaseStation *st, TileArea ta) { - assert(this->PtInExtendedRect(TileX(tile), TileY(tile))); - assert(this->PtInExtendedRect(TileX(tile) + w - 1, TileY(tile) + h - 1)); + assert(this->PtInExtendedRect(TileX(ta.tile), TileY(ta.tile))); + assert(this->PtInExtendedRect(TileX(ta.tile) + ta.w - 1, TileY(ta.tile) + ta.h - 1)); - bool empty = this->AfterRemoveTile(st, tile); - if (w != 1 || h != 1) empty = empty || this->AfterRemoveTile(st, TILE_ADDXY(tile, w - 1, h - 1)); + bool empty = this->AfterRemoveTile(st, ta.tile); + if (ta.w != 1 || ta.h != 1) empty = empty || this->AfterRemoveTile(st, TILE_ADDXY(ta.tile, ta.w - 1, ta.h - 1)); return empty; } |