[Scummvm-git-logs] scummvm master -> 58560d17fbcbf229f81f01aaf8dcc2ea873002aa

sev- noreply at scummvm.org
Fri Jun 19 21:36:59 UTC 2026


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

Summary:
379e0dcde6 DIRECTOR: Keep track of context when working with factories
828a15ad8a CREDITS: Moved leads to residualvm section
58560d17fb CREDITS: Regenerate


Commit: 379e0dcde6887185af651dbb5e9636dd3655e039
    https://github.com/scummvm/scummvm/commit/379e0dcde6887185af651dbb5e9636dd3655e039
Author: Zachary Berry (zberry92 at gmail.com)
Date: 2026-06-19T23:29:48+02:00

Commit Message:
DIRECTOR: Keep track of context when working with factories

A factory could be created in one movie, and then called from
another MIAW (via tell). This should execute in the context
of the original movie.

This keeps track of the context window and switched Lingo
context when calling those methods.

Fixes startup in jewels

Changed paths:
    engines/director/cast.cpp
    engines/director/cast.h
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-object.cpp
    engines/director/lingo/lingo-object.h
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 7f403b7cd5e..b9d8ba07068 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1806,6 +1806,7 @@ void Cast::loadLingoContext(Common::SeekableReadStreamEndian &stream) {
 				if (_lingoArchive->getScriptContext(script->_scriptType, script->_id)) {
 					error("Cast::loadLingoContext: Script already defined for type %s, id %d", scriptType2str(script->_scriptType), script->_id);
 				}
+				script->_cast = this;
 				_lingoArchive->scriptContexts[script->_scriptType][script->_id] = script;
 				_lingoArchive->patchScriptHandler(script->_scriptType, CastMemberID(script->_id, _castLibID));
 			} else {
diff --git a/engines/director/cast.h b/engines/director/cast.h
index d6be2246252..43f08651f59 100644
--- a/engines/director/cast.h
+++ b/engines/director/cast.h
@@ -92,6 +92,7 @@ public:
 	void loadArchive();
 	void setArchive(Common::SharedPtr<Archive> archive);
 	Common::SharedPtr<Archive> getArchive() const { return _castArchive; };
+	Movie *getMovie() const { return _movie; }
 	Common::String getMacName() const { return _macName; }
 	Common::String getCastName() const { return _castName; }
 	void setCastName(const Common::String &name) { _castName = name; }
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 6d1a422f89c..d73993e97a5 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -47,6 +47,7 @@
 
 #include "director/director.h"
 #include "director/debugger.h"
+#include "director/cast.h"
 #include "director/movie.h"
 #include "director/score.h"
 #include "director/sprite.h"
@@ -258,6 +259,18 @@ void Lingo::pushContext(const Symbol funcSym, bool allowRetVal, Datum defaultRet
 		_state->context->incRefCount();
 	}
 
+	// Run the handler in the window that owns its script (MIAW scoping); mirrors c_tell().
+	fp->retWindow = nullptr;
+	if (funcSym.ctx && funcSym.ctx->_cast && funcSym.ctx->_cast->getMovie()) {
+		Window *targetWindow = funcSym.ctx->_cast->getMovie()->getWindow();
+		Window *currentWindow = _vm->getCurrentWindow();
+		if (targetWindow && targetWindow != currentWindow) {
+			fp->retWindow = currentWindow;
+			currentWindow->moveLingoState(targetWindow);
+			_vm->setCurrentWindow(targetWindow);
+		}
+	}
+
 	DatumHash *localvars = new DatumHash;
 	if (funcSym.anonymous && _state->localVars) {
 		// Execute anonymous functions within the current var frame.
@@ -364,8 +377,16 @@ void Lingo::popContext(bool aborting) {
 		printCallStack(_state->pc);
 	}
 
+	// Undo the pushContext window switch.
+	Window *retWindow = fp->retWindow;
+
 	delete fp;
 
+	if (retWindow && _vm->getCurrentWindow() != retWindow) {
+		_vm->getCurrentWindow()->moveLingoState(retWindow);
+		_vm->setCurrentWindow(retWindow);
+	}
+
 	g_debugger->popContextHook();
 }
 
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 4355af923f4..fd191216170 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -577,6 +577,7 @@ ScriptContext::ScriptContext(const ScriptContext &sc) : Object<ScriptContext>(sc
 
 	_id = sc._id;
 	_castLibHint = sc._castLibHint;
+	_cast = sc._cast;
 }
 
 ScriptContext::~ScriptContext() {
diff --git a/engines/director/lingo/lingo-object.h b/engines/director/lingo/lingo-object.h
index ebd29576ad4..b56717251e4 100644
--- a/engines/director/lingo/lingo-object.h
+++ b/engines/director/lingo/lingo-object.h
@@ -217,6 +217,7 @@ public:
 	int _scriptId;
 	uint16 _parentNumber;
 	uint16 _castLibHint;
+	Cast *_cast = nullptr;	// owning cast (MIAW scoping)
 	Common::Array<Common::String> _functionNames; // used by cb_localcall
 	Common::HashMap<Common::String, Common::Array<uint32>> _functionByteOffsets;
 	SymbolHash _functionHandlers;
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index d11bbe941ad..95ab781a34e 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -401,6 +401,7 @@ void LingoArchive::addCode(const Common::U32String &code, ScriptType type, uint1
 
 	ScriptContext *sc = g_lingo->_compiler->compileLingo(code, this, type, CastMemberID(id, cast->_castLibID), contextName, false, preprocFlags);
 	if (sc) {
+		sc->_cast = cast;
 		scriptContexts[type][id] = sc;
 		sc->incRefCount();
 	}
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index e140baedd48..2f30e6f1902 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -46,6 +46,7 @@ class Cast;
 class ScriptContext;
 class DirectorEngine;
 class Frame;
+class Window;
 class LingoCompiler;
 struct Breakpoint;
 
@@ -262,6 +263,7 @@ struct CFrame {	/* proc/func call stack frame */
 	Datum			defaultRetVal;		/* default return value */
 	int				paramCount;			/* original number of arguments submitted */
 	Common::Array<Datum> paramList;		/* original argument list */
+	Window			*retWindow;			/* window to restore on return */
 };
 
 struct LingoEvent {


Commit: 828a15ad8a6109a3cfcdc4347d0fedeb24192ea2
    https://github.com/scummvm/scummvm/commit/828a15ad8a6109a3cfcdc4347d0fedeb24192ea2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-06-19T23:36:26+02:00

Commit Message:
CREDITS: Moved leads to residualvm section

Changed paths:
    devtools/credits.pl


diff --git a/devtools/credits.pl b/devtools/credits.pl
index d94341e812f..08fcd2ac5be 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -508,10 +508,8 @@ begin_credits("Credits");
 	begin_section("ScummVM Team", "scummvm_team");
 		begin_section("Project Leaders", "project_leader");
 			begin_persons();
-				add_person("Paweł Kołodziejski", "aquadran", "");
-				add_person("Eugene Sandulenko", "sev", "");
-				add_person("Einar Johan T. Sømåen", "somaen", "");
-				add_person("Lothar Serra Mari", "felsqualle", "");
+				add_person("Eugene Sandulenko", "sev", "Project Leader");
+				add_person("Lothar Serra Mari", "felsqualle", "Project Co-Leader and Admin");
 			end_persons();
 		end_section();
 
@@ -1117,6 +1115,11 @@ begin_credits("Credits");
 		end_section();
 
 		begin_section("ResidualVM Contributors", "residualvm_contrib");
+			begin_section("Project Leaders");
+				add_person("Paweł Kołodziejski", "aquadran", "");
+				add_person("Einar Johan T. Sømåen", "somaen", "");
+			end_section();
+
 			begin_section("Grim");
 				add_person("Thomas Allen", "olldray", "Various engine code fixes and improvements");
 				add_person("Torbjörn Andersson", "eriktorbjorn", "Various code fixes");


Commit: 58560d17fbcbf229f81f01aaf8dcc2ea873002aa
    https://github.com/scummvm/scummvm/commit/58560d17fbcbf229f81f01aaf8dcc2ea873002aa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-06-19T23:36:41+02:00

Commit Message:
CREDITS: Regenerate

Changed paths:
    AUTHORS
    doc/docportal/help/credits.rst
    gui/credits.h


diff --git a/AUTHORS b/AUTHORS
index 7f6f7e8cd3e..09cd67fd4d1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,10 +2,8 @@ ScummVM Team
 ************
   Project Leaders
   ---------------
-     Pawel Kolodziejski
-     Eugene Sandulenko
-     Einar Johan T. Somaaen
-     Lothar Serra Mari
+     Eugene Sandulenko              - Project Leader
+     Lothar Serra Mari              - Project Co-Leader and Admin
 
   PR Office
   ---------
@@ -1217,6 +1215,10 @@ Other contributions
 
   ResidualVM Contributors
   -----------------------
+    Project Leaders:
+       Pawel Kolodziejski
+       Einar Johan T. Somaaen
+
     Grim:
        Thomas Allen                   - Various engine code fixes and
                                         improvements
diff --git a/doc/docportal/help/credits.rst b/doc/docportal/help/credits.rst
index 83cba9afb50..f59a4b9f8d7 100644
--- a/doc/docportal/help/credits.rst
+++ b/doc/docportal/help/credits.rst
@@ -14,14 +14,10 @@ Project Leaders
 .. list-table::
    :widths: 35 65
 
-   * - Paweł Kołodziejski
-     -
    * - Eugene Sandulenko
-     -
-   * - Einar Johan T. Sømåen
-     -
+     - Project Leader
    * - Lothar Serra Mari
-     -
+     - Project Co-Leader and Admin
 
 PR Office
 *********
@@ -2939,6 +2935,17 @@ Special thanks to Bob Heitman and Corey Cole for their support of FreeSCI.
 ResidualVM Contributors
 ***********************
 
+Project Leaders
+^^^^^^^^^^^^^^^
+
+.. list-table::
+   :widths: 35 65
+
+   * - Paweł Kołodziejski
+     -
+   * - Einar Johan T. Sømåen
+     -
+
 Grim
 ^^^^
 
diff --git a/gui/credits.h b/gui/credits.h
index 046f8917163..2953f97d528 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -3,10 +3,10 @@ static const char *const credits[] = {
 "C1""ScummVM Team",
 "",
 "C1""Project Leaders",
-"C0""Pawe\305\202 Ko\305\202odziejski",
 "C0""Eugene Sandulenko",
-"C0""Einar Johan T. S\303\270m\303\245en",
+"C2""Project Leader",
 "C0""Lothar Serra Mari",
+"C2""Project Co-Leader and Admin",
 "",
 "C1""PR Office",
 "C0""Arnaud Boutonn\303\251",
@@ -1450,6 +1450,10 @@ static const char *const credits[] = {
 "C0""",
 "",
 "C1""ResidualVM Contributors",
+"C1""Project Leaders",
+"C0""Pawe\305\202 Ko\305\202odziejski",
+"C0""Einar Johan T. S\303\270m\303\245en",
+"",
 "C1""Grim",
 "C0""Thomas Allen",
 "C2""Various engine code fixes and improvements",




More information about the Scummvm-git-logs mailing list