diff options
author | Eugene Sandulenko | 2016-01-04 12:06:47 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-01-04 12:06:47 +0100 |
commit | 3b48d90f13159afc3b877929b63bea6a8467694c (patch) | |
tree | 9a03fe7ad0cab93fbc0a90678947b74788ef2eb2 | |
parent | e7eb7ffc810aed64ad3837484f3a5c0bfa001d65 (diff) | |
download | scummvm-rg350-3b48d90f13159afc3b877929b63bea6a8467694c.tar.gz scummvm-rg350-3b48d90f13159afc3b877929b63bea6a8467694c.tar.bz2 scummvm-rg350-3b48d90f13159afc3b877929b63bea6a8467694c.zip |
WAGE: Mark scene as dirty of some object was moved to/from it
-rw-r--r-- | engines/wage/gui.h | 1 | ||||
-rw-r--r-- | engines/wage/wage.cpp | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/wage/gui.h b/engines/wage/gui.h index cd918f7bd3..3c5660b4f2 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -72,6 +72,7 @@ public: void mouseMove(int x, int y); Designed *getClickTarget(int x, int y); void drawInput(); + void setSceneDirty() { _sceneDirty = true; } private: void paintBorder(Graphics::Surface *g, Common::Rect &r, WindowType windowType); diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index fa00618014..6cf9e39941 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -308,6 +308,18 @@ void WageEngine::onMove(Designed *what, Designed *from, Designed *to) { return; } + if (!_temporarilyHidden) { + assert(what); + assert(from); + assert(to); + debug(6, "move: %s, %s -> %s", what->_name.c_str(), from->_name.c_str(), to->_name.c_str()); + } + + if (from == currentScene || to == currentScene || + (what->_classType == CHR && ((Chr *)what)->_currentScene == currentScene) || + (what->_classType == OBJ && ((Obj *)what)->_currentScene == currentScene)) + _gui->setSceneDirty(); + if (what != player && what->_classType == CHR) { Chr *chr = (Chr *)what; if (to == _world->_storageScene) { |