diff options
Diffstat (limited to 'src/tilearea_type.h')
-rw-r--r-- | src/tilearea_type.h | 10 |
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; |