[Scummvm-git-logs] scummvm master -> 7e30d10a31c1201841307d07e28a20e92cd9f275

sev- sev at scummvm.org
Mon Aug 2 23:15:31 UTC 2021


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

Summary:
5216ff6f77 DIRECTOR: Added OrthoPlay XObj stub
7a3a6160be DIRECTOR: Added stub for Videodisc XObj
5e0dc15bb1 DIRECTOR: Added stub for SerialPort XObj and automatically preload it
7e30d10a31 DIRECTOR: Added CDROM XObj stub


Commit: 5216ff6f7726ee5670a1e1aa95f429b1ddcf56ec
    https://github.com/scummvm/scummvm/commit/5216ff6f7726ee5670a1e1aa95f429b1ddcf56ec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-03T01:13:53+02:00

Commit Message:
DIRECTOR: Added OrthoPlay XObj stub

Changed paths:
  A engines/director/lingo/xlibs/orthoplayxobj.cpp
  A engines/director/lingo/xlibs/orthoplayxobj.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 de03f867b1..6731fe5e7c 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -40,6 +40,7 @@
 #include "director/lingo/xlibs/fplayxobj.h"
 #include "director/lingo/xlibs/labeldrvxobj.h"
 #include "director/lingo/xlibs/palxobj.h"
+#include "director/lingo/xlibs/orthoplayxobj.h"
 #include "director/lingo/xlibs/popupmenuxobj.h"
 #include "director/lingo/xlibs/soundjam.h"
 #include "director/lingo/xlibs/winxobj.h"
