diff options
author | Peter Kohaut | 2017-03-29 18:47:38 +0200 |
---|---|---|
committer | Peter Kohaut | 2017-03-29 18:48:46 +0200 |
commit | 5f36e65855458a7f146621d99ab09aa049cc6916 (patch) | |
tree | ea66de80170f133b7b34f157e0f4cddf0dd8c6e6 /engines/bladerunner/vqa_player.h | |
parent | d4ff2ddf1073e13f42be8fd2918a83d198a8b00c (diff) | |
download | scummvm-rg350-5f36e65855458a7f146621d99ab09aa049cc6916.tar.gz scummvm-rg350-5f36e65855458a7f146621d99ab09aa049cc6916.tar.bz2 scummvm-rg350-5f36e65855458a7f146621d99ab09aa049cc6916.zip |
BLADERUNNER: zbuffer is now updated between scene changes
updated vqa player udpate code
fixed some warnings
audio preloading still needs some work
Diffstat (limited to 'engines/bladerunner/vqa_player.h')
-rw-r--r-- | engines/bladerunner/vqa_player.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/engines/bladerunner/vqa_player.h b/engines/bladerunner/vqa_player.h index d0eb069969..8c2653ec85 100644 --- a/engines/bladerunner/vqa_player.h +++ b/engines/bladerunner/vqa_player.h @@ -32,6 +32,12 @@ namespace BladeRunner { +enum LoopSetModes { + kLoopSetModeJustStart = 0, + kLoopSetModeEnqueue = 1, + kLoopSetModeImmediate = 2 +}; + class BladeRunnerEngine; class View; class Lights; @@ -47,8 +53,7 @@ class VQAPlayer { const uint16 *_zBuffer; Audio::QueuingAudioStream *_audioStream; - int _frameCurrent; - int _frameDecoded; + int _frameNext; int _frameBegin; int _frameEnd; int _loop; @@ -60,7 +65,7 @@ class VQAPlayer { int _loopInitial; int _repeatsCountInitial; - uint32 _nextFrameTime; + uint32 _frameNextTime; bool _hasAudio; bool _audioStarted; Audio::SoundHandle _soundHandle; @@ -74,9 +79,9 @@ public: : _vm(vm), _s(nullptr), _surface(nullptr), + _zBuffer(nullptr), _audioStream(nullptr), - _frameCurrent(-1), - _frameDecoded(-1), + _frameNext(-1), _frameBegin(-1), _frameEnd(-1), _loop(-1), @@ -85,11 +90,11 @@ public: _frameEndQueued(-1), _loopInitial(-1), _repeatsCountInitial(-1), - _nextFrameTime(0), + _frameNextTime(0), _hasAudio(false), _audioStarted(false), - _callbackLoopEnded(nullptr) { - } + _callbackLoopEnded(nullptr), + _callbackData(nullptr) { } ~VQAPlayer() { close(); @@ -104,14 +109,15 @@ public: void updateView(View *view); void updateLights(Lights *lights); - bool setBeginAndEndFrame(int begin, int end, int repeatsCount, int loopMode, void(*callback)(void *, int, int), void *callbackData); - bool setLoop(int loop, int repeatsCount, int loopMode, void(*callback)(void*, int, int), void* callbackData); + bool setBeginAndEndFrame(int begin, int end, int repeatsCount, int loopSetMode, void(*callback)(void *, int, int), void *callbackData); + bool setLoop(int loop, int repeatsCount, int loopSetMode, void(*callback)(void*, int, int), void* callbackData); + + bool seekToFrame(int frame); int getLoopBeginFrame(int loop); int getLoopEndFrame(int loop); private: - int calcNextFrame(int frame); void queueAudioFrame(Audio::AudioStream *audioStream); }; |