diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/palette.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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(); } |