summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/station.cpp b/src/station.cpp
index f4138af04..84c7efb60 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -491,6 +491,21 @@ StationRect& StationRect::operator = (Rect src)
return *this;
}
+TileArea::TileArea(TileIndex start, TileIndex end)
+{
+ uint sx = TileX(start);
+ uint sy = TileY(start);
+ uint ex = TileX(end);
+ uint ey = TileY(end);
+
+ if (sx > ex) Swap(sx, ex);
+ if (sy > ey) Swap(sy, ey);
+
+ this->tile = TileXY(sx, sy);
+ this->w = ex - sx + 1;
+ this->h = ey - sy + 1;
+}
+
void InitializeStations()
{