[Scummvm-git-logs] scummvm master -> f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc

dreammaster dreammaster at scummvm.org
Sun Nov 13 02:29:43 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f8d935d7db TITANIC: Cleanup and fixes for GameStateMovieList


Commit: f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc
    https://github.com/scummvm/scummvm/commit/f8d935d7db8a50133ccc255aa7ceaf7b7d286ccc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-12T20:29:36-05:00

Commit Message:
TITANIC: Cleanup and fixes for GameStateMovieList

Changed paths:
    engines/titanic/game_state.cpp
    engines/titanic/game_state.h



diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp
index f3b1115..e75f097 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 ba1dff2..9657350 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 {





More information about the Scummvm-git-logs mailing list