summaryrefslogtreecommitdiff
path: root/src/base_station_base.h
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2018-10-30 15:28:03 +0100
commita34d095259409cf1454d9777deabbc00bcdb9407 (patch)
tree9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/base_station_base.h
parent6647cb917963c4e0d6d633b7a92af78167050893 (diff)
downloadopenttd-a34d095259409cf1454d9777deabbc00bcdb9407.tar.xz
underground patch appliedunderground-plus-others-original
Diffstat (limited to 'src/base_station_base.h')
-rw-r--r--src/base_station_base.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/base_station_base.h b/src/base_station_base.h
index 812692bb1..dfbc2dd8c 100644
--- a/src/base_station_base.h
+++ b/src/base_station_base.h
@@ -28,6 +28,13 @@ struct StationSpecList {
/** StationRect - used to track station spread out rectangle - cheaper than scanning whole map */
+/*
+** Патч "layer"
+** Критическое изменение:
+** "Rect" подразумевает только верхний слой (поверхность)
+** (станция может располагаться на любом слое, --
+** Rect описывает соответствующую часть верхнего слоя)
+*/
struct StationRect : public Rect {
enum StationRectMode
{
@@ -38,7 +45,8 @@ struct StationRect : public Rect {
StationRect();
void MakeEmpty();
- bool PtInExtendedRect(int x, int y, int distance = 0) const;
+ bool PtInExtendedRect(int topx, int topy, int distance = 0) const;
+ bool AreaInExtendedRect(const TileArea& area, int distance = 0) const;
bool IsEmpty() const;
CommandCost BeforeAddTile(TileIndex tile, StationRectMode mode);
CommandCost BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode);