[Scummvm-git-logs] scummvm master -> 9dd8922a8dc9e5591e4cb35622593724362c35c8

mistydemeo noreply at scummvm.org
Fri Aug 18 05:00:58 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b51c1004a4 DIRECTOR: add willywabbit2
9dd8922a8d DIRECTOR: add Misc xlib


Commit: b51c1004a4ca04667c6395aa37aee08df0bff42c
    https://github.com/scummvm/scummvm/commit/b51c1004a4ca04667c6395aa37aee08df0bff42c
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-08-17T22:00:49-07:00

Commit Message:
DIRECTOR: add willywabbit2

Changed paths:
    engines/director/detection_tables.h


diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index e90be611160..cecea9ac493 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -468,6 +468,7 @@ static const PlainGameDescriptor directorGames[] = {
 	{ "warlock",			"Spaceship Warlock" },
 	{ "wiggles1",			"A Day with the Wiggles" },
 	{ "willywabbit",		"Willy Wabbit & His Magical Books" },
+	{ "willywabbit2",		"Around the World With Willy Wabbit" },
 	{ "willywabbitmosaic",	"Mosaic Game" },
 	{ "winniewitch",		"Winnie the Witch" },
 	{ "wishbone", 			"Wishbone and the Amazing Odyssey" },
@@ -5548,6 +5549,10 @@ static const DirectorGameDescription gameDescriptions[] = {
 	// Windows version is D3
 	MACGAME1t("willywabbit", "North American release", "Willy Wabbit(Click me)", "04e5a9a6c98f48aaef7fe7115b3606ca", 304029, 400),
 
+	// Released on two discs, sold separately or bundled together
+	WINGAME1t_l("willywabbit2", "Around the World", "ATWMAIN.EXE", "34c63cc23bb4987a054bdf8c378b2fc9", 1342511, Common::JA_JPN, 404),
+	WINGAME1t_l("willywabbit2", "Game Pack", "ATWGAME.EXE", "79c57e89e0beb4f8f2bd1ef5cc5ad5d1", 1325755, Common::JA_JPN, 404),
+
 	// Free download from SEC's website:
 	// https://web.archive.org/web/19970109103231/http://www.sec.com.sg/freegame.htm
 	// Just calls itself "Mosaic Game" in-game, but is based on


Commit: 9dd8922a8dc9e5591e4cb35622593724362c35c8
    https://github.com/scummvm/scummvm/commit/9dd8922a8dc9e5591e4cb35622593724362c35c8
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-08-17T22:00:49-07:00

Commit Message:
DIRECTOR: add Misc xlib

This is used in Around the World With Willy Wabbit (SEC Multimedia).

Changed paths:
  A engines/director/lingo/xlibs/misc.cpp
  A engines/director/lingo/xlibs/misc.h
    engines/director/lingo/lingo-object.cpp
    engines/director/module.mk


diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 296eb24c3a6..ab9f2fe8ae9 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -65,6 +65,7 @@
 #include "director/lingo/xlibs/labeldrvxobj.h"
 #include "director/lingo/xlibs/maniacbg.h"
 #include "director/lingo/xlibs/memoryxobj.h"
+#include "director/lingo/xlibs/misc.h"
 #include "director/lingo/xlibs/miscx.h"
 #include "director/lingo/xlibs/moovxobj.h"
 #include "director/lingo/xlibs/movemousexobj.h"
@@ -197,6 +198,7 @@ static struct XLibProto {
 	{ LabelDrvXObj::fileNames,			LabelDrvXObj::open,			LabelDrvXObj::close,		kXObj,					400 },	// D4
 	{ ManiacBgXObj::fileNames,			ManiacBgXObj::open,			ManiacBgXObj::close,			kXObj,				300 },	// D3
 	{ MemoryXObj::fileNames,			MemoryXObj::open,			MemoryXObj::close,			kXObj,					300 },	// D3
+	{ Misc::fileNames,					Misc::open,				Misc::close,				kXObj,					400 },	// D4
 	{ MiscX::fileNames,					MiscX::open,				MiscX::close,				kXObj,					400 },	// D4
 	{ MoovXObj::fileNames, 				MoovXObj::open, 			MoovXObj::close,			kXObj,					300 },  // D3
 	{ MoveMouseXObj::fileNames,			MoveMouseXObj::open,		MoveMouseXObj::close,		kXObj,					400 },	// D4
diff --git a/engines/director/lingo/xlibs/misc.cpp b/engines/director/lingo/xlibs/misc.cpp
new file mode 100644
index 00000000000..6f97eb3e0b6
--- /dev/null
+++ b/engines/director/lingo/xlibs/misc.cpp
@@ -0,0 +1,98 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*************************************
+ *
+ * USED IN:
+ * Around the World With Willy Wabbit
+ *
+ *************************************/
+
+#include "common/formats/ini-file.h"
+#include "director/director.h"
+#include "director/window.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/misc.h"
+
+namespace Director {
+
+const char *Misc::xlibName = "misc";
+const char *Misc::fileNames[] = {
+    "misc",
+    nullptr
+};
+
+static MethodProto xlibMethods[] = {
+    { "getProfileString",    Misc::m_getProfileString,   3, 3,  400 },
+    { "isFilePresent",       Misc::m_isFilePresent,      1, 1,  400 },
+    { nullptr, nullptr, 0, 0, 0 }
+};
+
+void Misc::open(int type) {
+    if (type == kXObj) {
+        MiscObject::initMethods(xlibMethods);
+        MiscObject *xobj = new MiscObject(kXObj);
+        g_lingo->exposeXObject(xlibName, xobj);
+    }
+}
+
+void Misc::close(int type) {
+    if (type == kXObj) {
+        MiscObject::cleanupMethods();
+        g_lingo->_globalvars[xlibName] = Datum();
+    }
+}
+
+MiscObject::MiscObject(ObjectType ObjectType) :Object<MiscObject>("Misc") {
+    _objType = ObjectType;
+}
+
+void Misc::m_getProfileString(int nargs) {
+    Common::String file = g_lingo->pop().asString();
+    Common::Path filePath = findPath(file);
+    Common::INIFile config;
+    config.loadFromFile(filePath.toString());
+
+    Common::String entry = g_lingo->pop().asString();
+    Common::String section = g_lingo->pop().asString();
+
+    Common::String value;
+    if (config.getKey(entry, section, value)) {
+        g_lingo->push(Datum(value));
+    } else {
+        warning("Unable to fetch %s:%s; returning default", section.c_str(), entry.c_str());
+        g_lingo->push(Datum(""));
+    }
+}
+
+void Misc::m_isFilePresent(int nargs) {
+    Common::String filename = g_lingo->pop().asString();
+    Common::Path filePath = findPath(filename);
+    if (filePath.empty()) {
+        g_lingo->push(Datum(0));
+    } else {
+        g_lingo->push(Datum(1));
+    }
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/misc.h b/engines/director/lingo/xlibs/misc.h
new file mode 100644
index 00000000000..2d4e8166c38
--- /dev/null
+++ b/engines/director/lingo/xlibs/misc.h
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_MISC_H
+#define DIRECTOR_LINGO_XLIBS_MISC_H
+
+namespace Director {
+
+class MiscObject : public Object<MiscObject> {
+public:
+    MiscObject(ObjectType objType);
+};
+
+namespace Misc {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void m_getProfileString(int nargs);
+void m_isFilePresent(int nargs);
+
+} // End of namespace Misc
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index c14e717eb65..d2dbf3dcd0c 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -88,6 +88,7 @@ MODULE_OBJS = \
 	lingo/xlibs/labeldrvxobj.o \
 	lingo/xlibs/maniacbg.o \
 	lingo/xlibs/memoryxobj.o \
+	lingo/xlibs/misc.o \
 	lingo/xlibs/miscx.o \
 	lingo/xlibs/moovxobj.o \
 	lingo/xlibs/movemousexobj.o \




More information about the Scummvm-git-logs mailing list