@@ -120,6 +121,7 @@ static struct XLibProto {
 	{ "PopUp Menu XObj",		PopUpMenuXObj::open,	PopUpMenuXObj::close,		kXObj | kXtraObj,		200 }, 	// D2
 	{ "LabelDrv",				LabelDrvXObj::open,		LabelDrvXObj::close,		kXObj,					400 }, 	// D4
 	{ "SoundJam",				SoundJam::open,			SoundJam::close,			kXObj,					400 },	// D4
+	{ "OrthoPlay XObj",			OrthoPlayXObj::open,	OrthoPlayXObj::close,		kXObj,					400 }, 	// D4
 	{ "winXObj",				RearWindowXObj::open,	RearWindowXObj::close,		kXObj,					400 },	// D4
 	{ 0, 0, 0, 0, 0 }
 
diff --git a/engines/director/lingo/xlibs/orthoplayxobj.cpp b/engines/director/lingo/xlibs/orthoplayxobj.cpp
new file mode 100644
index 0000000000..904986106b
--- /dev/null
+++ b/engines/director/lingo/xlibs/orthoplayxobj.cpp
@@ -0,0 +1,512 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * Macromedia provides several XObjects for controlling some common devices that
+ * play video and audio source material:
+ *  - The Sony videodisc and Pioneer videodisc XObjects control many models
+ *    manufactured by two popular brands of videodisc players.
+ *  - The VISCA XObject controls a wide variety ofvideotape recorders that use
+ *    the VISCA protocol.
+ *  - The AppleCD XObject controls the CD audio capabilities ofthe AppleCD SC.
+ *
+ *  Reference: Director 4 Using Lingo, pages 325-339
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/orthoplayxobj.h"
+
+
+namespace Director {
+
+static const char *xlibName = "OrthoPlayXObj";
+
+static MethodProto xlibMethods[] = {
+	{ "new",				OrthoPlayXObj::m_new,				 0, 0,	200 },	// D2
+	{ "SetSerialPort",		OrthoPlayXObj::m_setSerialPort,		 1, 1,	200 },	// D2
+	{ "SetInitViaDlog",		OrthoPlayXObj::m_setInitViaDlog,	 1, 1,	200 },	// D2
+	{ "GetInitInfo",		OrthoPlayXObj::m_getInitInfo,		 0, 0,  200 },	// D2
+	{ "SetInitInfo",		OrthoPlayXObj::m_setInitInfo,		 1, 1,  200 },	// D2
+	{ "GetMaxDevices",		OrthoPlayXObj::m_getMaxDevices,		 0, 0,  200 },	// D2
+	{ "GetDeviceTitle",		OrthoPlayXObj::m_getDeviceTitle,	 1, 1,  200 },	// D2
+	{ "SetDevice",			OrthoPlayXObj::m_setDevice,			 1, 1,  200 },	// D2
+	{ "SelectDevice",		OrthoPlayXObj::m_selectDevice,		 1, 1,  200 },	// D2
+	{ "GetDevice",			OrthoPlayXObj::m_getDevice,			 0, 0,  200 },	// D2
+	{ "Service",			OrthoPlayXObj::m_service,			 0, 0,  200 },	// D2
+	{ "GetValue",			OrthoPlayXObj::m_getValue,			 0, 0,  200 },	// D2
+	{ "Cancel",				OrthoPlayXObj::m_cancel,			 0, 0,  200 },	// D2
+	{ "Explain",			OrthoPlayXObj::m_explain,			 0, 0,  200 },	// D2
+	{ "Idle",				OrthoPlayXObj::m_idle,				 0, 0,  200 },	// D2
+	{ "ReadStatus",			OrthoPlayXObj::m_readStatus,		 0, 0,  200 },	// D2
+	{ "ReadPos",			OrthoPlayXObj::m_readPos,			 0, 0,  200 },	// D2
+	{ "SearchTo",			OrthoPlayXObj::m_searchTo,			 1, 1,  200 },	// D2
+	{ "Play",				OrthoPlayXObj::m_play,				 0, 0,  200 },	// D2
+	{ "Still",				OrthoPlayXObj::m_still,				 0, 0,  200 },	// D2
+	{ "Stop",				OrthoPlayXObj::m_stop,				 0, 0,  200 },	// D2
+	{ "ScanForward",		OrthoPlayXObj::m_scanForward,		 0, 0,  200 },	// D2
+	{ "ScanReverse",		OrthoPlayXObj::m_scanReverse,		 0, 0,  200 },	// D2
+	{ "PlayReverse",		OrthoPlayXObj::m_playReverse,		 0, 0,  200 },	// D2
+	{ "FastForward",		OrthoPlayXObj::m_fastForward,		 0, 0,  200 },	// D2
+	{ "Rewind",				OrthoPlayXObj::m_rewind,			 0, 0,  200 },	// D2
+	{ "StepForward",		OrthoPlayXObj::m_stepForward,		 0, 0,  200 },	// D2
+	{ "StepReverse",		OrthoPlayXObj::m_stepReverse,		 0, 0,  200 },	// D2
+	{ "Shuttle",			OrthoPlayXObj::m_shuttle,			 1, 1,  200 },	// D2
+	{ "Record",				OrthoPlayXObj::m_record,			 0, 0,  200 },	// D2
+	{ "Eject",				OrthoPlayXObj::m_eject,				 0, 0,  200 },	// D2
+	{ "PrepareMedium",		OrthoPlayXObj::m_prepareMedium,		 0, 0,  200 },	// D2
+	{ "GetFirstTrack",		OrthoPlayXObj::m_getFirstTrack,		 0, 0,  200 },	// D2
+	{ "GetLastTrack",		OrthoPlayXObj::m_getLastTrack,		 0, 0,  200 },	// D2
+	{ "GetFirstFrame",		OrthoPlayXObj::m_getFirstFrame,		 1, 1,  200 },	// D2
+	{ "GetLastFrame",		OrthoPlayXObj::m_getLastFrame,		 1, 1,  200 },	// D2
+	{ "GetTrack",			OrthoPlayXObj::m_getTrack,			 0, 0,  200 },	// D2
+	{ "ResetCounter",		OrthoPlayXObj::m_resetCounter,		 0, 0,  200 },	// D2
+	{ "AudioEnable",		OrthoPlayXObj::m_audioEnable,		 2, 2,  200 },	// D2
+	{ "AudioMute",			OrthoPlayXObj::m_audioMute,			 2, 2,  200 },	// D2
+	{ "VideoEnable",		OrthoPlayXObj::m_videoEnable,		 2, 2,  200 },	// D2
+	{ "ShowFrame",			OrthoPlayXObj::m_showFrame,			 1, 1,  200 },	// D2
+	{ "GetFrameResolution",	OrthoPlayXObj::m_getFrameResolution, 0, 0,  200 },	// D2
+	{ "SetFrameResolution",	OrthoPlayXObj::m_setFrameResolution, 1, 1,  200 },	// D2
+	{ "HasDropFrames",		OrthoPlayXObj::m_hasDropFrames,		 0, 0,  200 },	// D2
+	{ "SendRaw",			OrthoPlayXObj::m_sendRaw,			 1, 1,  200 },	// D2
+	{ "ReadRaw",			OrthoPlayXObj::m_readRaw,			 0, 0,  200 },	// D2
+	{ "SetInPoint",			OrthoPlayXObj::m_setInPoint,		 1, 1,  200 },	// D2
+	{ "SetOutPoint",		OrthoPlayXObj::m_setOutPoint,		 1, 1,  200 },	// D2
+	{ "SetDuration",		OrthoPlayXObj::m_setDuration,		 1, 1,  200 },	// D2
+	{ "GetMinDuration",		OrthoPlayXObj::m_getMinDuration,	 0, 0,  200 },	// D2
+	{ "SetPreroll",			OrthoPlayXObj::m_setPreroll,		 1, 1,  200 },	// D2
+	{ "GetPreroll",			OrthoPlayXObj::m_getPreroll,		 0, 0,  200 },	// D2
+	{ "SetPostroll",		OrthoPlayXObj::m_setPostroll,		 1, 1,  200 },	// D2
+	{ "GetPostroll",		OrthoPlayXObj::m_getPostroll,		 0, 0,  200 },	// D2
+	{ "SetFieldDominance",	OrthoPlayXObj::m_setFieldDominance,	 1, 1,  200 },	// D2
+	{ "PlayCue",			OrthoPlayXObj::m_playCue,			 0, 0,  200 },	// D2
+	{ "PlaySegment",		OrthoPlayXObj::m_playSegment,		 0, 0,  200 },	// D2
+	{ "RecordCue",			OrthoPlayXObj::m_recordCue,			 0, 0,  200 },	// D2
+	{ "RecordSegment",		OrthoPlayXObj::m_recordSegment,		 0, 0,  200 },	// D2
+	{ "RecordVideoEnable",	OrthoPlayXObj::m_recordVideoEnable,	 1, 1,  200 },	// D2
+	{ "RecordAudioEnable",	OrthoPlayXObj::m_recordAudioEnable,	 2, 2,  200 },	// D2
+	{ "AssembleRecord",		OrthoPlayXObj::m_assembleRecord,	 0, 0,  200 },	// D2
+	{ "PreviewRecord",		OrthoPlayXObj::m_previewRecord,		 0, 0,  200 },	// D2
+	{ "GotoInPoint",		OrthoPlayXObj::m_gotoInPoint,		 0, 0,  200 },	// D2
+	{ "GotoOutPoint",		OrthoPlayXObj::m_gotoOutPoint,		 0, 0,  200 },	// D2
+	{ "GotoPrerollPoint",	OrthoPlayXObj::m_gotoPrerollPoint,	 0, 0,  200 },	// D2
+	{ "GotoPostrollPoint",	OrthoPlayXObj::m_gotoPostrollPoint,	 0, 0,  200 },	// D2
+	{ 0, 0, 0, 0, 0 }
+};
+
+void OrthoPlayXObj::open(int type) {
+	if (type == kXObj) {
+		OrthoPlayXObject::initMethods(xlibMethods);
+		OrthoPlayXObject *xobj = new OrthoPlayXObject(kXObj);
+		g_lingo->_globalvars[xlibName] = xobj;
+	}
+}
+
+void OrthoPlayXObj::close(int type) {
+	if (type == kXObj) {
+		OrthoPlayXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+OrthoPlayXObject::OrthoPlayXObject(ObjectType ObjectType) :Object<OrthoPlayXObject>("OrthoPlayXObj") {
+	_objType = ObjectType;
+}
+
+void OrthoPlayXObj::m_new(int nargs) {
+	g_lingo->push(g_lingo->_currentMe);
+}
+
+void OrthoPlayXObj::m_setSerialPort(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setSerialPort", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setInitViaDlog(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setInitViaDlog", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getInitInfo(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getInitInfo", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setInitInfo(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setInitInfo", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getMaxDevices(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getMaxDevices", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getDeviceTitle(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getDeviceTitle", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setDevice(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setDevice", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_selectDevice(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_selectDevice", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getDevice(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getDevice", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_service(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_service", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getValue(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getValue", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_cancel(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_cancel", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_explain(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_explain", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_idle(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_idle", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_readStatus(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_readStatus", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_readPos(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_readPos", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_searchTo(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_searchTo", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_play(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_play", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_still(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_still", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_stop(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_stop", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_scanForward(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_scanForward", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_scanReverse(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_scanReverse", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_playReverse(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_playReverse", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_fastForward(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_fastForward", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_rewind(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_rewind", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_stepForward(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_stepForward", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_stepReverse(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_stepReverse", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_shuttle(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_shuttle", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_record(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_record", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_eject(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_eject", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_prepareMedium(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_prepareMedium", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_getFirstTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getFirstTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getLastTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getLastTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getFirstFrame(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getFirstFrame", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getLastFrame(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getLastFrame", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_resetCounter(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_resetCounter", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_audioEnable(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_audioEnable", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_audioMute(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_audioMute", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_videoEnable(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_videoEnable", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_showFrame(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_showFrame", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_getFrameResolution(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getFrameResolution", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setFrameResolution(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setFrameResolution", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_hasDropFrames(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_hasDropFrames", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_sendRaw(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_sendRaw", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_readRaw(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_readRaw", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setInPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setInPoint", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setOutPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setOutPoint", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setDuration(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setDuration", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getMinDuration(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getMinDuration", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setPreroll(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setPreroll", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getPreroll(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getPreroll", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setPostroll(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setPostroll", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_getPostroll(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_getPostroll", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_setFieldDominance(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_setFieldDominance", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_playCue(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_playCue", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_playSegment(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_playSegment", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_recordCue(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_recordCue", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_recordSegment(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_recordSegment", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_recordVideoEnable(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_recordVideoEnable", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_recordAudioEnable(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_recordAudioEnable", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_assembleRecord(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_assembleRecord", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_previewRecord(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_previewRecord", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void OrthoPlayXObj::m_gotoInPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_gotoInPoint", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_gotoOutPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_gotoOutPoint", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_gotoPrerollPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_gotoPrerollPoint", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void OrthoPlayXObj::m_gotoPostrollPoint(int nargs) {
+	g_lingo->printSTUBWithArglist("OrthoPlayXObj::m_gotoPostrollPoint", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/orthoplayxobj.h b/engines/director/lingo/xlibs/orthoplayxobj.h
new file mode 100644
index 0000000000..be04579e66
--- /dev/null
+++ b/engines/director/lingo/xlibs/orthoplayxobj.h
@@ -0,0 +1,111 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_ORTHOPLAYXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_ORTHOPLAYXOBJ_H
+
+namespace Director {
+
+class OrthoPlayXObject : public Object<OrthoPlayXObject> {
+public:
+	OrthoPlayXObject(ObjectType objType);
+};
+
+namespace OrthoPlayXObj {
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_setSerialPort(int nargs);
+void m_setInitViaDlog(int nargs);
+void m_getInitInfo(int nargs);
+void m_setInitInfo(int nargs);
+void m_getMaxDevices(int nargs);
+void m_getDeviceTitle(int nargs);
+void m_setDevice(int nargs);
+void m_selectDevice(int nargs);
+void m_getDevice(int nargs);
+void m_service(int nargs);
+void m_getValue(int nargs);
+void m_cancel(int nargs);
+void m_explain(int nargs);
+void m_idle(int nargs);
+void m_readStatus(int nargs);
+void m_readPos(int nargs);
+void m_searchTo(int nargs);
+void m_play(int nargs);
+void m_still(int nargs);
+void m_stop(int nargs);
+void m_scanForward(int nargs);
+void m_scanReverse(int nargs);
+void m_playReverse(int nargs);
+void m_fastForward(int nargs);
+void m_rewind(int nargs);
+void m_stepForward(int nargs);
+void m_stepReverse(int nargs);
+void m_shuttle(int nargs);
+void m_record(int nargs);
+void m_eject(int nargs);
+void m_prepareMedium(int nargs);
+void m_getFirstTrack(int nargs);
+void m_getLastTrack(int nargs);
+void m_getFirstFrame(int nargs);
+void m_getLastFrame(int nargs);
+void m_getTrack(int nargs);
+void m_resetCounter(int nargs);
+void m_audioEnable(int nargs);
+void m_audioMute(int nargs);
+void m_videoEnable(int nargs);
+void m_showFrame(int nargs);
+void m_getFrameResolution(int nargs);
+void m_setFrameResolution(int nargs);
+void m_hasDropFrames(int nargs);
+void m_sendRaw(int nargs);
+void m_readRaw(int nargs);
+void m_setInPoint(int nargs);
+void m_setOutPoint(int nargs);
+void m_setDuration(int nargs);
+void m_getMinDuration(int nargs);
+void m_setPreroll(int nargs);
+void m_getPreroll(int nargs);
+void m_setPostroll(int nargs);
+void m_getPostroll(int nargs);
+void m_setFieldDominance(int nargs);
+void m_playCue(int nargs);
+void m_playSegment(int nargs);
+void m_recordCue(int nargs);
+void m_recordSegment(int nargs);
+void m_recordVideoEnable(int nargs);
+void m_recordAudioEnable(int nargs);
+void m_assembleRecord(int nargs);
+void m_previewRecord(int nargs);
+void m_gotoInPoint(int nargs);
+void m_gotoOutPoint(int nargs);
+void m_gotoPrerollPoint(int nargs);
+void m_gotoPostrollPoint(int nargs);
+
+} // End of namespace OrthoPlayXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 936739dfc6..76f7da559c 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -42,6 +42,7 @@ MODULE_OBJS = \
 	lingo/xlibs/fplayxobj.o \
 	lingo/xlibs/labeldrvxobj.o \
 	lingo/xlibs/palxobj.o \
+	lingo/xlibs/orthoplayxobj.o \
 	lingo/xlibs/popupmenuxobj.o \
 	lingo/xlibs/soundjam.o \
 	lingo/xlibs/winxobj.o


Commit: 7a3a6160be42412c6dd0e298d88ce0f0280c2103
    https://github.com/scummvm/scummvm/commit/7a3a6160be42412c6dd0e298d88ce0f0280c2103
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-03T01:13:53+02:00

Commit Message:
DIRECTOR: Added stub for Videodisc XObj

Changed paths:
  A engines/director/lingo/xlibs/videodiscxobj.cpp
  A engines/director/lingo/xlibs/videodiscxobj.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 6731fe5e7c..e2d9b7eeb1 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -39,10 +39,11 @@
 #include "director/lingo/xlibs/flushxobj.h"
 #include "director/lingo/xlibs/fplayxobj.h"
 #include "director/lingo/xlibs/labeldrvxobj.h"
-#include "director/lingo/xlibs/palxobj.h"
 #include "director/lingo/xlibs/orthoplayxobj.h"
+#include "director/lingo/xlibs/palxobj.h"
 #include "director/lingo/xlibs/popupmenuxobj.h"
 #include "director/lingo/xlibs/soundjam.h"
+#include "director/lingo/xlibs/videodiscxobj.h"
 #include "director/lingo/xlibs/winxobj.h"
 
 namespace Director {
@@ -117,11 +118,12 @@ static struct XLibProto {
 	{ "FileIO",					FileIO::open,			FileIO::close,				kXObj | kXtraObj,		200 },	// D2
 	{ "FlushXObj",				FlushXObj::open,		FlushXObj::close,			kXObj,					400 },	// D4
 	{ "FPlayXObj",				FPlayXObj::open,		FPlayXObj::close,			kXObj,					200 },	// D2
+	{ "OrthoPlay XObj",			OrthoPlayXObj::open,	OrthoPlayXObj::close,		kXObj,					400 }, 	// D4
 	{ "PalXObj",				PalXObj::open,			PalXObj::close,				kXObj,					400 }, 	// D4
 	{ "PopUp Menu XObj",		PopUpMenuXObj::open,	PopUpMenuXObj::close,		kXObj | kXtraObj,		200 }, 	// D2
 	{ "LabelDrv",				LabelDrvXObj::open,		LabelDrvXObj::close,		kXObj,					400 }, 	// D4
 	{ "SoundJam",				SoundJam::open,			SoundJam::close,			kXObj,					400 },	// D4
-	{ "OrthoPlay XObj",			OrthoPlayXObj::open,	OrthoPlayXObj::close,		kXObj,					400 }, 	// D4
+	{ "Videodisc XObj",			VideodiscXObj::open,	VideodiscXObj::close,		kXObj | kXtraObj,		200 }, 	// D2
 	{ "winXObj",				RearWindowXObj::open,	RearWindowXObj::close,		kXObj,					400 },	// D4
 	{ 0, 0, 0, 0, 0 }
 
diff --git a/engines/director/lingo/xlibs/videodiscxobj.cpp b/engines/director/lingo/xlibs/videodiscxobj.cpp
new file mode 100644
index 0000000000..99adafb2ca
--- /dev/null
+++ b/engines/director/lingo/xlibs/videodiscxobj.cpp
@@ -0,0 +1,313 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * mNew, portObject, baudRate, playerType  creates a
+ *    new instance and returns error code
+ *    portObject is an instance from SerialPort XObject.
+ *    baudRate should be the same as machine setting.
+ *        9600(default for Pioneer 8000),
+ *        4800(preferred for Pioneer 2200, 4200),
+ *        2400, and 1200.
+ *    playerType:
+ *        0 for Pioneer 2200, 4200 and 8000
+ *        1 for Sony Laser Max 1200, 1500, and 2000
+ *    Error codes:
+ *        -1 : incorrect BaudRate.
+ *        -2 : memory error.
+ *        -3 : SerialPort Drivers would not open.
+ *
+ * mDispose  frees this instance from memory.
+ * mName  returns my name.
+ * mPlayer  returns the player.
+ *
+ * Note: all of the following methods will return either "OK" or an error message. Possible error messages include:
+ *     "No Response" -- bad connection or wrong baud rate.
+ *     "Not Ready"    -- disc ejected or motor stopped.
+ *
+ * mPlay  normal playback mode in the forward direction.
+ * mPlayRev  playback mode in the reverse direction.
+ *
+ * mFastFwd  fast forward playback mode.
+ *     3 times normal speed.
+ * mFastRev  fast reverse playback mode.
+ *     3 times normal speed.
+ *
+ * mSlowFwd  slow forward playback mode.
+ *     1/5 times normal speed.
+ * mSlowRev  slow reverse playback mode
+ *     1/5 times normal speed.
+ *
+ * mStepFwd  step forward a single frame.
+ * mStepRev  step reverse a single frame.
+ *
+ * mPlayJog, nFrame  step multiple frames either forward
+ *     or reverse
+ *
+ * mPlaySpeed, rate  play at slower than normal speed.
+ *     rate can be any of the following:
+ *         30 is 1x; 15 is 1/2x; 10 is 1/3x; 5 is 1/6x
+ *     Example: -10 is one third normal speed, backwards.
+ *
+ * mPlaySegment, start, end  play a segment of video disc.
+ *     Start and end are frame numbers.
+ *
+ * mPause  set player to display freeze picture (STILL)
+ *     When this method is called a second time, this will
+ *     continue the mode prior to first call.
+ * mStop  halts playback of videodisc.
+ * mEject  opens disc compartment and ejects disc.
+ *
+ * mStopAtFrame, frameNum  set to stop at frameNum
+ *
+ * mSearchWait, frameNum  search for frameNum and
+ *     returns "OK" when search is completed.
+ *
+ * mReadPos  return the current frame position
+ * mShowDisplay, flag  enable/disable frame display
+ *
+ * mClear  clear all modes of player. Remove Stop markers
+ *
+ * mVideoControl, videoState  control squelch condition
+ *     of video image.
+ *
+ * mAudioControl, audioState
+ *     audioState is one of the following
+ *         0 : Turn off both audio channels.
+ *         1 : Turn on channel 1 only.
+ *         2 : Turn on channel 2 only.
+ *         3 : Turn on both audio channels.
+ *
+ * mStatus  return either "OK" or error message
+ *     See the mDescribe for a full list of errors.
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/videodiscxobj.h"
+
+namespace Director {
+
+static const char *xlibName = "Videodisc";
+
+static MethodProto xlibMethods[] = {
+	{ "new",			VideodiscXObj::m_new,			 3, 3,	200 },	// D2
+	{ "Name",			VideodiscXObj::m_name,			 0, 0,	200 },	// D2
+	{ "Player",			VideodiscXObj::m_player,		 0, 0,	200 },	// D2
+	{ "Play",			VideodiscXObj::m_play,			 0, 0,	200 },	// D2
+	{ "PlayRev",		VideodiscXObj::m_playRev,		 0, 0,	200 },	// D2
+	{ "FastFwd",		VideodiscXObj::m_fastFwd,		 0, 0,	200 },	// D2
+	{ "FastRev",		VideodiscXObj::m_fastRev,		 0, 0,	200 },	// D2
+	{ "SlowFwd",		VideodiscXObj::m_slowFwd,		 0, 0,	200 },	// D2
+	{ "SlowRev",		VideodiscXObj::m_slowRev,		 0, 0,	200 },	// D2
+	{ "StepFwd",		VideodiscXObj::m_stepFwd,		 0, 0,	200 },	// D2
+	{ "StepRev",		VideodiscXObj::m_stepRev,		 0, 0,	200 },	// D2
+	{ "PlayJog",		VideodiscXObj::m_playJog,		 1, 1,	200 },	// D2
+	{ "PlaySpeed",		VideodiscXObj::m_playSpeed,		 1, 1,	200 },	// D2
+	{ "PlaySegment",	VideodiscXObj::m_playSegment,	 2, 2,	200 },	// D2
+	{ "Pause",			VideodiscXObj::m_pause,			 0, 0,	200 },	// D2
+	{ "Stop",			VideodiscXObj::m_stop,			 0, 0,	200 },	// D2
+	{ "Eject",			VideodiscXObj::m_eject,			 0, 0,	200 },	// D2
+	{ "StopAtFrame",	VideodiscXObj::m_stopAtFrame,	 1, 1,	200 },	// D2
+	{ "SearchWait",		VideodiscXObj::m_searchWait,	 1, 1,	200 },	// D2
+	{ "ReadPos",		VideodiscXObj::m_readPos,		 0, 0,	200 },	// D2
+	{ "ShowDisplay",	VideodiscXObj::m_showDisplay,	 0, 0,	200 },	// D2
+	{ "Clear",			VideodiscXObj::m_clear,			 0, 0,	200 },	// D2
+	{ "VideoControl",	VideodiscXObj::m_videoControl,	 1, 1,	200 },	// D2
+	{ "AudioControl",	VideodiscXObj::m_audioControl,	 1, 1,	200 },	// D2
+	{ "Status",			VideodiscXObj::m_status,		 0, 0,	200 },	// D2
+	{ 0, 0, 0, 0, 0 }
+};
+
+void VideodiscXObj::open(int type) {
+	if (type == kXObj) {
+		VideodiscXObject::initMethods(xlibMethods);
+		VideodiscXObject *xobj = new VideodiscXObject(kXObj);
+		g_lingo->_globalvars[xlibName] = xobj;
+	}
+}
+
+void VideodiscXObj::close(int type) {
+	if (type == kXObj) {
+		VideodiscXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+VideodiscXObject::VideodiscXObject(ObjectType ObjectType) :Object<VideodiscXObject>("Videodisc") {
+	_objType = ObjectType;
+}
+
+void VideodiscXObj::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_currentMe);
+}
+
+void VideodiscXObj::m_name(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_name", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_player(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_player", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_play(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_play", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_playRev(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_playRev", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_fastFwd(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_fastFwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_fastRev(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_fastRev", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_slowFwd(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_slowFwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_slowRev(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_slowRev", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_stepFwd(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_stepFwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_stepRev(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_stepRev", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_playJog(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_playJog", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_playSpeed(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_playSpeed", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_playSegment(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_playSegment", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_pause(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_pause", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_stop(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_stop", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_eject(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_eject", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_stopAtFrame(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_stopAtFrame", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_searchWait(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_searchWait", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_readPos(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_readPos", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_showDisplay(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_showDisplay", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_clear(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_clear", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_videoControl(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_videoControl", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_audioControl(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_audioControl", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void VideodiscXObj::m_status(int nargs) {
+	g_lingo->printSTUBWithArglist("VideodiscXObj::m_status", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/videodiscxobj.h b/engines/director/lingo/xlibs/videodiscxobj.h
new file mode 100644
index 0000000000..26be1d105a
--- /dev/null
+++ b/engines/director/lingo/xlibs/videodiscxobj.h
@@ -0,0 +1,68 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_VIDEODISCXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_VIDEODISCXOBJ_H
+
+namespace Director {
+
+class VideodiscXObject : public Object<VideodiscXObject> {
+public:
+	VideodiscXObject(ObjectType objType);
+};
+
+namespace VideodiscXObj {
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_name(int nargs);
+void m_player(int nargs);
+void m_play(int nargs);
+void m_playRev(int nargs);
+void m_fastFwd(int nargs);
+void m_fastRev(int nargs);
+void m_slowFwd(int nargs);
+void m_slowRev(int nargs);
+void m_stepFwd(int nargs);
+void m_stepRev(int nargs);
+void m_playJog(int nargs);
+void m_playSpeed(int nargs);
+void m_playSegment(int nargs);
+void m_pause(int nargs);
+void m_stop(int nargs);
+void m_eject(int nargs);
+void m_stopAtFrame(int nargs);
+void m_searchWait(int nargs);
+void m_readPos(int nargs);
+void m_showDisplay(int nargs);
+void m_clear(int nargs);
+void m_videoControl(int nargs);
+void m_audioControl(int nargs);
+void m_status(int nargs);
+
+} // End of namespace VideodiscXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 76f7da559c..49c12e9dd0 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -45,6 +45,7 @@ MODULE_OBJS = \
 	lingo/xlibs/orthoplayxobj.o \
 	lingo/xlibs/popupmenuxobj.o \
 	lingo/xlibs/soundjam.o \
+	lingo/xlibs/videodiscxobj.o \
 	lingo/xlibs/winxobj.o
 
 # HACK: Skip this when including the file for detection objects.


Commit: 5e0dc15bb18e27ead23c877f2df6f43be8c92f7f
    https://github.com/scummvm/scummvm/commit/5e0dc15bb18e27ead23c877f2df6f43be8c92f7f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-03T01:13:53+02:00

Commit Message:
DIRECTOR: Added stub for SerialPort XObj and automatically preload it

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


diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index e2d9b7eeb1..707cd81774 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -42,6 +42,7 @@
 #include "director/lingo/xlibs/orthoplayxobj.h"
 #include "director/lingo/xlibs/palxobj.h"
 #include "director/lingo/xlibs/popupmenuxobj.h"
+#include "director/lingo/xlibs/serialportxobj.h"
 #include "director/lingo/xlibs/soundjam.h"
 #include "director/lingo/xlibs/videodiscxobj.h"
 #include "director/lingo/xlibs/winxobj.h"
@@ -122,6 +123,7 @@ static struct XLibProto {
 	{ "PalXObj",				PalXObj::open,			PalXObj::close,				kXObj,					400 }, 	// D4
 	{ "PopUp Menu XObj",		PopUpMenuXObj::open,	PopUpMenuXObj::close,		kXObj | kXtraObj,		200 }, 	// D2
 	{ "LabelDrv",				LabelDrvXObj::open,		LabelDrvXObj::close,		kXObj,					400 }, 	// D4
+	{ "SerialPort",				SerialPortXObj::open,	SerialPortXObj::close,		kXObj | kXtraObj,		200 },	// D2
 	{ "SoundJam",				SoundJam::open,			SoundJam::close,			kXObj,					400 },	// D4
 	{ "Videodisc XObj",			VideodiscXObj::open,	VideodiscXObj::close,		kXObj | kXtraObj,		200 }, 	// D2
 	{ "winXObj",				RearWindowXObj::open,	RearWindowXObj::close,		kXObj,					400 },	// D4
diff --git a/engines/director/lingo/xlibs/serialportxobj.cpp b/engines/director/lingo/xlibs/serialportxobj.cpp
new file mode 100644
index 0000000000..1e524d4c3d
--- /dev/null
+++ b/engines/director/lingo/xlibs/serialportxobj.cpp
@@ -0,0 +1,144 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * Use the SerialPort XObject to send and receive data over the Macintosh’s
+ * two standard serial ports (commonly called the modem and printer ports).
+ * This XObject is built into Macromedia Director, so you don’t have to open
+ * an XLibrary to use it.
+ *
+ * Reference: Director 4 Using Lingo, pages 315-320
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/serialportxobj.h"
+
+namespace Director {
+
+static const char *xlibName = "SerialPort";
+
+static MethodProto xlibMethods[] = {
+	{ "new",				SerialPortXObj::m_new,			 1, 1,	200 },	// D2
+	{ "GetPortNum",			SerialPortXObj::m_getPortNum,	 0, 0,	200 },	// D2
+	{ "WriteString",		SerialPortXObj::m_writeString,	 1, 1,	200 },	// D2
+	{ "WriteChar",			SerialPortXObj::m_writeChar,	 1, 1,	200 },	// D2
+	{ "ReadString",			SerialPortXObj::m_readString,	 0, 0,  200 },	// D2
+	{ "ReadChar",			SerialPortXObj::m_readChar,		 0, 0,  200 },	// D2
+	{ "ReadCount",			SerialPortXObj::m_readCount,	 0, 0,  200 },	// D2
+	{ "ReadFlush",			SerialPortXObj::m_readFlush,	 0, 0,  200 },	// D2
+	{ "ConfigChan",			SerialPortXObj::m_configChan,	 2, 2,  200 },	// D2
+	{ "HShakeChan",			SerialPortXObj::m_hShakeChan,	 3, 3,  200 },	// D2
+	{ "SetUp",				SerialPortXObj::m_setUp,		 3, 3,  200 },	// D2
+	{ 0, 0, 0, 0, 0 }
+};
+
+void SerialPortXObj::open(int type) {
+	if (type == kXObj) {
+		SerialPortXObject::initMethods(xlibMethods);
+		SerialPortXObject *xobj = new SerialPortXObject(kXObj);
+		g_lingo->_globalvars[xlibName] = xobj;
+	}
+}
+
+void SerialPortXObj::close(int type) {
+	if (type == kXObj) {
+		SerialPortXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+SerialPortXObject::SerialPortXObject(ObjectType ObjectType) :Object<SerialPortXObject>("SerialPort") {
+	_objType = ObjectType;
+}
+
+void SerialPortXObj::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_currentMe);
+}
+
+void SerialPortXObj::m_getPortNum(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_getPortNum", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_writeString(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_writeString", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_writeChar(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_writeChar", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_readString(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_readString", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_readChar(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_readChar", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_readCount(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_readCount", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_readFlush(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_readFlush", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_configChan(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_configChan", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_hShakeChan(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_hShakeChan", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void SerialPortXObj::m_setUp(int nargs) {
+	g_lingo->printSTUBWithArglist("SerialPortXObj::m_setUp", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/serialportxobj.h b/engines/director/lingo/xlibs/serialportxobj.h
new file mode 100644
index 0000000000..2da5020f8d
--- /dev/null
+++ b/engines/director/lingo/xlibs/serialportxobj.h
@@ -0,0 +1,54 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_SERIALPORTXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_SERIALPORTXOBJ_H
+
+namespace Director {
+
+class SerialPortXObject : public Object<SerialPortXObject> {
+public:
+	SerialPortXObject(ObjectType objType);
+};
+
+namespace SerialPortXObj {
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_getPortNum(int nargs);
+void m_writeString(int nargs);
+void m_writeChar(int nargs);
+void m_readString(int nargs);
+void m_readChar(int nargs);
+void m_readCount(int nargs);
+void m_readFlush(int nargs);
+void m_configChan(int nargs);
+void m_hShakeChan(int nargs);
+void m_setUp(int nargs);
+
+} // End of namespace SerialPortXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 49c12e9dd0..3cfb48aa94 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -44,6 +44,7 @@ MODULE_OBJS = \
 	lingo/xlibs/palxobj.o \
 	lingo/xlibs/orthoplayxobj.o \
 	lingo/xlibs/popupmenuxobj.o \
+	lingo/xlibs/serialportxobj.o \
 	lingo/xlibs/soundjam.o \
 	lingo/xlibs/videodiscxobj.o \
 	lingo/xlibs/winxobj.o
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 6ad0354ce0..db0c07827b 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -393,6 +393,7 @@ void Window::loadStartMovieXLibs() {
 	if (strcmp(g_director->getGameId(), "warlock") == 0 && g_director->getPlatform() == Common::kPlatformMacintosh) {
 		g_lingo->openXLib("FPlayXObj", kXObj);
 	}
+	g_lingo->openXLib("SerialPort", kXObj);
 }
 
 } // End of namespace Director


Commit: 7e30d10a31c1201841307d07e28a20e92cd9f275
    https://github.com/scummvm/scummvm/commit/7e30d10a31c1201841307d07e28a20e92cd9f275
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-03T01:13:53+02:00

Commit Message:
DIRECTOR: Added CDROM XObj stub

Changed paths:
  A engines/director/lingo/xlibs/cdromxobj.cpp
  A engines/director/lingo/xlibs/cdromxobj.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 707cd81774..7f2d2b2836 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -35,6 +35,7 @@
 #include "director/lingo/lingo-object.h"
 #include "director/lingo/lingo-the.h"
 
+#include "director/lingo/xlibs/cdromxobj.h"
 #include "director/lingo/xlibs/fileio.h"
 #include "director/lingo/xlibs/flushxobj.h"
 #include "director/lingo/xlibs/fplayxobj.h"
@@ -116,6 +117,7 @@ static struct XLibProto {
 	int type;
 	int version;
 } xlibs[] = {
+	{ "CDROM XObj",				CDROMXObj::open,		CDROMXObj::close,			kXObj | kXtraObj,		200 },	// D2
 	{ "FileIO",					FileIO::open,			FileIO::close,				kXObj | kXtraObj,		200 },	// D2
 	{ "FlushXObj",				FlushXObj::open,		FlushXObj::close,			kXObj,					400 },	// D4
 	{ "FPlayXObj",				FPlayXObj::open,		FPlayXObj::close,			kXObj,					200 },	// D2
diff --git a/engines/director/lingo/xlibs/cdromxobj.cpp b/engines/director/lingo/xlibs/cdromxobj.cpp
new file mode 100644
index 0000000000..9fc4c466f0
--- /dev/null
+++ b/engines/director/lingo/xlibs/cdromxobj.cpp
@@ -0,0 +1,337 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * mNew	 creates a new object instance for a single
+ *     CD-ROM player. if the Apple Audio CD Player is not
+ *     mounted the instance will not be created.
+ *
+ * mDispose  disposes of the current instance.
+ *     This should always be called when you are finished
+ *     using the XObject.
+ *
+ * mName  returns the name of the XObj.
+ *
+ * mPlay  plays the  current track from the beginning.
+ *
+ * mPlayTrack, trackNum  plays the specified track number
+ *     from its beginning.
+ *
+ * mPlayName, trackName  plays the specified track name.
+ *     (Note: volume name is ignored.)
+ *
+ * mPlayAbsTime, minute, second, frame  plays starting at
+ *     the specified absolute time on current CD-ROM.
+ *
+ * mPlaySegment, startMin, startSec, startFrm, stopMin, stopSec, stopFrm  plays starting at the specified absolute
+ *     time, and stops at the specified stopping point.
+ *
+ * mAskPlay, leftDialogPosition, topDialogPosition  opens
+ *     a standard file dialog for the user to select a track.
+ *
+ * mStepFwd  steps forward one track and plays.
+ *
+ * mStepBwd  steps back one track and plays.
+ *
+ * mPause  pauses the player. When this method is called a
+ *     second time, the player will continue the mode prior to
+ *     first call; just like calling mContinue.
+ *
+ * mContinue  continues the mode prior to calling mPause.
+ *
+ * mStop  stops playing.
+ *
+ * mStopTrack, trackNum  stops when specified track
+ *     finishes playing.
+ *
+ * mStopAbsTime, minute, second, frame  stops play at
+ *     absolute time position.
+ *
+ * mRemoveStop  removes the conditions which are set
+ *     with: mPlaySegment, mStopTrack and mStopAbsTime.
+ *
+ * mEject  ejects the CD from the drive.
+ *
+ * mStatus  returns the status of the CD player. See the
+ *     mDescribe for a list of messages which are returned.
+ *
+ * mPlayMode  returns the play mode from an audio track.
+ *     The play mode describes how to play the audio track.
+ *     See the mDescribe for a list of messages.
+ *
+ * mCurrentFormat  returns the format of the current track
+ *     See the mDescribe for a list of messages.
+ *
+ * mCurrentTrack  returns the current track.
+ *
+ * mCurrentTime  returns the current time (min:sec:frame).
+ *
+ * mFirstTrack  returns the first track number on current CD
+ *
+ * mLastTrack  returns the last track number on current CD
+ *
+ * mTotalTime  returns the total time on current CD in
+ *     minutes:seconds:frames.
+ *
+ * mScanFwd min, sec, frm, monitorP  scans forward.
+ * mScanBwd min, sec, frm, monitorP  scans backwards.
+ *   min, sec, and frm are the absolute time to start scan.
+ *   monitorP — if true, will stop scan when mouse is
+ *   released, and continue playing at current position.
+ *   However, this will inhibit all other events.
+ *   Otherwise use the mStopScan method.
+ *
+ * mStopScan  stops scan and continues playing at current
+ *     position.
+ */
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/cdromxobj.h"
+
+namespace Director {
+
+static const char *xlibName = "AppleAudioCD";
+
+static MethodProto xlibMethods[] = {
+	{ "new",			CDROMXObj::m_new,			 2, 2,	200 },	// D2
+	{ "Name",			CDROMXObj::m_name,		 	 0, 0,	200 },	// D2
+	{ "Play",			CDROMXObj::m_play,		 	 0, 0,	200 },	// D2
+	{ "PlayTrack",		CDROMXObj::m_playTrack,	 	 1, 1,	200 },	// D2
+	{ "PlayName",		CDROMXObj::m_playName,	 	 1, 1,  200 },	// D2
+	{ "PlayAbsTime",	CDROMXObj::m_playAbsTime,	 3, 3,  200 },	// D2
+	{ "PlaySegment",	CDROMXObj::m_playSegment,	 6, 6,  200 },	// D2
+	{ "AskPlay",		CDROMXObj::m_askPlay,		 2, 2,  200 },	// D2
+	{ "StepFwd",		CDROMXObj::m_stepFwd,		 0, 0,  200 },	// D2
+	{ "StepBwd",		CDROMXObj::m_stepBwd,		 0, 0,  200 },	// D2
+	{ "Pause",			CDROMXObj::m_pause,			 0, 0,  200 },	// D2
+	{ "Continue",		CDROMXObj::m_continue,		 0, 0,  200 },	// D2
+	{ "Stop",			CDROMXObj::m_stop,			 0, 0,  200 },	// D2
+	{ "StopTrack",		CDROMXObj::m_stopTrack,		 1, 1,  200 },	// D2
+	{ "StopAbsTime",	CDROMXObj::m_stopAbsTime,	 3, 3,  200 },	// D2
+	{ "RemoveStop",		CDROMXObj::m_removeStop,	 0, 0,  200 },	// D2
+	{ "Eject",			CDROMXObj::m_eject,			 0, 0,  200 },	// D2
+	{ "Status",			CDROMXObj::m_status,		 0, 0,  200 },	// D2
+	{ "PlayMode",		CDROMXObj::m_playMode,		 0, 0,  200 },	// D2
+	{ "CurrentFormat",	CDROMXObj::m_currentFormat,  0, 0,  200 },	// D2
+	{ "CurrentTrack",	CDROMXObj::m_currentTrack,	 0, 0,  200 },	// D2
+	{ "CurrentTime",	CDROMXObj::m_currentTime,	 0, 0,  200 },	// D2
+	{ "FirstTrack",		CDROMXObj::m_firstTrack,	 0, 0,  200 },	// D2
+	{ "LastTrack",		CDROMXObj::m_lastTrack,		 0, 0,  200 },	// D2
+	{ "TotalTime",		CDROMXObj::m_totalTime,		 0, 0,  200 },	// D2
+	{ "ScanFwd",		CDROMXObj::m_scanFwd,		 4, 4,  200 },	// D2
+	{ "ScanBwd",		CDROMXObj::m_scanBwd,		 4, 4,  200 },	// D2
+	{ "StopScan",		CDROMXObj::m_stopScan,		 0, 0,  200 },	// D2
+	{ 0, 0, 0, 0, 0 }
+};
+
+void CDROMXObj::open(int type) {
+	if (type == kXObj) {
+		CDROMXObject::initMethods(xlibMethods);
+		CDROMXObject *xobj = new CDROMXObject(kXObj);
+		g_lingo->_globalvars[xlibName] = xobj;
+	}
+}
+
+void CDROMXObj::close(int type) {
+	if (type == kXObj) {
+		CDROMXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+CDROMXObject::CDROMXObject(ObjectType ObjectType) :Object<CDROMXObject>("AppleAudioCD") {
+	_objType = ObjectType;
+}
+
+void CDROMXObj::m_new(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_new", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(g_lingo->_currentMe);
+}
+
+void CDROMXObj::m_name(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_name", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_play(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_play", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_playTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_playTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_playName(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_playName", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_playAbsTime(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_playAbsTime", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_playSegment(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_playSegment", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_askPlay(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_askPlay", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stepFwd(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stepFwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stepBwd(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stepBwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_pause(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_pause", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_continue(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_continue", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stop(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stop", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stopTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stopTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stopAbsTime(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stopAbsTime", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_removeStop(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_removeStop", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_eject(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_eject", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_status(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_status", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_playMode(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_playMode", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_currentFormat(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_currentFormat", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_currentTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_currentTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_currentTime(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_currentTime", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_firstTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_firstTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_lastTrack(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_lastTrack", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_totalTime(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_totalTime", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_scanFwd(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_scanFwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_scanBwd(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_scanBwd", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+void CDROMXObj::m_stopScan(int nargs) {
+	g_lingo->printSTUBWithArglist("CDROMXObj::m_stopScan", nargs);
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum());
+}
+
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/cdromxobj.h b/engines/director/lingo/xlibs/cdromxobj.h
new file mode 100644
index 0000000000..5b13141f1f
--- /dev/null
+++ b/engines/director/lingo/xlibs/cdromxobj.h
@@ -0,0 +1,71 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_CDROMXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_CDROMXOBJ_H
+
+namespace Director {
+
+class CDROMXObject : public Object<CDROMXObject> {
+public:
+	CDROMXObject(ObjectType objType);
+};
+
+namespace CDROMXObj {
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_name(int nargs);
+void m_play(int nargs);
+void m_playTrack(int nargs);
+void m_playName(int nargs);
+void m_playAbsTime(int nargs);
+void m_playSegment(int nargs);
+void m_askPlay(int nargs);
+void m_stepFwd(int nargs);
+void m_stepBwd(int nargs);
+void m_pause(int nargs);
+void m_continue(int nargs);
+void m_stop(int nargs);
+void m_stopTrack(int nargs);
+void m_stopAbsTime(int nargs);
+void m_removeStop(int nargs);
+void m_eject(int nargs);
+void m_status(int nargs);
+void m_playMode(int nargs);
+void m_currentFormat(int nargs);
+void m_currentTrack(int nargs);
+void m_currentTime(int nargs);
+void m_firstTrack(int nargs);
+void m_lastTrack(int nargs);
+void m_totalTime(int nargs);
+void m_scanFwd(int nargs);
+void m_scanBwd(int nargs);
+void m_stopScan(int nargs);
+
+} // End of namespace CDROMXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 3cfb48aa94..460675df09 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -37,6 +37,7 @@ MODULE_OBJS = \
 	lingo/lingo-preprocessor.o \
 	lingo/lingo-the.o \
 	lingo/lingo-utils.o \
+	lingo/xlibs/cdromxobj.o \
 	lingo/xlibs/fileio.o \
 	lingo/xlibs/flushxobj.o \
 	lingo/xlibs/fplayxobj.o \




More information about the Scummvm-git-logs mailing list