From 409ce79a35131d8538e3100e499366e43ae15d02 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 13 Dec 2014 03:42:07 +0200 Subject: ZVISION: Rename RlfAnimation -> RLFDecoder --- engines/zvision/animation/meta_animation.cpp | 2 +- engines/zvision/animation/meta_animation.h | 4 ++-- engines/zvision/animation/rlf_animation.cpp | 26 +++++++++++++------------- engines/zvision/animation/rlf_animation.h | 10 +++++----- engines/zvision/zvision.h | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'engines/zvision') diff --git a/engines/zvision/animation/meta_animation.cpp b/engines/zvision/animation/meta_animation.cpp index 857a0dd688..5a8dba6b9d 100644 --- a/engines/zvision/animation/meta_animation.cpp +++ b/engines/zvision/animation/meta_animation.cpp @@ -44,7 +44,7 @@ MetaAnimation::MetaAnimation(const Common::String &fileName, ZVision *engine) if (tmpFileName.hasSuffix(".rlf")) { _fileType = RLF; Common::File *_file = engine->getSearchManager()->openFile(tmpFileName); - _animation.rlf = new RlfAnimation(_file, false); + _animation.rlf = new RLFDecoder(_file, false); _frmDelay = _animation.rlf->frameTime(); } else if (tmpFileName.hasSuffix(".avi")) { _fileType = AVI; diff --git a/engines/zvision/animation/meta_animation.h b/engines/zvision/animation/meta_animation.h index 93b69587c4..6d2025b2cf 100644 --- a/engines/zvision/animation/meta_animation.h +++ b/engines/zvision/animation/meta_animation.h @@ -43,7 +43,7 @@ struct Surface; namespace ZVision { class ZVision; -class RlfAnimation; +class RLFDecoder; class MetaAnimation { public: @@ -69,7 +69,7 @@ private: private: union { - RlfAnimation *rlf; + RLFDecoder *rlf; Video::VideoDecoder *avi; } _animation; diff --git a/engines/zvision/animation/rlf_animation.cpp b/engines/zvision/animation/rlf_animation.cpp index d9b8fa3894..eaf08a79f9 100644 --- a/engines/zvision/animation/rlf_animation.cpp +++ b/engines/zvision/animation/rlf_animation.cpp @@ -34,7 +34,7 @@ namespace ZVision { -RlfAnimation::RlfAnimation(const Common::String &fileName, bool stream) +RLFDecoder::RLFDecoder(const Common::String &fileName, bool stream) : _stream(stream), _readStream(NULL), _lastFrameRead(0), @@ -72,7 +72,7 @@ RlfAnimation::RlfAnimation(const Common::String &fileName, bool stream) } } -RlfAnimation::RlfAnimation(Common::SeekableReadStream *rstream, bool stream) +RLFDecoder::RLFDecoder(Common::SeekableReadStream *rstream, bool stream) : _stream(stream), _readStream(rstream), _lastFrameRead(0), @@ -102,7 +102,7 @@ RlfAnimation::RlfAnimation(Common::SeekableReadStream *rstream, bool stream) } } -RlfAnimation::~RlfAnimation() { +RLFDecoder::~RLFDecoder() { for (uint i = 0; i < _frameCount; ++i) { delete[] _frames[i].encodedData; } @@ -111,7 +111,7 @@ RlfAnimation::~RlfAnimation() { _currentFrameBuffer.free(); } -bool RlfAnimation::readHeader() { +bool RLFDecoder::readHeader() { if (_readStream->readUint32BE() != MKTAG('F', 'E', 'L', 'R')) { return false; } @@ -160,8 +160,8 @@ bool RlfAnimation::readHeader() { return true; } -RlfAnimation::Frame RlfAnimation::readNextFrame() { - RlfAnimation::Frame frame; +RLFDecoder::Frame RLFDecoder::readNextFrame() { + RLFDecoder::Frame frame; _readStream->readUint32BE(); // Magic number MARF uint32 size = _readStream->readUint32LE(); // Size @@ -188,7 +188,7 @@ RlfAnimation::Frame RlfAnimation::readNextFrame() { return frame; } -void RlfAnimation::seekToFrame(int frameNumber) { +void RLFDecoder::seekToFrame(int frameNumber) { assert(!_stream); assert(frameNumber < (int)_frameCount || frameNumber >= -1); @@ -228,7 +228,7 @@ void RlfAnimation::seekToFrame(int frameNumber) { _nextFrame = frameNumber; } -const Graphics::Surface *RlfAnimation::getFrameData(uint frameNumber) { +const Graphics::Surface *RLFDecoder::getFrameData(uint frameNumber) { assert(!_stream); assert(frameNumber < _frameCount); @@ -244,7 +244,7 @@ const Graphics::Surface *RlfAnimation::getFrameData(uint frameNumber) { return decodeNextFrame(); } -const Graphics::Surface *RlfAnimation::decodeNextFrame() { +const Graphics::Surface *RLFDecoder::decodeNextFrame() { assert(_nextFrame < (int)_frameCount); if (_stream) { @@ -257,7 +257,7 @@ const Graphics::Surface *RlfAnimation::decodeNextFrame() { return &_currentFrameBuffer; } -void RlfAnimation::applyFrameToCurrent(uint frameNumber) { +void RLFDecoder::applyFrameToCurrent(uint frameNumber) { if (_frames[frameNumber].type == Masked) { decodeMaskedRunLengthEncoding(_frames[frameNumber].encodedData, (int8 *)_currentFrameBuffer.getPixels(), _frames[frameNumber].encodedSize, _frameBufferByteSize); } else if (_frames[frameNumber].type == Simple) { @@ -265,7 +265,7 @@ void RlfAnimation::applyFrameToCurrent(uint frameNumber) { } } -void RlfAnimation::applyFrameToCurrent(const RlfAnimation::Frame &frame) { +void RLFDecoder::applyFrameToCurrent(const RLFDecoder::Frame &frame) { if (frame.type == Masked) { decodeMaskedRunLengthEncoding(frame.encodedData, (int8 *)_currentFrameBuffer.getPixels(), frame.encodedSize, _frameBufferByteSize); } else if (frame.type == Simple) { @@ -273,7 +273,7 @@ void RlfAnimation::applyFrameToCurrent(const RlfAnimation::Frame &frame) { } } -void RlfAnimation::decodeMaskedRunLengthEncoding(int8 *source, int8 *dest, uint32 sourceSize, uint32 destSize) const { +void RLFDecoder::decodeMaskedRunLengthEncoding(int8 *source, int8 *dest, uint32 sourceSize, uint32 destSize) const { uint32 sourceOffset = 0; uint32 destOffset = 0; int16 numberOfCopy = 0; @@ -320,7 +320,7 @@ void RlfAnimation::decodeMaskedRunLengthEncoding(int8 *source, int8 *dest, uint3 } } -void RlfAnimation::decodeSimpleRunLengthEncoding(int8 *source, int8 *dest, uint32 sourceSize, uint32 destSize) const { +void RLFDecoder::decodeSimpleRunLengthEncoding(int8 *source, int8 *dest, uint32 sourceSize, uint32 destSize) const { uint32 sourceOffset = 0; uint32 destOffset = 0; int16 numberOfCopy = 0; diff --git a/engines/zvision/animation/rlf_animation.h b/engines/zvision/animation/rlf_animation.h index c8b2930676..62fa6099bf 100644 --- a/engines/zvision/animation/rlf_animation.h +++ b/engines/zvision/animation/rlf_animation.h @@ -33,11 +33,11 @@ class String; namespace ZVision { -class RlfAnimation { +class RLFDecoder { public: - RlfAnimation(const Common::String &fileName, bool stream = true); - RlfAnimation(Common::SeekableReadStream *rstream, bool stream); - ~RlfAnimation(); + RLFDecoder(const Common::String &fileName, bool stream = true); + RLFDecoder(Common::SeekableReadStream *rstream, bool stream); + ~RLFDecoder(); private: enum EncodingType { @@ -143,7 +143,7 @@ private: * * @param frame A Frame object to apply to _currentFrameBuffer */ - void applyFrameToCurrent(const RlfAnimation::Frame &frame); + void applyFrameToCurrent(const RLFDecoder::Frame &frame); /** * Decode frame data that uses masked run length encoding. This is the encoding diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 5850bf66cd..891f9a9a0f 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -50,7 +50,7 @@ class RenderManager; class CursorManager; class StringManager; class SaveManager; -class RlfAnimation; +class RLFDecoder; class MenuHandler; class TextRenderer; class Subtitle; -- cgit v1.2.3