From 3bb70ee70c09b1b65310ecc6801216751c9eacfd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 21 Mar 2017 23:38:39 +0100 Subject: DIRECTOR: Lingo: Open '.MMM' files on Windows --- engines/director/lingo/lingo-funcs.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'engines/director') diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 307d79a0a2..0f2110d8f1 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -182,14 +182,15 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { Common::String cleanedFilename; - for (const byte *p = (const byte *)movie.u.s->c_str(); *p; p++) - if (*p >= 0x20 && *p <= 0x7f) - cleanedFilename += (const char) *p; - bool fileExists = false; if (_vm->getPlatform() == Common::kPlatformMacintosh) { Common::MacResManager resMan; + + for (const byte *p = (const byte *)movie.u.s->c_str(); *p; p++) + if (*p >= 0x20 && *p <= 0x7f) + cleanedFilename += (const char) *p; + if (resMan.open(*movie.u.s)) { fileExists = true; cleanedFilename = *movie.u.s; @@ -198,6 +199,8 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { } } else { Common::File file; + cleanedFilename = *movie.u.s + ".MMM"; + if (file.open(*movie.u.s)) { fileExists = true; cleanedFilename = *movie.u.s; -- cgit v1.2.3