aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/livingbooks.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-02-20 17:20:47 +0100
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit9153393219b398ce5a7a8122d9af38e32e128059 (patch)
tree212f1183e15c7546f966c8c9b6539837e1fccda0 /engines/mohawk/livingbooks.cpp
parent1aa42338025543814ac0dbf41ed62c03ccf01ba8 (diff)
downloadscummvm-rg350-9153393219b398ce5a7a8122d9af38e32e128059.tar.gz
scummvm-rg350-9153393219b398ce5a7a8122d9af38e32e128059.tar.bz2
scummvm-rg350-9153393219b398ce5a7a8122d9af38e32e128059.zip
MOHAWK: Allow games to opt out of the default video manager
Diffstat (limited to 'engines/mohawk/livingbooks.cpp')
-rw-r--r--engines/mohawk/livingbooks.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 6ee18d1576..340dfd16f7 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -145,6 +145,7 @@ MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGa
_rnd = new Common::RandomSource("livingbooks");
_sound = NULL;
+ _video = NULL;
_page = NULL;
const Common::FSNode gameDataDir(ConfMan.get("path"));
@@ -160,6 +161,7 @@ MohawkEngine_LivingBooks::~MohawkEngine_LivingBooks() {
delete _console;
delete _sound;
+ delete _video;
delete _gfx;
delete _rnd;
_bookInfoFile.clear();
@@ -184,6 +186,7 @@ Common::Error MohawkEngine_LivingBooks::run() {
error("Could not find xRes/yRes variables");
_gfx = new LBGraphics(this, _screenWidth, _screenHeight);
+ _video = new VideoManager(this);
_sound = new Sound(this);
if (getGameType() != GType_LIVINGBOOKSV1)
@@ -287,6 +290,17 @@ Common::Error MohawkEngine_LivingBooks::run() {
return Common::kNoError;
}
+void MohawkEngine_LivingBooks::pauseEngineIntern(bool pause) {
+ MohawkEngine::pauseEngineIntern(pause);
+
+ if (pause) {
+ _video->pauseVideos();
+ } else {
+ _video->resumeVideos();
+ _system->updateScreen();
+ }
+}
+
void MohawkEngine_LivingBooks::loadBookInfo(const Common::String &filename) {
if (!_bookInfoFile.loadFromFile(filename))
error("Could not open %s as a config file", filename.c_str());