aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorDenis Kasak2009-08-11 04:18:14 +0000
committerDenis Kasak2009-08-11 04:18:14 +0000
commitee7b9271a2ca245a8b18e44a7379fc70b2362e27 (patch)
tree7df7c74d74c271f1fcec7cc2cea3019ccca0ba74 /engines/draci
parent0daad906859b29da86dfd5160a0a179da2487149 (diff)
downloadscummvm-rg350-ee7b9271a2ca245a8b18e44a7379fc70b2362e27.tar.gz
scummvm-rg350-ee7b9271a2ca245a8b18e44a7379fc70b2362e27.tar.bz2
scummvm-rg350-ee7b9271a2ca245a8b18e44a7379fc70b2362e27.zip
Implemented GPL command WalkOnPlay.
svn-id: r43255
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/script.cpp23
-rw-r--r--engines/draci/script.h1
2 files changed, 23 insertions, 1 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index eefc90d9c0..19b59dff48 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -60,7 +60,7 @@ void Script::setupCommandList() {
{ 9, 5, "ResetBlock", 1, { 3 }, &Script::resetBlock },
{ 10, 1, "WalkOn", 3, { 1, 1, 3 }, &Script::walkOn },
{ 10, 2, "StayOn", 3, { 1, 1, 3 }, &Script::walkOn }, // HACK: not a proper implementation
- { 10, 3, "WalkOnPlay", 3, { 1, 1, 3 }, &Script::walkOn }, // HACK: not a proper implementation
+ { 10, 3, "WalkOnPlay", 3, { 1, 1, 3 }, &Script::walkOnPlay },
{ 11, 1, "LoadPalette", 1, { 2 }, NULL },
{ 12, 1, "SetPalette", 0, { 0 }, NULL },
{ 12, 2, "BlackPalette", 0, { 0 }, NULL },
@@ -582,6 +582,27 @@ void Script::walkOn(Common::Queue<int> &params) {
_vm->_game->walkHero(x, y);
}
+void Script::walkOnPlay(Common::Queue<int> &params) {
+ if (_vm->_game->getLoopStatus() == kStatusInventory) {
+ return;
+ }
+
+ int x = params.pop();
+ int y = params.pop();
+ params.pop(); // facing direction, not used yet
+
+ // HACK: This should be an onDest action when hero walking is properly implemented
+ _vm->_game->setExitLoop(true);
+
+ _vm->_game->walkHero(x, y);
+
+ _vm->_game->setLoopStatus(kStatusStrange);
+ _vm->_game->loop();
+ _vm->_game->setLoopStatus(kStatusOrdinary);
+
+ _vm->_game->setExitLoop(false);
+}
+
void Script::newRoom(Common::Queue<int> &params) {
if (_vm->_game->getLoopStatus() == kStatusInventory) {
diff --git a/engines/draci/script.h b/engines/draci/script.h
index b1f9ed9bbd..5483bf4e6a 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -115,6 +115,7 @@ private:
void execLook(Common::Queue<int> &params);
void execUse(Common::Queue<int> &params);
void walkOn(Common::Queue<int> &params);
+ void walkOnPlay(Common::Queue<int> &params);
void play(Common::Queue<int> &params);
void startPlay(Common::Queue<int> &params);
void newRoom(Common::Queue<int> &params);