[Scummvm-git-logs] scummvm master -> 97749c5b1b11d284411de501597cec135c7937a3

rvanlaar noreply at scummvm.org
Thu Jun 27 20:36:00 UTC 2024


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:
97749c5b1b DIRECTOR: Add XTRA's for Safecracker


Commit: 97749c5b1b11d284411de501597cec135c7937a3
    https://github.com/scummvm/scummvm/commit/97749c5b1b11d284411de501597cec135c7937a3
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-06-27T22:35:17+02:00

Commit Message:
DIRECTOR: Add XTRA's for Safecracker

Adds stubs for:
- directsound
- keypoll
- qtvrxtra
- timextra

All generated with `director-generate-xobj-stub.py`.

Changed paths:
  A engines/director/lingo/xtras/directsound.cpp
  A engines/director/lingo/xtras/directsound.h
  A engines/director/lingo/xtras/keypoll.cpp
  A engines/director/lingo/xtras/keypoll.h
  A engines/director/lingo/xtras/qtvrxtra.cpp
  A engines/director/lingo/xtras/qtvrxtra.h
  A engines/director/lingo/xtras/timextra.cpp
  A engines/director/lingo/xtras/timextra.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 b35d66d53bd..ecdd2fe0fdb 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -128,7 +128,11 @@
 #include "director/lingo/xlibs/xsoundxfcn.h"
 #include "director/lingo/xlibs/xwin.h"
 #include "director/lingo/xlibs/yasix.h"
+#include "director/lingo/xtras/directsound.h"
+#include "director/lingo/xtras/keypoll.h"
+#include "director/lingo/xtras/qtvrxtra.h"
 #include "director/lingo/xtras/scrnutil.h"
