aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-09 10:00:55 +0200
committerBastien Bouclet2017-07-22 20:38:56 +0200
commit9ac98d0fc90c332c66621554cbc024cd70f38026 (patch)
tree9c34a58769252f8e2d0962203f782740a5e8f4ba /engines
parenta1be6d4209ce5c0ce8bd3d954de53fdeb3274cc9 (diff)
downloadscummvm-rg350-9ac98d0fc90c332c66621554cbc024cd70f38026.tar.gz
scummvm-rg350-9ac98d0fc90c332c66621554cbc024cd70f38026.tar.bz2
scummvm-rg350-9ac98d0fc90c332c66621554cbc024cd70f38026.zip
MOHAWK: Myst: Always update the screen during the gameloop
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/cursors.cpp4
-rw-r--r--engines/mohawk/myst.cpp10
-rw-r--r--engines/mohawk/myst.h1
3 files changed, 2 insertions, 13 deletions
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index ebc556137a..cef24e14e5 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -93,12 +93,10 @@ MystCursorManager::~MystCursorManager() {
void MystCursorManager::showCursor() {
CursorMan.showMouse(true);
- _vm->_needsUpdate = true;
}
void MystCursorManager::hideCursor() {
CursorMan.showMouse(false);
- _vm->_needsUpdate = true;
}
void MystCursorManager::setCursor(uint16 id) {
@@ -139,8 +137,6 @@ void MystCursorManager::setCursor(uint16 id) {
Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat);
}
-
- _vm->_needsUpdate = true;
}
void MystCursorManager::setDefaultCursor() {
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 3d45e389d0..3e1ca0eb53 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -70,7 +70,6 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
_mainCursor = kDefaultMystCursor;
_showResourceRects = false;
_curCard = 0;
- _needsUpdate = false;
_canSafelySaveLoad = false;
_curResource = -1;
_hoverResource = nullptr;
@@ -264,13 +263,12 @@ Common::Error MohawkEngine_Myst::run() {
Common::Event event;
while (!shouldQuit()) {
// Update any background videos
- _needsUpdate = _video->updateMovies();
+ _video->updateMovies();
_scriptParser->runPersistentScripts();
while (pollEvent(event)) {
switch (event.type) {
case Common::EVENT_MOUSEMOVE: {
- _needsUpdate = true;
bool mouseClicked = _system->getEventManager()->getButtonState() & 1;
// Keep the same resource when dragging
@@ -349,10 +347,7 @@ Common::Error MohawkEngine_Myst::run() {
}
}
- if (_needsUpdate) {
- _system->updateScreen();
- _needsUpdate = false;
- }
+ _system->updateScreen();
// Cut down on CPU usage
_system->delayMillis(10);
@@ -643,7 +638,6 @@ void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
} else {
_gfx->copyBackBufferToScreen(Common::Rect(544, 333));
_system->updateScreen();
- _needsUpdate = false;
}
}
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 588880aaaf..d1b74d7912 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -193,7 +193,6 @@ public:
MystSoundBlock readSoundBlock(Common::ReadStream *stream) const;
void applySoundBlock(const MystSoundBlock &block);
- bool _needsUpdate;
bool _needsPageDrop;
bool _needsShowMap;
bool _needsShowDemoMenu;