(svn r16965) -Codechange: use tile area instead of sets of variables for the station joiner code.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user