[Scummvm-cvs-logs] scummvm master -> 1f26a75bb937c4ff6a2935fca6007e9af7aba4bf

dreammaster dreammaster at scummvm.org
Sun Jun 8 20:18:02 CEST 2014


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:
1f26a75bb9 VOYEUR: Don't reset mansion view position after looking at rooms


Commit: 1f26a75bb937c4ff6a2935fca6007e9af7aba4bf
    https://github.com/scummvm/scummvm/commit/1f26a75bb937c4ff6a2935fca6007e9af7aba4bf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-06-08T14:17:25-04:00

Commit Message:
VOYEUR: Don't reset mansion view position after looking at rooms

Changed paths:
    engines/voyeur/voyeur.cpp
    engines/voyeur/voyeur.h
    engines/voyeur/voyeur_game.cpp



diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 8edacc5..681f431 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -82,6 +82,8 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
 	_glGoStack = -1;
 	_resolvePtr = nullptr;
 	_mainThread = nullptr;
+
+	centerMansionView();
 }
 
 VoyeurEngine::~VoyeurEngine() {
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index a35473b..e0bb734 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -150,6 +150,11 @@ private:
 	 * Synchronizes the game data
 	 */
 	void synchronize(Common::Serializer &s);
+
+	/**
+	 * Resets the mansion view position
+	 */
+	void centerMansionView();
 protected:
 	// Engine APIs
 	virtual Common::Error run();
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 34ad62a..c7df924 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -1063,9 +1063,7 @@ void VoyeurEngine::initIFace() {
 	CMapResource *pal = _bVoy->boltEntry(_playStampGroupId + 2)._cMapResource;
 	pal->startFade();
 
-	// Start the mansion off centered
-	_mansionViewPos = Common::Point((MANSION_MAX_X - MANSION_VIEW_WIDTH) / 2,
-		(MANSION_MAX_Y - MANSION_VIEW_HEIGHT) / 2);
+	// Reset the mansion view off to it's prior position (if any)
 	doScroll(_mansionViewPos);
 
 	_voy->_viewBounds = _bVoy->boltEntry(_playStampGroupId)._rectResource;
@@ -1138,6 +1136,7 @@ void VoyeurEngine::checkTransition() {
 		}
 
 		_checkTransitionId = _voy->_transitionId;
+		centerMansionView();
 	}
 }
 
@@ -1420,4 +1419,9 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) {
 	}
 }
 
+void VoyeurEngine::centerMansionView() {
+	_mansionViewPos = Common::Point((MANSION_MAX_X - MANSION_VIEW_WIDTH) / 2,
+		(MANSION_MAX_Y - MANSION_VIEW_HEIGHT) / 2);
+}
+
 } // End of namespace Voyeur






More information about the Scummvm-git-logs mailing list