diff options
author | Torbjörn Andersson | 2006-05-21 20:41:53 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-21 20:41:53 +0000 |
commit | 57efbacb9af159c59043d5265b12625206d48224 (patch) | |
tree | 1cc8f6329ffe8353998c5d775a6ee165d9f1b6c4 /engines/kyra | |
parent | a1f5bddaa8644630d71dd6a497d653c677a35351 (diff) | |
download | scummvm-rg350-57efbacb9af159c59043d5265b12625206d48224.tar.gz scummvm-rg350-57efbacb9af159c59043d5265b12625206d48224.tar.bz2 scummvm-rg350-57efbacb9af159c59043d5265b12625206d48224.zip |
Palette handling simplification, suggested by LordHoto.
svn-id: r22567
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/vqa.cpp | 26 | ||||
-rw-r--r-- | engines/kyra/vqa.h | 1 |
2 files changed, 3 insertions, 24 deletions
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index 83eedea694..e0bc757da9 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -463,7 +463,6 @@ void VQAMovie::displayFrame(uint frameNum) { byte *inbuf, *outbuf; uint32 insize, outsize; - byte *pal; uint32 end; switch (tag) { @@ -532,32 +531,13 @@ void VQAMovie::displayFrame(uint frameNum) { case MKID_BE('CPL0'): // Palette assert(size <= 3 * 256); - - inbuf = (byte *)allocBuffer(0, size); - pal = _palette; - _file.read(inbuf, size); - - for (i = 0; i < size / 3; i++) { - *pal++ = *inbuf++; - *pal++ = *inbuf++; - *pal++ = *inbuf++; - } - + _file.read(_vm->screen()->_currentPalette, size); break; case MKID_BE('CPLZ'): // Palette inbuf = (byte *)allocBuffer(0, size); - outbuf = (byte *)allocBuffer(1, 3 * 256); - pal = _palette; _file.read(inbuf, size); - size = decodeFormat80(inbuf, outbuf); - - for (i = 0; i < size / 3; i++) { - *pal++ = *outbuf++; - *pal++ = *outbuf++; - *pal++ = *outbuf++; - } - + size = decodeFormat80(inbuf, _vm->screen()->_currentPalette); break; case MKID_BE('VPT0'): // Frame data @@ -600,7 +580,7 @@ void VQAMovie::displayFrame(uint frameNum) { // The frame has been decoded if (_frameInfo[frameNum] & 0x80000000) { - _vm->screen()->setScreenPalette(_palette); + _vm->screen()->setScreenPalette(_vm->screen()->_currentPalette); } int blockPitch = _header.width / _header.blockW; diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h index f5d7cc5399..90ad2b12b4 100644 --- a/engines/kyra/vqa.h +++ b/engines/kyra/vqa.h @@ -108,7 +108,6 @@ protected: uint32 _numVectorPointers; uint16 *_vectorPointers; - byte _palette[3 * 256]; byte *_frame; Audio::AppendableAudioStream *_stream; |