aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/voyeur/animation.cpp5
-rw-r--r--engines/voyeur/animation.h1
-rw-r--r--engines/voyeur/voyeur.cpp13
3 files changed, 10 insertions, 9 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
index 5bda66e7fe..42172b7a33 100644
--- a/engines/voyeur/animation.cpp
+++ b/engines/voyeur/animation.cpp
@@ -355,9 +355,9 @@ void RL2Decoder::RL2VideoTrack::rl2DecodeFrameWithTransparency(int screenOffset)
++screenOffset;
--frameSize;
} else if (nextByte < 0x80) {
- // Raw byte to copy to output
+ // Single 7-bit pixel to output (128-255)
assert(frameSize > 0);
- destP[screenOffset] = nextByte;
+ destP[screenOffset] = nextByte | 0x80;
++screenOffset;
--frameSize;
} else if (nextByte == 0x80) {
@@ -374,7 +374,6 @@ void RL2Decoder::RL2VideoTrack::rl2DecodeFrameWithTransparency(int screenOffset)
} else {
// Run length of a single pixel value
int runLength = _fileStream->readByte();
- nextByte &= 0x7f;
runLength = MIN(runLength, frameSize);
Common::fill(destP + screenOffset, destP + screenOffset + runLength, nextByte);
diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
index ed237775cf..34cc9eec12 100644
--- a/engines/voyeur/animation.h
+++ b/engines/voyeur/animation.h
@@ -157,6 +157,7 @@ public:
void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
RL2VideoTrack *getVideoTrack();
void play(::Voyeur::VoyeurEngine *vm);
+ int getPaletteCount() const { return _header._colorCount; }
};
} // End of namespace Video
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 24738fa639..52bcd05930 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -564,11 +564,6 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager._mouseClicked &&
(decoder.getCurFrame() < endFrame)) {
- if (decoder.hasDirtyPalette()) {
- const byte *palette = decoder.getPalette();
- _graphicsManager.setPalette(palette, 0, 256);
- }
-
if (decoder.needsUpdate()) {
const Graphics::Surface *frame = decoder.decodeNextFrame();
@@ -576,7 +571,13 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
(byte *)_graphicsManager._screenSurface.getPixels());
}
- _eventsManager.pollEvents();
+ if (decoder.hasDirtyPalette()) {
+ const byte *palette = decoder.getPalette();
+ _graphicsManager.setPalette(palette, 0, decoder.getPaletteCount());
+ _graphicsManager.setOneColor(128, 220, 20, 20);
+ }
+
+ _eventsManager.getMouseInfo();
g_system->delayMillis(10);
}