[Scummvm-git-logs] scummvm master -> 75040ccd24f89c38d2cf72d771b1b17b484e2b33

sev- noreply at scummvm.org
Mon Jul 10 13:38:40 UTC 2023


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:
75040ccd24 DIRECTOR: Allow using of 'me' in setting `the` expressions


Commit: 75040ccd24f89c38d2cf72d771b1b17b484e2b33
    https://github.com/scummvm/scummvm/commit/75040ccd24f89c38d2cf72d771b1b17b484e2b33
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-07-10T15:38:35+02:00

Commit Message:
DIRECTOR: Allow using of 'me' in setting `the` expressions

Statements like `set the perFrameHook to me` where `me` was used to refer
own object were not allowed. This patch fixes this by returning current object
from `me` keyword when used as assignment.

'totaldistortion-win' uses this feature to set `the perFrameHook` to current
factory mAtFrame method.

Additionally `ATD\HD\bdDREAML.DXR` of 'totaldistortion-win' also uses this.

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 c4e04920466..78fbfc7b972 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -627,7 +627,14 @@ void LC::cb_thepush() {
 			g_lingo->push(g_lingo->_state->me.u.obj->getProp(name));
 			return;
 		}
-		warning("cb_thepush: me object has no property '%s'", name.c_str());
+
+		if (name == "me") {
+			// Special case: push the me object itself
+			g_lingo->push(g_lingo->_state->me);
+			return;
+		}
+
+		warning("cb_thepush: me object has no property '%s', type: %d", name.c_str(), g_lingo->_state->me.type);
 	} else {
 		warning("cb_thepush: no me object");
 	}




More information about the Scummvm-git-logs mailing list