From cf6f08b137bedc807d8eed00988aa338c6cffd15 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 13 Mar 2017 09:23:20 +0100 Subject: DIRECTOR: Lingo: Implement b_moveableSprite() --- engines/director/director.h | 1 + engines/director/events.cpp | 4 ++++ engines/director/lingo/lingo-builtins.cpp | 8 ++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/director') 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 *getSharedDIB() const { return _sharedDIB; } Common::HashMap *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) { -- cgit v1.2.3