diff options
Diffstat (limited to 'engines/titanic/game_manager.cpp')
-rw-r--r-- | engines/titanic/game_manager.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp index 3e15bb0e2c..a4e3420702 100644 --- a/engines/titanic/game_manager.cpp +++ b/engines/titanic/game_manager.cpp @@ -195,11 +195,32 @@ void CGameManager::updateMovies() { // TODO: Make this more like the original, if I can figuring out // what's it doing with temporary lists and the OSMovie methods for (CMovieList::iterator i = g_vm->_activeMovies.begin(); - i != g_vm->_activeMovies.end(); ++i) { + i != g_vm->_activeMovies.end(); ) { + OSMovie *movie = static_cast<OSMovie *>(*i); + assert(movie && movie->_gameObject); + + movie->update(); + switch (movie->getState()) { + case MOVIE_FINISHED: { + CMovieEndMsg endMsg; + endMsg.execute(movie->_gameObject); + + i = g_vm->_activeMovies.erase(i); + continue; + } - } + case MOVIE_FRAME: { + CMovieFrameMsg frameMsg; + frameMsg.execute(movie->_gameObject); + break; + } - + default: + break; + } + + ++i; + } } void CGameManager::updateDiskTicksCount() { @@ -245,4 +266,8 @@ void CGameManager::extendBounds(const Rect &r) { _bounds.combine(r); } +CScreenManager *CGameManager::setScreenManager() const { + return CScreenManager::setCurrent(); +} + } // End of namespace Titanic |