aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/livingbooks_code.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2011-11-20 16:31:27 +0100
committerAlyssa Milburn2011-11-20 16:32:23 +0100
commitc74b364b218d5fdf737685398a77a8ebaeb60c73 (patch)
tree738b9e9e06a0ca9639d7e48480f88aafbe4e515c /engines/mohawk/livingbooks_code.cpp
parent40474f0bc65796db591438ef236d0888398d5e65 (diff)
downloadscummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.tar.gz
scummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.tar.bz2
scummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.zip
MOHAWK: Implement LB's makePt.
Diffstat (limited to 'engines/mohawk/livingbooks_code.cpp')
-rw-r--r--engines/mohawk/livingbooks_code.cpp8
1 files changed, 7 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());