diff options
author | athrxx | 2011-12-14 00:44:12 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-12-26 16:18:17 +0100 |
commit | 53e1bf21ecced447192f75067f0232c08d24d647 (patch) | |
tree | 940a929fe6e98d94b5d0aa7298013d5fb8422ae5 | |
parent | 40b1b794ae1cdc8524271f5cc522c82cb5a7fd59 (diff) | |
download | scummvm-rg350-53e1bf21ecced447192f75067f0232c08d24d647.tar.gz scummvm-rg350-53e1bf21ecced447192f75067f0232c08d24d647.tar.bz2 scummvm-rg350-53e1bf21ecced447192f75067f0232c08d24d647.zip |
KYRA: (EOB) - get rid of loadVGAPalette7bit()
(slightly change VGA palette loader to accomodate EOB1 palettes)
-rw-r--r-- | engines/kyra/screen.cpp | 17 | ||||
-rw-r--r-- | engines/kyra/screen.h | 5 |
2 files changed, 2 insertions, 20 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 9a8bff6346..8dc53baa2f 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -3057,9 +3057,6 @@ bool Screen::loadPalette(const char *filename, Palette &pal) { } else if (_vm->gameFlags().platform == Common::kPlatformPC98 && _use16ColorMode) { numCols = stream->size() / Palette::kPC98BytesPerColor; pal.loadPC98Palette(*stream, 0, MIN(maxCols, numCols)); - } else if (_vm->gameFlags().gameID == GI_EOB1) { - numCols = stream->size() / Palette::kVGABytesPerColor; - pal.loadVGAPalette7bit(*stream, 0, MIN(maxCols, numCols)); } else { numCols = stream->size() / Palette::kVGABytesPerColor; pal.loadVGAPalette(*stream, 0, MIN(maxCols, numCols)); @@ -3524,19 +3521,9 @@ Palette::~Palette() { void Palette::loadVGAPalette(Common::ReadStream &stream, int startIndex, int colors) { assert(startIndex + colors <= _numColors); - stream.read(_palData + startIndex * 3, colors * 3); -} - -void Palette::loadVGAPalette7bit(Common::ReadStream &stream, int startIndex, int colors) { - assert(startIndex + colors <= _numColors); - - stream.read(_palData + startIndex * 3, colors * 3); uint8 *pos = _palData + startIndex * 3; - for (int i = 0 ; i < colors; i++) { - *pos++ &= 0x3f; - *pos++ &= 0x3f; - *pos++ &= 0x3f; - } + for (int i = 0 ; i < colors * 3; i++) + *pos++ = stream.readByte() & 0x3f; } void Palette::loadAmigaPalette(Common::ReadStream &stream, int startIndex, int colors) { diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 2db84157b3..7912e59973 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -252,11 +252,6 @@ public: void loadVGAPalette(Common::ReadStream &stream, int startIndex, int colors); /** - * Load a VGA palette from the given stream masking out the upper bit. - */ - void loadVGAPalette7bit(Common::ReadStream &stream, int startIndex, int colors); - - /** * Load a AMIGA palette from the given stream. */ void loadAmigaPalette(Common::ReadStream &stream, int startIndex, int colors); |