diff options
author | Johannes Schickel | 2009-06-25 19:55:25 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-25 19:55:25 +0000 |
commit | b21dd2cb4344dc4b4a9914d3e3ec67a004a726b8 (patch) | |
tree | ffa755d0cb78c380151b8c1c69f904406e17438b /engines | |
parent | c3672f8433f762e7f7a33651e82a6732dc2ded54 (diff) | |
download | scummvm-rg350-b21dd2cb4344dc4b4a9914d3e3ec67a004a726b8.tar.gz scummvm-rg350-b21dd2cb4344dc4b4a9914d3e3ec67a004a726b8.tar.bz2 scummvm-rg350-b21dd2cb4344dc4b4a9914d3e3ec67a004a726b8.zip |
Cleanup VQA player a bit.
svn-id: r41879
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/vqa.cpp | 15 | ||||
-rw-r--r-- | engines/kyra/vqa.h | 14 |
2 files changed, 22 insertions, 7 deletions
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index bfb27d0d16..1225bc9976 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -32,12 +32,14 @@ // The jung2.vqa movie does work, but only thanks to a grotesque hack. +#include "kyra/vqa.h" + #include "common/system.h" #include "sound/audiostream.h" #include "sound/mixer.h" + #include "kyra/sound.h" #include "kyra/screen.h" -#include "kyra/vqa.h" #include "kyra/resource.h" namespace Kyra { @@ -45,6 +47,7 @@ namespace Kyra { VQAMovie::VQAMovie(KyraEngine_v1 *vm, OSystem *system) { _system = system; _vm = vm; + _screen = _vm->screen(); _opened = false; _x = _y = _drawPage = -1; } @@ -474,13 +477,13 @@ void VQAMovie::displayFrame(uint frameNum) { case MKID_BE('CPL0'): // Palette assert(size <= 3 * 256); - _file->read(_vm->screen()->getPalette(0).getData(), size); + _file->read(_screen->getPalette(0).getData(), size); break; case MKID_BE('CPLZ'): // Palette inbuf = (byte *)allocBuffer(0, size); _file->read(inbuf, size); - Screen::decodeFrame4(inbuf, _vm->screen()->getPalette(0).getData(), 768); + Screen::decodeFrame4(inbuf, _screen->getPalette(0).getData(), 768); break; case MKID_BE('VPT0'): // Frame data @@ -521,7 +524,7 @@ void VQAMovie::displayFrame(uint frameNum) { // The frame has been decoded if (_frameInfo[frameNum] & 0x80000000) - _vm->screen()->setScreenPalette(_vm->screen()->getPalette(0)); + _screen->setScreenPalette(_screen->getPalette(0)); int blockPitch = _header.width / _header.blockW; @@ -561,7 +564,7 @@ void VQAMovie::displayFrame(uint frameNum) { _partialCodeBookSize = 0; } - _vm->screen()->copyBlockToPage(_drawPage, _x, _y, _header.width, _header.height, _frame); + _screen->copyBlockToPage(_drawPage, _x, _y, _header.width, _header.height, _frame); } void VQAMovie::play() { @@ -675,7 +678,7 @@ void VQAMovie::play() { _system->delayMillis(10); } - _vm->screen()->updateScreen(); + _screen->updateScreen(); } // TODO: Wait for the sound to finish? diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h index 46d3bd48fb..98e279bd29 100644 --- a/engines/kyra/vqa.h +++ b/engines/kyra/vqa.h @@ -26,13 +26,24 @@ #ifndef KYRA_VQA_H #define KYRA_VQA_H -#include "common/stream.h" +#include "common/scummsys.h" + +#include "sound/mixer.h" class OSystem; +namespace Audio { +class AppendableAudioStream; +} // end of namespace Audio + +namespace Common { +class SeekableReadStream; +} // end of namespace Common + namespace Kyra { class KyraEngine_v1; +class Screen; class VQAMovie { public: @@ -57,6 +68,7 @@ public: protected: OSystem *_system; KyraEngine_v1 *_vm; + Screen *_screen; bool _opened; int _x, _y; |