diff options
Diffstat (limited to 'engines/bladerunner/vqa_player.cpp')
-rw-r--r-- | engines/bladerunner/vqa_player.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/bladerunner/vqa_player.cpp b/engines/bladerunner/vqa_player.cpp index f875b84cce..4fb19cf561 100644 --- a/engines/bladerunner/vqa_player.cpp +++ b/engines/bladerunner/vqa_player.cpp @@ -121,7 +121,7 @@ void VQAPlayer::updateLights(Lights *lights) { _decoder.decodeLights(lights); } -bool VQAPlayer::setLoop(int loop) { +bool VQAPlayer::setLoop(int loop, int unknown, int loopMode, void(*callback)(void*, int, int), void *callbackData) { int begin, end; if (!_decoder.getLoopBeginAndEndFrame(loop, &begin, &end)) { return false; @@ -131,6 +131,9 @@ bool VQAPlayer::setLoop(int loop) { _loopBegin = begin; _loopEnd = end; + _callbackLoopEnded = callback; + _callbackData = callbackData; + // warning("\t\t\tActive Loop: %d - %d\n", begin, end); return true; @@ -158,6 +161,9 @@ int VQAPlayer::calcNextFrame(int frame) const { if (_curLoop != -1 && frame >= _loopEnd) { frame = _loopBegin; + if (_callbackLoopEnded != nullptr) { + _callbackLoopEnded(_callbackData, 0, _curLoop); + } } else { frame++; } |