mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
DIRECTOR: Fix palette loading
This commit is contained in:
parent
8064274d3b
commit
2b57a711f6
@ -61,8 +61,8 @@ void DIBDecoder::destroy() {
|
||||
void DIBDecoder::loadPalette(Common::SeekableReadStream &stream) {
|
||||
uint16 steps = stream.size()/6;
|
||||
uint16 index = (steps * 3) - 1;
|
||||
_paletteColorCount = steps;
|
||||
_palette = new byte[index];
|
||||
|
||||
for (uint8 i = 0; i < steps; i++) {
|
||||
_palette[index - 2] = stream.readByte();
|
||||
stream.readByte();
|
||||
|
@ -91,7 +91,8 @@ Score::Score(Archive &movie, Lingo &lingo) {
|
||||
|
||||
Common::SeekableReadStream *pal = _movieArchive->getResource(MKTAG('C', 'L', 'U', 'T'), clutList[0]);
|
||||
palette.loadPalette(*pal);
|
||||
g_system->getPaletteManager()->setPalette(palette.getPalette(), 0, 255);
|
||||
g_system->getPaletteManager()->setPalette(palette.getPalette(), 0, palette.getPaletteColorCount());
|
||||
|
||||
}
|
||||
|
||||
void Score::loadFrames(Common::SeekableReadStream &stream) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user