aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
authorSven Hesse2008-06-19 22:54:17 +0000
committerSven Hesse2008-06-19 22:54:17 +0000
commit0c6c7de3554a65a22324a0aa89b111aa7f2fa79f (patch)
treef241581bfce77cb6d813f01c4a6accbec24fd552 /engines/gob/videoplayer.cpp
parentf1b0e379d1977df831bfd3659d73fa57588a0279 (diff)
downloadscummvm-rg350-0c6c7de3554a65a22324a0aa89b111aa7f2fa79f.tar.gz
scummvm-rg350-0c6c7de3554a65a22324a0aa89b111aa7f2fa79f.tar.bz2
scummvm-rg350-0c6c7de3554a65a22324a0aa89b111aa7f2fa79f.zip
Fixed a palette issue in Lost in Time
svn-id: r32738
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 909d39a63b..aa47e6cf84 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -588,12 +588,14 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
}
void VideoPlayer::copyPalette(CoktelVideo &video, int16 palStart, int16 palEnd) {
- if ((palStart != -1) && (palEnd != -1))
- memcpy(((char *) (_vm->_global->_pPaletteDesc->vgaPal)) + palStart * 3,
- video.getPalette() + palStart * 3,
- (palEnd - palStart + 1) * 3);
- else
- memcpy((char *) _vm->_global->_pPaletteDesc->vgaPal, video.getPalette(), 768);
+ if (palStart < 0)
+ palStart = 0;
+ if (palEnd < 0)
+ palEnd = 255;
+
+ memcpy(((char *) (_vm->_global->_pPaletteDesc->vgaPal)) + palStart * 3,
+ video.getPalette() + palStart * 3,
+ (palEnd - palStart + 1) * 3);
}
void VideoPlayer::writeVideoInfo(const char *videoFile, int16 varX, int16 varY,