aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.cpp
diff options
context:
space:
mode:
authorColin Snover2017-04-29 14:00:28 -0500
committerColin Snover2017-04-29 14:31:01 -0500
commit5dd961884276cfb3f5d5ae95b3c2440582ced917 (patch)
tree59475619e88a1bb15d50c2cb8b26aa33d8f54b1f /engines/sci/graphics/frameout.cpp
parent75c6b1fd3bf34e37e5aa5b6b6bfce355091d2e4a (diff)
downloadscummvm-rg350-5dd961884276cfb3f5d5ae95b3c2440582ced917.tar.gz
scummvm-rg350-5dd961884276cfb3f5d5ae95b3c2440582ced917.tar.bz2
scummvm-rg350-5dd961884276cfb3f5d5ae95b3c2440582ced917.zip
SCI32: Remove unnecessary GfxFrameout::_frameNowVisible
This flag was used in SSCI to read from VRAM instead of from the back buffer when a mouse interrupt was received in the middle of a back buffer update. Since ScummVM controls when mouse events are received via polling, it is not possible to receive a mouse event in the middle of back buffer updates, so this code is unnecessary for the engine to work properly. This also fixes Valgrind warnings about use of uninitialized memory at the start of the game, caused by not filling the cursor memory buffers because `_frameNowVisible` was false until the first frame was rendered.
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r--engines/sci/graphics/frameout.cpp16
1 files changed, 0 insertions, 16 deletions
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;
}
/**