aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorFilippos Karapetis2014-12-13 03:42:07 +0200
committerFilippos Karapetis2014-12-16 01:58:53 +0200
commit409ce79a35131d8538e3100e499366e43ae15d02 (patch)
treec0edbd9bd23cba9ef55a2fda0ce86e8aff778fbe /engines/zvision
parent4e20a93931685c5a5e37a869c6ef57ed9f78aa83 (diff)
downloadscummvm-rg350-409ce79a35131d8538e3100e499366e43ae15d02.tar.gz
scummvm-rg350-409ce79a35131d8538e3100e499366e43ae15d02.tar.bz2
scummvm-rg350-409ce79a35131d8538e3100e499366e43ae15d02.zip
ZVISION: Rename RlfAnimation -> RLFDecoder
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/animation/meta_animation.cpp2
-rw-r--r--engines/zvision/animation/meta_animation.h4
-rw-r--r--engines/zvision/animation/rlf_animation.cpp26
-rw-r--r--engines/zvision/animation/rlf_animation.h10
-rw-r--r--engines/zvision/zvision.h2
5 files changed, 22 insertions, 22 deletions
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;