summaryrefslogtreecommitdiff
path: root/src/tilearea_type.h
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2018-11-16 19:11:46 +0100
commit5430113f4a842e519d2661a490022dcdf86f5247 (patch)
tree9368bef97133cea28eae5fc2161a4fdfd61dae27 /src/tilearea_type.h
parent278a705bbbd378a4c05a795b42028ba440a8bd49 (diff)
downloadopenttd-5430113f4a842e519d2661a490022dcdf86f5247.tar.xz
underground patch applied
Diffstat (limited to 'src/tilearea_type.h')
-rw-r--r--src/tilearea_type.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tilearea_type.h b/src/tilearea_type.h
index 45bfb3d4c..11094ea17 100644
--- a/src/tilearea_type.h
+++ b/src/tilearea_type.h
@@ -44,6 +44,16 @@ struct OrthogonalTileArea {
this->h = 0;
}
+ inline bool IsEmpty() const
+ {
+ return (w==0 && h==0);
+ }
+
+ inline bool IsFinite() const
+ {
+ return (w!=0 && h!=0);
+ }
+
bool Intersects(const OrthogonalTileArea &ta) const;
bool Contains(TileIndex tile) const;