diff options
-rw-r--r-- | engines/sci/graphics/cursor32.cpp | 15 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 16 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.h | 7 |
3 files changed, 7 insertions, 31 deletions
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp index e8450b773e..2f74873229 100644 --- a/engines/sci/graphics/cursor32.cpp +++ b/engines/sci/graphics/cursor32.cpp @@ -287,14 +287,13 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const } void GfxCursor32::readVideo(DrawRegion &target) { - if (g_sci->_gfxFrameout->_frameNowVisible) { - copy(target, _vmapRegion); - } else { - // NOTE: SSCI would read the background for the cursor directly out of - // video memory here, but this is not necessary in ScummVM because mouse - // events in ScummVM are polled so can never interrupt the renderer - // between frames - } + // NOTE: In SSCI, mouse events were received via hardware interrupt, so + // there was a separate branch here that would read from VRAM instead of + // from the game's back buffer when a mouse event was received while the + // back buffer was being updated. In ScummVM, mouse events are polled, which + // means it is not possible to receive a mouse event during a back buffer + // update, so the code responsible for handling that is removed. + copy(target, _vmapRegion); } void GfxCursor32::copy(DrawRegion &target, const DrawRegion &source) { diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 47992763f1..259e3a01b8 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -69,7 +69,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio _throttleFrameOut(true), _throttleState(0), _remapOccurred(false), - _frameNowVisible(false), _overdrawThreshold(0), _palMorphIsOn(false) { @@ -467,11 +466,6 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR _remapOccurred = _palette->updateForFrame(); - // NOTE: SCI engine set this to false on each loop through the - // planelist iterator below. Since that is a waste, we only set - // it once. - _frameNowVisible = false; - for (PlaneList::size_type i = 0; i < _planes.size(); ++i) { drawEraseList(eraseLists[i], *_planes[i]); drawScreenItemList(screenItemLists[i]); @@ -487,8 +481,6 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR showBits(); } - _frameNowVisible = true; - if (robotIsActive) { robotPlayer.frameNowVisible(); } @@ -528,7 +520,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show } _remapOccurred = _palette->updateForFrame(); - _frameNowVisible = false; for (PlaneList::size_type i = 0; i < _planes.size(); ++i) { drawEraseList(eraseLists[i], *_planes[i]); @@ -564,8 +555,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show showBits(); } - _frameNowVisible = true; - for (PlaneList::iterator plane = _planes.begin(); plane != _planes.end(); ++plane) { (*plane)->_redrawAllCount = getScreenCount(); } @@ -586,9 +575,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show } _remapOccurred = _palette->updateForFrame(); - // NOTE: During this second loop, `_frameNowVisible = false` is - // inside the next loop in SCI2.1mid - _frameNowVisible = false; for (PlaneList::size_type i = 0; i < _planes.size(); ++i) { drawEraseList(eraseLists[i], *_planes[i]); @@ -599,8 +585,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show _palette->updateFFrame(); _palette->updateHardware(false); showBits(); - - _frameNowVisible = true; } /** diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 208c5b439c..146211544c 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -307,13 +307,6 @@ private: public: /** - * Whether or not the data in the current buffer is what - * is visible to the user. During rendering updates, - * this flag is set to false. - */ - bool _frameNowVisible; - - /** * Whether palMorphFrameOut should be used instead of * frameOut for rendering. Used by kMorphOn to * explicitly enable palMorphFrameOut for one frame. |