diff options
author | Paul Gilbert | 2016-11-12 20:29:36 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-12 20:29:36 -0500 |
commit | f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc (patch) | |
tree | 3d30e49fd945e566282277f001ca93d5101603dd /engines/titanic | |
parent | a02adba8423c295b32b465a22f90229253c50cdf (diff) | |
download | scummvm-rg350-f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc.tar.gz scummvm-rg350-f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc.tar.bz2 scummvm-rg350-f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc.zip |
TITANIC: Cleanup and fixes for GameStateMovieList
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game_state.cpp | 14 | ||||
-rw-r--r-- | engines/titanic/game_state.h | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp index f3b1115a1b..e75f0975c3 100644 --- a/engines/titanic/game_state.cpp +++ b/engines/titanic/game_state.cpp @@ -27,7 +27,7 @@ namespace Titanic { -bool CGameStateMovieList::clear() { +bool CGameStateMovieList::empty() { for (CGameStateMovieList::iterator i = begin(); i != end(); ) { CMovieListItem *movieItem = *i; @@ -38,7 +38,7 @@ bool CGameStateMovieList::clear() { } } - return !empty(); + return List<CMovieListItem>::empty(); } /*------------------------------------------------------------------------*/ @@ -103,7 +103,7 @@ void CGameState::enterNode() { void CGameState::enterView() { CViewItem *oldView = _gameLocation.getView(); - CViewItem *newView = _movieList._view; + CViewItem *newView = _movieList._destView; oldView->preEnterView(newView); _gameManager->_gameView->setView(newView); @@ -115,7 +115,7 @@ void CGameState::enterView() { _gameManager->decTransitions(); oldView->enterView(newView); - _movieList._view = nullptr; + _movieList._destView = nullptr; _movieList._movieClip = nullptr; } @@ -133,7 +133,7 @@ void CGameState::changeView(CViewItem *newView, CMovieClip *clip) { clip = nullptr; if (_mode == GSMODE_CUTSCENE) { - _movieList._view = newView; + _movieList._destView = newView; _movieList._movieClip = clip; _gameManager->incTransitions(); } else { @@ -153,9 +153,9 @@ void CGameState::changeView(CViewItem *newView, CMovieClip *clip) { } void CGameState::checkForViewChange() { - if (_mode == GSMODE_CUTSCENE && _movieList.clear()) { + if (_mode == GSMODE_CUTSCENE && _movieList.empty()) { setMode(GSMODE_INTERACTIVE); - if (_movieList._view) + if (_movieList._destView) enterView(); } } diff --git a/engines/titanic/game_state.h b/engines/titanic/game_state.h index ba1dff2a45..965735026c 100644 --- a/engines/titanic/game_state.h +++ b/engines/titanic/game_state.h @@ -48,15 +48,15 @@ enum Season { PTR_LIST_ITEM(CMovie); class CGameStateMovieList : public List<CMovieListItem> { public: - CViewItem *_view; + CViewItem *_destView; CMovieClip *_movieClip; public: - CGameStateMovieList() : List<CMovieListItem>(), _view(nullptr), _movieClip(nullptr) {} + CGameStateMovieList() : List<CMovieListItem>(), _destView(nullptr), _movieClip(nullptr) {} /** - * Clear the movie list + * Returns true if there are no movies in the list */ - bool clear(); + bool empty(); }; class CGameState { |