[Scummvm-git-logs] scummvm master -> 8af497a75c42ce0f62b00ef02a3c8a31e32f52fb

rvanlaar noreply at scummvm.org
Sun Mar 20 10:44:25 UTC 2022


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:
8af497a75c DIRECTOR: LINGO: Generalize cb_theassign2


Commit: 8af497a75c42ce0f62b00ef02a3c8a31e32f52fb
    https://github.com/scummvm/scummvm/commit/8af497a75c42ce0f62b00ef02a3c8a31e32f52fb
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-03-20T11:43:59+01:00

Commit Message:
DIRECTOR: LINGO: Generalize cb_theassign2

Leverage the existing setTheEntity functionality in cb_theassign2.

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


diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 9e4b76778cd..63b2537684e 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -594,24 +594,17 @@ void LC::cb_theassign() {
 
 void LC::cb_theassign2() {
 	// cb_theassign2 is for setting movie-level properties
-
 	Common::String name = g_lingo->readString();
 	Datum value = g_lingo->pop();
 
-	if (name == "actorList") {
-		g_lingo->_actorList = value;
-	} else if (name == "searchPath") {
-		g_lingo->_searchPath = value;
-	} else if (name == "traceLoad") {
-		g_lingo->_traceLoad = value.asInt();
-	} else if (name == "updateMovieEnabled") {
-		g_lingo->_updateMovieEnabled = bool(value.asInt());
-	} else if (name == "preloadRam") {
-		// We always have the unlimited RAM, ignore
-	} else if (name == "preLoadEventAbort") {
-		g_lingo->_preLoadEventAbort = bool(value.asInt());
+	if (g_lingo->_theEntities.contains(name)) {
+		TheEntity *entity = g_lingo->_theEntities[name];
+		Datum id;
+		id.u.i = 0;
+		id.type = VOID;
+		g_lingo->setTheEntity(entity->entity, id, kTEANOArgs, value);
 	} else {
-		warning("BUILDBOT: cb_theassign2 unkown name: %s", name.c_str());
+		warning("LC::cb_theassign2 Can't assign theEntity: (%s)", name.c_str());
 	}
 }
 




More information about the Scummvm-git-logs mailing list