From 78552afdae3b7b27845d7ea4d2c2638fa3182333 Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Tue, 9 Sep 2014 12:31:11 +0700 Subject: ZVISION: Check .avi and .rlf suffix only in MetaAnimation. --- engines/zvision/animation/meta_animation.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/zvision/animation/meta_animation.cpp') diff --git a/engines/zvision/animation/meta_animation.cpp b/engines/zvision/animation/meta_animation.cpp index 38f56699bb..1ea6df6481 100644 --- a/engines/zvision/animation/meta_animation.cpp +++ b/engines/zvision/animation/meta_animation.cpp @@ -40,14 +40,16 @@ namespace ZVision { MetaAnimation::MetaAnimation(const Common::String &fileName, ZVision *engine) : _fileType(RLF), _cur_frame(NULL) { - if (fileName.hasSuffix(".rlf")) { + Common::String tmpFileName = fileName; + tmpFileName.toLowercase(); + if (tmpFileName.hasSuffix(".rlf")) { _fileType = RLF; - Common::File *_file = engine->getSearchManager()->openFile(fileName); + Common::File *_file = engine->getSearchManager()->openFile(tmpFileName); _animation.rlf = new RlfAnimation(_file, false); _frmDelay = _animation.rlf->frameTime(); - } else if (fileName.hasSuffix(".avi")) { + } else if (tmpFileName.hasSuffix(".avi")) { _fileType = AVI; - Common::File *_file = engine->getSearchManager()->openFile(fileName); + Common::File *_file = engine->getSearchManager()->openFile(tmpFileName); _animation.avi = new ZorkAVIDecoder(); _animation.avi->loadStream(_file); _frmDelay = 1000.0 / _animation.avi->getDuration().framerate(); -- cgit v1.2.3