aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-03-13 09:23:20 +0100
committerEugene Sandulenko2017-03-13 09:23:20 +0100
commitcf6f08b137bedc807d8eed00988aa338c6cffd15 (patch)
tree274aa03e0307faba1f4b770adbf3621862b7337b /engines/director
parenta3828cf7a5534151057621130fdb35fa1753f7b6 (diff)
downloadscummvm-rg350-cf6f08b137bedc807d8eed00988aa338c6cffd15.tar.gz
scummvm-rg350-cf6f08b137bedc807d8eed00988aa338c6cffd15.tar.bz2
scummvm-rg350-cf6f08b137bedc807d8eed00988aa338c6cffd15.zip
DIRECTOR: Lingo: Implement b_moveableSprite()
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/director.h1
-rw-r--r--engines/director/events.cpp4
-rw-r--r--engines/director/lingo/lingo-builtins.cpp8
3 files changed, 11 insertions, 2 deletions
diff --git a/engines/director/director.h b/engines/director/director.h
index 6e7947fcc9..61c5f4e2df 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -105,6 +105,7 @@ public:
void cleanupMainArchive();
void processEvents(); // evetns.cpp
+ void setDraggedSprite(uint16 id); // events.cpp
Common::HashMap<int, Common::SeekableSubReadStreamEndian *> *getSharedDIB() const { return _sharedDIB; }
Common::HashMap<int, Common::SeekableSubReadStreamEndian *> *getSharedBMP() const { return _sharedBMP; }
diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index b010f74a6a..116db9c059 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -122,4 +122,8 @@ void DirectorEngine::processEvents() {
}
}
+void DirectorEngine::setDraggedSprite(uint16 id) {
+ warning("STUB: DirectorEngine::setDraggedSprite(%d)", id);
+}
+
} // End of namespace Director
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index d79b201a04..cb6a7d67ec 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -25,6 +25,7 @@
#include "director/lingo/lingo.h"
#include "director/frame.h"
+#include "director/sprite.h"
namespace Director {
@@ -1166,9 +1167,12 @@ void Lingo::b_move(int nargs) {
}
void Lingo::b_moveableSprite(int nargs) {
- g_lingo->printSTUBWithArglist("b_moveableSprite", nargs);
+ Frame *frame = g_director->getCurrentScore()->_frames[g_director->getCurrentScore()->getCurrentFrame()];
- g_lingo->dropStack(nargs);
+ // Will have no effect
+ frame->_sprites[g_lingo->_currentEntityId]->_moveable = true;
+
+ g_director->setDraggedSprite(frame->_sprites[g_lingo->_currentEntityId]->_castId);
}
void Lingo::b_pasteClipBoardInto(int nargs) {