From 61bac6ed157e364fd4976762f79c1e7bde0b115c Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 25 Nov 2011 23:03:18 +0100 Subject: MOHAWK: Convert between rects/points in LB code (thanks clone2727). --- engines/mohawk/livingbooks_code.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp index 00b07dffff..c0c03e0e9b 100644 --- a/engines/mohawk/livingbooks_code.cpp +++ b/engines/mohawk/livingbooks_code.cpp @@ -105,6 +105,8 @@ Common::Point LBValue::toPoint() const { return Common::Point(integer, integer); case kLBValuePoint: return point; + case kLBValueRect: + return Common::Point(rect.left, rect.top); default: error("failed to convert to point"); } @@ -117,6 +119,8 @@ Common::Rect LBValue::toRect() const { return Common::Rect(); case kLBValueInteger: return Common::Rect(integer, integer, integer, integer); + case kLBValuePoint: + return Common::Rect(point.x, point.y, point.x, point.y); case kLBValueRect: return rect; case kLBValueItemPtr: -- cgit v1.2.3