From cced42a765cff0ad89490ebc0e70a7e00b8a2f4f Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Thu, 27 Jun 2013 16:38:49 +0200 Subject: WINTERMUTE: Add cast op Common::Rect => Rect32 --- engines/wintermute/math/rect32.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/wintermute') 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()); } -- cgit v1.2.3