[Scummvm-git-logs] scummvm master -> 1c7d491edb331f3ce4caacadc7286ea26d9b5eea

sev- noreply at scummvm.org
Sat Feb 15 20:58:24 UTC 2025


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:
d8df4c1266 DIRECTOR: LINGO: Made executeHandler() execute only handler
1c7d491edb DIRECTOR: XTRAS: Added TODO to m_QTVRMouseOver()


Commit: d8df4c1266fb5713fa603e6fd5871e9976143b14
    https://github.com/scummvm/scummvm/commit/d8df4c1266fb5713fa603e6fd5871e9976143b14
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-15T21:58:12+01:00

Commit Message:
DIRECTOR: LINGO: Made executeHandler() execute only handler

In the previous implementation we gracefully continued execution up
to the code pat exhaustion. Now, executeHandler() executes only handler
and stops at the point where it was called.

Changed paths:
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h


diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 34d77e8281d..428d272911e 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -615,10 +615,13 @@ Common::String Lingo::formatFunctionBody(Symbol &sym) {
 	return result;
 }
 
-bool Lingo::execute() {
+bool Lingo::execute(int targetFrame) {
 	uint localCounter = 0;
 
 	while (!_abort && !_freezeState && _state->script && (*_state->script)[_state->pc] != STOP) {
+		if (targetFrame != -1 && _state->callstack.size() == targetFrame)
+			break;
+
 		if ((_exec._state == kPause) || (_exec._shouldPause && _exec._shouldPause())) {
 			// if execution is in pause -> poll event + update screen
 			_exec._state = kPause;
@@ -739,8 +742,10 @@ void Lingo::executeScript(ScriptType type, CastMemberID id) {
 void Lingo::executeHandler(const Common::String &name, int numargs) {
 	debugC(1, kDebugLingoExec, "Executing script handler : %s", name.c_str());
 	Symbol sym = getHandler(name);
+
+	int frame = _state->callstack.size();
 	LC::call(sym, numargs, false);
-	execute();
+	execute(frame);
 }
 
 void Lingo::lingoError(const char *s, ...) {
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 7ca1637bbb1..63a6d61a500 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -407,7 +407,7 @@ public:
 	void processEvents(Common::Queue<LingoEvent> &queue, bool isInputEvent);
 
 public:
-	bool execute();
+	bool execute(int targetFrame = -1);
 	void switchStateFromWindow();
 	void freezeState();
 	void freezePlayState();


Commit: 1c7d491edb331f3ce4caacadc7286ea26d9b5eea
    https://github.com/scummvm/scummvm/commit/1c7d491edb331f3ce4caacadc7286ea26d9b5eea
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-15T21:58:12+01:00

Commit Message:
DIRECTOR: XTRAS: Added TODO to m_QTVRMouseOver()

Changed paths:
    engines/director/lingo/xtras/qtvrxtra.cpp


diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
index 6f4331547ca..34799b6078e 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -465,6 +465,9 @@ void QtvrxtraXtra::m_QTVRMouseOver(int nargs) {
 				g_lingo->push(hotspot ? hotspot->id : 0);
 
 				g_lingo->executeHandler(me->_rolloverHotSpotHandler, 1);
+
+				// TODO We need to redraw current frame because the handler could change
+				// some fields etc. FIXME
 			}
 		}
 




More information about the Scummvm-git-logs mailing list