[Scummvm-git-logs] scummvm master -> 1c14a1d6ab06d3f3ea07a27f42bbc92bc6cbfe4a
sev-
noreply at scummvm.org
Sun Mar 26 19:59:03 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:
1c14a1d6ab DIRECTOR: LINGO: Added dpwavi and dpwqtw XObject stubs
Commit: 1c14a1d6ab06d3f3ea07a27f42bbc92bc6cbfe4a
https://github.com/scummvm/scummvm/commit/1c14a1d6ab06d3f3ea07a27f42bbc92bc6cbfe4a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-26T21:58:41+02:00
Commit Message:
DIRECTOR: LINGO: Added dpwavi and dpwqtw XObject stubs
Changed paths:
A engines/director/lingo/xlibs/dpwavi.cpp
A engines/director/lingo/xlibs/dpwavi.h
A engines/director/lingo/xlibs/dpwqtw.cpp
A engines/director/lingo/xlibs/dpwqtw.h
engines/director/lingo/lingo-object.cpp
engines/director/lingo/xlibs/darkenscreen.cpp
engines/director/module.mk
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index aba78187dda..1f5f36c93fa 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -45,6 +45,8 @@
#include "director/lingo/xlibs/cdromxobj.h"
#include "director/lingo/xlibs/darkenscreen.h"
#include "director/lingo/xlibs/developerStack.h"
+#include "director/lingo/xlibs/dpwavi.h"
+#include "director/lingo/xlibs/dpwqtw.h"
#include "director/lingo/xlibs/draw.h"
#include "director/lingo/xlibs/ednox.h"
#include "director/lingo/xlibs/fileexists.h"
@@ -160,6 +162,8 @@ static struct XLibProto {
{ CDROMXObj::fileNames, CDROMXObj::open, CDROMXObj::close, kXObj, 200 }, // D2
{ DarkenScreen::fileNames, DarkenScreen::open, DarkenScreen::close, kXObj, 300 }, // D3
{ DeveloperStack::fileNames, DeveloperStack::open, DeveloperStack::close, kXObj, 300 }, // D3
+ { DPwAVI::fileNames, DPwAVI::open, DPwAVI::close, kXObj, 400 }, // D4
+ { DPwQTw::fileNames, DPwQTw::open, DPwQTw::close, kXObj, 400 }, // D4
{ DrawXObj::fileNames, DrawXObj::open, DrawXObj::close, kXObj, 400 }, // D4
{ Ednox::fileNames, Ednox::open, Ednox::close, kXObj, 300 }, // D3
{ FileExists::fileNames, FileExists::open, FileExists::close, kXObj, 300 }, // D3
diff --git a/engines/director/lingo/xlibs/darkenscreen.cpp b/engines/director/lingo/xlibs/darkenscreen.cpp
index 7f33af08aae..e1ff14c739e 100644
--- a/engines/director/lingo/xlibs/darkenscreen.cpp
+++ b/engines/director/lingo/xlibs/darkenscreen.cpp
@@ -58,7 +58,7 @@ void DarkenScreen::close(int type) {
}
void DarkenScreen::m_darkenscreen(int nargs) {
- g_lingo->printSTUBWithArglist("DarkenScreen::m_darkenscreen", nargs);
+ g_lingo->printSTUBWithArglist("DarkenScreen::m_darkenscreen", nargs);
}
} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/dpwavi.cpp b/engines/director/lingo/xlibs/dpwavi.cpp
new file mode 100644
index 00000000000..497428f6f53
--- /dev/null
+++ b/engines/director/lingo/xlibs/dpwavi.cpp
@@ -0,0 +1,94 @@
+/* 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/>.
+ *
+ */
+
+/**
+ * -- AVI External Factory. 02oct92 JT
+ * DPWAVI
+ * X +mStartup -- First time init
+ * X +mQuit -- Major bye bye
+ * XI mNew qtPacket -- create a window
+ * X mDispose -- close and dispose window
+ * XII mVerb msg, qtPacker -- do something
+ *
+ *
+ * USED IN: jman-win
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/dpwavi.h"
+
+
+namespace Director {
+
+// The name is different from the obj filename.
+const char *DPwAVI::xlibName = "dpwavi";
+const char *DPwAVI::fileNames[] = {
+ "dpwavi",
+ nullptr
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", DPwAVI::m_new, 0, 1, 400 }, // D4
+ { "startup", DPwAVI::m_startup, 0, 0, 400 }, // D4
+ { "quit", DPwAVI::m_quit, 0, 0, 400 }, // D4
+ { "verb", DPwAVI::m_verb, 2, 2, 400 }, // D4
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+void DPwAVI::open(int type) {
+ if (type == kXObj) {
+ DPwAVIXObject::initMethods(xlibMethods);
+ DPwAVIXObject *xobj = new DPwAVIXObject(kXObj);
+ g_lingo->exposeXObject(xlibName, xobj);
+ }
+}
+
+void DPwAVI::close(int type) {
+ if (type == kXObj) {
+ DPwAVIXObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+ }
+}
+
+
+DPwAVIXObject::DPwAVIXObject(ObjectType ObjectType) : Object<DPwAVIXObject>("dpwavi") {
+ _objType = ObjectType;
+}
+
+void DPwAVI::m_new(int nargs) {
+ g_lingo->push(g_lingo->_state->me);
+}
+
+void DPwAVI::m_startup(int nargs) {
+ // no op
+}
+
+void DPwAVI::m_quit(int nargs) {
+ // no op
+}
+
+void DPwAVI::m_verb(int nargs) {
+ g_lingo->printSTUBWithArglist("DPwAVI::m_verb", nargs);
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/dpwavi.h b/engines/director/lingo/xlibs/dpwavi.h
new file mode 100644
index 00000000000..846cc54ecba
--- /dev/null
+++ b/engines/director/lingo/xlibs/dpwavi.h
@@ -0,0 +1,49 @@
+/* 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_DPWAVI_H
+#define DIRECTOR_LINGO_XLIBS_DPWAVI_H
+
+namespace Director {
+
+class DPwAVIXObject : public Object<DPwAVIXObject> {
+public:
+ DPwAVIXObject(ObjectType objType);
+};
+
+namespace DPwAVI {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_startup(int nargs);
+void m_quit(int nargs);
+void m_verb(int nargs);
+
+} // End of namespace DPwAVI
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xlibs/dpwqtw.cpp b/engines/director/lingo/xlibs/dpwqtw.cpp
new file mode 100644
index 00000000000..7019da4716c
--- /dev/null
+++ b/engines/director/lingo/xlibs/dpwqtw.cpp
@@ -0,0 +1,93 @@
+/* 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/>.
+ *
+ */
+
+/**
+ * -- QuickTime for Windows Player External Factory. 02oct92 JT
+ * DPWQTW
+ * X +mStartup -- First time init
+ * X +mQuit -- Major bye bye
+ * XI mNew qtPacket -- create a window
+ * X mDispose -- close and dispose window
+ * XII mVerb msg, qtPacker -- do something
+ *
+ * USED IN: jman-win
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/dpwqtw.h"
+
+
+namespace Director {
+
+// The name is different from the obj filename.
+const char *DPwQTw::xlibName = "dpwqtw";
+const char *DPwQTw::fileNames[] = {
+ "dpwqtw",
+ nullptr
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", DPwQTw::m_new, 0, 1, 400 }, // D4
+ { "startup", DPwQTw::m_startup, 0, 0, 400 }, // D4
+ { "quit", DPwQTw::m_quit, 0, 0, 400 }, // D4
+ { "verb", DPwQTw::m_verb, 2, 2, 400 }, // D4
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+void DPwQTw::open(int type) {
+ if (type == kXObj) {
+ DPwQTwXObject::initMethods(xlibMethods);
+ DPwQTwXObject *xobj = new DPwQTwXObject(kXObj);
+ g_lingo->exposeXObject(xlibName, xobj);
+ }
+}
+
+void DPwQTw::close(int type) {
+ if (type == kXObj) {
+ DPwQTwXObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+ }
+}
+
+
+DPwQTwXObject::DPwQTwXObject(ObjectType ObjectType) : Object<DPwQTwXObject>("dpwqtw") {
+ _objType = ObjectType;
+}
+
+void DPwQTw::m_new(int nargs) {
+ g_lingo->push(g_lingo->_state->me);
+}
+
+void DPwQTw::m_startup(int nargs) {
+ // no op
+}
+
+void DPwQTw::m_quit(int nargs) {
+ // no op
+}
+
+void DPwQTw::m_verb(int nargs) {
+ g_lingo->printSTUBWithArglist("DPwQTw::m_verb", nargs);
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/dpwqtw.h b/engines/director/lingo/xlibs/dpwqtw.h
new file mode 100644
index 00000000000..a1ac4830f14
--- /dev/null
+++ b/engines/director/lingo/xlibs/dpwqtw.h
@@ -0,0 +1,49 @@
+/* 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_DPWQTW_H
+#define DIRECTOR_LINGO_XLIBS_DPWQTW_H
+
+namespace Director {
+
+class DPwQTwXObject : public Object<DPwQTwXObject> {
+public:
+ DPwQTwXObject(ObjectType objType);
+};
+
+namespace DPwQTw {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_startup(int nargs);
+void m_quit(int nargs);
+void m_verb(int nargs);
+
+} // End of namespace DPwQTw
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index b27ee30d89d..c3fb86a53fa 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -50,6 +50,8 @@ MODULE_OBJS = \
lingo/xlibs/cdromxobj.o \
lingo/xlibs/darkenscreen.o \
lingo/xlibs/developerStack.o \
+ lingo/xlibs/dpwavi.o \
+ lingo/xlibs/dpwqtw.o \
lingo/xlibs/draw.o \
lingo/xlibs/ednox.o \
lingo/xlibs/fileexists.o \
More information about the Scummvm-git-logs
mailing list