aboutsummaryrefslogtreecommitdiff
path: root/image/codecs/truemotion1.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2014-02-27 21:27:24 -0500
committerMatthew Hoops2014-02-28 00:27:37 -0500
commit08ea14a8d0e1a1478d1f486edeecea3e619e0cd0 (patch)
tree54e46574c82d1aa95c4cca2a16e31faae2e34aea /image/codecs/truemotion1.cpp
parente6717aaf43c7a25d426502a6d5d7028d50aab255 (diff)
downloadscummvm-rg350-08ea14a8d0e1a1478d1f486edeecea3e619e0cd0.tar.gz
scummvm-rg350-08ea14a8d0e1a1478d1f486edeecea3e619e0cd0.tar.bz2
scummvm-rg350-08ea14a8d0e1a1478d1f486edeecea3e619e0cd0.zip
IMAGE: Make Codec take a stream reference; change function name to decodeFrame
Diffstat (limited to 'image/codecs/truemotion1.cpp')
-rw-r--r--image/codecs/truemotion1.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/image/codecs/truemotion1.cpp b/image/codecs/truemotion1.cpp
index 3b8ad85606..1302d72e2f 100644
--- a/image/codecs/truemotion1.cpp
+++ b/image/codecs/truemotion1.cpp
@@ -163,9 +163,9 @@ void TrueMotion1Decoder::genVectorTable16(const byte *selVectorTable) {
}
}
-void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream *stream) {
- _buf = new byte[stream->size()];
- stream->read(_buf, stream->size());
+void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream &stream) {
+ _buf = new byte[stream.size()];
+ stream.read(_buf, stream.size());
byte headerBuffer[128]; // logical maximum size of the header
const byte *selVectorTable;
@@ -243,7 +243,7 @@ void TrueMotion1Decoder::decodeHeader(Common::SeekableReadStream *stream) {
_indexStream = _mbChangeBits + _mbChangeBitsRowSize * (_height >> 2);
}
- _indexStreamSize = stream->size() - (_indexStream - _buf);
+ _indexStreamSize = stream.size() - (_indexStream - _buf);
_lastDeltaset = _header.deltaset;
_lastVectable = _header.vectable;
@@ -397,7 +397,7 @@ void TrueMotion1Decoder::decode16() {
}
}
-const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
+const Graphics::Surface *TrueMotion1Decoder::decodeFrame(Common::SeekableReadStream &stream) {
decodeHeader(stream);
if (compressionTypes[_header.compression].algorithm == ALGO_NOP) {