diff options
author | Denis Kasak | 2009-07-06 17:27:12 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-06 17:27:12 +0000 |
commit | 4e15262e7493b726fa4a6ea57089063211180d2d (patch) | |
tree | 9eb6beefabc5d847d3551fd7f8d344671e4bb6d3 | |
parent | f4ba64d2e4783b300242fd43ab6813d6c8ca8cdb (diff) | |
download | scummvm-rg350-4e15262e7493b726fa4a6ea57089063211180d2d.tar.gz scummvm-rg350-4e15262e7493b726fa4a6ea57089063211180d2d.tar.bz2 scummvm-rg350-4e15262e7493b726fa4a6ea57089063211180d2d.zip |
Implemented Script::play() GPL opcode.
svn-id: r42184
-rw-r--r-- | engines/draci/script.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index 1e51402d65..68bfbe6583 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -44,7 +44,7 @@ void Script::setupCommandList() { { 1, 1, "goto", 1, { 3 }, NULL }, { 2, 1, "Let", 2, { 3, 4 }, NULL }, { 3, 1, "if", 2, { 4, 3 }, NULL }, - { 4, 1, "Start", 2, { 3, 2 }, NULL }, + { 4, 1, "Start", 2, { 3, 2 }, &Script::start }, { 5, 1, "Load", 2, { 3, 2 }, &Script::load }, { 5, 2, "StartPlay", 2, { 3, 2 }, NULL }, { 5, 3, "JustTalk", 0, { 0 }, NULL }, @@ -217,6 +217,15 @@ void Script::load(Common::Queue<int> ¶ms) { obj->_seqTab[animID - obj->_idxSeq] = _vm->_game->loadAnimation(animID); } +void Script::start(Common::Queue<int> ¶ms) { + int objID = params.pop() - 1; + int animID = params.pop() - 1; + + GameObject *obj = _vm->_game->getObject(objID); + + _vm->_anims->play(animID); +} + /** * @brief Evaluates mathematical expressions * @param reader Stream reader set to the beginning of the expression |