From de0c772a01382eeb93a9977feb096a505123e75b Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 16 Feb 2009 06:02:21 +0000 Subject: Blank the palette correctly. (Fixes Valgrind warning.) svn-id: r38343 --- engines/sword1/animation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') 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) { -- cgit v1.2.3