aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xengines/pegasus/movie.cpp9
-rwxr-xr-xengines/pegasus/movie.h1
-rw-r--r--engines/pegasus/pegasus.cpp16
-rw-r--r--engines/pegasus/pegasus.h2
4 files changed, 24 insertions, 4 deletions
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp
index 380834faf6..fa0cb95dff 100755
--- a/engines/pegasus/movie.cpp
+++ b/engines/pegasus/movie.cpp
@@ -163,12 +163,19 @@ void Movie::stop() {
}
void Movie::resume() {
- if (_video && _video->isPaused())
+ if (_video)
_video->pauseVideo(false);
TimeBase::resume();
}
+void Movie::pause() {
+ if (_video)
+ _video->pauseVideo(true);
+
+ TimeBase::pause();
+}
+
void Movie::checkCallBacks() {
TimeBase::checkCallBacks();
diff --git a/engines/pegasus/movie.h b/engines/pegasus/movie.h
index a72491478f..3983a6f942 100755
--- a/engines/pegasus/movie.h
+++ b/engines/pegasus/movie.h
@@ -60,6 +60,7 @@ public:
virtual void start();
virtual void stop();
virtual void resume();
+ virtual void pause();
virtual void moveMovieBoxTo(const tCoordType, const tCoordType);
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 5c25be2cfa..8ecab93b4f 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -1759,13 +1759,13 @@ void PegasusEngine::setAmbienceLevel(uint16 ambientLevel) {
void PegasusEngine::pauseMenu(bool menuUp) {
if (menuUp) {
- // TODO: Pause engine
+ pauseEngine(true);
_screenDimmer.startDisplaying();
_screenDimmer.show();
_gfx->updateDisplay();
useMenu(new PauseMenu());
} else {
- // TODO: Resume engine
+ pauseEngine(false);
_screenDimmer.hide();
_screenDimmer.stopDisplaying();
useMenu(0);
@@ -1855,4 +1855,16 @@ tNeighborhoodID PegasusEngine::getCurrentNeighborhoodID() const {
return kNoNeighborhoodID;
}
+void PegasusEngine::pauseEngineIntern(bool pause) {
+ Engine::pauseEngineIntern(pause);
+
+ if (pause) {
+ for (Common::List<TimeBase *>::iterator it = _timeBases.begin(); it != _timeBases.end(); it++)
+ (*it)->pause();
+ } else {
+ for (Common::List<TimeBase *>::iterator it = _timeBases.begin(); it != _timeBases.end(); it++)
+ (*it)->resume();
+ }
+}
+
} // End of namespace Pegasus
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index e8e67b54d3..13e975e0c8 100644
--- a/engines/pegasus/pegasus.h
+++ b/engines/pegasus/pegasus.h
@@ -180,6 +180,7 @@ public:
protected:
Common::Error run();
+ void pauseEngineIntern(bool pause);
Notification _shellNotification;
virtual void receiveNotification(Notification *notification, const tNotificationFlags flags);
@@ -233,7 +234,6 @@ private:
bool playMovieScaled(Video::SeekableVideoDecoder *video, uint16 x, uint16 y);
void throwAwayEverything();
void shellGameInput(const Input &input, const Hotspot *cursorSpot);
- bool isPaused() { return false; } // TODO
// Menu
GameMenu *_gameMenu;