[Scummvm-cvs-logs] SF.net SVN: scummvm:[43255] scummvm/branches/gsoc2009-draci/engines/draci
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Tue Aug 11 06:18:15 CEST 2009
Revision: 43255
http://scummvm.svn.sourceforge.net/scummvm/?rev=43255&view=rev
Author: dkasak13
Date: 2009-08-11 04:18:14 +0000 (Tue, 11 Aug 2009)
Log Message:
-----------
Implemented GPL command WalkOnPlay.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
scummvm/branches/gsoc2009-draci/engines/draci/script.h
Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-08-11 04:14:38 UTC (rev 43254)
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-08-11 04:18:14 UTC (rev 43255)
@@ -60,7 +60,7 @@
{ 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 @@
_vm->_game->walkHero(x, y);
}
+void Script::walkOnPlay(Common::Queue<int> ¶ms) {
+ 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> ¶ms) {
if (_vm->_game->getLoopStatus() == kStatusInventory) {
Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/script.h 2009-08-11 04:14:38 UTC (rev 43254)
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.h 2009-08-11 04:18:14 UTC (rev 43255)
@@ -115,6 +115,7 @@
void execLook(Common::Queue<int> ¶ms);
void execUse(Common::Queue<int> ¶ms);
void walkOn(Common::Queue<int> ¶ms);
+ void walkOnPlay(Common::Queue<int> ¶ms);
void play(Common::Queue<int> ¶ms);
void startPlay(Common::Queue<int> ¶ms);
void newRoom(Common::Queue<int> ¶ms);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list