diff options
author | Paul Gilbert | 2014-06-08 14:17:25 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-06-08 14:17:25 -0400 |
commit | 1f26a75bb937c4ff6a2935fca6007e9af7aba4bf (patch) | |
tree | 6d2ab1c54dca5f6b9ad666aa3dbe4ac335a15c19 /engines | |
parent | ec37a542edbe3d4a7d1301abd34532afe5d383b2 (diff) | |
download | scummvm-rg350-1f26a75bb937c4ff6a2935fca6007e9af7aba4bf.tar.gz scummvm-rg350-1f26a75bb937c4ff6a2935fca6007e9af7aba4bf.tar.bz2 scummvm-rg350-1f26a75bb937c4ff6a2935fca6007e9af7aba4bf.zip |
VOYEUR: Don't reset mansion view position after looking at rooms
Diffstat (limited to 'engines')
-rw-r--r-- | engines/voyeur/voyeur.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 5 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 10 |
3 files changed, 14 insertions, 3 deletions
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 |