aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/video32.cpp12
-rw-r--r--engines/sci/graphics/video32.h12
2 files changed, 20 insertions, 4 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 35a92c3ab9..2dc2347765 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -531,8 +531,9 @@ VMDPlayer::VMDPlayer(SegManager *segMan, EventManager *eventMan) :
_startColor(0),
_endColor(255),
+#ifdef SCI_VMD_BLACK_PALETTE
_blackPalette(false),
-
+#endif
_boostPercent(100),
_boostStartColor(0),
_boostEndColor(255),
@@ -594,7 +595,9 @@ void VMDPlayer::init(const int16 x, const int16 y, const PlayFlags flags, const
_boostEndColor = CLIP<int16>(boostEndColor, 0, 255);
_leaveScreenBlack = flags & kPlayFlagLeaveScreenBlack;
_leaveLastFrame = flags & kPlayFlagLeaveLastFrame;
+#ifdef SCI_VMD_BLACK_PALETTE
_blackPalette = flags & kPlayFlagBlackPalette;
+#endif
_stretchVertical = flags & kPlayFlagStretchVertical;
}
@@ -869,25 +872,28 @@ void VMDPlayer::renderFrame() const {
for (uint16 i = _endColor; i < 256; ++i) {
palette.colors[i].used = false;
}
+#if SCI_VMD_BLACK_PALETTE
if (_blackPalette) {
for (uint16 i = _startColor; i <= _endColor; ++i) {
palette.colors[i].r = palette.colors[i].g = palette.colors[i].b = 0;
palette.colors[i].used = true;
}
- } else {
+ } else
+#endif
fillPalette(palette);
- }
g_sci->_gfxPalette32->submit(palette);
g_sci->_gfxFrameout->updateScreenItem(*_screenItem);
g_sci->_gfxFrameout->frameOut(true);
+#if SCI_VMD_BLACK_PALETTE
if (_blackPalette) {
fillPalette(palette);
g_sci->_gfxPalette32->submit(palette);
g_sci->_gfxPalette32->updateForFrame();
g_sci->_gfxPalette32->updateHardware();
}
+#endif
} else {
g_sci->_gfxFrameout->updateScreenItem(*_screenItem);
g_sci->_gfxFrameout->frameOut(true);
diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h
index 3200105fc9..7b71b37fb0 100644
--- a/engines/sci/graphics/video32.h
+++ b/engines/sci/graphics/video32.h
@@ -498,8 +498,18 @@ private:
* palette is submitted to the palette manager,
* which is then restored after the video pixels
* have already been rendered.
- */
+ *
+ * This functionality is currently disabled because it seems like
+ * it was designed for a different graphics architecture where
+ * pixel data could be rendered before the video card's palette
+ * had been updated. This is not possible in ScummVM because the
+ * palette & pixel data are rendered simultaneously when
+ * OSystem::updateScreen is called, rather than immediately
+ * after they are sent to the backend.
+ */
+#ifdef SCI_VMD_BLACK_PALETTE
bool _blackPalette;
+#endif
#pragma mark -
#pragma mark VMDPlayer - Brightness boost