diff options
author | Max Horn | 2010-08-04 08:25:05 +0000 |
---|---|---|
committer | Max Horn | 2010-08-04 08:25:05 +0000 |
commit | 0e2807dc27af89c46a191834e5e623a9e77e9187 (patch) | |
tree | a105f2e5207a5aad449d42bf19740668b1716739 /graphics/video/coktelvideo | |
parent | 154c589f188914e79ba10da1de947a5ae2c0427e (diff) | |
download | scummvm-rg350-0e2807dc27af89c46a191834e5e623a9e77e9187.tar.gz scummvm-rg350-0e2807dc27af89c46a191834e5e623a9e77e9187.tar.bz2 scummvm-rg350-0e2807dc27af89c46a191834e5e623a9e77e9187.zip |
GRAPHICS: Change signature of VideoDecoder::load()
Now takes a pointer to a stream, instead of a reference.
The rational is that in all instances, callers have a pointer
(and dereference it to call load), and all load implementations
turn the reference back into a pointer.
svn-id: r51725
Diffstat (limited to 'graphics/video/coktelvideo')
-rw-r--r-- | graphics/video/coktelvideo/coktelvideo.cpp | 12 | ||||
-rw-r--r-- | graphics/video/coktelvideo/coktelvideo.h | 16 |
2 files changed, 12 insertions, 16 deletions
diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 4d93815b44..9ee9fd68d0 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -127,14 +127,14 @@ Common::MemoryReadStream *PreImd::getExtraData(const char *fileName) { return 0; } -bool PreImd::load(Common::SeekableReadStream &stream) { +bool PreImd::load(Common::SeekableReadStream *stream) { // Since PreIMDs don't have any width and height values stored, // we need them to be specified in the constructor assert((_forcedWidth > 0) && (_forcedHeight > 0)); unload(); - _stream = &stream; + _stream = stream; _stream->seek(0); @@ -564,10 +564,10 @@ bool Imd::loadFrameTables(uint32 framesPosPos, uint32 framesCoordsPos) { return true; } -bool Imd::load(Common::SeekableReadStream &stream) { +bool Imd::load(Common::SeekableReadStream *stream) { unload(); - _stream = &stream; + _stream = stream; uint16 handle; @@ -1656,10 +1656,10 @@ void Vmd::readExtraData() { } } -bool Vmd::load(Common::SeekableReadStream &stream) { +bool Vmd::load(Common::SeekableReadStream *stream) { unload(); - _stream = &stream; + _stream = stream; uint16 headerLength; uint16 handle; diff --git a/graphics/video/coktelvideo/coktelvideo.h b/graphics/video/coktelvideo/coktelvideo.h index 8fbd861e82..f8b1965f41 100644 --- a/graphics/video/coktelvideo/coktelvideo.h +++ b/graphics/video/coktelvideo/coktelvideo.h @@ -23,12 +23,8 @@ * */ -// Currently, only GOB and SCI32 games play IMDs and VMDs, so skip compiling if GOB and SCI32 is disabled. -#if !(defined(ENABLE_GOB) || defined(ENABLE_SCI32) || defined(DYNAMIC_MODULES)) - -// Do not compile the CoktelVideo code - -#else +// Currently, only GOB and SCI32 games play IMDs and VMDs +#if defined(ENABLE_GOB) || defined(ENABLE_SCI32) || defined(DYNAMIC_MODULES) #ifndef GRAPHICS_VIDEO_COKTELVIDEO_H #define GRAPHICS_VIDEO_COKTELVIDEO_H @@ -153,7 +149,7 @@ public: virtual Common::MemoryReadStream *getExtraData(const char *fileName) = 0; /** Load a video out of a stream. */ - virtual bool load(Common::SeekableReadStream &stream) = 0; + virtual bool load(Common::SeekableReadStream *stream) = 0; /** Unload the currently loaded video. */ virtual void unload() = 0; @@ -243,7 +239,7 @@ public: bool hasExtraData(const char *fileName) const; Common::MemoryReadStream *getExtraData(const char *fileName); - bool load(Common::SeekableReadStream &stream); + bool load(Common::SeekableReadStream *stream); void unload(); void setXY(int16 x, int16 y); @@ -322,7 +318,7 @@ public: uint32 getSyncLag() const; - bool load(Common::SeekableReadStream &stream); + bool load(Common::SeekableReadStream *stream); void unload(); void setXY(int16 x, int16 y); @@ -451,7 +447,7 @@ public: bool hasExtraData(const char *fileName) const; Common::MemoryReadStream *getExtraData(const char *fileName); - bool load(Common::SeekableReadStream &stream); + bool load(Common::SeekableReadStream *stream); void unload(); int16 getWidth() const; |