diff options
author | athrxx | 2019-03-22 18:42:43 +0100 |
---|---|---|
committer | athrxx | 2019-04-13 18:54:57 +0200 |
commit | 8c92e045ce59f456be5b2a3f51b558f9abc9d472 (patch) | |
tree | 0b117a6bcbcfa3bdd4a986f51d986551e165b04e /engines/kyra/graphics/screen.cpp | |
parent | 02ecc7abb7ab53e88ae2edec332a38d8c85f1beb (diff) | |
download | scummvm-rg350-8c92e045ce59f456be5b2a3f51b558f9abc9d472.tar.gz scummvm-rg350-8c92e045ce59f456be5b2a3f51b558f9abc9d472.tar.bz2 scummvm-rg350-8c92e045ce59f456be5b2a3f51b558f9abc9d472.zip |
KYRA: (EOB2/Amiga) - fix load up and intro sequence
Diffstat (limited to 'engines/kyra/graphics/screen.cpp')
-rw-r--r-- | engines/kyra/graphics/screen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp index 44b6fadb00..5717319b7f 100644 --- a/engines/kyra/graphics/screen.cpp +++ b/engines/kyra/graphics/screen.cpp @@ -3349,11 +3349,13 @@ bool Screen::loadPaletteTable(const char *filename, int firstPalette) { void Screen::loadPalette(const byte *data, Palette &pal, int bytes) { Common::MemoryReadStream stream(data, bytes, DisposeAfterUse::NO); - if (_isAmiga) - pal.loadAmigaPalette(stream, 0, stream.size() / Palette::kAmigaBytesPerColor); - else if (_vm->gameFlags().platform == Common::kPlatformPC98 && _use16ColorMode) + if (_isAmiga) { + // EOB II Amiga sometimes has multiple palettes here one after + // the other (64 bytes each). We only load the first one here. + pal.loadAmigaPalette(stream, 0, MIN(32, stream.size() / Palette::kAmigaBytesPerColor)); + } else if (_vm->gameFlags().platform == Common::kPlatformPC98 && _use16ColorMode) { pal.loadPC98Palette(stream, 0, stream.size() / Palette::kPC98BytesPerColor); - else if (_renderMode == Common::kRenderEGA) { + } else if (_renderMode == Common::kRenderEGA) { // EOB II checks the number of palette bytes to distinguish between real EGA palettes // and normal palettes (which are used to generate a color map). if (stream.size() == 16) |