diff options
-rw-r--r-- | engines/titanic/game_state.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/game_state.h | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp index 9bb83cc03a..7de069b97c 100644 --- a/engines/titanic/game_state.cpp +++ b/engines/titanic/game_state.cpp @@ -31,16 +31,16 @@ namespace Titanic { bool CGameStateMovieList::empty() { for (CGameStateMovieList::iterator i = begin(); i != end(); ) { - CMovieListItem *movieItem = *i; + CMovie *movie = *i; - if (movieItem->_item->isActive()) { + if (movie->isActive()) { ++i; } else { i = erase(i); } } - return List<CMovieListItem>::empty(); + return Common::List<CMovie *>::empty(); } /*------------------------------------------------------------------------*/ @@ -163,7 +163,7 @@ void CGameState::checkForViewChange() { } void CGameState::addMovie(CMovie *movie) { - _movieList.push_back(new CMovieListItem(movie)); + _movieList.push_back(movie); setMode(GSMODE_CUTSCENE); } diff --git a/engines/titanic/game_state.h b/engines/titanic/game_state.h index 547e8f8221..731e94b792 100644 --- a/engines/titanic/game_state.h +++ b/engines/titanic/game_state.h @@ -45,13 +45,12 @@ enum Season { SEASON_SPRING = 3 }; -PTR_LIST_ITEM(CMovie); -class CGameStateMovieList : public List<CMovieListItem> { +class CGameStateMovieList : public Common::List<CMovie *> { public: CViewItem *_destView; CMovieClip *_movieClip; public: - CGameStateMovieList() : List<CMovieListItem>(), _destView(nullptr), _movieClip(nullptr) {} + CGameStateMovieList() : Common::List<CMovie *>(), _destView(nullptr), _movieClip(nullptr) {} /** * Returns true if there are no movies in the list |