aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-02-16 06:02:21 +0000
committerTorbjörn Andersson2009-02-16 06:02:21 +0000
commitde0c772a01382eeb93a9977feb096a505123e75b (patch)
tree24ea4694bc5a1bab9fb60f8beb2c3b943367ef44
parent7fc7234312b0e056a3172d3c88cad346bb128b10 (diff)
downloadscummvm-rg350-de0c772a01382eeb93a9977feb096a505123e75b.tar.gz
scummvm-rg350-de0c772a01382eeb93a9977feb096a505123e75b.tar.bz2
scummvm-rg350-de0c772a01382eeb93a9977feb096a505123e75b.zip
Blank the palette correctly. (Fixes Valgrind warning.)
svn-id: r38343
-rw-r--r--engines/sword1/animation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 1b402c5455..47997b6810 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -181,13 +181,13 @@ void MoviePlayer::play(void) {
_system->delayMillis(100);
// It's tempting to call _screen->fullRefresh() here to restore the old
- // palette. However, that causes glitches with DXA movies, here the
+ // palette. However, that causes glitches with DXA movies, where the
// previous location would be momentarily drawn, before switching to
// the new one. Work around this by setting the palette to black.
- byte pal[3 * 256];
+ byte pal[4 * 256];
memset(pal, 0, sizeof(pal));
- _system->setPalette(pal, 0, 255);
+ _system->setPalette(pal, 0, 256);
}
void MoviePlayer::performPostProcessing(byte *screen) {