From c74b364b218d5fdf737685398a77a8ebaeb60c73 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 20 Nov 2011 16:31:27 +0100 Subject: MOHAWK: Implement LB's makePt. --- engines/mohawk/livingbooks_code.cpp | 8 +++++++- engines/mohawk/livingbooks_code.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp index 80b5fe9660..00b07dffff 100644 --- a/engines/mohawk/livingbooks_code.cpp +++ b/engines/mohawk/livingbooks_code.cpp @@ -692,7 +692,7 @@ CodeCommandInfo generalCommandInfo[NUM_GENERAL_COMMANDS] = { { "min", 0 }, { "abs", 0 }, { "getRect", &LBCode::cmdGetRect }, // also "makeRect" - { "makePt", 0 }, // also "makePair" + { "makePt", &LBCode::cmdMakePoint }, // also "makePair" { "topLeft", &LBCode::cmdTopLeft }, { "bottomRight", &LBCode::cmdBottomRight }, { "mousePos", 0 }, @@ -899,6 +899,12 @@ void LBCode::cmdGetRect(const Common::Array ¶ms) { error("incorrect number of parameters (%d) to getRect", params.size()); } +void LBCode::cmdMakePoint(const Common::Array ¶ms) { + if (params.size() != 2) + error("incorrect number of parameters (%d) to makePoint", params.size()); + _stack.push(Common::Point(params[0].toInt(), params[1].toInt())); +} + void LBCode::cmdTopLeft(const Common::Array ¶ms) { if (params.size() > 1) error("too many parameters (%d) to topLeft", params.size()); diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h index 79c9af94f7..84ea66a4c7 100644 --- a/engines/mohawk/livingbooks_code.h +++ b/engines/mohawk/livingbooks_code.h @@ -225,6 +225,7 @@ public: void cmdStringLen(const Common::Array ¶ms); void cmdSubstring(const Common::Array ¶ms); void cmdGetRect(const Common::Array ¶ms); + void cmdMakePoint(const Common::Array ¶ms); void cmdTopLeft(const Common::Array ¶ms); void cmdBottomRight(const Common::Array ¶ms); void cmdTop(const Common::Array ¶ms); -- cgit v1.2.3