diff options
author | Colin Snover | 2016-08-05 09:27:17 -0500 |
---|---|---|
committer | Colin Snover | 2016-08-19 15:23:10 -0500 |
commit | e55b7745845e39ba385bff07d8dc45fa7317a4cb (patch) | |
tree | cd80833488773554f2e42b935860f1aed8121fd6 /engines/sci/graphics | |
parent | 6708b58faf145158b47e2184f8d776fa6426305e (diff) | |
download | scummvm-rg350-e55b7745845e39ba385bff07d8dc45fa7317a4cb.tar.gz scummvm-rg350-e55b7745845e39ba385bff07d8dc45fa7317a4cb.tar.bz2 scummvm-rg350-e55b7745845e39ba385bff07d8dc45fa7317a4cb.zip |
SCI32: Add kPlayVMDGetStatus kernel call
Used by Lighthouse.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/video32.cpp | 16 | ||||
-rw-r--r-- | engines/sci/graphics/video32.h | 14 |
2 files changed, 30 insertions, 0 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index b4b14d6d23..8b1d4ef32b 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -613,6 +613,22 @@ VMDPlayer::IOStatus VMDPlayer::close() { return kIOSuccess; } +VMDPlayer::VMDStatus VMDPlayer::getStatus() const { + if (!_isOpen) { + return kVMDNotOpen; + } + if (_decoder->isPaused()) { + return kVMDPaused; + } + if (_decoder->isPlaying()) { + return kVMDPlaying; + } + if (_decoder->endOfVideo()) { + return kVMDFinished; + } + return kVMDOpen; +} + VMDPlayer::EventFlags VMDPlayer::kernelPlayUntilEvent(const EventFlags flags, const int16 lastFrameNo, const int16 yieldInterval) { assert(lastFrameNo >= -1); diff --git a/engines/sci/graphics/video32.h b/engines/sci/graphics/video32.h index 3ea244292e..75b8fb2d21 100644 --- a/engines/sci/graphics/video32.h +++ b/engines/sci/graphics/video32.h @@ -268,6 +268,15 @@ public: kEventFlagReverse = 0x80 }; + enum VMDStatus { + kVMDNotOpen = 0, + kVMDOpen = 1, + kVMDPlaying = 2, + kVMDPaused = 3, + kVMDStopped = 4, + kVMDFinished = 5 + }; + VMDPlayer(SegManager *segMan, EventManager *eventMan); ~VMDPlayer(); @@ -295,6 +304,11 @@ public: */ IOStatus close(); + /** + * Gets the playback status of the VMD player. + */ + VMDStatus getStatus() const; + // NOTE: Was WaitForEvent in SSCI EventFlags kernelPlayUntilEvent(const EventFlags flags, const int16 lastFrameNo, const int16 yieldInterval); |