[Scummvm-git-logs] scummvm master -> dbda3574ccc0f718d9cbf886fe0826c2f954d3d1
mistydemeo
noreply at scummvm.org
Mon Jun 12 00:55:23 UTC 2023
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:
dbda3574cc DIRECTOR: add second movutils name, method
Commit: dbda3574ccc0f718d9cbf886fe0826c2f954d3d1
https://github.com/scummvm/scummvm/commit/dbda3574ccc0f718d9cbf886fe0826c2f954d3d1
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-06-11T17:25:22-07:00
Commit Message:
DIRECTOR: add second movutils name, method
This is loaded as `MovieUtilities` in Momi no Ki no Shita de, which
also makes use of the getSystemPath method.
Other methods not implemented since they're not used on this disc.
Changed paths:
engines/director/lingo/xlibs/movutils.cpp
engines/director/lingo/xlibs/movutils.h
diff --git a/engines/director/lingo/xlibs/movutils.cpp b/engines/director/lingo/xlibs/movutils.cpp
index df5fa9ce173..06cbae5b215 100644
--- a/engines/director/lingo/xlibs/movutils.cpp
+++ b/engines/director/lingo/xlibs/movutils.cpp
@@ -23,6 +23,7 @@
*
* USED IN:
* Gahan Wilson's Ultimate Haunted House
+ * Momi no Ki no Shita de: The Day of St. Claus
*
*************************************/
@@ -99,14 +100,22 @@
namespace Director {
-const char *MovUtilsXObj::xlibName = "movutils";
+const char *MovUtilsXObj::xlibNames[] = {
+ "movutils",
+ "MovieUtilities",
+ nullptr
+};
+
const char *MovUtilsXObj::fileNames[] = {
"MOVUTILS",
+ "MovieUtilities",
+ "MovieUtilities.XObj",
nullptr
};
static MethodProto xlibMethods[] = {
- { "new", MovUtilsXObj::m_new, 0, 0, 400 }, // D4
+ { "new", MovUtilsXObj::m_new, 0, 0, 400 }, // D4
+ { "getSystemPath", MovUtilsXObj::m_getsystempath, 0, 0, 400 }, // D4
{ nullptr, nullptr, 0, 0, 0 }
};
@@ -114,14 +123,18 @@ void MovUtilsXObj::open(int type) {
if (type == kXObj) {
MovieUtilsXObject::initMethods(xlibMethods);
MovieUtilsXObject *xobj = new MovieUtilsXObject(kXObj);
- g_lingo->exposeXObject(xlibName, xobj);
+ for (uint i = 0; xlibNames[i]; i++) {
+ g_lingo->exposeXObject(xlibNames[i], xobj);
+ }
}
}
void MovUtilsXObj::close(int type) {
if (type == kXObj) {
MovieUtilsXObject::cleanupMethods();
- g_lingo->_globalvars[xlibName] = Datum();
+ for (uint i = 0; xlibNames[i]; i++) {
+ g_lingo->_globalvars[xlibNames[i]] = Datum();
+ }
}
}
@@ -134,4 +147,11 @@ void MovUtilsXObj::m_new(int nargs) {
g_lingo->push(g_lingo->_state->me);
}
+void MovUtilsXObj::m_getsystempath(int nargs) {
+ g_lingo->dropStack(nargs);
+ // An empty string ensures this just maps to the root of
+ // ScummVM's save data path.
+ g_lingo->push(Datum(""));
+}
+
} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/movutils.h b/engines/director/lingo/xlibs/movutils.h
index 9ac217ec832..3dc1f04d867 100644
--- a/engines/director/lingo/xlibs/movutils.h
+++ b/engines/director/lingo/xlibs/movutils.h
@@ -32,7 +32,7 @@ public:
namespace MovUtilsXObj {
-extern const char *xlibName;
+extern const char *xlibNames[];
extern const char *fileNames[];
void open(int type);
@@ -40,6 +40,7 @@ void close(int type);
void m_new(int nargs);
void m_clear(int nargs);
+void m_getsystempath(int nargs);
} // End of namespace MovUtilsXObj
More information about the Scummvm-git-logs
mailing list