aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2015-01-31 22:42:46 +0100
committerStrangerke2015-01-31 22:42:46 +0100
commite0a9c92ccd1d9fb531f9c1c5ad8281aa1339f2fd (patch)
tree9456b726730db2bb27af8738e08f25e78d058760 /engines/access
parent4cd155c9a867ae55f390f0207a2896da2898bb13 (diff)
downloadscummvm-rg350-e0a9c92ccd1d9fb531f9c1c5ad8281aa1339f2fd.tar.gz
scummvm-rg350-e0a9c92ccd1d9fb531f9c1c5ad8281aa1339f2fd.tar.bz2
scummvm-rg350-e0a9c92ccd1d9fb531f9c1c5ad8281aa1339f2fd.zip
ACCESS: Split setVideo into 2 functions to allow the loading of files out of a container
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/video.cpp20
-rw-r--r--engines/access/video.h2
2 files changed, 17 insertions, 5 deletions
diff --git a/engines/access/video.cpp b/engines/access/video.cpp
index b7d5652e5b..70d6ac62e8 100644
--- a/engines/access/video.cpp
+++ b/engines/access/video.cpp
@@ -37,17 +37,13 @@ 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();
@@ -80,6 +76,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;
diff --git a/engines/access/video.h b/engines/access/video.h
index 17825db367..83c8995d3e 100644
--- a/engines/access/video.h
+++ b/engines/access/video.h
@@ -51,6 +51,7 @@ private:
Common::Rect _videoBounds;
void getFrame();
+ void setVideo(ASurface *vidSurface, const Common::Point &pt, int rate);
public:
int _videoFrame;
bool _soundFlag;
@@ -64,6 +65,7 @@ public:
* Start up a video
*/
void setVideo(ASurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate);
+ void setVideo(ASurface *vidSurface, const Common::Point &pt, const Common::String filename, int rate);
/**
* Decodes a frame of the video