diff options
Diffstat (limited to 'engines/wintermute/math/rect32.h')
-rw-r--r-- | engines/wintermute/math/rect32.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/wintermute/math/rect32.h b/engines/wintermute/math/rect32.h index d44655311c..821df1880e 100644 --- a/engines/wintermute/math/rect32.h +++ b/engines/wintermute/math/rect32.h @@ -57,12 +57,14 @@ struct Point32 { }; + struct Rect32 { int32 top, left; ///< The point at the top left of the rectangle (part of the rect). int32 bottom, right; ///< The point at the bottom right of the rectangle (not part of the rect). Rect32() : top(0), left(0), bottom(0), right(0) {} Rect32(int32 w, int32 h) : top(0), left(0), bottom(h), right(w) {} + Rect32(Common::Rect rect) : top(rect.top), left(rect.left), bottom(rect.bottom), right(rect.right) {} Rect32(int32 x1, int32 y1, int32 x2, int32 y2) : top(y1), left(x1), bottom(y2), right(x2) { assert(isValidRect()); } |