[Scummvm-git-logs] scummvm master -> 98cdffaf74fa7c7bd4fc69b59de3397f39101806

djsrv dservilla at gmail.com
Thu Jun 11 18:18:20 UTC 2020


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:
8fc7f16d43 DIRECTOR: LINGO: Fix kTheDate and kTheTime version
98cdffaf74 DIRECTOR: LINGO: Run LINGO.INI if present


Commit: 8fc7f16d4328da2744e905db4ca10a6b0730d2f3
    https://github.com/scummvm/scummvm/commit/8fc7f16d4328da2744e905db4ca10a6b0730d2f3
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-11T14:17:02-04:00

Commit Message:
DIRECTOR: LINGO: Fix kTheDate and kTheTime version

Changed paths:
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index c5d4e4bed5..5db619fe16 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -54,7 +54,7 @@ TheEntity entities[] = {
 	{ kTheColorQD,			"colorQD",			false, 2 },	// D2 f
 	{ kTheCommandDown,		"commandDown",		false, 2 },	// D2 f
 	{ kTheControlDown,		"controlDown",		false, 2 },	// D2 f
-	{ kTheDate,				"date",				false, 3 },	//		 D3
+	{ kTheDate,				"date",				false, 2 },	// D2 f
 	{ kTheDoubleClick,		"doubleClick",		false, 2 },	// D2 f
 	{ kTheExitLock,			"exitLock",			false, 2 },	// D2 p
 	{ kTheField,			"field",			true,  3 },	//		 D3
@@ -142,7 +142,7 @@ TheEntity entities[] = {
 	{ kTheTimeoutMouse,		"timeoutMouse",		false, 2 },	// D2 p
 	{ kTheTimeoutPlay,		"timeoutPlay",		false, 2 },	// D2 p
 	{ kTheTimeoutScript,	"timeoutScript",	false, 2 },	// D2 p
-	{ kTheTime,				"time",				false, 3 },	// 		D3 f
+	{ kTheTime,				"time",				false, 2 },	// D2 f
 	{ kTheTimer,			"timer",			false, 2 },	// D2 p
 	{ kTheTrace,			"trace",			false, 4 },	//				D4 p
 	{ kTheTraceLoad,		"traceLoad",		false, 4 },	//				D4 p


Commit: 98cdffaf74fa7c7bd4fc69b59de3397f39101806
    https://github.com/scummvm/scummvm/commit/98cdffaf74fa7c7bd4fc69b59de3397f39101806
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-11T14:17:02-04:00

Commit Message:
DIRECTOR: LINGO: Run LINGO.INI if present

Changed paths:
    engines/director/lingo/lingo-events.cpp
    engines/director/resource.cpp
    engines/director/types.h


diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp
index f456911914..6e70c96a8b 100644
--- a/engines/director/lingo/lingo-events.cpp
+++ b/engines/director/lingo/lingo-events.cpp
@@ -69,6 +69,8 @@ struct EventHandlerType {
 
 	{ kEventTimeout,			"timeout" },			// D2 as when
 
+	{ kEventStartUp,			"startUp" },
+
 	{ kEventNone,				0 },
 };
 
@@ -238,7 +240,7 @@ void Lingo::registerFrameEvent(LEvent event) {
 
 void Lingo::registerGenericEvent(LEvent event) {
 	// Movie Script
-	if (event == kEventStart || event == kEventPrepareMovie ||
+	if (event == kEventStart || event == kEventStartUp || event == kEventPrepareMovie ||
 			event == kEventStartMovie || event == kEventStopMovie)
 		; // we're OK
 	else
@@ -279,6 +281,7 @@ void Lingo::registerEvent(LEvent event) {
 			break;
 
 		case kEventStart:
+		case kEventStartUp:
 		case kEventStartMovie:
 		case kEventStopMovie:
 		case kEventTimeout:
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index f1f7ea65d7..bf2d997d17 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -75,6 +75,18 @@ Archive *DirectorEngine::openMainArchive(const Common::String movie) {
 }
 
 void DirectorEngine::loadEXE(const Common::String movie) {
+	Common::SeekableReadStream *iniStream = SearchMan.createReadStreamForMember("LINGO.INI");
+	if (iniStream) {
+		char *script = (char *)calloc(iniStream->size() + 1, 1);
+		iniStream->read(script, iniStream->size());
+		_lingo->addCode(script, kMovieScript, 0);
+		_lingo->processEvent(kEventStartUp);
+		free(script);
+		_lingo->restartLingo(false);
+	} else {
+		warning("No LINGO.INI");
+	}
+
 	Common::SeekableReadStream *exeStream = SearchMan.createReadStreamForMember(movie);
 	if (!exeStream)
 		error("Failed to open EXE '%s'", getEXEName().c_str());
diff --git a/engines/director/types.h b/engines/director/types.h
index ac74569a19..a2c9cdecb8 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -172,7 +172,8 @@ enum LEvent {
 	kEventMouseUpOutSide,
 	kEventMouseWithin,
 
-	kEventStart
+	kEventStart,
+	kEventStartUp
 };
 
 enum TransitionType {




More information about the Scummvm-git-logs mailing list