aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/livingbooks_code.cpp8
-rw-r--r--engines/mohawk/livingbooks_code.h1
2 files changed, 8 insertions, 1 deletions
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<LBValue> &params) {
error("incorrect number of parameters (%d) to getRect", params.size());
}
+void LBCode::cmdMakePoint(const Common::Array<LBValue> &params) {
+ 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<LBValue> &params) {
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<LBValue> &params);
void cmdSubstring(const Common::Array<LBValue> &params);
void cmdGetRect(const Common::Array<LBValue> &params);
+ void cmdMakePoint(const Common::Array<LBValue> &params);
void cmdTopLeft(const Common::Array<LBValue> &params);
void cmdBottomRight(const Common::Array<LBValue> &params);
void cmdTop(const Common::Array<LBValue> &params);