From 1f26a75bb937c4ff6a2935fca6007e9af7aba4bf Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 8 Jun 2014 14:17:25 -0400 Subject: VOYEUR: Don't reset mansion view position after looking at rooms --- engines/voyeur/voyeur.cpp | 2 ++ engines/voyeur/voyeur.h | 5 +++++ engines/voyeur/voyeur_game.cpp | 10 +++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'engines/voyeur') diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 8edacc5883..681f431635 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 a35473ba93..e0bb734fa8 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 34ad62a88d..c7df924f7e 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 -- cgit v1.2.3