From 881b8310740fdc9d9d0d2d7f885251959af01fd9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 29 Dec 2009 17:10:14 +0000 Subject: Adding CoktelVideo::hasExtraData(void), for checking if /any/ extra data files are embedded in the video file svn-id: r46710 --- graphics/video/coktelvideo/coktelvideo.cpp | 8 ++++++++ graphics/video/coktelvideo/coktelvideo.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index e014af58e5..95b12528c0 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -96,6 +96,10 @@ bool Imd::getFrameCoords(int16 frame, return false; } +bool Imd::hasExtraData() const { + return false; +} + bool Imd::hasExtraData(const char *fileName) const { return false; } @@ -2273,6 +2277,10 @@ bool Vmd::getFrameCoords(int16 frame, return getPartCoords(frame, kPartTypeVideo, x, y, width, height); } +bool Vmd::hasExtraData() const { + return !_extraData.empty(); +} + bool Vmd::hasExtraData(const char *fileName) const { for (uint i = 0; i < _extraData.size(); i++) if (!scumm_stricmp(_extraData[i].name, fileName)) diff --git a/graphics/video/coktelvideo/coktelvideo.h b/graphics/video/coktelvideo/coktelvideo.h index b24195d110..cf325d7c7b 100644 --- a/graphics/video/coktelvideo/coktelvideo.h +++ b/graphics/video/coktelvideo/coktelvideo.h @@ -141,6 +141,8 @@ public: virtual bool getFrameCoords(int16 frame, int16 &x, int16 &y, int16 &width, int16 &height) = 0; + /** Returns whether any extra data files are embedded in this video. */ + virtual bool hasExtraData() const = 0; /** Returns whether that extra data file exists */ virtual bool hasExtraData(const char *fileName) const = 0; /** Returns an extra data file */ @@ -227,6 +229,7 @@ public: bool getFrameCoords(int16 frame, int16 &x, int16 &y, int16 &width, int16 &height); + bool hasExtraData() const; bool hasExtraData(const char *fileName) const; Common::MemoryReadStream *getExtraData(const char *fileName); @@ -388,6 +391,7 @@ public: bool getFrameCoords(int16 frame, int16 &x, int16 &y, int16 &width, int16 &height); + bool hasExtraData() const; bool hasExtraData(const char *fileName) const; Common::MemoryReadStream *getExtraData(const char *fileName); -- cgit v1.2.3