mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-02 23:26:44 +00:00
Added an "equals" function to Common::Rect (used by SCI)
svn-id: r38428
This commit is contained in:
parent
57176cdce1
commit
5b8d0a77ff
@ -137,6 +137,17 @@ struct Rect {
|
||||
return (left < r.left) && (right > r.right) && (top < r.top) && (bottom > r.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given rect is equal to this one.
|
||||
*
|
||||
* @param r The rectangle to check
|
||||
*
|
||||
* @return true if the given rect is equal, false otherwise
|
||||
*/
|
||||
bool equals(const Rect &r) const {
|
||||
return (left == r.left) && (right == r.right) && (top == r.top) && (bottom == r.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if given rectangle intersects with this rectangle
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user