[Scummvm-git-logs] scummvm master -> 4a2aeb1d2194b0730434cb7cfbba8b7465a66b61

sev- noreply at scummvm.org
Fri Mar 3 14:51:24 UTC 2023


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

Summary:
54d37226e1 DIRECTOR: LINGO: Added stubs for Xlibs used in Mitz Petel.
4a2aeb1d21 DIRECTOR: LINGO: Make FileIO aware of cross-platform line endings


Commit: 54d37226e1952e61aacd616fa6dff77c95cf8450
    https://github.com/scummvm/scummvm/commit/54d37226e1952e61aacd616fa6dff77c95cf8450
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T15:50:24+01:00

Commit Message:
DIRECTOR: LINGO: Added stubs for Xlibs used in Mitz Petel.

Patch courtesy of eientei

Changed paths:
  A engines/director/lingo/xlibs/draw.cpp
  A engines/director/lingo/xlibs/draw.h
  A engines/director/lingo/xlibs/xio.cpp
  A engines/director/lingo/xlibs/xio.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 f6cc62d6be6..2158e0d5cbb 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -45,6 +45,7 @@
 #include "director/lingo/xlibs/cdromxobj.h"
 #include "director/lingo/xlibs/darkenscreen.h"
 #include "director/lingo/xlibs/developerStack.h"
+#include "director/lingo/xlibs/draw.h"
 #include "director/lingo/xlibs/ednox.h"
 #include "director/lingo/xlibs/fileexists.h"
 #include "director/lingo/xlibs/fileio.h"
@@ -76,6 +77,7 @@
 #include "director/lingo/xlibs/volumelist.h"
 #include "director/lingo/xlibs/widgetxobj.h"
 #include "director/lingo/xlibs/winxobj.h"
+#include "director/lingo/xlibs/xio.h"
 #include "director/lingo/xlibs/xplayanim.h"
 #include "director/lingo/xlibs/yasix.h"
 
