From 4a454ed763c24f94062be5dd57f43e0a84c1b0a2 Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Tue, 4 Feb 2014 08:32:02 +0700 Subject: ZVISION: New search manager for handle right handle for ZIX-files. --- engines/zvision/meta_animation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/zvision/meta_animation.cpp') diff --git a/engines/zvision/meta_animation.cpp b/engines/zvision/meta_animation.cpp index 430b1436cb..33ae92a523 100644 --- a/engines/zvision/meta_animation.cpp +++ b/engines/zvision/meta_animation.cpp @@ -37,17 +37,19 @@ namespace ZVision { -MetaAnimation::MetaAnimation(const Common::String &fileName) +MetaAnimation::MetaAnimation(const Common::String &fileName, ZVision *engine) : _fileType(RLF), _cur_frame(NULL) { if (fileName.hasSuffix(".rlf")) { _fileType = RLF; - _animation.rlf = new RlfAnimation(fileName, false); + Common::File *_file = engine->getSearchManager()->openFile(fileName); + _animation.rlf = new RlfAnimation(_file, false); _frmDelay = _animation.rlf->frameTime(); } else if (fileName.hasSuffix(".avi")) { _fileType = AVI; + Common::File *_file = engine->getSearchManager()->openFile(fileName); _animation.avi = new ZorkAVIDecoder(); - _animation.avi->loadFile(fileName); + _animation.avi->loadStream(_file); _frmDelay = 1000.0 / _animation.avi->getDuration().framerate(); } else { warning("Unrecognized animation file type: %s", fileName.c_str()); -- cgit v1.2.3