From b26f30b98793c522265a3eeb48fb3b41034663c6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 19 Feb 2011 21:19:45 +0100 Subject: DRASCULA: Adapt to setPalette RGBA->RGB change. --- engines/drascula/palette.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp index 67597efd0c..b521c0313b 100644 --- a/engines/drascula/palette.cpp +++ b/engines/drascula/palette.cpp @@ -65,15 +65,12 @@ void DrasculaEngine::black() { } void DrasculaEngine::setPalette(byte *PalBuf) { - byte pal[256 * 4]; - int i; - - for (i = 0; i < 256; i++) { - pal[i * 4 + 0] = PalBuf[i * 3 + 0] * 4; - pal[i * 4 + 1] = PalBuf[i * 3 + 1] * 4; - pal[i * 4 + 2] = PalBuf[i * 3 + 2] * 4; - pal[i * 4 + 3] = 0; + byte pal[256 * 3]; + + for (int i = 0; i < 3 * 256; ++i) { + pal[i] = PalBuf[i] * 4; } + _system->getPaletteManager()->setPalette(pal, 0, 256); _system->updateScreen(); } -- cgit v1.2.3