Skip to content

Commit

Permalink
MOHAWK: Convert between rects/points in LB code (thanks clone2727).
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzie committed Nov 25, 2011
1 parent d070d11 commit 61bac6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/mohawk/livingbooks_code.cpp
Expand Up @@ -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");
}
Expand All @@ -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:
Expand Down

0 comments on commit 61bac6e

Please sign in to comment.