[Scummvm-git-logs] scummvm master -> 0a699b968116ad96153c686b13be88ce472f9bb5

moralrecordings code at moral.net.au
Thu Jun 18 14:49:40 UTC 2020


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:
0a699b9681 DIRECTOR: LINGO: Implement cb_thepush2


Commit: 0a699b968116ad96153c686b13be88ce472f9bb5
    https://github.com/scummvm/scummvm/commit/0a699b968116ad96153c686b13be88ce472f9bb5
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-06-18T14:49:37Z

Commit Message:
DIRECTOR: LINGO: Implement cb_thepush2

Implement cb_thepush2 for pushing the value of an entity to the stack.

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 f15c92101d..301d5a0a42 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -538,10 +538,19 @@ void LC::cb_thepush() {
 
 void LC::cb_thepush2() {
 	int nameId = g_lingo->readInt();
-	Common::String name = g_lingo->getName(nameId);
-	warning("STUB: cb_thepush2(%s)", name.c_str());
 	Datum result;
-	result.type = VOID;
+	Common::String name = g_lingo->getName(nameId);
+	if (g_lingo->_theEntities.contains(name)) {
+		TheEntity *entity = g_lingo->_theEntities[name];
+		Datum id;
+		id.u.i = 0;
+		id.type = VOID;
+		debugC(3, kDebugLingoExec, "cb_thepush: pushing value of entity %s to stack", name.c_str());
+		result = g_lingo->getTheEntity(entity->entity, id, kTEANOArgs);
+	} else {
+		warning("LC::cb_thepush2 Can't find theEntity: (%s)", name.c_str());
+		result.type = VOID;
+	}
 	g_lingo->push(result);
 }
 




More information about the Scummvm-git-logs mailing list