aboutsummaryrefslogtreecommitdiff
path: root/engines/access/video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access/video.cpp')
-rw-r--r--engines/access/video.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/engines/access/video.cpp b/engines/access/video.cpp
index 920c066898..5fc5f6762c 100644
--- a/engines/access/video.cpp
+++ b/engines/access/video.cpp
@@ -29,6 +29,7 @@ VideoPlayer::VideoPlayer(AccessEngine *vm) : Manager(vm) {
_vidSurface = nullptr;
_videoData = nullptr;
_startCoord = nullptr;
+
_frameCount = 0;
_xCount = 0;
_scanCount = 0;
@@ -37,23 +38,23 @@ VideoPlayer::VideoPlayer(AccessEngine *vm) : Manager(vm) {
_soundFlag = false;
_soundFrame = 0;
_videoEnd = false;
+
+ _header._frameCount = 0;
+ _header._width = _header._height = 0;
+ _header._flags = VIDEOFLAG_NONE;
}
VideoPlayer::~VideoPlayer() {
closeVideo();
}
-
-void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) {
+void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, int rate) {
_vidSurface = vidSurface;
vidSurface->_orgX1 = pt.x;
vidSurface->_orgY1 = pt.y;
_vm->_timers[31]._timer = rate;
_vm->_timers[31]._initTm = rate;
- // Open up video stream
- _videoData = _vm->_files->loadFile(videoFile);
-
// Load in header
_header._frameCount = _videoData->_stream->readUint16LE();
_header._width = _videoData->_stream->readUint16LE();
@@ -86,6 +87,20 @@ void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const
_videoEnd = false;
}
+void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate) {
+ // Open up video stream
+ _videoData = _vm->_files->loadFile(filename);
+
+ setVideo(vidSurface, pt, rate);
+}
+
+void VideoPlayer::setVideo(ASurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate) {
+ // Open up video stream
+ _videoData = _vm->_files->loadFile(videoFile);
+
+ setVideo(vidSurface, pt, rate);
+}
+
void VideoPlayer::closeVideo() {
delete _videoData;
_videoData = nullptr;