[Scummvm-git-logs] scummvm master -> 08bfca4f9f3cd1087eb5ac4a786579264f87a1de
moralrecordings
code at moral.net.au
Sat Nov 6 05:56:40 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
08bfca4f9f DIRECTOR: Check for movie file extensions on Mac
Commit: 08bfca4f9f3cd1087eb5ac4a786579264f87a1de
https://github.com/scummvm/scummvm/commit/08bfca4f9f3cd1087eb5ac4a786579264f87a1de
Author: Scott Percival (code at moral.net.au)
Date: 2021-11-06T05:56:38Z
Commit Message:
DIRECTOR: Check for movie file extensions on Mac
* DIRECTOR: Check for movie file extensions on Mac
Some Mac games have file extensions for movies, but use
extensionless filenames in the code (e.g. Total Distortion).
* DIRECTOR: LINGO: Add alias for MoveMouse.XObj
Fixes Jungle Park for Mac.
Changed paths:
engines/director/lingo/xlibs/movemousexobj.cpp
engines/director/util.cpp
diff --git a/engines/director/lingo/xlibs/movemousexobj.cpp b/engines/director/lingo/xlibs/movemousexobj.cpp
index a8d35ed3c3..63c051e192 100644
--- a/engines/director/lingo/xlibs/movemousexobj.cpp
+++ b/engines/director/lingo/xlibs/movemousexobj.cpp
@@ -34,6 +34,7 @@ namespace Director {
const char *MoveMouseXObj::xlibName = "MoveMouse";
const char *MoveMouseXObj::fileNames[] = {
"MoveMouse",
+ "MoveMouse.XObj",
"MOVEWIN",
0
};
diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index c9a7916c13..1960f05a78 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -510,28 +510,28 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
// Let's try to translate file path into 8.3 format
Common::String addedexts;
- if (g_director->getPlatform() == Common::kPlatformWindows && g_director->getVersion() < 500) {
- convPath.clear();
- const char *ptr = initialPath.c_str();
- Common::String component;
-
- while (*ptr) {
- if (*ptr == g_director->_dirSeparator) {
- if (component.equals(".")) {
- convPath += component;
- } else {
- convPath += convertMacFilename(component.c_str());
- }
-
- component.clear();
- convPath += g_director->_dirSeparator;
+ convPath.clear();
+ const char *ptr = initialPath.c_str();
+ Common::String component;
+
+ while (*ptr) {
+ if (*ptr == g_director->_dirSeparator) {
+ if (component.equals(".")) {
+ convPath += component;
} else {
- component += *ptr;
+ convPath += convertMacFilename(component.c_str());
}
- ptr++;
+ component.clear();
+ convPath += g_director->_dirSeparator;
+ } else {
+ component += *ptr;
}
+ ptr++;
+ }
+
+ if (g_director->getPlatform() == Common::kPlatformWindows) {
if (hasExtension(component)) {
Common::String nameWithoutExt = component.substr(0, component.size() - 4);
Common::String ext = component.substr(component.size() - 4);
@@ -543,14 +543,11 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
if (testPath(res))
return res;
}
-
- if (addexts)
- addedexts = testExtensions(component, initialPath, convPath);
- } else {
- if (addexts)
- addedexts = testExtensions(initialPath, initialPath, convPath);
}
+ if (addexts)
+ addedexts = testExtensions(component, initialPath, convPath);
+
if (!addedexts.empty()) {
return addedexts;
}
More information about the Scummvm-git-logs
mailing list