From 737ef0270718c2f7fb92784f337a308967d57ce3 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Aug 2010 00:46:34 +0000 Subject: VIDEO/GOB: Stub hasEmbeddedFile / getEmbeddedFile Stubbing CoktelDecoder::hasEmbeddedFile() and CoktelDecoder::getEmbeddedFile(), formerly hasExtraData/getExtraData. svn-id: r51875 --- engines/gob/totfile.cpp | 2 +- engines/gob/videoplayer.cpp | 8 ++++---- engines/gob/videoplayer.h | 4 ++-- graphics/video/coktel_decoder.cpp | 8 ++++++++ graphics/video/coktel_decoder.h | 5 +++++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp index 5cc723ba7d..178deeaf58 100644 --- a/engines/gob/totfile.cpp +++ b/engines/gob/totfile.cpp @@ -49,7 +49,7 @@ bool TOTFile::load(const Common::String &fileName) { if (!_stream) // Trying to open from video - _stream = _vm->_vidPlayer->getExtraData(fileName.c_str()); + _stream = _vm->_vidPlayer->getEmbeddedFile(fileName.c_str()); if (!_stream) return false; diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 4dcf49fb86..b219d341da 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -442,20 +442,20 @@ uint16 VideoPlayer::getDefaultY(int slot) const { return video->decoder->getDefaultY(); } -bool VideoPlayer::hasExtraData(const Common::String &fileName, int slot) const { +bool VideoPlayer::hasEmbeddedFile(const Common::String &fileName, int slot) const { const Video *video = getVideoBySlot(slot); if (!video) return false; - return false; // video->decoder->hasExtraData(fileName); + return video->decoder->hasEmbeddedFile(fileName); } -Common::MemoryReadStream *VideoPlayer::getExtraData(const Common::String &fileName, int slot) { +Common::MemoryReadStream *VideoPlayer::getEmbeddedFile(const Common::String &fileName, int slot) { const Video *video = getVideoBySlot(slot); if (!video) return 0; - return 0; // video->decoder->getExtraData(fileName); + return video->decoder->getEmbeddedFile(fileName); } void VideoPlayer::writeVideoInfo(const Common::String &file, int16 varX, int16 varY, diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index 04c55f84cd..b932807d65 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -111,8 +111,8 @@ public: uint16 getDefaultX (int slot = 0) const; uint16 getDefaultY (int slot = 0) const; - bool hasExtraData(const Common::String &fileName, int slot = 0) const; - Common::MemoryReadStream *getExtraData(const Common::String &fileName, int slot = 0); + bool hasEmbeddedFile(const Common::String &fileName, int slot = 0) const; + Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName, int slot = 0); void writeVideoInfo(const Common::String &file, int16 varX, int16 varY, int16 varFrames, int16 varWidth, int16 varHeight); diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index 4e5a8fe6e5..41d4664937 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -169,6 +169,14 @@ void CoktelDecoder::disableSound() { _audioStream = 0; } +bool CoktelDecoder::hasEmbeddedFile(const Common::String &fileName) const { + return false; +} + +Common::MemoryReadStream *CoktelDecoder::getEmbeddedFile(const Common::String &fileName) const { + return 0; +} + void CoktelDecoder::close() { disableSound(); freeSurface(); diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index a8449a25ac..2c47951be9 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -93,6 +93,11 @@ public: void enableSound(); void disableSound(); + /** Return whether that embedded file exists. */ + virtual bool hasEmbeddedFile(const Common::String &fileName) const; + + /** Return that embedded file. */ + virtual Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName) const; // VideoDecoder interface -- cgit v1.2.3