+#include "director/lingo/xtras/timextra.h"
 
 namespace Director {
 
@@ -223,6 +227,7 @@ static struct XLibProto {
 	XLIBDEF(DeveloperStack,		kXObj,			300),	// D3
 	XLIBDEF(DialogsXObj,		kXObj,			400),	// D4
 	XLIBDEF(DirUtilXObj,		kXObj,			400),	// D4
+	XLIBDEF(DirectsoundXtra,	kXtraObj,		500),	// D5
 	XLIBDEF(DrawXObj,			kXObj,			400),	// D4
 	XLIBDEF(Ednox,				kXObj,			300),	// D3
 	XLIBDEF(EventQXObj,			kXObj,			400),	// D4
@@ -251,6 +256,7 @@ static struct XLibProto {
 	XLIBDEF(IsPippin,			kXObj,			400),	// D4
 	XLIBDEF(JITDraw3XObj,		kXObj,			400),	// D4
 	XLIBDEF(JourneyWareXINIXObj,kXObj,			400),	// D4
+	XLIBDEF(KeypollXtra,		kXtraObj,		500),	// D5
 	XLIBDEF(LabelDrvXObj,		kXObj,			400),	// D4
 	XLIBDEF(MMovieXObj,			kXObj,			400),	// D4
 	XLIBDEF(ManiacBgXObj,		kXObj,			300),	// D3
@@ -279,6 +285,7 @@ static struct XLibProto {
 	XLIBDEF(QTCatMoviePlayerXObj,kXObj,			400),	// D4
 	XLIBDEF(QTMovie,			kXObj,			400),	// D4
 	XLIBDEF(QTVR,				kXObj,			400),	// D4
+	XLIBDEF(QtvrxtraXtra,		kXtraObj,		500),	// D5
 	XLIBDEF(Quicktime,			kXObj,			300),	// D3
 	XLIBDEF(RearWindowXObj,		kXObj,			400),	// D4
 	XLIBDEF(RegisterComponent,	kXObj,			400),	// D4
@@ -288,6 +295,7 @@ static struct XLibProto {
 	XLIBDEF(SoundJam,			kXObj,			400),	// D4
 	XLIBDEF(SpaceMgr,			kXObj,			400),	// D4
 	XLIBDEF(StageTCXObj,		kXObj,			400),	// D4
+	XLIBDEF(TimextraXtra,		kXtraObj,		500),	// D5
 	XLIBDEF(UnitTestXObj,		kXObj,			400),	// D4
 	XLIBDEF(VMisOnXFCN,			kXObj,			400),	// D4
 	XLIBDEF(ValkyrieXObj,		kXObj,			400),	// D4
diff --git a/engines/director/lingo/xtras/directsound.cpp b/engines/director/lingo/xtras/directsound.cpp
new file mode 100644
index 00000000000..7b759d1aca7
--- /dev/null
+++ b/engines/director/lingo/xtras/directsound.cpp
@@ -0,0 +1,227 @@
+/* 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/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xtras/directsound.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * safecracker
+ *
+ **************************************************/
+
+/*
+-- xtra DirectSound
+new object me
+--
+-- DirectSound Xtra(tm) version 1.3.
+--
+-- Programmed by Tomer Berda, Hed Arzi - Multimedia.
+-- Copyright 1996.
+--
+* dsOpen
+* dsNewSound string fileName, integer Mode
+* dsDelSound integer ID
+* dsDupSound integer ID
+* dsPlay integer ID
+* dsStop integer ID
+* dsGetSize integer ID
+* dsGetFreq integer ID
+* dsSetFreq integer ID, integer Frequency
+* dsGetVolume integer ID
+* dsSetVolume integer ID, integer Volume
+* dsGetPan integer ID
+* dsSetPan integer ID, integer Pan
+* dsGetPosition integer ID
+* dsSetPosition integer ID, integer Pos
+* dsGetLoop integer ID
+* dsSetLoop integer ID, integer loopFlag
+* dsIsPlaying integer ID
+* dsGetCaps 
+--
+* ds3DOpen
+* ds3DLGetPosition
+* ds3DLSetPosition float X, float Y, float Z
+* ds3DLGetOrientation 
+* ds3DLSetOrientation float xFront,float yFront,float zFront,float xTop,float yTop,float zTop
+* ds3DLGetVelocity 
+* ds3DLSetVelocity float X, float Y, float Z
+* ds3DLGetDopplerFactor
+* ds3DLSetDopplerFactor float DopplerFactor
+* ds3DLGetRolloffFactor
+* ds3DLSetRolloffFactor float RolloffFactor
+--
+* ds3DGetPosition integer ID
+* ds3DSetPosition integer ID,float X,float Y,float Z
+* ds3DGetOrientation integer ID
+* ds3DSetOrientation integer ID, float X, float Y, float Z
+* ds3DGetVelocity integer ID
+* ds3DSetVelocity integer ID,float X,float Y,float Z
+* ds3DGetOutsideVolume integer ID
+* ds3DSetOutsideVolume integer ID, integer Volume
+* ds3DGetAngles integer ID
+* ds3DSetAngles integer ID, integer Inside, integer Outside
+* ds3DGetMaxDistance integer ID
+* ds3DSetMaxDistance integer ID, float MaxDistance
+* ds3DGetMinDistance integer ID
+* ds3DSetMinDistance integer ID, float MinDistance
+* dsClose
+
+ */
+
+namespace Director {
+
+const char *DirectsoundXtra::xlibName = "Directsound";
+const XlibFileDesc DirectsoundXtra::fileNames[] = {
+	{ "directsound",   nullptr },
+	{ nullptr,        nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+	{ "new",				DirectsoundXtra::m_new,		 0, 0,	500 },
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+	{ "dsOpen", DirectsoundXtra::m_dsOpen, 0, 0, 500, HBLTIN },
+	{ "dsNewSound", DirectsoundXtra::m_dsNewSound, 2, 2, 500, HBLTIN },
+	{ "dsDelSound", DirectsoundXtra::m_dsDelSound, 1, 1, 500, HBLTIN },
+	{ "dsDupSound", DirectsoundXtra::m_dsDupSound, 1, 1, 500, HBLTIN },
+	{ "dsPlay", DirectsoundXtra::m_dsPlay, 1, 1, 500, HBLTIN },
+	{ "dsStop", DirectsoundXtra::m_dsStop, 1, 1, 500, HBLTIN },
+	{ "dsGetSize", DirectsoundXtra::m_dsGetSize, 1, 1, 500, HBLTIN },
+	{ "dsGetFreq", DirectsoundXtra::m_dsGetFreq, 1, 1, 500, HBLTIN },
+	{ "dsSetFreq", DirectsoundXtra::m_dsSetFreq, 2, 2, 500, HBLTIN },
+	{ "dsGetVolume", DirectsoundXtra::m_dsGetVolume, 1, 1, 500, HBLTIN },
+	{ "dsSetVolume", DirectsoundXtra::m_dsSetVolume, 2, 2, 500, HBLTIN },
+	{ "dsGetPan", DirectsoundXtra::m_dsGetPan, 1, 1, 500, HBLTIN },
+	{ "dsSetPan", DirectsoundXtra::m_dsSetPan, 2, 2, 500, HBLTIN },
+	{ "dsGetPosition", DirectsoundXtra::m_dsGetPosition, 1, 1, 500, HBLTIN },
+	{ "dsSetPosition", DirectsoundXtra::m_dsSetPosition, 2, 2, 500, HBLTIN },
+	{ "dsGetLoop", DirectsoundXtra::m_dsGetLoop, 1, 1, 500, HBLTIN },
+	{ "dsSetLoop", DirectsoundXtra::m_dsSetLoop, 2, 2, 500, HBLTIN },
+	{ "dsIsPlaying", DirectsoundXtra::m_dsIsPlaying, 1, 1, 500, HBLTIN },
+	{ "dsGetCaps", DirectsoundXtra::m_dsGetCaps, 0, 0, 500, HBLTIN },
+	{ "ds3DOpen", DirectsoundXtra::m_ds3DOpen, 0, 0, 500, HBLTIN },
+	{ "ds3DLGetPosition", DirectsoundXtra::m_ds3DLGetPosition, 0, 0, 500, HBLTIN },
+	{ "ds3DLSetPosition", DirectsoundXtra::m_ds3DLSetPosition, 3, 3, 500, HBLTIN },
+	{ "ds3DLGetOrientation", DirectsoundXtra::m_ds3DLGetOrientation, 0, 0, 500, HBLTIN },
+	{ "ds3DLSetOrientation", DirectsoundXtra::m_ds3DLSetOrientation, 6, 6, 500, HBLTIN },
+	{ "ds3DLGetVelocity", DirectsoundXtra::m_ds3DLGetVelocity, 0, 0, 500, HBLTIN },
+	{ "ds3DLSetVelocity", DirectsoundXtra::m_ds3DLSetVelocity, 3, 3, 500, HBLTIN },
+	{ "ds3DLGetDopplerFactor", DirectsoundXtra::m_ds3DLGetDopplerFactor, 0, 0, 500, HBLTIN },
+	{ "ds3DLSetDopplerFactor", DirectsoundXtra::m_ds3DLSetDopplerFactor, 1, 1, 500, HBLTIN },
+	{ "ds3DLGetRolloffFactor", DirectsoundXtra::m_ds3DLGetRolloffFactor, 0, 0, 500, HBLTIN },
+	{ "ds3DLSetRolloffFactor", DirectsoundXtra::m_ds3DLSetRolloffFactor, 1, 1, 500, HBLTIN },
+	{ "ds3DGetPosition", DirectsoundXtra::m_ds3DGetPosition, 1, 1, 500, HBLTIN },
+	{ "ds3DSetPosition", DirectsoundXtra::m_ds3DSetPosition, 4, 4, 500, HBLTIN },
+	{ "ds3DGetOrientation", DirectsoundXtra::m_ds3DGetOrientation, 1, 1, 500, HBLTIN },
+	{ "ds3DSetOrientation", DirectsoundXtra::m_ds3DSetOrientation, 4, 4, 500, HBLTIN },
+	{ "ds3DGetVelocity", DirectsoundXtra::m_ds3DGetVelocity, 1, 1, 500, HBLTIN },
+	{ "ds3DSetVelocity", DirectsoundXtra::m_ds3DSetVelocity, 4, 4, 500, HBLTIN },
+	{ "ds3DGetOutsideVolume", DirectsoundXtra::m_ds3DGetOutsideVolume, 1, 1, 500, HBLTIN },
+	{ "ds3DSetOutsideVolume", DirectsoundXtra::m_ds3DSetOutsideVolume, 2, 2, 500, HBLTIN },
+	{ "ds3DGetAngles", DirectsoundXtra::m_ds3DGetAngles, 1, 1, 500, HBLTIN },
+	{ "ds3DSetAngles", DirectsoundXtra::m_ds3DSetAngles, 3, 3, 500, HBLTIN },
+	{ "ds3DGetMaxDistance", DirectsoundXtra::m_ds3DGetMaxDistance, 1, 1, 500, HBLTIN },
+	{ "ds3DSetMaxDistance", DirectsoundXtra::m_ds3DSetMaxDistance, 2, 2, 500, HBLTIN },
+	{ "ds3DGetMinDistance", DirectsoundXtra::m_ds3DGetMinDistance, 1, 1, 500, HBLTIN },
+	{ "ds3DSetMinDistance", DirectsoundXtra::m_ds3DSetMinDistance, 2, 2, 500, HBLTIN },
+	{ "dsClose", DirectsoundXtra::m_dsClose, 0, 0, 500, HBLTIN },
+	{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+DirectsoundXtraObject::DirectsoundXtraObject(ObjectType ObjectType) :Object<DirectsoundXtraObject>("Directsound") {
+	_objType = ObjectType;
+}
+
+void DirectsoundXtra::open(ObjectType type, const Common::Path &path) {
+    DirectsoundXtraObject::initMethods(xlibMethods);
+    DirectsoundXtraObject *xobj = new DirectsoundXtraObject(type);
+    g_lingo->exposeXObject(xlibName, xobj);
+    g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void DirectsoundXtra::close(ObjectType type) {
+    DirectsoundXtraObject::cleanupMethods();
+    g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void DirectsoundXtra::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("DirectsoundXtra::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(DirectsoundXtra::m_dsOpen, 0)
+XOBJSTUB(DirectsoundXtra::m_dsNewSound, 0)
+XOBJSTUB(DirectsoundXtra::m_dsDelSound, 0)
+XOBJSTUB(DirectsoundXtra::m_dsDupSound, 0)
+XOBJSTUB(DirectsoundXtra::m_dsPlay, 0)
+XOBJSTUB(DirectsoundXtra::m_dsStop, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetSize, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetFreq, 0)
+XOBJSTUB(DirectsoundXtra::m_dsSetFreq, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetVolume, 0)
+XOBJSTUB(DirectsoundXtra::m_dsSetVolume, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetPan, 0)
+XOBJSTUB(DirectsoundXtra::m_dsSetPan, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_dsSetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetLoop, 0)
+XOBJSTUB(DirectsoundXtra::m_dsSetLoop, 0)
+XOBJSTUB(DirectsoundXtra::m_dsIsPlaying, 0)
+XOBJSTUB(DirectsoundXtra::m_dsGetCaps, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DOpen, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLGetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLSetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLGetOrientation, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLSetOrientation, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLGetVelocity, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLSetVelocity, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLGetDopplerFactor, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLSetDopplerFactor, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLGetRolloffFactor, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DLSetRolloffFactor, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetPosition, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetOrientation, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetOrientation, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetVelocity, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetVelocity, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetOutsideVolume, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetOutsideVolume, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetAngles, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetAngles, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetMaxDistance, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetMaxDistance, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DGetMinDistance, 0)
+XOBJSTUB(DirectsoundXtra::m_ds3DSetMinDistance, 0)
+XOBJSTUB(DirectsoundXtra::m_dsClose, 0)
+
+}
diff --git a/engines/director/lingo/xtras/directsound.h b/engines/director/lingo/xtras/directsound.h
new file mode 100644
index 00000000000..b45cbd34549
--- /dev/null
+++ b/engines/director/lingo/xtras/directsound.h
@@ -0,0 +1,91 @@
+/* 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_XTRAS_DIRECTSOUND_H
+#define DIRECTOR_LINGO_XTRAS_DIRECTSOUND_H
+
+namespace Director {
+
+class DirectsoundXtraObject : public Object<DirectsoundXtraObject> {
+public:
+	DirectsoundXtraObject(ObjectType objType);
+};
+
+namespace DirectsoundXtra {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_dsOpen(int nargs);
+void m_dsNewSound(int nargs);
+void m_dsDelSound(int nargs);
+void m_dsDupSound(int nargs);
+void m_dsPlay(int nargs);
+void m_dsStop(int nargs);
+void m_dsGetSize(int nargs);
+void m_dsGetFreq(int nargs);
+void m_dsSetFreq(int nargs);
+void m_dsGetVolume(int nargs);
+void m_dsSetVolume(int nargs);
+void m_dsGetPan(int nargs);
+void m_dsSetPan(int nargs);
+void m_dsGetPosition(int nargs);
+void m_dsSetPosition(int nargs);
+void m_dsGetLoop(int nargs);
+void m_dsSetLoop(int nargs);
+void m_dsIsPlaying(int nargs);
+void m_dsGetCaps(int nargs);
+void m_ds3DOpen(int nargs);
+void m_ds3DLGetPosition(int nargs);
+void m_ds3DLSetPosition(int nargs);
+void m_ds3DLGetOrientation(int nargs);
+void m_ds3DLSetOrientation(int nargs);
+void m_ds3DLGetVelocity(int nargs);
+void m_ds3DLSetVelocity(int nargs);
+void m_ds3DLGetDopplerFactor(int nargs);
+void m_ds3DLSetDopplerFactor(int nargs);
+void m_ds3DLGetRolloffFactor(int nargs);
+void m_ds3DLSetRolloffFactor(int nargs);
+void m_ds3DGetPosition(int nargs);
+void m_ds3DSetPosition(int nargs);
+void m_ds3DGetOrientation(int nargs);
+void m_ds3DSetOrientation(int nargs);
+void m_ds3DGetVelocity(int nargs);
+void m_ds3DSetVelocity(int nargs);
+void m_ds3DGetOutsideVolume(int nargs);
+void m_ds3DSetOutsideVolume(int nargs);
+void m_ds3DGetAngles(int nargs);
+void m_ds3DSetAngles(int nargs);
+void m_ds3DGetMaxDistance(int nargs);
+void m_ds3DSetMaxDistance(int nargs);
+void m_ds3DGetMinDistance(int nargs);
+void m_ds3DSetMinDistance(int nargs);
+void m_dsClose(int nargs);
+
+} // End of namespace DirectsoundXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/keypoll.cpp b/engines/director/lingo/xtras/keypoll.cpp
new file mode 100644
index 00000000000..8f8770fee02
--- /dev/null
+++ b/engines/director/lingo/xtras/keypoll.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/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xtras/keypoll.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Safecracker
+ *
+ **************************************************/
+
+/*
+-- -- KeyPoll Xtra
+-- by Brian Gray
+-- (c) 1996 Macromedia, Inc.  All Rights Reserved.
+
+xtra KeyPoll
+new object me
+
+-- KeyPoll handlers --
+* bgOneKey integer keyCode -- returns TRUE if key (argument) is down, else FALSE
+* bgAllKeys -- returns a linear list of the keycodes of every key currently down
+
+ */
+
+namespace Director {
+
+const char *KeypollXtra::xlibName = "Keypoll";
+const XlibFileDesc KeypollXtra::fileNames[] = {
+	{ "keypoll",   nullptr },
+	{ nullptr,        nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+	{ "xtra",				KeypollXtra::m_xtra,		 0, 0,	500 },
+	{ "new",				KeypollXtra::m_new,		 0, 0,	500 },
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+	{ "bgOneKey", KeypollXtra::m_bgOneKey, 1, 1, 500, HBLTIN },
+	{ "bgAllKeys", KeypollXtra::m_bgAllKeys, 0, 0, 500, HBLTIN },
+	{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+KeypollXtraObject::KeypollXtraObject(ObjectType ObjectType) :Object<KeypollXtraObject>("Keypoll") {
+	_objType = ObjectType;
+}
+
+void KeypollXtra::open(ObjectType type, const Common::Path &path) {
+    KeypollXtraObject::initMethods(xlibMethods);
+    KeypollXtraObject *xobj = new KeypollXtraObject(type);
+    g_lingo->exposeXObject(xlibName, xobj);
+    g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void KeypollXtra::close(ObjectType type) {
+    KeypollXtraObject::cleanupMethods();
+    g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void KeypollXtra::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("KeypollXtra::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(KeypollXtra::m_xtra, 0)
+XOBJSTUB(KeypollXtra::m_bgOneKey, 0)
+XOBJSTUB(KeypollXtra::m_bgAllKeys, 0)
+
+}
diff --git a/engines/director/lingo/xtras/keypoll.h b/engines/director/lingo/xtras/keypoll.h
new file mode 100644
index 00000000000..f3b0b046806
--- /dev/null
+++ b/engines/director/lingo/xtras/keypoll.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_XTRAS_KEYPOLL_H
+#define DIRECTOR_LINGO_XTRAS_KEYPOLL_H
+
+namespace Director {
+
+class KeypollXtraObject : public Object<KeypollXtraObject> {
+public:
+	KeypollXtraObject(ObjectType objType);
+};
+
+namespace KeypollXtra {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_xtra(int nargs);
+void m_new(int nargs);
+void m_bgOneKey(int nargs);
+void m_bgAllKeys(int nargs);
+
+} // End of namespace KeypollXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
new file mode 100644
index 00000000000..6684d0344eb
--- /dev/null
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -0,0 +1,322 @@
+/* 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/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xtras/qtvrxtra.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Safecracker
+ *
+ **************************************************/
+
+/*
+-- xtra QTVRXtra -- v. 1.0, Copyright 1997 Apple Computer, Inc. All Rights Reserved.
+-- Methods listed as returning |<void> return <void> on error.
+-----------------------------------
+-- Initialization & Finalization --
+-----------------------------------
+new object me
+forget object me -- for Director use only. Invoke by calling me = 0 
++ QTVREnter object xt --> integer (zero on success)  -- Initialize QTVR
++ QTVRExit  object xt                                -- Release QTVR
+-----------------------------------
+-- Methods for any QTVR movie    --
+-----------------------------------
+QTVROpen object me, string filename, string rectStrLTRB, string visibleStr --> string emptyOrError
+  -- visibleStr is ("visible"|"invisible")
+  -- Opens QTVR movie, e.g.: QTVROpen(vrInst, "qtvrtest.mov", "0,0,320,200", "visible")
+  --  (If the movie couldn't be opened, the result is "Error: <message>")
+QTVRClose object me  -- Closes QTVR movie
+QTVRUpdate object me  -- Redraws QTVR movie with latest parameter settings
+QTVRGetQTVRType object me --> string ("QTVRPanorama"|"QTVRObject"|"NotAQTVRType")
+QTVRIdle object me -- Provides idle time to QTVR controller
+QTVRMouseDown object me --> string mouseDownResult|<void>
+QTVRMouseOver object me --> string mouseDownResultOrZero|<void>
+  -- mouseDownResult is a two-token string:
+  -- "pan ,0"             if panning or zooming
+  -- "jump,<newNodeID>"   if the user moved between nodes
+  -- "navg,<hotSpotID>"   if the user selected a 'navg' hot spot
+  -- "stil,<hotSpotID>"   if the user selected a 'stil' hot spot
+  -- "misc,<hotSpotID>"   if the user selected a 'misc' hot spot
+  -- "<type>,<hotSpotID>" if the user selected a custom hot spot
+  -- "undf,<hotSpotID>"   if the user selected an undefined hot spot
+  -- QTVRMouseOver returns "0" if the user did not mouse down, if the cursor
+  -- moved outside the panoramic movie, or if QTVRExitMouseOver was called.
+QTVRGetPanAngle object me --> string floatStr|<void>
+QTVRSetPanAngle object me, string floatOrIntStr
+QTVRGetTiltAngle object me --> string floatStr|<void>
+QTVRSetTiltAngle object me, string floatOrIntStr
+-----------------------------------
+-- Methods for QTVR Panoramas    --
+-----------------------------------
+QTVRGetFOV object me --> string floatStr|<void>
+QTVRSetFOV object me, string floatOrIntStr
+QTVRGetClickLoc object me --> string pointStr|<void>
+QTVRSetClickLoc object me, string pointStr
+  -- clickLoc is the click location in window coordinates
+QTVRGetClickPanAngles object me --> string anglePair|<void>
+  -- returns "<pan>,<tilt>" angle pair
+QTVRGetClickPanLoc object me --> string pointStr|<void>
+  -- clickPanLoc is the click location in panoramic image coordinates
+QTVRGetHotSpotID object me --> integer hotSpotID|<void> -- (0-255)
+QTVRSetHotSpotID object me, integer hotSpotID -- (1-255 sets, 0 resets hotSpotID)
+QTVRGetHotSpotName object me --> string hotSpotName|<void>
+QTVRGetHotSpotType object me --> string hotSpotType|<void>
+QTVRGetHotSpotViewAngles object me --> string angleTriple|<void>
+  -- returns "<pan>,<tilt>,<FOV>" angle triple
+QTVRGetObjectViewAngles object me --> string anglePairOrEmpty|<void>
+  -- returns "<pan>,<tilt>" angle pair; empty if no hot spot of type 'navg' selected
+QTVRGetObjectZoomRect object me --> string rectStr|<void>
+QTVRGetNodeID object me --> integer nodeID|<void>
+QTVRSetNodeID object me, integer nodeID
+QTVRGetNodeName object me --> string nodeName|<void>
+QTVRGetQuality object me --> string floatStr|<void>
+QTVRSetQuality object me, string floatOrIntStr -- (0|1|2|4)
+QTVRGetTransitionMode object me --> string transitionMode|<void>
+QTVRSetTransitionMode object me, string transitionMode
+  -- transitionMode is ("normal"|"swing")
+QTVRGetTransitionSpeed object me --> string floatStr|<void>
+QTVRSetTransitionSpeed object me, string floatOrIntStr
+  -- minimum transition speed is 1.0, 4.0 is typical.
+QTVRGetUpdateMode object me --> string updateMode|<void>
+QTVRSetUpdateMode object me, string updateMode
+  -- updateMode is ("normal"|"updateBoth"|"offscreenOnly"|"fromOffscreen"|"directToScreen")
+  -- NOTE: QTVRGet/SetUpdateMode are functional only on MacOS.
+QTVRGetVisible object me --> integer (non-zero if visible)
+QTVRSetVisible object me, integer booleanInt -- false (0) or true (non-zero)
+  -- NOTE: QTVRGet/SetVisible both work for QTVR Objects as well.
+QTVRGetWarpMode object me --> string warpMode|<void>
+QTVRSetWarpMode object me, string warpMode
+  -- warpMode is ("2"|"1"|"0") for 2-d, 1-d or no warping;
+  -- equivalent to full, partial and no correction in QTVRPlayer
+QTVRCollapseToHotSpotRgn object me
+  -- NOTE: QTVRCollapseToHotSpotRgn is functional only on MacOS.
+-----------------------------------
+-- Methods for QTVR Objects      --
+-----------------------------------
+QTVRZoomOutEffect object me, string startRectStr, string skipFirstFrameBoolean, string clipRectStr
+  -- Rect strings are "<left>,<top>,<bottom>,<right>". Boolean string is ("true"|"false").
+  -- NOTE: QTVRZoomOutEffect is functional only on MacOS.
+QTVRGetColumn object me --> string columnStr
+QTVRSetColumn object me, integer column -- (column >= 0)
+QTVRGetRow object me --> string rowStr|<void>
+QTVRSetRow object me, integer row -- (row >= 0)
+QTVRNudge object me, string direction -- ("up"|"down"|"left"|"right")
+-----------------------------------
+-- Callbacks for QTVR Panoramas  --
+-----------------------------------
+QTVRGetMouseDownHandler object me --> string handlerName|<void>
+QTVRSetMouseDownHandler object me, string handlerName
+QTVRGetMouseOverHandler object me --> string handlerName|<void>
+QTVRSetMouseOverHandler object me, string handlerName
+QTVRGetMouseStillDownHandler object me --> string handlerName|<void>
+QTVRSetMouseStillDownHandler object me, string handlerName
+QTVRGetNodeLeaveHandler object me --> string handlerName|<void>
+QTVRSetNodeLeaveHandler object me, string handlerName
+QTVRGetPanZoomStartHandler object me --> string handlerName|<void>
+QTVRSetPanZoomStartHandler object me, string handlerName
+QTVRGetRolloverHotSpotHandler object me --> string handlerName|<void>
+QTVRSetRolloverHotSpotHandler object me, string handlerName
+QTVRExitMouseOver object me -- returns control to Director from a QTVRMouseOver handler
+QTVRPassMouseDown object me -- passes a MouseDown event to the QTVR controller
+-----------------------------------
+-- Testing for a QTVR movie      --
+-----------------------------------
+IsQTVRMovie object me --> integer (non-zero if the movie is a valid, open QTVR movie)
+
+ */
+
+namespace Director {
+
+const char *QtvrxtraXtra::xlibName = "Qtvrxtra";
+const XlibFileDesc QtvrxtraXtra::fileNames[] = {
+	{ "qtvrxtra",   nullptr },
+	{ nullptr,        nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+	{ "new",				QtvrxtraXtra::m_new,		 0, 0,	500 },
+	{ "forget",				QtvrxtraXtra::m_forget,		 0, 0,	500 },
+	{ "QTVROpen",				QtvrxtraXtra::m_QTVROpen,		 3, 0,	500 },
+	{ "QTVRClose",				QtvrxtraXtra::m_QTVRClose,		 0, 0,	500 },
+	{ "QTVRUpdate",				QtvrxtraXtra::m_QTVRUpdate,		 0, 0,	500 },
+	{ "QTVRGetQTVRType",				QtvrxtraXtra::m_QTVRGetQTVRType,		 0, 0,	500 },
+	{ "QTVRIdle",				QtvrxtraXtra::m_QTVRIdle,		 0, 0,	500 },
+	{ "QTVRMouseDown",				QtvrxtraXtra::m_QTVRMouseDown,		 0, 0,	500 },
+	{ "QTVRMouseOver",				QtvrxtraXtra::m_QTVRMouseOver,		 0, 0,	500 },
+	{ "QTVRGetPanAngle",				QtvrxtraXtra::m_QTVRGetPanAngle,		 0, 0,	500 },
+	{ "QTVRSetPanAngle",				QtvrxtraXtra::m_QTVRSetPanAngle,		 1, 0,	500 },
+	{ "QTVRGetTiltAngle",				QtvrxtraXtra::m_QTVRGetTiltAngle,		 0, 0,	500 },
+	{ "QTVRSetTiltAngle",				QtvrxtraXtra::m_QTVRSetTiltAngle,		 1, 0,	500 },
+	{ "QTVRGetFOV",				QtvrxtraXtra::m_QTVRGetFOV,		 0, 0,	500 },
+	{ "QTVRSetFOV",				QtvrxtraXtra::m_QTVRSetFOV,		 1, 0,	500 },
+	{ "QTVRGetClickLoc",				QtvrxtraXtra::m_QTVRGetClickLoc,		 0, 0,	500 },
+	{ "QTVRSetClickLoc",				QtvrxtraXtra::m_QTVRSetClickLoc,		 1, 0,	500 },
+	{ "QTVRGetClickPanAngles",				QtvrxtraXtra::m_QTVRGetClickPanAngles,		 0, 0,	500 },
+	{ "QTVRGetClickPanLoc",				QtvrxtraXtra::m_QTVRGetClickPanLoc,		 0, 0,	500 },
+	{ "QTVRGetHotSpotID",				QtvrxtraXtra::m_QTVRGetHotSpotID,		 0, 0,	500 },
+	{ "QTVRSetHotSpotID",				QtvrxtraXtra::m_QTVRSetHotSpotID,		 1, 0,	500 },
+	{ "QTVRGetHotSpotName",				QtvrxtraXtra::m_QTVRGetHotSpotName,		 0, 0,	500 },
+	{ "QTVRGetHotSpotType",				QtvrxtraXtra::m_QTVRGetHotSpotType,		 0, 0,	500 },
+	{ "QTVRGetHotSpotViewAngles",				QtvrxtraXtra::m_QTVRGetHotSpotViewAngles,		 0, 0,	500 },
+	{ "QTVRGetObjectViewAngles",				QtvrxtraXtra::m_QTVRGetObjectViewAngles,		 0, 0,	500 },
+	{ "QTVRGetObjectZoomRect",				QtvrxtraXtra::m_QTVRGetObjectZoomRect,		 0, 0,	500 },
+	{ "QTVRGetNodeID",				QtvrxtraXtra::m_QTVRGetNodeID,		 0, 0,	500 },
+	{ "QTVRSetNodeID",				QtvrxtraXtra::m_QTVRSetNodeID,		 1, 0,	500 },
+	{ "QTVRGetNodeName",				QtvrxtraXtra::m_QTVRGetNodeName,		 0, 0,	500 },
+	{ "QTVRGetQuality",				QtvrxtraXtra::m_QTVRGetQuality,		 0, 0,	500 },
+	{ "QTVRSetQuality",				QtvrxtraXtra::m_QTVRSetQuality,		 1, 0,	500 },
+	{ "QTVRGetTransitionMode",				QtvrxtraXtra::m_QTVRGetTransitionMode,		 0, 0,	500 },
+	{ "QTVRSetTransitionMode",				QtvrxtraXtra::m_QTVRSetTransitionMode,		 1, 0,	500 },
+	{ "QTVRGetTransitionSpeed",				QtvrxtraXtra::m_QTVRGetTransitionSpeed,		 0, 0,	500 },
+	{ "QTVRSetTransitionSpeed",				QtvrxtraXtra::m_QTVRSetTransitionSpeed,		 1, 0,	500 },
+	{ "QTVRGetUpdateMode",				QtvrxtraXtra::m_QTVRGetUpdateMode,		 0, 0,	500 },
+	{ "QTVRSetUpdateMode",				QtvrxtraXtra::m_QTVRSetUpdateMode,		 1, 0,	500 },
+	{ "QTVRGetVisible",				QtvrxtraXtra::m_QTVRGetVisible,		 0, 0,	500 },
+	{ "QTVRSetVisible",				QtvrxtraXtra::m_QTVRSetVisible,		 1, 0,	500 },
+	{ "QTVRGetWarpMode",				QtvrxtraXtra::m_QTVRGetWarpMode,		 0, 0,	500 },
+	{ "QTVRSetWarpMode",				QtvrxtraXtra::m_QTVRSetWarpMode,		 1, 0,	500 },
+	{ "QTVRCollapseToHotSpotRgn",				QtvrxtraXtra::m_QTVRCollapseToHotSpotRgn,		 0, 0,	500 },
+	{ "QTVRZoomOutEffect",				QtvrxtraXtra::m_QTVRZoomOutEffect,		 3, 0,	500 },
+	{ "QTVRGetColumn",				QtvrxtraXtra::m_QTVRGetColumn,		 0, 0,	500 },
+	{ "QTVRSetColumn",				QtvrxtraXtra::m_QTVRSetColumn,		 1, 0,	500 },
+	{ "QTVRGetRow",				QtvrxtraXtra::m_QTVRGetRow,		 0, 0,	500 },
+	{ "QTVRSetRow",				QtvrxtraXtra::m_QTVRSetRow,		 1, 0,	500 },
+	{ "QTVRNudge",				QtvrxtraXtra::m_QTVRNudge,		 1, 0,	500 },
+	{ "QTVRGetMouseDownHandler",				QtvrxtraXtra::m_QTVRGetMouseDownHandler,		 0, 0,	500 },
+	{ "QTVRSetMouseDownHandler",				QtvrxtraXtra::m_QTVRSetMouseDownHandler,		 1, 0,	500 },
+	{ "QTVRGetMouseOverHandler",				QtvrxtraXtra::m_QTVRGetMouseOverHandler,		 0, 0,	500 },
+	{ "QTVRSetMouseOverHandler",				QtvrxtraXtra::m_QTVRSetMouseOverHandler,		 1, 0,	500 },
+	{ "QTVRGetMouseStillDownHandler",				QtvrxtraXtra::m_QTVRGetMouseStillDownHandler,		 0, 0,	500 },
+	{ "QTVRSetMouseStillDownHandler",				QtvrxtraXtra::m_QTVRSetMouseStillDownHandler,		 1, 0,	500 },
+	{ "QTVRGetNodeLeaveHandler",				QtvrxtraXtra::m_QTVRGetNodeLeaveHandler,		 0, 0,	500 },
+	{ "QTVRSetNodeLeaveHandler",				QtvrxtraXtra::m_QTVRSetNodeLeaveHandler,		 1, 0,	500 },
+	{ "QTVRGetPanZoomStartHandler",				QtvrxtraXtra::m_QTVRGetPanZoomStartHandler,		 0, 0,	500 },
+	{ "QTVRSetPanZoomStartHandler",				QtvrxtraXtra::m_QTVRSetPanZoomStartHandler,		 1, 0,	500 },
+	{ "QTVRGetRolloverHotSpotHandler",				QtvrxtraXtra::m_QTVRGetRolloverHotSpotHandler,		 0, 0,	500 },
+	{ "QTVRSetRolloverHotSpotHandler",				QtvrxtraXtra::m_QTVRSetRolloverHotSpotHandler,		 1, 0,	500 },
+	{ "QTVRExitMouseOver",				QtvrxtraXtra::m_QTVRExitMouseOver,		 0, 0,	500 },
+	{ "QTVRPassMouseDown",				QtvrxtraXtra::m_QTVRPassMouseDown,		 0, 0,	500 },
+	{ "IsQTVRMovie",				QtvrxtraXtra::m_IsQTVRMovie,		 0, 0,	500 },
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+
+	{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+QtvrxtraXtraObject::QtvrxtraXtraObject(ObjectType ObjectType) :Object<QtvrxtraXtraObject>("Qtvrxtra") {
+	_objType = ObjectType;
+}
+
+void QtvrxtraXtra::open(ObjectType type, const Common::Path &path) {
+    QtvrxtraXtraObject::initMethods(xlibMethods);
+    QtvrxtraXtraObject *xobj = new QtvrxtraXtraObject(type);
+    g_lingo->exposeXObject(xlibName, xobj);
+    g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void QtvrxtraXtra::close(ObjectType type) {
+    QtvrxtraXtraObject::cleanupMethods();
+    g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void QtvrxtraXtra::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("QtvrxtraXtra::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(QtvrxtraXtra::m_forget, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVREnter, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRExit, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVROpen, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRClose, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRUpdate, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetQTVRType, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRIdle, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRMouseDown, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRMouseOver, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetPanAngle, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetPanAngle, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetTiltAngle, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetTiltAngle, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetFOV, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetFOV, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickLoc, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetClickLoc, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanAngles, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanLoc, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotID, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetHotSpotID, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotName, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotType, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotViewAngles, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetObjectViewAngles, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetObjectZoomRect, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetNodeID, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetNodeID, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetNodeName, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetQuality, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetQuality, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetTransitionMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetTransitionMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetTransitionSpeed, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetTransitionSpeed, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetUpdateMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetUpdateMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetVisible, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetVisible, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetWarpMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetWarpMode, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRCollapseToHotSpotRgn, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRZoomOutEffect, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetColumn, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetColumn, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetRow, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetRow, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRNudge, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetMouseDownHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetMouseDownHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetMouseOverHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetMouseOverHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetMouseStillDownHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetMouseStillDownHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetNodeLeaveHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetNodeLeaveHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetPanZoomStartHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetPanZoomStartHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRGetRolloverHotSpotHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRSetRolloverHotSpotHandler, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRExitMouseOver, 0)
+XOBJSTUB(QtvrxtraXtra::m_QTVRPassMouseDown, 0)
+XOBJSTUB(QtvrxtraXtra::m_IsQTVRMovie, 0)
+
+}
diff --git a/engines/director/lingo/xtras/qtvrxtra.h b/engines/director/lingo/xtras/qtvrxtra.h
new file mode 100644
index 00000000000..51e0c3541ba
--- /dev/null
+++ b/engines/director/lingo/xtras/qtvrxtra.h
@@ -0,0 +1,110 @@
+/* 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_XTRAS_QTVRXTRA_H
+#define DIRECTOR_LINGO_XTRAS_QTVRXTRA_H
+
+namespace Director {
+
+class QtvrxtraXtraObject : public Object<QtvrxtraXtraObject> {
+public:
+	QtvrxtraXtraObject(ObjectType objType);
+};
+
+namespace QtvrxtraXtra {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_forget(int nargs);
+void m_QTVREnter(int nargs);
+void m_QTVRExit(int nargs);
+void m_QTVROpen(int nargs);
+void m_QTVRClose(int nargs);
+void m_QTVRUpdate(int nargs);
+void m_QTVRGetQTVRType(int nargs);
+void m_QTVRIdle(int nargs);
+void m_QTVRMouseDown(int nargs);
+void m_QTVRMouseOver(int nargs);
+void m_QTVRGetPanAngle(int nargs);
+void m_QTVRSetPanAngle(int nargs);
+void m_QTVRGetTiltAngle(int nargs);
+void m_QTVRSetTiltAngle(int nargs);
+void m_QTVRGetFOV(int nargs);
+void m_QTVRSetFOV(int nargs);
+void m_QTVRGetClickLoc(int nargs);
+void m_QTVRSetClickLoc(int nargs);
+void m_QTVRGetClickPanAngles(int nargs);
+void m_QTVRGetClickPanLoc(int nargs);
+void m_QTVRGetHotSpotID(int nargs);
+void m_QTVRSetHotSpotID(int nargs);
+void m_QTVRGetHotSpotName(int nargs);
+void m_QTVRGetHotSpotType(int nargs);
+void m_QTVRGetHotSpotViewAngles(int nargs);
+void m_QTVRGetObjectViewAngles(int nargs);
+void m_QTVRGetObjectZoomRect(int nargs);
+void m_QTVRGetNodeID(int nargs);
+void m_QTVRSetNodeID(int nargs);
+void m_QTVRGetNodeName(int nargs);
+void m_QTVRGetQuality(int nargs);
+void m_QTVRSetQuality(int nargs);
+void m_QTVRGetTransitionMode(int nargs);
+void m_QTVRSetTransitionMode(int nargs);
+void m_QTVRGetTransitionSpeed(int nargs);
+void m_QTVRSetTransitionSpeed(int nargs);
+void m_QTVRGetUpdateMode(int nargs);
+void m_QTVRSetUpdateMode(int nargs);
+void m_QTVRGetVisible(int nargs);
+void m_QTVRSetVisible(int nargs);
+void m_QTVRGetWarpMode(int nargs);
+void m_QTVRSetWarpMode(int nargs);
+void m_QTVRCollapseToHotSpotRgn(int nargs);
+void m_QTVRZoomOutEffect(int nargs);
+void m_QTVRGetColumn(int nargs);
+void m_QTVRSetColumn(int nargs);
+void m_QTVRGetRow(int nargs);
+void m_QTVRSetRow(int nargs);
+void m_QTVRNudge(int nargs);
+void m_QTVRGetMouseDownHandler(int nargs);
+void m_QTVRSetMouseDownHandler(int nargs);
+void m_QTVRGetMouseOverHandler(int nargs);
+void m_QTVRSetMouseOverHandler(int nargs);
+void m_QTVRGetMouseStillDownHandler(int nargs);
+void m_QTVRSetMouseStillDownHandler(int nargs);
+void m_QTVRGetNodeLeaveHandler(int nargs);
+void m_QTVRSetNodeLeaveHandler(int nargs);
+void m_QTVRGetPanZoomStartHandler(int nargs);
+void m_QTVRSetPanZoomStartHandler(int nargs);
+void m_QTVRGetRolloverHotSpotHandler(int nargs);
+void m_QTVRSetRolloverHotSpotHandler(int nargs);
+void m_QTVRExitMouseOver(int nargs);
+void m_QTVRPassMouseDown(int nargs);
+void m_IsQTVRMovie(int nargs);
+
+} // End of namespace QtvrxtraXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xtras/timextra.cpp b/engines/director/lingo/xtras/timextra.cpp
new file mode 100644
index 00000000000..c5c0c7d183e
--- /dev/null
+++ b/engines/director/lingo/xtras/timextra.cpp
@@ -0,0 +1,87 @@
+/* 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/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xtras/timextra.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Safecracker
+ *
+ **************************************************/
+
+/*
+-- xtra TimeXtra
+new object me, any
+* getTime -- add two numbers 
+
+ */
+
+namespace Director {
+
+const char *TimextraXtra::xlibName = "Timextra";
+const XlibFileDesc TimextraXtra::fileNames[] = {
+	{ "timextra",   nullptr },
+	{ nullptr,        nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+	{ "new",				TimextraXtra::m_new,		 1, 0,	500 },
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+	{ "getTime", TimextraXtra::m_getTime, 0, 0, 500, HBLTIN },
+	{ nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+TimextraXtraObject::TimextraXtraObject(ObjectType ObjectType) :Object<TimextraXtraObject>("Timextra") {
+	_objType = ObjectType;
+}
+
+void TimextraXtra::open(ObjectType type, const Common::Path &path) {
+    TimextraXtraObject::initMethods(xlibMethods);
+    TimextraXtraObject *xobj = new TimextraXtraObject(type);
+    g_lingo->exposeXObject(xlibName, xobj);
+    g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void TimextraXtra::close(ObjectType type) {
+    TimextraXtraObject::cleanupMethods();
+    g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void TimextraXtra::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("TimextraXtra::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUB(TimextraXtra::m_getTime, 0)
+
+}
diff --git a/engines/director/lingo/xtras/timextra.h b/engines/director/lingo/xtras/timextra.h
new file mode 100644
index 00000000000..829147ed3bd
--- /dev/null
+++ b/engines/director/lingo/xtras/timextra.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_XTRAS_TIMEXTRA_H
+#define DIRECTOR_LINGO_XTRAS_TIMEXTRA_H
+
+namespace Director {
+
+class TimextraXtraObject : public Object<TimextraXtraObject> {
+public:
+	TimextraXtraObject(ObjectType objType);
+};
+
+namespace TimextraXtra {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_getTime(int nargs);
+
+} // End of namespace TimextraXtra
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 4c91682d0a5..494771c5732 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -157,7 +157,12 @@ MODULE_OBJS = \
 	lingo/xlibs/xsoundxfcn.o \
 	lingo/xlibs/xwin.o \
 	lingo/xlibs/yasix.o \
-	lingo/xtras/scrnutil.o
+	lingo/xtras/directsound.o \
+	lingo/xtras/keypoll.o \
+	lingo/xtras/qtvrxtra.o \
+	lingo/xtras/scrnutil.o \
+	lingo/xtras/timextra.o
+
 
 ifdef USE_IMGUI
 MODULE_OBJS += \




More information about the Scummvm-git-logs mailing list