mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
SWORD2: Fix reference to out-of-scope variable
This commit is contained in:
parent
22d8fe9544
commit
617b9cf613
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user