aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/voyeur/voyeur.cpp2
-rw-r--r--engines/voyeur/voyeur.h5
-rw-r--r--engines/voyeur/voyeur_game.cpp10
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