diff options
author | Willem Jan Palenstijn | 2013-04-22 22:27:19 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-04-22 22:27:19 +0200 |
commit | 617b9cf613cb3ac67a033e38fd6fd1bcdf3b19ad (patch) | |
tree | 7e7b016a0871ad7dbbc9cc0fafe1df286e2394d3 /engines/sword2 | |
parent | 22d8fe9544462af6d14e87df8ec2f6b70c5871bf (diff) | |
download | scummvm-rg350-617b9cf613cb3ac67a033e38fd6fd1bcdf3b19ad.tar.gz scummvm-rg350-617b9cf613cb3ac67a033e38fd6fd1bcdf3b19ad.tar.bz2 scummvm-rg350-617b9cf613cb3ac67a033e38fd6fd1bcdf3b19ad.zip |
SWORD2: Fix reference to out-of-scope variable
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/palette.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp index c3a3d24075..9634d3af10 100644 --- a/engines/sword2/palette.cpp +++ b/engines/sword2/palette.cpp @@ -288,19 +288,17 @@ void Screen::fadeServer() { } void Screen::setSystemPalette(const byte *colors, uint start, uint num) { - const byte *palette; - if (_dimPalette) { byte pal[256 * 3]; for (uint i = start * 3; i < 3 * (start + num); i++) pal[i] = colors[i] / 2; - palette = pal; - } else - palette = colors; + _vm->_system->getPaletteManager()->setPalette(pal, start, num); + } else { + _vm->_system->getPaletteManager()->setPalette(colors, start, num); + } - _vm->_system->getPaletteManager()->setPalette(palette, start, num); } } // End of namespace Sword2 |