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-10-30 15:28:03 +0100
commita34d095259409cf1454d9777deabbc00bcdb9407 (patch)
tree9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/tilearea_type.h
parent6647cb917963c4e0d6d633b7a92af78167050893 (diff)
downloadopenttd-a34d095259409cf1454d9777deabbc00bcdb9407.tar.xz
underground patch appliedunderground-plus-others-original
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 62d3d75df..88c2928ac 100644
--- a/src/tilearea_type.h
+++ b/src/tilearea_type.h
@@ -46,6 +46,16 @@ struct TileArea {
this->h = 0;
}
+ inline bool IsEmpty() const
+ {
+ return (w==0 && h==0);
+ }
+
+ inline bool IsFinite() const
+ {
+ return (w!=0 && h!=0);
+ }
+
bool Intersects(const TileArea &ta) const;
bool Contains(TileIndex tile) const;