diff options
author | Alyssa Milburn | 2011-11-20 16:31:27 +0100 |
---|---|---|
committer | Alyssa Milburn | 2011-11-20 16:32:23 +0100 |
commit | c74b364b218d5fdf737685398a77a8ebaeb60c73 (patch) | |
tree | 738b9e9e06a0ca9639d7e48480f88aafbe4e515c /engines/mohawk | |
parent | 40474f0bc65796db591438ef236d0888398d5e65 (diff) | |
download | scummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.tar.gz scummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.tar.bz2 scummvm-rg350-c74b364b218d5fdf737685398a77a8ebaeb60c73.zip |
MOHAWK: Implement LB's makePt.
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/livingbooks_code.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/livingbooks_code.h | 1 |
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> ¶ms) { error("incorrect number of parameters (%d) to getRect", params.size()); } +void LBCode::cmdMakePoint(const Common::Array<LBValue> ¶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<LBValue> ¶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<LBValue> ¶ms); void cmdSubstring(const Common::Array<LBValue> ¶ms); void cmdGetRect(const Common::Array<LBValue> ¶ms); + void cmdMakePoint(const Common::Array<LBValue> ¶ms); void cmdTopLeft(const Common::Array<LBValue> ¶ms); void cmdBottomRight(const Common::Array<LBValue> ¶ms); void cmdTop(const Common::Array<LBValue> ¶ms); |