diff options
author | Torbjörn Andersson | 2006-05-21 19:03:27 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-21 19:03:27 +0000 |
commit | b98a67d1eb4aa77f7e3d3d4ccec0bce4706351c9 (patch) | |
tree | c0d8ad00831bc89e93e242f5eb31d47d080f6c32 /engines/kyra | |
parent | 7d15c60ab903accd2331cbdfcd05645235a42512 (diff) | |
download | scummvm-rg350-b98a67d1eb4aa77f7e3d3d4ccec0bce4706351c9.tar.gz scummvm-rg350-b98a67d1eb4aa77f7e3d3d4ccec0bce4706351c9.tar.bz2 scummvm-rg350-b98a67d1eb4aa77f7e3d3d4ccec0bce4706351c9.zip |
More VQA fixes:
* Use setScreenPalette() rather than calling the backend directly. (As an extra
bonus, the VQA player now only needs to store 3 bytes per colour.)
* Hide the mouse cursor while the movie is playing.
svn-id: r22563
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra3.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/vqa.cpp | 16 | ||||
-rw-r--r-- | engines/kyra/vqa.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/kyra/kyra3.cpp b/engines/kyra/kyra3.cpp index b7c6f763cf..805a2395b6 100644 --- a/engines/kyra/kyra3.cpp +++ b/engines/kyra/kyra3.cpp @@ -163,9 +163,11 @@ void KyraEngine_v3::playVQA(const char *name) { vqa.open(filename); if (vqa.opened()) { + _screen->hideMouse(); vqa.setDrawPage(0); vqa.play(); vqa.close(); + _screen->showMouse(); } if (_screen->_curPage == 0) diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index b209f5ea6d..d74204bc36 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -511,10 +511,9 @@ void VQAMovie::displayFrame(int frameNum) { _file.read(inbuf, size); for (i = 0; i < size / 3; i++) { - *pal++ = 4 * (0x3F & *inbuf++); - *pal++ = 4 * (0x3F & *inbuf++); - *pal++ = 4 * (0x3F & *inbuf++); - *pal++ = 0; + *pal++ = *inbuf++; + *pal++ = *inbuf++; + *pal++ = *inbuf++; } break; @@ -527,10 +526,9 @@ void VQAMovie::displayFrame(int frameNum) { size = decodeFormat80(inbuf, outbuf); for (i = 0; i < size / 3; i++) { - *pal++ = 4 * (0x3F & *outbuf++); - *pal++ = 4 * (0x3F & *outbuf++); - *pal++ = 4 * (0x3F & *outbuf++); - *pal++ = 0; + *pal++ = *outbuf++; + *pal++ = *outbuf++; + *pal++ = *outbuf++; } break; @@ -575,7 +573,7 @@ void VQAMovie::displayFrame(int frameNum) { // The frame has been decoded if (_frameInfo[frameNum] & 0x80000000) { - _system->setPalette(_palette, 0, 256); + _vm->screen()->setScreenPalette(_palette); } int blockPitch = _header.width / _header.blockW; diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h index ec13bb1c6c..05371d4869 100644 --- a/engines/kyra/vqa.h +++ b/engines/kyra/vqa.h @@ -108,7 +108,7 @@ protected: uint32 _numVectorPointers; uint16 *_vectorPointers; - byte _palette[4 * 256]; + byte _palette[3 * 256]; byte *_frame; Audio::AppendableAudioStream *_stream; |