@@ -157,6 +159,7 @@ static struct XLibProto {
 	{ CDROMXObj::fileNames,				CDROMXObj::open,			CDROMXObj::close,			kXObj,					200 },	// D2
 	{ DarkenScreen::fileNames,			DarkenScreen::open,			DarkenScreen::close,		kXObj,					300 },	// D3
 	{ DeveloperStack::fileNames,		DeveloperStack::open,		DeveloperStack::close,		kXObj,					300 },	// D3
+	{ DrawXObj::fileNames,				DrawXObj::open,				DrawXObj::close,			kXObj,					400 },	// D4
 	{ Ednox::fileNames,					Ednox::open,				Ednox::close,				kXObj,					300 },	// D3
 	{ FileExists::fileNames,			FileExists::open,			FileExists::close,			kXObj,					300 },	// D3
 	{ FileIO::fileNames,				FileIO::open,				FileIO::close,				kXObj | kXtraObj,		200 },	// D2
@@ -188,6 +191,7 @@ static struct XLibProto {
 	{ VolumeList::fileNames,			VolumeList::open,			VolumeList::close,			kXObj,					300 },	// D3
 	{ WidgetXObj::fileNames,			WidgetXObj::open,			WidgetXObj::close, 			kXObj,					400 },  // D4
 	{ VideodiscXObj::fileNames,			VideodiscXObj::open,		VideodiscXObj::close,		kXObj,					200 },	// D2
+	{ XioXObj::fileNames,				XioXObj::open,				XioXObj::close,				kXObj,					400 },	// D3
 	{ XPlayAnim::fileNames,				XPlayAnim::open,			XPlayAnim::close,			kXObj,					300 },	// D3
 	{ Yasix::fileNames,					Yasix::open,				Yasix::close,				kXObj,					300 },	// D3
 	{ nullptr, nullptr, nullptr, 0, 0 }
diff --git a/engines/director/lingo/xlibs/draw.cpp b/engines/director/lingo/xlibs/draw.cpp
new file mode 100644
index 00000000000..59fb295033c
--- /dev/null
+++ b/engines/director/lingo/xlibs/draw.cpp
@@ -0,0 +1,221 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*************************************
+ *
+ * USED IN:
+ * מיץ פטל (Mitz Petel)
+ *
+ *************************************/
+/* -- Draw XObject version 1.0 beta
+Draw
+-- (c) 1995 - Daniele Russo
+-- New York University - Center for Digital Multimedia
+I        mNew                --Creates a new instance of the XObject.
+--
+I        mDispose            --Disposes of an XObject instance.
+--
+IIIII    mLine               --Draws a line.
+--
+IIIII    mLineBrush          --Draws a line using a pen.
+--
+IIIIII   mLineBrushTrans     --Draws a line using a transparent, multicolored pen.
+--
+IIIIIII  mLineBrushCol       --Draws a line using a transparent pen.
+--
+III      mFilterBMP          --Gets a picture containing all the pixels in an
+--                             image excluding those which are of a particular color.
+--                             The image to filter must be on the clipboard (as a BITMAP).
+--
+III      mFilterDIB          --As above, but the image must be a DIB.
+--
+III      mFilterBMP128       --Gets a picture containing all the pixels in an
+--                             image whose color is within the lower/upper
+--                             128. The image to filter must be on the clipboard
+--                             (as a BITMAP).
+--
+III      mFilterDIB128       --As above, but the image must be a DIB.
+--
+III      mFilterBMPMakeGhostImage
+--                             Gets a picture which has all the pixels that don't
+--                             have the background color changed to a given color,
+--                             specified by the caller. The image to filter must be
+--                             on the clipboard (as a BITMAP).
+--
+III      mFilterDIBMakeGhostImage
+--                             As above, but the image must be a DIB.
+--
+I        mEmptyClipboard     --Empties the clipboard. This method MUST be called
+--                             after using the result of mFilterBMP and mFilterBMP128.
+--
+IIII     mFill               --Fills an area starting at a specified pixel
+--                             and defined by all the adjacent pixels with
+--                             the same color.
+--
+III      mGetColor           --Gets the color of a pixel on the stage. The
+--                             result is the index of the color in Director's
+--                             palette.
+--
+IIIIII   mDrawRect           -- Draws a rectangle of a specified color.
+--
+IIIIII   mDrawFrame          -- Draws a frame using a dotted pen.
+*/
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/draw.h"
+
+
+namespace Director {
+
+const char *DrawXObj::xlibName = "Draw";
+const char *DrawXObj::fileNames[] = {
+	"DRAW",
+	0
+};
+
+static MethodProto xlibMethods[] = {
+	{ "New",						DrawXObj::m_new,						0,	0,	400 },	// D4
+	{ "Dispose",					DrawXObj::m_dispose,					0,	0,	400 },	// D4
+	{ "Line",						DrawXObj::m_line,						4,	4,	400 },	// D4
+	{ "LineBrush",					DrawXObj::m_lineBrush,					4,	4,	400 },	// D4
+	{ "LineBrushTrans",				DrawXObj::m_lineBrushTrans,				5,	5,	400 },	// D4
+	{ "LineBrushCol",				DrawXObj::m_lineBrushCol,				6,	6,	400 },	// D4
+	{ "FilterBMP",					DrawXObj::m_filterBMP,					2,	2,	400 },	// D4
+	{ "FilterDIB",					DrawXObj::m_filterDIB,					2,	2,	400 },	// D4
+	{ "FilterBMP128",				DrawXObj::m_filterBMP128,				2,	2,	400 },	// D4
+	{ "FilterDIB128",				DrawXObj::m_filterDIB128,				2,	2,	400 },	// D4
+	{ "FilterBMPMakeGhostImage",	DrawXObj::m_filterBMPMakeGhostImage,	2,	2,	400 },	// D4
+	{ "FilterDIBMakeGhostImage",	DrawXObj::m_filterDIBMakeGhostImage,	2,	2,	400 },	// D4
+	{ "EmptyClipboard",				DrawXObj::m_emptyClipboard,				0,	0,	400 },	// D4
+	{ "Fill",						DrawXObj::m_fill,						3,	3,	400 },	// D4
+	{ "GetColor",					DrawXObj::m_getColor,					2,	2,	400 },	// D4
+	{ "DrawRect",					DrawXObj::m_drawRect,					5,	5,	400 },	// D4
+	{ "DrawFrame",					DrawXObj::m_drawFrame,					5,	5,	400 },	// D4
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+void DrawXObj::open(int type) {
+	if (type == kXObj) {
+		DrawXObject::initMethods(xlibMethods);
+		DrawXObject *xobj = new DrawXObject(kXObj);
+		g_lingo->exposeXObject(xlibName, xobj);
+	}
+}
+
+void DrawXObj::close(int type) {
+	if (type == kXObj) {
+		DrawXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+DrawXObject::DrawXObject(ObjectType ObjectType) :Object<DrawXObject>("DrawXObj") {
+	_objType = ObjectType;
+}
+
+void DrawXObj::m_new(int nargs) {
+	g_lingo->push(g_lingo->_state->me);
+}
+
+void DrawXObj::m_dispose(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_dispose", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_line(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_line", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_lineBrush(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_lineBrush", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_lineBrushTrans(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_lineBrushTrans", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_lineBrushCol(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_lineBrushCol", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterBMP(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterBMP", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterDIB(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterDIB", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterBMP128(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterBMP128", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterDIB128(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterDIB128", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterBMPMakeGhostImage(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterBMPMakeGhostImage", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_filterDIBMakeGhostImage(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_filterDIBMakeGhostImage", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_emptyClipboard(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_emptyClipboard", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_fill(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_fill", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_getColor(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_getColor", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_drawRect(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_drawRect", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void DrawXObj::m_drawFrame(int nargs) {
+	g_lingo->printSTUBWithArglist("DrawXObj::m_drawFrame", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/draw.h b/engines/director/lingo/xlibs/draw.h
new file mode 100644
index 00000000000..d55ea7a8da6
--- /dev/null
+++ b/engines/director/lingo/xlibs/draw.h
@@ -0,0 +1,62 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_DRAWXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_DRAWXOBJ_H
+
+namespace Director {
+
+class DrawXObject : public Object<DrawXObject> {
+public:
+	DrawXObject(ObjectType objType);
+};
+
+namespace DrawXObj {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_dispose(int nargs);
+void m_line(int nargs);
+void m_lineBrush(int nargs);
+void m_lineBrushTrans(int nargs);
+void m_lineBrushCol(int nargs);
+void m_filterBMP(int nargs);
+void m_filterDIB(int nargs);
+void m_filterBMP128(int nargs);
+void m_filterDIB128(int nargs);
+void m_filterBMPMakeGhostImage(int nargs);
+void m_filterDIBMakeGhostImage(int nargs);
+void m_emptyClipboard(int nargs);
+void m_fill(int nargs);
+void m_getColor(int nargs);
+void m_drawRect(int nargs);
+void m_drawFrame(int nargs);
+
+} // End of namespace DrawXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xlibs/xio.cpp b/engines/director/lingo/xlibs/xio.cpp
new file mode 100644
index 00000000000..7767eeda9ff
--- /dev/null
+++ b/engines/director/lingo/xlibs/xio.cpp
@@ -0,0 +1,109 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*************************************
+ *
+ * USED IN:
+ * מיץ פטל (Mitz Petel)
+ *
+ *************************************/
+/* -- Xio - Functions for file manipulation 10Aug96 Moty Aharobnovitz
+xio
+I	mNew			--Creates a new instance of the XObject
+X	mDispose		--Disposes of XObject instance
+IS  mUnlock    --Given a correct code, enables usage of the Xobject
+IS  mDeleteFile  --Removes a file from the file system
+ISS  mCopyFile   --Copies a file from source to dest
+*/
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/xlibs/xio.h"
+
+
+namespace Director {
+
+const char *XioXObj::xlibName = "Xio";
+const char *XioXObj::fileNames[] = {
+	"XIO",
+	0
+};
+
+static MethodProto xlibMethods[] = {
+	{ "New",		XioXObj::m_new,			0,	0,	400 },	// D4
+	{ "Dispose",	XioXObj::m_dispose,		0,	0,	400 },	// D4
+	{ "Unlock",		XioXObj::m_unlock,		1,	1,	400 },	// D4
+	{ "DeleteFile",	XioXObj::m_deleteFile,	2,	2,	400 },	// D4
+	{ "CopyFile",	XioXObj::m_copyFile,	3,	3,	400 },	// D4
+	{ nullptr, nullptr, 0, 0, 0 }
+};
+
+void XioXObj::open(int type) {
+	if (type == kXObj) {
+		XioXObject::initMethods(xlibMethods);
+		XioXObject *xobj = new XioXObject(kXObj);
+		g_lingo->exposeXObject(xlibName, xobj);
+	}
+}
+
+void XioXObj::close(int type) {
+	if (type == kXObj) {
+		XioXObject::cleanupMethods();
+		g_lingo->_globalvars[xlibName] = Datum();
+	}
+}
+
+
+XioXObject::XioXObject(ObjectType ObjectType) :Object<XioXObject>("XioXObj") {
+	_objType = ObjectType;
+}
+
+void XioXObj::m_new(int nargs) {
+	g_lingo->push(g_lingo->_state->me);
+}
+
+void XioXObj::m_dispose(int nargs) {
+	g_lingo->printSTUBWithArglist("XioXObj::m_dispose", nargs);
+	g_lingo->dropStack(nargs);
+}
+
+void XioXObj::m_unlock(int nargs) {
+	Common::String unlockPassword = g_lingo->pop().asString();
+	warning("XioXObj::m_unlock: Unlocked with password \"%s\"", unlockPassword.c_str());
+	g_lingo->push(Datum(1));
+}
+
+void XioXObj::m_deleteFile(int nargs) {
+	Common::String filename = g_lingo->pop().asString();
+	warning("XioXObj::m_deleteFile: filename: \"%s\"", filename.c_str());
+	g_lingo->dropStack(nargs);
+	g_lingo->push(Datum(1));
+}
+
+void XioXObj::m_copyFile(int nargs) {
+	Common::String source = g_lingo->pop().asString();
+	Common::String destination = g_lingo->pop().asString();
+	warning("XioXObj::m_copyFile: source: \"%s\", destination: \"%s\"", source.c_str(), destination.c_str());
+	g_lingo->push(Datum(1));
+}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/xio.h b/engines/director/lingo/xlibs/xio.h
new file mode 100644
index 00000000000..59d200d0055
--- /dev/null
+++ b/engines/director/lingo/xlibs/xio.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_XIOXOBJ_H
+#define DIRECTOR_LINGO_XLIBS_XIOXOBJ_H
+
+namespace Director {
+
+class XioXObject : public Object<XioXObject> {
+public:
+	XioXObject(ObjectType objType);
+};
+
+namespace XioXObj {
+
+extern const char *xlibName;
+extern const char *fileNames[];
+
+void open(int type);
+void close(int type);
+
+void m_new(int nargs);
+void m_dispose(int nargs);
+void m_unlock(int nargs);
+void m_deleteFile(int nargs);
+void m_copyFile(int nargs);
+
+} // End of namespace XioXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/module.mk b/engines/director/module.mk
index c09ac848e83..824d22e7d2b 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -49,6 +49,7 @@ MODULE_OBJS = \
 	lingo/xlibs/cdromxobj.o \
 	lingo/xlibs/darkenscreen.o \
 	lingo/xlibs/developerStack.o \
+	lingo/xlibs/draw.o \
 	lingo/xlibs/ednox.o \
 	lingo/xlibs/fileexists.o \
 	lingo/xlibs/fileio.o \
@@ -80,6 +81,7 @@ MODULE_OBJS = \
 	lingo/xlibs/volumelist.o \
 	lingo/xlibs/widgetxobj.o \
 	lingo/xlibs/winxobj.o \
+	lingo/xlibs/xio.o \
 	lingo/xlibs/xplayanim.o \
 	lingo/xlibs/yasix.o
 


Commit: 4a2aeb1d2194b0730434cb7cfbba8b7465a66b61
    https://github.com/scummvm/scummvm/commit/4a2aeb1d2194b0730434cb7cfbba8b7465a66b61
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T15:50:46+01:00

Commit Message:
DIRECTOR: LINGO: Make FileIO aware of cross-platform line endings

This fixes Mitz Petel

Changed paths:
    engines/director/lingo/xlibs/fileio.cpp


diff --git a/engines/director/lingo/xlibs/fileio.cpp b/engines/director/lingo/xlibs/fileio.cpp
index 7313174bebd..3260f48a484 100644
--- a/engines/director/lingo/xlibs/fileio.cpp
+++ b/engines/director/lingo/xlibs/fileio.cpp
@@ -309,7 +309,11 @@ void FileIO::m_readLine(int nargs) {
 	// See D4 Using Lingo p. 323
 
 	g_lingo->push(Datum(""));
-	g_lingo->push(Datum("\n"));
+	if (g_director->getPlatform() == Common::kPlatformWindows) {
+		g_lingo->push(Datum("\r"));
+	} else {
+		g_lingo->push(Datum("\n"));
+	}
 	FileIO::m_readToken(2);
 }
 
@@ -318,7 +322,11 @@ void FileIO::m_readWord(int nargs) {
 	// See D4 Using Lingo p. 323
 
 	g_lingo->push(Datum(" "));
-	g_lingo->push(Datum(" \n"));
+	if (g_director->getPlatform() == Common::kPlatformWindows) {
+		g_lingo->push(Datum(" \r"));
+	} else {
+		g_lingo->push(Datum(" \n"));
+	}
 	FileIO::m_readToken(2);
 }
 
@@ -328,7 +336,7 @@ void FileIO::m_readPict(int nargs) {
 }
 
 bool FileIO::charInMatchString(char ch, const Common::String &matchString) {
-	if (ch == '\r')
+	if (ch == '\r' && g_director->getPlatform() == Common::kPlatformWindows)
 		ch = '\n';
 	return matchString.contains(ch);
 }




More information about the Scummvm-git-logs mailing list