[Scummvm-git-logs] scummvm master -> 65ed2697bbe1a983f60e82fe0965855d3064f492

sev- noreply at scummvm.org
Thu Sep 4 14:34:37 UTC 2025


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

Summary:
c073d65341 DIRECTOR: IMGUI: Fix 'Go To Definition' tooltip being shown for builtins handlers
a8848e3349 DIRECTOR: Read Parent Number while reading scripts
ba094cdfd5 DIRECTOR: IMGUI: Fix continuous scrolling in the Scripts window
3d5915a13c DIRECTOR: IMGUI: Mark the script dirty after pause in debugger
f817ca5cd7 DIRECTOR: IMGUI: Normalize handler names in the execution context window
dd69902aa7 DIRECTOR: IMGUI: Show Continuation data in the Score window
14588e6fa6 DIRECTOR: IMGUI: Look for handler in factory script
4c39d6d57f DIRECTOR: IMGUI: Represent palette cast member as a number
cc1a7a67c7 DIRECTOR: IMGUI: Show continuous frames with the same background color
b23bc736c5 DIRECTOR: IMGUI: Show only one text per continuation
b356a37563 DIRECTOR: IMGUI: Show extended mode in score window properly
ee7a5f5278 DIRECTOR: IMGUI: Show script in the open handler window only once
b575b44161 DIRECTOR: IMGUI: Refactor handler naming in Execution Context window
65ed2697bb DIRECTOR: IMGUI: Minor formatting changes


Commit: c073d65341dd86c6cc59f1a94d175053bfdbac76
    https://github.com/scummvm/scummvm/commit/c073d65341dd86c6cc59f1a94d175053bfdbac76
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Fix 'Go To Definition' tooltip being shown for builtins handlers

For which we can't show the definition

Changed paths:
    engines/director/debugger/dt-script-d2.cpp
    engines/director/debugger/dt-script-d4.cpp


diff --git a/engines/director/debugger/dt-script-d2.cpp b/engines/director/debugger/dt-script-d2.cpp
index dc4b2461a7b..cbc3803f119 100644
--- a/engines/director/debugger/dt-script-d2.cpp
+++ b/engines/director/debugger/dt-script-d2.cpp
@@ -504,12 +504,14 @@ public:
 			}
 
 			ScriptContext *context = getScriptContext(obj, _script.id, *node->name);
-			ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), *node->name);
-			script.byteOffsets = context->_functionByteOffsets[script.handlerId];
-			script.moviePath = _script.moviePath;
-			script.handlerName = *node->name;
-			setScriptToDisplay(script);
-			_state->_dbg._goToDefinition = true;
+			if (context) {
+				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), *node->name);
+				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
+				script.moviePath = _script.moviePath;
+				script.handlerName = *node->name;
+				setScriptToDisplay(script);
+				_state->_dbg._goToDefinition = true;
+			}
 		}
 		ImGui::SameLine();
 		for (uint i = 0; i < node->args->size(); i++) {
diff --git a/engines/director/debugger/dt-script-d4.cpp b/engines/director/debugger/dt-script-d4.cpp
index 22933f73123..d4c0eef619e 100644
--- a/engines/director/debugger/dt-script-d4.cpp
+++ b/engines/director/debugger/dt-script-d4.cpp
@@ -104,11 +104,11 @@ public:
 		const ImVec4 color = (ImVec4)ImColor(g_lingo->_builtinCmds.contains(node.name) ? _state->_colors._builtin_color : _state->_colors._call_color);
 		ImGui::TextColored(color, "%s", node.name.c_str());
 		// TODO: we should test Director::builtins too (but inaccessible)
-		if (!g_lingo->_builtinCmds.contains(node.name) && ImGui::IsItemHovered() && ImGui::BeginTooltip()) {
+		if (!g_lingo->_builtinFuncs.contains(node.name) && ImGui::IsItemHovered() && ImGui::BeginTooltip()) {
 			ImGui::Text("Go to definition");
 			ImGui::EndTooltip();
 		}
-		if (!g_lingo->_builtinCmds.contains(node.name) && ImGui::IsItemClicked()) {
+		if (!g_lingo->_builtinFuncs.contains(node.name) && ImGui::IsItemClicked()) {
 			int32 obj = 0;
 			for (uint i = 0; i < _script.bytecodeArray.size(); i++) {
 				if (node._startOffset == _script.bytecodeArray[i].pos) {
@@ -119,12 +119,15 @@ public:
 				}
 			}
 			ScriptContext *context = getScriptContext(obj, _script.id, node.name);
-			ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), node.name);
-			script.byteOffsets = context->_functionByteOffsets[script.handlerId];
-			script.moviePath = _script.moviePath;
-			script.handlerName = node.name;
-			setScriptToDisplay(script);
-			_state->_dbg._goToDefinition = true;
+
+			if (context) {
+				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), node.name);
+				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
+				script.moviePath = _script.moviePath;
+				script.handlerName = node.name;
+				setScriptToDisplay(script);
+				_state->_dbg._goToDefinition = true;
+			}
 		}
 		ImGui::SameLine();
 


Commit: a8848e334978b03a8d2e03b3d6cd20c26aac2d7b
    https://github.com/scummvm/scummvm/commit/a8848e334978b03a8d2e03b3d6cd20c26aac2d7b
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: Read Parent Number while reading scripts

We need that parent number in case the scripts don't have a cast id
we have to refer to their parent's cast id

Changed paths:
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-scripts.cpp
    engines/director/lingo/lingo-bytecode.cpp
    engines/director/lingo/lingo-object.cpp
    engines/director/lingo/lingo-object.h


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index 517ad9dce14..43a6efc93c0 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -95,7 +95,7 @@ typedef struct ImGuiWindows {
 	bool logger = false;
 	bool archive = false;
 	bool watchedVars = false;
-	bool executionContext = false;
+	bool executionContext = true;
 } ImGuiWindows;
 
 typedef struct ScriptData {
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 3a6ef326e59..3208a8c9a7f 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -149,10 +149,15 @@ static void renderCallStack(uint pc) {
 			CFrame *head = callstack[callstack.size() - i - 1];
 			ScriptContext *scriptContext = head->sp.ctx;
 			int castLibID = movie->getCast()->_castLibID;
-			ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(head->sp.ctx->_id, castLibID), *head->sp.name);
+			int castId = head->sp.ctx->_id;
+			if (castId == -1) {
+				castId = movie->getCast()->getCastIdByScriptId(head->sp.ctx->_parentNumber);
+			}
+
+			ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 			script.byteOffsets = head->sp.ctx->_functionByteOffsets[script.handlerId];
 			script.moviePath = movie->getArchive()->getPathName().toString();
-			script.handlerName = head->sp.ctx->_id ? Common::String::format("%d:%s", head->sp.ctx->_id, script.handlerId.c_str()) : script.handlerId;
+			script.handlerName = Common::String::format("%s-%d:%s", castId, script.handlerId.c_str());
 			script.pc = framePc;
 			setScriptToDisplay(script);
 		}
@@ -287,10 +292,15 @@ static void updateCurrentScript() {
 	Director::Movie *movie = g_director->getCurrentMovie();
 	ScriptContext *scriptContext = head->sp.ctx;
 	int castLibID = movie->getCast()->_castLibID;
-	ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(head->sp.ctx->_id, castLibID), *head->sp.name);
+	int castId = head->sp.ctx->_id;
+	if (castId == -1) {
+		castId = movie->getCast()->getCastIdByScriptId(head->sp.ctx->_parentNumber);
+	}
+
+	ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 	script.byteOffsets = scriptContext->_functionByteOffsets[script.handlerId];
 	script.moviePath = movie->getArchive()->getPathName().toString();
-	script.handlerName = head->sp.ctx->_id ? Common::String::format("%d:%s", head->sp.ctx->_id, script.handlerId.c_str()) : script.handlerId;
+	script.handlerName = head->sp.ctx->_id ? Common::String::format("%d:%s", castId, script.handlerId.c_str()) : script.handlerId;
 	script.pc = 0;
 	setScriptToDisplay(script);
 }
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index e5eef56b38c..220b988c6de 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -1032,7 +1032,10 @@ ScriptContext *LingoCompiler::compileLingoV4(Common::SeekableReadStreamEndian &s
 	uint16 scriptId = lctxIndex;
 
 	// unk2
-	for (uint32 i = 0; i < 0x10; i++) {
+	stream.readSint16BE();
+	uint16 parentNumber = stream.readSint16BE();
+
+	for (uint32 i = 0; i < 0xC; i++) {
 		stream.readByte();
 	}
 
@@ -1114,12 +1117,12 @@ ScriptContext *LingoCompiler::compileLingoV4(Common::SeekableReadStreamEndian &s
 		}
 		debugC(1, kDebugCompile, "Add V4 script %d: factory '%s'", scriptId, factoryName.c_str());
 
-		sc = _assemblyContext = new ScriptContext(factoryName, scriptType, _assemblyId);
+		sc = _assemblyContext = new ScriptContext(factoryName, scriptType, _assemblyId, parentNumber);
 		registerFactory(factoryName);
 	} else {
 		debugC(1, kDebugCompile, "Add V4 script %d: %s %d", scriptId, scriptType2str(scriptType), _assemblyId);
 
-		sc = _assemblyContext = new ScriptContext(!castName.empty() ? castName : Common::String::format("%d", _assemblyId), scriptType, _assemblyId, archive->cast->_castLibID);
+		sc = _assemblyContext = new ScriptContext(!castName.empty() ? castName : Common::String::format("%d", _assemblyId), scriptType, _assemblyId, archive->cast->_castLibID, parentNumber);
 	}
 
 	// initialise each property
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index a6f3cf5debf..2ffd2046075 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -478,8 +478,8 @@ void LM::m_dispose(int nargs) {
 
 /* ScriptContext */
 
-ScriptContext::ScriptContext(Common::String name, ScriptType type, int id, uint16 castLibHint)
-	: Object<ScriptContext>(name), _scriptType(type), _id(id), _castLibHint(castLibHint) {
+ScriptContext::ScriptContext(Common::String name, ScriptType type, int id, uint16 castLibHint, uint16 parentNumber)
+	: Object<ScriptContext>(name), _scriptType(type), _id(id), _castLibHint(castLibHint), _parentNumber(parentNumber) {
 	_objType = kScriptObj;
 }
 
@@ -497,6 +497,7 @@ ScriptContext::ScriptContext(const ScriptContext &sc) : Object<ScriptContext>(sc
 	_constants = sc._constants;
 	_properties = sc._properties;
 	_propertyNames = sc._propertyNames;
+	_parentNumber = sc._parentNumber;
 
 	_id = sc._id;
 	_castLibHint = sc._castLibHint;
diff --git a/engines/director/lingo/lingo-object.h b/engines/director/lingo/lingo-object.h
index 9bcfd95bfb9..31275d3b20d 100644
--- a/engines/director/lingo/lingo-object.h
+++ b/engines/director/lingo/lingo-object.h
@@ -214,6 +214,7 @@ class ScriptContext : public Object<ScriptContext> {
 public:
 	ScriptType _scriptType;
 	int _id;
+	uint16 _parentNumber;
 	uint16 _castLibHint;
 	Common::Array<Common::String> _functionNames; // used by cb_localcall
 	Common::HashMap<Common::String, Common::Array<uint32>> _functionByteOffsets;
@@ -230,7 +231,7 @@ private:
 	bool _onlyInLctxContexts = false;
 
 public:
-	ScriptContext(Common::String name, ScriptType type = kNoneScript, int id = 0, uint16 castLibHint = 0);
+	ScriptContext(Common::String name, ScriptType type = kNoneScript, int id = 0, uint16 castLibHint = 0, uint16 parentNumber = 0);
 	ScriptContext(const ScriptContext &sc);
 	~ScriptContext() override;
 


Commit: ba094cdfd553cdf7b4764ff531feb3e1c0ea415c
    https://github.com/scummvm/scummvm/commit/ba094cdfd553cdf7b4764ff531feb3e1c0ea415c
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Fix continuous scrolling in the Scripts window

Changed paths:
    engines/director/debugger/debugtools.cpp
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-script-d4.cpp
    engines/director/debugger/dt-scripts.cpp


diff --git a/engines/director/debugger/debugtools.cpp b/engines/director/debugger/debugtools.cpp
index ba924663263..68c8c62836e 100644
--- a/engines/director/debugger/debugtools.cpp
+++ b/engines/director/debugger/debugtools.cpp
@@ -379,6 +379,7 @@ void setScriptToDisplay(const ImGuiScript &script) {
 	scriptData->_scripts.push_back(script);
 	scriptData->_current = index;
 	scriptData->_showScript = true;
+	_state->_dbg._scrollToPC = true;
 }
 
 void displayScriptRef(CastMemberID &scriptId) {
diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index 43a6efc93c0..e88b865efd0 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -95,7 +95,7 @@ typedef struct ImGuiWindows {
 	bool logger = false;
 	bool archive = false;
 	bool watchedVars = false;
-	bool executionContext = true;
+	bool executionContext = false;
 } ImGuiWindows;
 
 typedef struct ScriptData {
@@ -127,6 +127,7 @@ typedef struct ImGuiState {
 	struct {
 		bool _isScriptDirty = false; // indicates whether or not we have to display the script corresponding to the current stackframe
 		bool _goToDefinition = false;
+		bool _scrollToPC = false;
 		uint _lastLinePC = 0;
 		uint _callstackSize = 0;
 	} _dbg;
diff --git a/engines/director/debugger/dt-script-d4.cpp b/engines/director/debugger/dt-script-d4.cpp
index d4c0eef619e..a627600265e 100644
--- a/engines/director/debugger/dt-script-d4.cpp
+++ b/engines/director/debugger/dt-script-d4.cpp
@@ -1188,9 +1188,9 @@ private:
 		if (showCurrentStatement) {
 			dl->AddQuadFilled(ImVec2(pos.x, pos.y + 4.f), ImVec2(pos.x + 9.f, pos.y + 4.f), ImVec2(pos.x + 9.f, pos.y + 10.f), ImVec2(pos.x, pos.y + 10.f), ImColor(_state->_colors._current_statement));
 			dl->AddTriangleFilled(ImVec2(pos.x + 8.f, pos.y), ImVec2(pos.x + 14.f, pos.y + 7.f), ImVec2(pos.x + 8.f, pos.y + 14.f), ImColor(_state->_colors._current_statement));
-			if (!_scrollDone && _scrollTo && g_lingo->_state->callstack.size() != _state->_dbg._callstackSize) {
+			if (_state->_dbg._scrollToPC && _scrollTo && g_lingo->_state->callstack.size() != _state->_dbg._callstackSize) {
 				ImGui::SetScrollHereY(0.5f);
-				_scrollDone = true;
+				_state->_dbg._scrollToPC = false;
 			}
 			dl->AddRectFilled(ImVec2(pos.x + 16.f, pos.y), ImVec2(pos.x + width, pos.y + 16.f), ImColor(IM_COL32(0xFF, 0xFF, 0x00, 0x20)), 0.4f);
 		}
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 3208a8c9a7f..a8beffa6ecc 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -157,7 +157,7 @@ static void renderCallStack(uint pc) {
 			ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 			script.byteOffsets = head->sp.ctx->_functionByteOffsets[script.handlerId];
 			script.moviePath = movie->getArchive()->getPathName().toString();
-			script.handlerName = Common::String::format("%s-%d:%s", castId, script.handlerId.c_str());
+			script.handlerName = Common::String::format("%d:%s", castId, script.handlerId.c_str());
 			script.pc = framePc;
 			setScriptToDisplay(script);
 		}


Commit: 3d5915a13cff0bba8d43529a92e338bcb654792b
    https://github.com/scummvm/scummvm/commit/3d5915a13cff0bba8d43529a92e338bcb654792b
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Mark the script dirty after pause in debugger

Changed paths:
    engines/director/debugger/dt-controlpanel.cpp
    engines/director/debugger/dt-scripts.cpp


diff --git a/engines/director/debugger/dt-controlpanel.cpp b/engines/director/debugger/dt-controlpanel.cpp
index 8f1afdeba67..9e28ebf5ffe 100644
--- a/engines/director/debugger/dt-controlpanel.cpp
+++ b/engines/director/debugger/dt-controlpanel.cpp
@@ -53,6 +53,7 @@ static bool stepOverShouldPauseDebugger() {
 	if (((g_lingo->_state->callstack.size() == _state->_dbg._callstackSize) && (line != _state->_dbg._lastLinePC)) ||
 		 (g_lingo->_state->callstack.size() < _state->_dbg._callstackSize)) {
 		_state->_dbg._lastLinePC = line;
+		_state->_dbg._isScriptDirty = true;
 		return true;
 	}
 
@@ -67,6 +68,7 @@ static bool stepInShouldPauseDebugger() {
 	// - OR when the callstack level change
 	if ((g_lingo->_state->callstack.size() != _state->_dbg._callstackSize) || (_state->_dbg._lastLinePC != line)) {
 		_state->_dbg._lastLinePC = line;
+		_state->_dbg._isScriptDirty = true;
 		return true;
 	}
 
@@ -80,6 +82,7 @@ static bool stepOutShouldPause() {
 	// - OR we go up in the callstack
 	if (g_lingo->_state->callstack.size() < _state->_dbg._callstackSize) {
 		_state->_dbg._lastLinePC = line;
+		_state->_dbg._isScriptDirty = true;
 		return true;
 	}
 
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index a8beffa6ecc..8c000387165 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -300,7 +300,7 @@ static void updateCurrentScript() {
 	ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 	script.byteOffsets = scriptContext->_functionByteOffsets[script.handlerId];
 	script.moviePath = movie->getArchive()->getPathName().toString();
-	script.handlerName = head->sp.ctx->_id ? Common::String::format("%d:%s", castId, script.handlerId.c_str()) : script.handlerId;
+	script.handlerName = Common::String::format("%d:%s", castId, script.handlerId.c_str());
 	script.pc = 0;
 	setScriptToDisplay(script);
 }


Commit: f817ca5cd7ea675cb3ac4b18c4863523dc1c668e
    https://github.com/scummvm/scummvm/commit/f817ca5cd7ea675cb3ac4b18c4863523dc1c668e
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Normalize handler names in the execution context window

Changed paths:
    engines/director/debugger/dt-script-d2.cpp
    engines/director/debugger/dt-script-d4.cpp
    engines/director/debugger/dt-scripts.cpp
    engines/director/lingo/lingo-bytecode.cpp
    engines/director/lingo/lingo-object.cpp
    engines/director/lingo/lingo-object.h


diff --git a/engines/director/debugger/dt-script-d2.cpp b/engines/director/debugger/dt-script-d2.cpp
index cbc3803f119..1616d043926 100644
--- a/engines/director/debugger/dt-script-d2.cpp
+++ b/engines/director/debugger/dt-script-d2.cpp
@@ -20,6 +20,8 @@
  */
 
 #include "director/director.h"
+#include "director/movie.h"
+#include "director/cast.h"
 #include "director/debugger/dt-internal.h"
 
 #include "director/debugger.h"
@@ -506,9 +508,23 @@ public:
 			ScriptContext *context = getScriptContext(obj, _script.id, *node->name);
 			if (context) {
 				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), *node->name);
+				Director::Movie *movie = g_director->getCurrentMovie();
+
+				int castId = context->_id;
+				bool childScript = false;
+				if (castId == -1) {
+					castId = movie->getCast()->getCastIdByScriptId(context->_parentNumber);
+					childScript = true;
+				}
 				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
 				script.moviePath = _script.moviePath;
-				script.handlerName = *node->name;
+
+				// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
+				if (childScript) {
+					script.handlerName = Common::String::format("%d (p<%d>): %s", context->_scriptId, castId, script.handlerId.c_str());
+				} else {
+					script.handlerName = Common::String::format("%d (%d): %s", context->_scriptId, castId, script.handlerId.c_str());
+				}
 				setScriptToDisplay(script);
 				_state->_dbg._goToDefinition = true;
 			}
diff --git a/engines/director/debugger/dt-script-d4.cpp b/engines/director/debugger/dt-script-d4.cpp
index a627600265e..ca65423d700 100644
--- a/engines/director/debugger/dt-script-d4.cpp
+++ b/engines/director/debugger/dt-script-d4.cpp
@@ -20,6 +20,8 @@
  */
 
 #include "director/director.h"
+#include "director/movie.h"
+#include "director/cast.h"
 #include "director/debugger/dt-internal.h"
 
 #include "director/debugger.h"
@@ -122,9 +124,22 @@ public:
 
 			if (context) {
 				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), node.name);
+				Director::Movie *movie = g_director->getCurrentMovie();
+
 				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
 				script.moviePath = _script.moviePath;
-				script.handlerName = node.name;
+				int castId = context->_id;
+				bool childScript = false;
+				if (castId == -1) {
+					castId = movie->getCast()->getCastIdByScriptId(context->_parentNumber);
+					childScript = true;
+				}
+				// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
+				if (childScript) {
+					script.handlerName = Common::String::format("%d (p<%d>): %s", context->_scriptId, castId, script.handlerId.c_str());
+				} else {
+					script.handlerName = Common::String::format("%d (%d): %s", context->_scriptId, castId, script.handlerId.c_str());
+				}
 				setScriptToDisplay(script);
 				_state->_dbg._goToDefinition = true;
 			}
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 8c000387165..083ed6086f2 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -118,6 +118,8 @@ static void renderCallStack(uint pc) {
 		return;
 	}
 
+	Movie *movie = g_director->getCurrentMovie();
+
 	ImGui::Text("Call stack:\n");
 	for (int i = 0; i < (int)callstack.size(); i++) {
 		Common::String stackFrame;
@@ -128,9 +130,14 @@ static void renderCallStack(uint pc) {
 
 		if (frame->sp.type != VOIDSYM) {
 			stackFrame = Common::String::format("#%d ", i);
-			if (frame->sp.ctx && frame->sp.ctx->_id) {
-				stackFrame += Common::String::format("%d:", frame->sp.ctx->_id);
+			stackFrame += Common::String::format("%d ", frame->sp.ctx->_scriptId);
+
+			if (frame->sp.ctx && frame->sp.ctx->_id != -1) {
+				stackFrame += Common::String::format("(%d): ", frame->sp.ctx->_id);
+			} else if (frame->sp.ctx) {
+				stackFrame += Common::String::format("(<p%d>): ", movie->getCast()->getCastIdByScriptId(frame->sp.ctx->_parentNumber));
 			}
+
 			if (frame->sp.ctx && frame->sp.ctx->isFactory()) {
 				stackFrame += Common::String::format("%s:", frame->sp.ctx->getName().c_str());
 			}
@@ -139,25 +146,33 @@ static void renderCallStack(uint pc) {
 				framePc
 			);
 		} else {
-			stackFrame = Common::String::format("#%d [unknown] at [%5d]\n", i,
+			stackFrame = Common::String::format("#%d [unknown] at [%5d]\n",
+				i,
 				framePc
 			);
 		}
 
 		if (ImGui::Selectable(stackFrame.c_str())) {
-			Director::Movie *movie = g_director->getCurrentMovie();
 			CFrame *head = callstack[callstack.size() - i - 1];
 			ScriptContext *scriptContext = head->sp.ctx;
 			int castLibID = movie->getCast()->_castLibID;
 			int castId = head->sp.ctx->_id;
+			bool childScript = false;
 			if (castId == -1) {
 				castId = movie->getCast()->getCastIdByScriptId(head->sp.ctx->_parentNumber);
+				childScript = true;
 			}
 
 			ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 			script.byteOffsets = head->sp.ctx->_functionByteOffsets[script.handlerId];
 			script.moviePath = movie->getArchive()->getPathName().toString();
-			script.handlerName = Common::String::format("%d:%s", castId, script.handlerId.c_str());
+
+			// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
+			if (childScript) {
+				script.handlerName = Common::String::format("%d (p<%d>): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
+			} else {
+				script.handlerName = Common::String::format("%d (%d):%s", scriptContext->_scriptId, castId, script.handlerId.c_str());
+			}
 			script.pc = framePc;
 			setScriptToDisplay(script);
 		}
@@ -222,8 +237,6 @@ static bool showHandler(ImGuiScript handler) {
 	Common::String wName;
 	if (ctx) {
 		wName = Common::String(ctx->asString());
-	} else {
-		wName = Common::String();
 	}
 
 	ImGui::SetNextWindowPos(ImVec2(20, 160), ImGuiCond_FirstUseEver);
@@ -293,14 +306,22 @@ static void updateCurrentScript() {
 	ScriptContext *scriptContext = head->sp.ctx;
 	int castLibID = movie->getCast()->_castLibID;
 	int castId = head->sp.ctx->_id;
+	bool childScript = false;
 	if (castId == -1) {
 		castId = movie->getCast()->getCastIdByScriptId(head->sp.ctx->_parentNumber);
+		childScript = true;
 	}
 
 	ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 	script.byteOffsets = scriptContext->_functionByteOffsets[script.handlerId];
 	script.moviePath = movie->getArchive()->getPathName().toString();
-	script.handlerName = Common::String::format("%d:%s", castId, script.handlerId.c_str());
+
+	// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
+	if (childScript) {
+		script.handlerName = Common::String::format("%d (p<%d>): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
+	} else {
+		script.handlerName = Common::String::format("%d (%d): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
+	}
 	script.pc = 0;
 	setScriptToDisplay(script);
 }
@@ -362,6 +383,13 @@ void showFuncList() {
 						if (ImGui::TreeNode(contextName.c_str())) {
 							if (ImGui::BeginTable("Functions", 1, ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg)) {
 								ImGui::TableSetupColumn("Function", ImGuiTableColumnFlags_WidthStretch, 240.f);
+								int castId = context._value->_id;
+								bool childScript = false;
+								if (castId == -1) {
+									castId = movie->getCast()->getCastIdByScriptId(context._value->_parentNumber);
+									childScript = true;
+								}
+
 								for (auto &functionHandler : context._value->_functionHandlers) {
 									Common::String function = Common::String::format("%s", g_lingo->formatFunctionName(functionHandler._value).c_str());
 
@@ -372,7 +400,13 @@ void showFuncList() {
 										ImGuiScript script = toImGuiScript(context._value->_scriptType, memberID, functionHandler._key);
 										script.byteOffsets = context._value->_functionByteOffsets[script.handlerId];
 										script.moviePath = movie->getArchive()->getPathName().toString();
-										script.handlerName = g_lingo->formatFunctionName(functionHandler._value);
+
+										// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler: script type
+										if (childScript) {
+											script.handlerName = Common::String::format("%d(p<%d>):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
+										} else {
+											script.handlerName = Common::String::format("%d(%d):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
+										}
 										addToOpenHandlers(script);
 									}
 								}
@@ -410,6 +444,13 @@ void showFuncList() {
 						if (ImGui::TreeNode(contextName.c_str())) {
 							if (ImGui::BeginTable("Functions", 1, ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg)) {
 								ImGui::TableSetupColumn("Function", ImGuiTableColumnFlags_WidthStretch, 240.f);
+								int castId = context._value->_id;
+								bool childScript = false;
+								if (castId == -1) {
+									castId = movie->getCast()->getCastIdByScriptId(context._value->_parentNumber);
+									childScript = true;
+								}
+
 								for (auto &functionHandler : context._value->_functionHandlers) {
 									Common::String function = Common::String::format("%s", g_lingo->formatFunctionName(functionHandler._value).c_str());
 
@@ -420,7 +461,13 @@ void showFuncList() {
 										ImGuiScript script = toImGuiScript(context._value->_scriptType, memberID, functionHandler._key);
 										script.byteOffsets = context._value->_functionByteOffsets[script.handlerId];
 										script.moviePath = movie->getArchive()->getPathName().toString();
-										script.handlerName = g_lingo->formatFunctionName(functionHandler._value);
+
+										// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler: script type
+										if (childScript) {
+											script.handlerName = Common::String::format("%d(p<%d>):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
+										} else {
+											script.handlerName = Common::String::format("%d(%d):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
+										}
 										addToOpenHandlers(script);
 									}
 								}
@@ -527,6 +574,7 @@ void showExecutionContext() {
 	ImGui::SetNextWindowSize(ImVec2(500, 750), ImGuiCond_FirstUseEver);
 
 	Director::Lingo *lingo = g_director->getLingo();
+	Movie *movie = g_director->getCurrentMovie();
 
 	Window *currentWindow = g_director->getCurrentWindow();
 	bool scriptsRendered = false;
@@ -617,7 +665,6 @@ void showExecutionContext() {
 			if (!context || context->_functionHandlers.size() == 1) {
 				renderScript(current, scriptData->_showByteCode, true);
 			} else {
-				Movie *movie = g_director->getCurrentMovie();
 				for (auto &functionHandler : context->_functionHandlers) {
 					if (current.handlerId == functionHandler._key) {
 						renderScript(current, scriptData->_showByteCode, true);
@@ -676,7 +723,11 @@ void showExecutionContext() {
 				ScriptContext* context = getScriptContext(current.id);
 
 				if (context) {
-					Common::String scriptInfo = Common::String::format("%d:%s type:%s", context->_id, context->getName().c_str(), scriptType2str(context->_scriptType));
+					int castId = context->_id;
+					if (castId == -1) {
+						castId = movie->getCast()->getCastIdByScriptId(context->_parentNumber);
+					}
+					Common::String scriptInfo = Common::String::format("%d:%s type:%s", castId, context->getName().c_str(), scriptType2str(context->_scriptType));
 					ImGui::Text("%s", scriptInfo.c_str());
 				}
 
@@ -730,7 +781,6 @@ void showExecutionContext() {
 				if (!context || context->_functionHandlers.size() == 1) {
 					renderScript(current, scriptData->_showByteCode, true);
 				} else {
-					Movie *movie = g_director->getCurrentMovie();
 					for (auto &functionHandler : context->_functionHandlers) {
 						if (current.handlerId == functionHandler._key) {
 							renderScript(current, scriptData->_showByteCode, true);
diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index 220b988c6de..1945f171b69 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -1101,7 +1101,7 @@ ScriptContext *LingoCompiler::compileLingoV4(Common::SeekableReadStreamEndian &s
 			castName = info->name;
 	} else {
 		warning("Script %d has no associated cast member", scriptId);
-		scriptType = kNoneScript;
+		scriptType = kMovieScript;
 	}
 
 	_assemblyArchive = archive;
@@ -1117,12 +1117,12 @@ ScriptContext *LingoCompiler::compileLingoV4(Common::SeekableReadStreamEndian &s
 		}
 		debugC(1, kDebugCompile, "Add V4 script %d: factory '%s'", scriptId, factoryName.c_str());
 
-		sc = _assemblyContext = new ScriptContext(factoryName, scriptType, _assemblyId, parentNumber);
+		sc = _assemblyContext = new ScriptContext(factoryName, scriptType, _assemblyId, parentNumber, scriptId);
 		registerFactory(factoryName);
 	} else {
 		debugC(1, kDebugCompile, "Add V4 script %d: %s %d", scriptId, scriptType2str(scriptType), _assemblyId);
 
-		sc = _assemblyContext = new ScriptContext(!castName.empty() ? castName : Common::String::format("%d", _assemblyId), scriptType, _assemblyId, archive->cast->_castLibID, parentNumber);
+		sc = _assemblyContext = new ScriptContext(!castName.empty() ? castName : Common::String::format("%d", _assemblyId), scriptType, _assemblyId, archive->cast->_castLibID, parentNumber, scriptId);
 	}
 
 	// initialise each property
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 2ffd2046075..104b8c729c2 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -478,8 +478,8 @@ void LM::m_dispose(int nargs) {
 
 /* ScriptContext */
 
-ScriptContext::ScriptContext(Common::String name, ScriptType type, int id, uint16 castLibHint, uint16 parentNumber)
-	: Object<ScriptContext>(name), _scriptType(type), _id(id), _castLibHint(castLibHint), _parentNumber(parentNumber) {
+ScriptContext::ScriptContext(Common::String name, ScriptType type, int id, uint16 castLibHint, uint16 parentNumber, int scriptId)
+	: Object<ScriptContext>(name), _scriptType(type), _id(id), _castLibHint(castLibHint), _parentNumber(parentNumber), _scriptId(scriptId) {
 	_objType = kScriptObj;
 }
 
@@ -498,6 +498,7 @@ ScriptContext::ScriptContext(const ScriptContext &sc) : Object<ScriptContext>(sc
 	_properties = sc._properties;
 	_propertyNames = sc._propertyNames;
 	_parentNumber = sc._parentNumber;
+	_scriptId = sc._scriptId;
 
 	_id = sc._id;
 	_castLibHint = sc._castLibHint;
diff --git a/engines/director/lingo/lingo-object.h b/engines/director/lingo/lingo-object.h
index 31275d3b20d..c6ba3757902 100644
--- a/engines/director/lingo/lingo-object.h
+++ b/engines/director/lingo/lingo-object.h
@@ -214,6 +214,7 @@ class ScriptContext : public Object<ScriptContext> {
 public:
 	ScriptType _scriptType;
 	int _id;
+	int _scriptId;
 	uint16 _parentNumber;
 	uint16 _castLibHint;
 	Common::Array<Common::String> _functionNames; // used by cb_localcall
@@ -231,7 +232,7 @@ private:
 	bool _onlyInLctxContexts = false;
 
 public:
-	ScriptContext(Common::String name, ScriptType type = kNoneScript, int id = 0, uint16 castLibHint = 0, uint16 parentNumber = 0);
+	ScriptContext(Common::String name, ScriptType type = kNoneScript, int id = 0, uint16 castLibHint = 0, uint16 parentNumber = 0, int scriptId = 0);
 	ScriptContext(const ScriptContext &sc);
 	~ScriptContext() override;
 


Commit: dd69902aa738003f597c403ba051b71f2751fc14
    https://github.com/scummvm/scummvm/commit/dd69902aa738003f597c403ba051b71f2751fc14
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Show Continuation data in the Score window

In the original director, the Score window used to show if a particular
sprite in a channel continues to stay the same throughout the next n
number of frames
i.e. the start frame at which the sprite is introduced and the end frame
until which the sprite doesn't change in that channel
Implement similar functionality in the ImGui Score window in ScummVM's
Director

Changed paths:
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-score.cpp
    engines/director/sprite.cpp
    engines/director/sprite.h


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index e88b865efd0..db02ba934bc 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -179,6 +179,9 @@ typedef struct ImGuiState {
 		int channel = -1;
 	} _selectedScoreCast;
 
+	Common::Array<Common::Array<Common::Pair<uint, uint>>> _continuationData;
+	bool _loadedContinuationData;
+
 	int _scoreMode = 0;
 	int _scoreFrameOffset = 1;
 
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index e5eb435f908..2681daebff9 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -57,6 +57,61 @@ const uint32 scoreColors[6] = {
 	0xffce9c,
 };
 
+static void buildContinuationData() {
+	if (_state->_loadedContinuationData) {
+		return;
+	}
+
+	Score *score = g_director->getCurrentMovie()->getScore();
+	uint numFrames = score->_scoreCache.size();
+
+	uint numChannels = score->_scoreCache[0]->_sprites.size();
+	_state->_continuationData.resize(numChannels);
+
+	for (int ch = 0; ch < (int)numChannels; ch++) {
+		_state->_continuationData[ch].resize(numFrames);
+
+		uint currentContinuation = 1;
+		for (int f = 0; f < (int)numFrames; f++) {
+			Frame &frame = *score->_scoreCache[f];
+			Sprite &sprite = *frame._sprites[ch];
+
+			Frame *prevFrame = (f == 0) ? nullptr : score->_scoreCache[f - 1];
+			Sprite *prevSprite = (prevFrame) ? prevFrame->_sprites[ch] : nullptr;
+
+			if (prevSprite) {
+				if (!(*prevSprite == sprite)) {
+					currentContinuation = f + 1;
+				}
+			} else {
+				currentContinuation = f + 1;
+			}
+			_state->_continuationData[ch][f].first = currentContinuation;
+		}
+
+		currentContinuation = 1;
+		for (int f = (int)numFrames - 1; f >= 0; f--) {
+			Frame &frame = *score->_scoreCache[f];
+			Sprite &sprite = *frame._sprites[ch];
+
+			Frame *nextFrame = (f == (int)numFrames - 1) ? nullptr : score->_scoreCache[f + 1];
+			Sprite *nextSprite = (nextFrame) ? nextFrame->_sprites[ch] : nullptr;
+
+			if (nextSprite) {
+				if (!(*nextSprite == sprite)) {
+					currentContinuation = f + 1;
+				}
+			} else {
+				currentContinuation = f + 1;
+			}
+			_state->_continuationData[ch][f].second = currentContinuation;
+			debug("%d %d [%d, %d]", ch, f, _state->_continuationData[ch][f].first, _state->_continuationData[ch][f].second);
+		}
+	}
+
+	_state->_loadedContinuationData = true;
+}
+
 static void displayScoreChannel(int ch, int mode, int modeSel) {
 	Score *score = g_director->getCurrentMovie()->getScore();
 	uint numFrames = score->_scoreCache.size();
@@ -207,6 +262,8 @@ void showScore() {
 	if (!_state->_w.score)
 		return;
 
+	buildContinuationData();
+
 	ImVec2 pos(40, 40);
 	ImGui::SetNextWindowPos(pos, ImGuiCond_FirstUseEver);
 
@@ -313,10 +370,10 @@ void showScore() {
 
 			if (castMember || shape) {
 				ImGui::Text("\uf816"); ImGui::SameLine();	// line_start_circle
-				ImGui::Text("  ?"); ImGui::SameLine(50);
+				ImGui::Text("  %d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first); ImGui::SameLine(50);
 				ImGui::SetItemTooltip("Start Frame");
 				ImGui::Text("\uf819"); ImGui::SameLine();	// line_end_square
-				ImGui::Text("  ?"); ImGui::SameLine();
+				ImGui::Text("  %d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second); ImGui::SameLine();
 				ImGui::SetItemTooltip("End Frame");
 			}
 
diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index 221f4536005..9ae962dab90 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -144,6 +144,20 @@ Sprite& Sprite::operator=(const Sprite &sprite) {
 	return *this;
 }
 
+bool Sprite::operator==(const Sprite &sprite) {
+	return _spriteType == sprite._spriteType &&
+		_castId == sprite._castId &&
+		_startPoint == sprite._startPoint &&
+		_width == sprite._width &&
+		_height == sprite._height &&
+		_ink == sprite._ink &&
+		_foreColor == sprite._foreColor &&
+		_backColor == sprite._backColor &&
+		_blendAmount == sprite._blendAmount &&
+		_inkData == sprite._inkData &&
+		_thickness == sprite._thickness;
+}
+
 Sprite::Sprite(const Sprite &sprite) {
 	_matte = nullptr;
 	*this = sprite;
diff --git a/engines/director/sprite.h b/engines/director/sprite.h
index 41030f6bc5c..b9d64a532d4 100644
--- a/engines/director/sprite.h
+++ b/engines/director/sprite.h
@@ -58,6 +58,7 @@ public:
 	Sprite(Frame *frame = nullptr);
 	Sprite(const Sprite &sprite);
 	Sprite& operator=(const Sprite &sprite);
+	bool operator==(const Sprite &sprite);
 	~Sprite();
 
 	Frame *getFrame() const { return _frame; }


Commit: 14588e6fa6fb996ee621111532ecaf7ed744c3cd
    https://github.com/scummvm/scummvm/commit/14588e6fa6fb996ee621111532ecaf7ed744c3cd
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Look for handler in factory script

When looking for a handler in the specified context, also check the
factory script if any

Changed paths:
    engines/director/debugger/debugtools.cpp


diff --git a/engines/director/debugger/debugtools.cpp b/engines/director/debugger/debugtools.cpp
index 68c8c62836e..0b3dd30dd19 100644
--- a/engines/director/debugger/debugtools.cpp
+++ b/engines/director/debugger/debugtools.cpp
@@ -66,6 +66,13 @@ const LingoDec::Handler *getHandler(const Cast *cast, CastMemberID id, const Com
 				return &handler;
 			}
 		}
+		for (const LingoDec::Script *factoryScript : p.second->factories) {
+			for (const LingoDec::Handler &handler : factoryScript->handlers) {
+				if (handler.name == handlerId) {
+					return &handler;
+				}
+			}
+		}
 	}
 	return nullptr;
 }


Commit: 4c39d6d57f36ad93d55834226ba3498ab651df35
    https://github.com/scummvm/scummvm/commit/4c39d6d57f36ad93d55834226ba3498ab651df35
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Represent palette cast member as a number

Also properly show the continuation start and end frame numbers

Changed paths:
    engines/director/debugger/dt-score.cpp


diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 2681daebff9..5cdc90677bf 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -211,7 +211,7 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kChPalette:
 			if (frame._mainChannels.palette.paletteId.member)
-				ImGui::Text(frame._mainChannels.palette.paletteId.asString().c_str());
+				ImGui::Text("%d", frame._mainChannels.palette.paletteId.member);
 			break;
 
 		case kChTransition:
@@ -370,10 +370,10 @@ void showScore() {
 
 			if (castMember || shape) {
 				ImGui::Text("\uf816"); ImGui::SameLine();	// line_start_circle
-				ImGui::Text("  %d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first); ImGui::SameLine(50);
+				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first); ImGui::SameLine(50);
 				ImGui::SetItemTooltip("Start Frame");
 				ImGui::Text("\uf819"); ImGui::SameLine();	// line_end_square
-				ImGui::Text("  %d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second); ImGui::SameLine();
+				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second); ImGui::SameLine();
 				ImGui::SetItemTooltip("End Frame");
 			}
 


Commit: cc1a7a67c762d090dd3353ddd61fa711d2e2ae6d
    https://github.com/scummvm/scummvm/commit/cc1a7a67c762d090dd3353ddd61fa711d2e2ae6d
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Show continuous frames with the same background color

Continuous frames are frames that have the same sprite
i.e. There is no change in the sprite between subsequent frames
Also hover/select all cells in a continuation at the same time

Changed paths:
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-score.cpp


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index db02ba934bc..afcf14cba76 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -152,8 +152,22 @@ typedef struct ImGuiState {
 		ImVec4 _var_ref = ImColor(IM_COL32(0xe6, 0xe6, 0x00, 0xff));
 		ImVec4 _var_ref_changed = ImColor(IM_COL32(0xFF, 0x00, 0x00, 0xFF));
 		ImVec4 _var_ref_out_of_scope = ImColor(IM_COL32(0xFF, 0x00, 0xFF, 0xFF));
+		// Colors to show continuation data
+		const int _contColorCount = 5;
+		ImColor _contColors[5] = {
+			ImColor(IM_COL32(0x00, 0x00, 0xB2, 0xFF)), // Blue
+			ImColor(IM_COL32(0xB2, 0x00, 0x00, 0xFF)), // Red
+			ImColor(IM_COL32(0x61, 0x1F, 0x9F, 0xFF)), // Violet
+			ImColor(IM_COL32(0x73, 0x1E, 0x1E, 0xFF)), // Brown
+			ImColor(IM_COL32(0x00, 0x59, 0x00, 0xFF)), // Green
+		};
+
+		ImColor _channel_selected_col = ImColor(IM_COL32(0x94, 0x00, 0xD3, 0xFF));
+		ImColor _channel_hovered_col = ImColor(IM_COL32(0xFF, 0xFF, 0, 0x3C));
+		int _contColorIndex = 0;
 	} _colors;
 
+
 	struct {
 		DatumHash _locals;
 		DatumHash _globals;
@@ -179,6 +193,11 @@ typedef struct ImGuiState {
 		int channel = -1;
 	} _selectedScoreCast;
 
+	struct {
+		int frame = -1;
+		int channel = -1;
+	} _hoveredScoreCast;
+
 	Common::Array<Common::Array<Common::Pair<uint, uint>>> _continuationData;
 	bool _loadedContinuationData;
 
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 5cdc90677bf..16ae4ebdbb7 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -81,10 +81,10 @@ static void buildContinuationData() {
 
 			if (prevSprite) {
 				if (!(*prevSprite == sprite)) {
-					currentContinuation = f + 1;
+					currentContinuation = f;
 				}
 			} else {
-				currentContinuation = f + 1;
+				currentContinuation = f;
 			}
 			_state->_continuationData[ch][f].first = currentContinuation;
 		}
@@ -99,13 +99,12 @@ static void buildContinuationData() {
 
 			if (nextSprite) {
 				if (!(*nextSprite == sprite)) {
-					currentContinuation = f + 1;
+					currentContinuation = f;
 				}
 			} else {
-				currentContinuation = f + 1;
+				currentContinuation = f;
 			}
 			_state->_continuationData[ch][f].second = currentContinuation;
-			debug("%d %d [%d, %d]", ch, f, _state->_continuationData[ch][f].first, _state->_continuationData[ch][f].second);
 		}
 	}
 
@@ -169,35 +168,56 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		ImGui::TableNextColumn();
 
+		int startCont = _state->_continuationData[ch][f].first;
+		int endCont = _state->_continuationData[ch][f].second;
 		ImGui::PushID(ch * 10000 + f);
 
 		if (f + _state->_scoreFrameOffset == (int)currentFrameNum)
 			ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, cell_bg_color);
 
-		if (f == _state->_selectedScoreCast.frame + _state->_scoreFrameOffset - 1 &&
-		  ch == _state->_selectedScoreCast.channel && mode <= kModeExtended)
-			ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ImGui::GetColorU32(ImVec4(1.0f, 0.3f, 0.3f, 0.6f)));
+		if (!(startCont == endCont) && (sprite._castId.member || sprite.isQDShape())) {
+			if (f == startCont) {
+				_state->_colors._contColorIndex = (_state->_colors._contColorIndex + 1) % _state->_colors._contColorCount;
+			}
+
+			if (_state->_selectedScoreCast.frame + _state->_scoreFrameOffset - 1 >= startCont &&
+				_state->_selectedScoreCast.frame + _state->_scoreFrameOffset - 1 <= endCont &&
+				ch == _state->_selectedScoreCast.channel &&
+				mode <= kModeExtended) {
+				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._channel_selected_col);
+			} else if (_state->_hoveredScoreCast.frame >= startCont &&
+				_state->_hoveredScoreCast.frame <= endCont &&
+				ch == _state->_hoveredScoreCast.channel) {
+				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._channel_hovered_col);
+			} else {
+				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._contColors[_state->_colors._contColorIndex]);
+			}
+		}
 
+		float startX = ImGui::GetCursorScreenPos().x;
+		float width = ImGui::GetColumnWidth(ImGui::TableGetColumnIndex()) * (endCont - startCont + 1);
+
+		Common::String string = Common::String("");
 		switch (mode) {
 		case kModeMember:
 			if (sprite._castId.member)
-				ImGui::Selectable(Common::String::format("%d", sprite._castId.member).c_str());
+				string += Common::String::format("%d", sprite._castId.member).c_str();
 			else if (sprite.isQDShape())
-				ImGui::Selectable("Q");
+				string += "Q";
 			else
-				ImGui::Selectable("  ");
+				string += "  ";
 			break;
 
 		case kModeInk:
-			ImGui::Selectable(Common::String::format("%s", inkType2str(sprite._ink)).c_str());
+			string += Common::String::format("%s", inkType2str(sprite._ink)).c_str();
 			break;
 
 		case kModeLocation:
-			ImGui::Selectable(Common::String::format("%d, %d", sprite._startPoint.x, sprite._startPoint.y).c_str());
+			string += Common::String::format("%d, %d", sprite._startPoint.x, sprite._startPoint.y);
 			break;
 
 		case kModeBlend:
-			ImGui::Selectable(Common::String::format("%d", sprite._blendAmount).c_str());
+			string += Common::String::format("%d", sprite._blendAmount);
 			break;
 
 		case kModeBehavior:
@@ -206,27 +226,27 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kChTempo:
 			if (frame._mainChannels.tempo)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.tempo).c_str());
+				string += Common::String::format("%d", frame._mainChannels.tempo);
 			break;
 
 		case kChPalette:
 			if (frame._mainChannels.palette.paletteId.member)
-				ImGui::Text("%d", frame._mainChannels.palette.paletteId.member);
+				string += Common::String::format("%d", frame._mainChannels.palette.paletteId.member);
 			break;
 
 		case kChTransition:
 			if (frame._mainChannels.transType)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.transType).c_str());
+				string += Common::String::format("%d", frame._mainChannels.transType);
 			break;
 
 		case kChSound1:
 			if (frame._mainChannels.sound1.member)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound1.member).c_str());
+				string += Common::String::format("%d", frame._mainChannels.sound1.member);
 			break;
 
 		case kChSound2:
 			if (frame._mainChannels.sound2.member)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound2.member).c_str());
+				string += Common::String::format("%d", frame._mainChannels.sound2.member);
 			break;
 
 		case kChScript:
@@ -235,9 +255,18 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kModeExtended: // Render empty row
 		default:
-			ImGui::Selectable("  ");
+			string += "  ";
 		}
 
+		const char *text = string.c_str();
+		ImGui::Text("%s", text);
+
+		// // Center text inside span
+		// ImVec2 textSize = ImGui::CalcTextSize(text);
+		// float cursorX = startX + (width - textSize.x) * 0.5f;
+		// ImGui::SetCursorScreenPos(ImVec2(cursorX, ImGui::GetCursorScreenPos().y));
+
+		// ImGui::TextUnformatted(text);
 		ImGui::PopID();
 
 		if (ImGui::IsItemClicked(0)) {
@@ -253,6 +282,11 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 				g_director->getCurrentWindow()->render(true);
 			}
 		}
+
+		if (ImGui::IsItemHovered()) {
+			_state->_hoveredScoreCast.frame = f;
+			_state->_hoveredScoreCast.channel = ch;
+		}
 	}
 
 	ImGui::PopFont();
@@ -370,10 +404,12 @@ void showScore() {
 
 			if (castMember || shape) {
 				ImGui::Text("\uf816"); ImGui::SameLine();	// line_start_circle
-				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first); ImGui::SameLine(50);
+				// the continuation data is 0-indexed but the frames are 1-indexed
+				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first + 1); ImGui::SameLine(50);
 				ImGui::SetItemTooltip("Start Frame");
 				ImGui::Text("\uf819"); ImGui::SameLine();	// line_end_square
-				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second); ImGui::SameLine();
+				// the continuation data is 0-indexed but the frames are 1-indexed
+				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second + 1); ImGui::SameLine();
 				ImGui::SetItemTooltip("End Frame");
 			}
 
@@ -501,8 +537,8 @@ void showScore() {
 		ImGuiTableFlags addonFlags = _state->_scoreMode == kModeExtended ? 0 : ImGuiTableFlags_RowBg;
 
 		if (ImGui::BeginTable("Score", tableColumns + 1,
-							  ImGuiTableFlags_Borders | ImGuiTableFlags_HighlightHoveredColumn |
-								  ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | addonFlags)) {
+					ImGuiTableFlags_Borders | ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY |
+					ImGuiTableFlags_SizingStretchProp | addonFlags)) {
 			ImGuiTableFlags flags = ImGuiTableColumnFlags_WidthFixed;
 
 			ImGui::TableSetupScrollFreeze(1, 2);
@@ -511,7 +547,7 @@ void showScore() {
 
 			ImGui::TableSetupColumn("##", flags);
 			for (uint i = 0; i < tableColumns; i++) {
-				Common::String label = (i + _state->_scoreFrameOffset) % 5 ? " " : Common::String::format("%-2d", i + _state->_scoreFrameOffset);
+				Common::String label = Common::String::format("%-2d", i + _state->_scoreFrameOffset);
 				label += Common::String::format("##l%d", i);
 
 				ImGui::TableSetupColumn(label.c_str(), flags);
@@ -593,6 +629,8 @@ void showScore() {
 
 			int mode = _state->_scoreMode;
 
+			// Reset the color index, so that each channel gets the same color each time
+			_state->_colors._contColorIndex = 0;
 			for (int ch = 0; ch < (int)numChannels - 1; ch++) {
 				if (mode == kModeExtended) // This will render empty row
 					displayScoreChannel(ch + 1, kModeExtended, _state->_scoreMode);


Commit: b23bc736c56a31ebd229b1df55097a993d03c98b
    https://github.com/scummvm/scummvm/commit/b23bc736c56a31ebd229b1df55097a993d03c98b
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Show only one text per continuation

Instead of showing the cast id, location, etc. for each frame in the
continuation, show it only once

Changed paths:
    engines/director/debugger/dt-score.cpp


diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 16ae4ebdbb7..b44af1d4898 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -170,11 +170,20 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		int startCont = _state->_continuationData[ch][f].first;
 		int endCont = _state->_continuationData[ch][f].second;
-		ImGui::PushID(ch * 10000 + f);
 
 		if (f + _state->_scoreFrameOffset == (int)currentFrameNum)
 			ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, cell_bg_color);
 
+		if (ImGui::IsItemClicked(0)) {
+			_state->_selectedScoreCast.frame = f + _state->_scoreFrameOffset - 1;
+			_state->_selectedScoreCast.channel = ch;
+		}
+
+		if (ImGui::IsItemHovered()) {
+			_state->_hoveredScoreCast.frame = f;
+			_state->_hoveredScoreCast.channel = ch;
+		}
+
 		if (!(startCont == endCont) && (sprite._castId.member || sprite.isQDShape())) {
 			if (f == startCont) {
 				_state->_colors._contColorIndex = (_state->_colors._contColorIndex + 1) % _state->_colors._contColorCount;
@@ -192,10 +201,20 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 			} else {
 				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._contColors[_state->_colors._contColorIndex]);
 			}
+
 		}
 
-		float startX = ImGui::GetCursorScreenPos().x;
-		float width = ImGui::GetColumnWidth(ImGui::TableGetColumnIndex()) * (endCont - startCont + 1);
+		// If the frame is not the start, then don't render any text
+		if (f != startCont || !(sprite._castId.member || sprite.isQDShape())) {
+			if (f == endCont && sprite._castId.member) {
+				ImGui::PushFont(ImGui::GetIO().FontDefault);
+				ImGui::Text("-\uf819");
+				ImGui::PopFont();
+			}
+			continue;
+		}
+
+		ImGui::PushID(ch * 10000 + f);
 
 		Common::String string = Common::String("");
 		switch (mode) {
@@ -259,14 +278,7 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 		}
 
 		const char *text = string.c_str();
-		ImGui::Text("%s", text);
-
-		// // Center text inside span
-		// ImVec2 textSize = ImGui::CalcTextSize(text);
-		// float cursorX = startX + (width - textSize.x) * 0.5f;
-		// ImGui::SetCursorScreenPos(ImVec2(cursorX, ImGui::GetCursorScreenPos().y));
-
-		// ImGui::TextUnformatted(text);
+		ImGui::Text(u8"\u25cf%s", text);
 		ImGui::PopID();
 
 		if (ImGui::IsItemClicked(0)) {


Commit: b356a375633dc0274e7f6f6fb8b1b15bdaf16f1f
    https://github.com/scummvm/scummvm/commit/b356a375633dc0274e7f6f6fb8b1b15bdaf16f1f
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Show extended mode in score window properly

Show all cells associated with the same continuation with the
same color, make the top cell in the extended mode a bit darker
than the rest of the rows in the same continuation

Changed paths:
    engines/director/debugger/debugtools.cpp
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-score.cpp


diff --git a/engines/director/debugger/debugtools.cpp b/engines/director/debugger/debugtools.cpp
index 0b3dd30dd19..0f939be8406 100644
--- a/engines/director/debugger/debugtools.cpp
+++ b/engines/director/debugger/debugtools.cpp
@@ -402,6 +402,14 @@ void displayScriptRef(CastMemberID &scriptId) {
 	}
 }
 
+ImColor brightenColor(const ImColor& color, float factor) {
+	ImVec4 col = color.Value;
+	col.x = CLIP<float>(col.x * factor, 0.0f, 1.0f);
+	col.y = CLIP<float>(col.y * factor, 0.0f, 1.0f);
+	col.z = CLIP<float>(col.z * factor, 0.0f, 1.0f);
+	return ImColor(col);
+}
+
 static void showSettings() {
 	if (!_state->_w.settings)
 		return;
diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index afcf14cba76..0b12f421220 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -155,11 +155,11 @@ typedef struct ImGuiState {
 		// Colors to show continuation data
 		const int _contColorCount = 5;
 		ImColor _contColors[5] = {
-			ImColor(IM_COL32(0x00, 0x00, 0xB2, 0xFF)), // Blue
-			ImColor(IM_COL32(0xB2, 0x00, 0x00, 0xFF)), // Red
-			ImColor(IM_COL32(0x61, 0x1F, 0x9F, 0xFF)), // Violet
-			ImColor(IM_COL32(0x73, 0x1E, 0x1E, 0xFF)), // Brown
-			ImColor(IM_COL32(0x00, 0x59, 0x00, 0xFF)), // Green
+			ImColor(IM_COL32(0x00, 0x00, 0xB2, 0x80)), // Blue
+			ImColor(IM_COL32(0xB2, 0x00, 0x00, 0x80)), // Red
+			ImColor(IM_COL32(0x61, 0x1F, 0x9F, 0x80)), // Violet
+			ImColor(IM_COL32(0x73, 0x1E, 0x1E, 0x80)), // Brown
+			ImColor(IM_COL32(0x00, 0x59, 0x00, 0x80)), // Green
 		};
 
 		ImColor _channel_selected_col = ImColor(IM_COL32(0x94, 0x00, 0xD3, 0xFF));
@@ -236,6 +236,7 @@ Common::String getDisplayName(CastMember *castMember);
 void showImage(const ImGuiImage &image, const char *name, float thumbnailSize);
 ImVec4 convertColor(uint32 color);
 void displayVariable(const Common::String &name, bool changed, bool outOfScope = false);
+ImColor brightenColor(const ImColor &color, float factor);
 
 void showCast();        // dt-cast.cpp
 void showControlPanel(); // dt-controlpanel.cpp
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index b44af1d4898..5ea80cc04cf 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -162,6 +162,10 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 	numFrames -= _state->_scoreFrameOffset - 1;
 	numFrames = MIN<uint>(numFrames, kMaxColumnsInTable - 2);
 
+	if (modeSel == kModeExtended) {
+		_state->_colors._contColorIndex = ch % _state->_colors._contColorCount;
+	}
+
 	for (int f = 0; f < (int)numFrames; f++) {
 		Frame &frame = *score->_scoreCache[f + _state->_scoreFrameOffset - 1];
 		Sprite &sprite = *frame._sprites[ch];
@@ -199,14 +203,16 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 				ch == _state->_hoveredScoreCast.channel) {
 				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._channel_hovered_col);
 			} else {
-				ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._contColors[_state->_colors._contColorIndex]);
+				if (mode == modeSel)
+					ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, _state->_colors._contColors[_state->_colors._contColorIndex]);
+				else
+					ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, brightenColor(_state->_colors._contColors[_state->_colors._contColorIndex], 1.5));
 			}
-
 		}
 
 		// If the frame is not the start, then don't render any text
 		if (f != startCont || !(sprite._castId.member || sprite.isQDShape())) {
-			if (f == endCont && sprite._castId.member) {
+			if (f == endCont && sprite._castId.member && mode == _state->_scoreMode) {
 				ImGui::PushFont(ImGui::GetIO().FontDefault);
 				ImGui::Text("-\uf819");
 				ImGui::PopFont();
@@ -216,27 +222,26 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		ImGui::PushID(ch * 10000 + f);
 
-		Common::String string = Common::String("");
 		switch (mode) {
 		case kModeMember:
 			if (sprite._castId.member)
-				string += Common::String::format("%d", sprite._castId.member).c_str();
+				ImGui::Text(Common::String::format("%d", sprite._castId.member).c_str());
 			else if (sprite.isQDShape())
-				string += "Q";
+				ImGui::Text("Q");
 			else
-				string += "  ";
+				ImGui::Text("  ");
 			break;
 
 		case kModeInk:
-			string += Common::String::format("%s", inkType2str(sprite._ink)).c_str();
+			ImGui::Text(inkType2str(sprite._ink));
 			break;
 
 		case kModeLocation:
-			string += Common::String::format("%d, %d", sprite._startPoint.x, sprite._startPoint.y);
+			ImGui::Text(Common::String::format("%d, %d", sprite._startPoint.x, sprite._startPoint.y).c_str());
 			break;
 
 		case kModeBlend:
-			string += Common::String::format("%d", sprite._blendAmount);
+			ImGui::Text(Common::String::format("%d", sprite._blendAmount).c_str());
 			break;
 
 		case kModeBehavior:
@@ -245,27 +250,27 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kChTempo:
 			if (frame._mainChannels.tempo)
-				string += Common::String::format("%d", frame._mainChannels.tempo);
+				ImGui::Text(Common::String::format("%d", frame._mainChannels.tempo).c_str());
 			break;
 
 		case kChPalette:
 			if (frame._mainChannels.palette.paletteId.member)
-				string += Common::String::format("%d", frame._mainChannels.palette.paletteId.member);
+				ImGui::Text(Common::String::format("%d", frame._mainChannels.palette.paletteId.member).c_str());
 			break;
 
 		case kChTransition:
 			if (frame._mainChannels.transType)
-				string += Common::String::format("%d", frame._mainChannels.transType);
+				ImGui::Text(Common::String::format("%d", frame._mainChannels.transType).c_str());
 			break;
 
 		case kChSound1:
 			if (frame._mainChannels.sound1.member)
-				string += Common::String::format("%d", frame._mainChannels.sound1.member);
+				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound1.member).c_str());
 			break;
 
 		case kChSound2:
 			if (frame._mainChannels.sound2.member)
-				string += Common::String::format("%d", frame._mainChannels.sound2.member);
+				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound2.member).c_str());
 			break;
 
 		case kChScript:
@@ -274,11 +279,9 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kModeExtended: // Render empty row
 		default:
-			string += "  ";
+			ImGui::Text("  ");
 		}
 
-		const char *text = string.c_str();
-		ImGui::Text(u8"\u25cf%s", text);
 		ImGui::PopID();
 
 		if (ImGui::IsItemClicked(0)) {


Commit: ee7a5f527828e25f2ef612529d4a1657a44579ab
    https://github.com/scummvm/scummvm/commit/ee7a5f527828e25f2ef612529d4a1657a44579ab
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Show script in the open handler window only once

There is a bug where if you click on two different handlers from the
same script in the Functions window, it will open a single window but
the window will contain the same script twice, fix that

Changed paths:
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-scripts.cpp


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index 0b12f421220..2837029b27a 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -183,7 +183,7 @@ typedef struct ImGuiState {
 	bool _wasHidden = false;
 
 	Common::List<CastMemberID> _scriptCasts;
-	Common::List<ImGuiScript> _openHandlers;
+	Common::HashMap<int, ImGuiScript> _openHandlers;
 	bool _showCompleteScript = true;
 
 	Common::HashMap<Common::String, bool, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _variables;
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 083ed6086f2..6d1df416565 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -228,8 +228,8 @@ void showScriptCasts() {
 }
 
 static void addToOpenHandlers(ImGuiScript handler) {
-	_state->_openHandlers.remove(handler);
-	_state->_openHandlers.push_back(handler);
+	_state->_openHandlers.erase(handler.id.member);
+	_state->_openHandlers[handler.id.member] = handler;
 }
 
 static bool showHandler(ImGuiScript handler) {
@@ -283,11 +283,9 @@ void showHandlers() {
 		return;
 	}
 
-	for (Common::List<ImGuiScript>::iterator handler = _state->_openHandlers.begin(); handler != _state->_openHandlers.end();) {
-		if (!showHandler(*handler)) {
-			handler = _state->_openHandlers.erase(handler);
-		} else {
-			handler++;
+	for (auto handler : _state->_openHandlers) {
+		if (!showHandler(handler._value)) {
+			_state->_openHandlers.erase(handler._value.id.member);
 		}
 	}
 }


Commit: b575b44161bc49ca483e64b747815a9e0d5c3784
    https://github.com/scummvm/scummvm/commit/b575b44161bc49ca483e64b747815a9e0d5c3784
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Refactor handler naming in Execution Context window

Changed paths:
    engines/director/debugger/debugtools.cpp
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-script-d2.cpp
    engines/director/debugger/dt-script-d4.cpp
    engines/director/debugger/dt-scripts.cpp


diff --git a/engines/director/debugger/debugtools.cpp b/engines/director/debugger/debugtools.cpp
index 0f939be8406..23b66f720af 100644
--- a/engines/director/debugger/debugtools.cpp
+++ b/engines/director/debugger/debugtools.cpp
@@ -579,5 +579,16 @@ int getSelectedChannel(){
 	return _state ? _state->_selectedChannel : -1;
 }
 
+Common::String formatHandlerName(int scriptId, int castId, Common::String handlerName, ScriptType scriptType, bool childScript) {
+	Common::String formatted = Common::String();
+	// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler: script type
+	if (childScript) {
+		formatted = Common::String::format("%d (p<%d>):%s :%s", scriptId, castId, handlerName.size() ? handlerName.c_str() : "<unnamed>", scriptType2str(scriptType));
+	} else {
+		formatted = Common::String::format("%d (%d) :%s :%s", scriptId, castId, handlerName.size() ? handlerName.c_str() : "<unnamed>", scriptType2str(scriptType));
+	}
+	return formatted;
+}
+
 } // namespace DT
 } // namespace Director
diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index 2837029b27a..d70196c2dac 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -237,6 +237,7 @@ void showImage(const ImGuiImage &image, const char *name, float thumbnailSize);
 ImVec4 convertColor(uint32 color);
 void displayVariable(const Common::String &name, bool changed, bool outOfScope = false);
 ImColor brightenColor(const ImColor &color, float factor);
+Common::String formatHandlerName(int scriptId, int castId, Common::String handlerName, ScriptType scriptType, bool childScript);
 
 void showCast();        // dt-cast.cpp
 void showControlPanel(); // dt-controlpanel.cpp
diff --git a/engines/director/debugger/dt-script-d2.cpp b/engines/director/debugger/dt-script-d2.cpp
index 1616d043926..21bf36fbfd7 100644
--- a/engines/director/debugger/dt-script-d2.cpp
+++ b/engines/director/debugger/dt-script-d2.cpp
@@ -519,12 +519,7 @@ public:
 				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
 				script.moviePath = _script.moviePath;
 
-				// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
-				if (childScript) {
-					script.handlerName = Common::String::format("%d (p<%d>): %s", context->_scriptId, castId, script.handlerId.c_str());
-				} else {
-					script.handlerName = Common::String::format("%d (%d): %s", context->_scriptId, castId, script.handlerId.c_str());
-				}
+				script.handlerName = formatHandlerName(context->_scriptId, castId, script.handlerId, context->_scriptType, childScript);
 				setScriptToDisplay(script);
 				_state->_dbg._goToDefinition = true;
 			}
diff --git a/engines/director/debugger/dt-script-d4.cpp b/engines/director/debugger/dt-script-d4.cpp
index ca65423d700..63535ec2cc4 100644
--- a/engines/director/debugger/dt-script-d4.cpp
+++ b/engines/director/debugger/dt-script-d4.cpp
@@ -134,12 +134,8 @@ public:
 					castId = movie->getCast()->getCastIdByScriptId(context->_parentNumber);
 					childScript = true;
 				}
-				// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
-				if (childScript) {
-					script.handlerName = Common::String::format("%d (p<%d>): %s", context->_scriptId, castId, script.handlerId.c_str());
-				} else {
-					script.handlerName = Common::String::format("%d (%d): %s", context->_scriptId, castId, script.handlerId.c_str());
-				}
+
+				script.handlerName = formatHandlerName(context->_scriptId, castId, script.handlerId, context->_scriptType, childScript);
 				setScriptToDisplay(script);
 				_state->_dbg._goToDefinition = true;
 			}
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 6d1df416565..2c4c1a529df 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -166,13 +166,7 @@ static void renderCallStack(uint pc) {
 			ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 			script.byteOffsets = head->sp.ctx->_functionByteOffsets[script.handlerId];
 			script.moviePath = movie->getArchive()->getPathName().toString();
-
-			// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
-			if (childScript) {
-				script.handlerName = Common::String::format("%d (p<%d>): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
-			} else {
-				script.handlerName = Common::String::format("%d (%d):%s", scriptContext->_scriptId, castId, script.handlerId.c_str());
-			}
+			script.handlerName = formatHandlerName(head->sp.ctx->_scriptId, castId, script.handlerName, head->sp.ctx->_scriptType, childScript);
 			script.pc = framePc;
 			setScriptToDisplay(script);
 		}
@@ -313,13 +307,7 @@ static void updateCurrentScript() {
 	ImGuiScript script = toImGuiScript(scriptContext->_scriptType, CastMemberID(castId, castLibID), *head->sp.name);
 	script.byteOffsets = scriptContext->_functionByteOffsets[script.handlerId];
 	script.moviePath = movie->getArchive()->getPathName().toString();
-
-	// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler
-	if (childScript) {
-		script.handlerName = Common::String::format("%d (p<%d>): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
-	} else {
-		script.handlerName = Common::String::format("%d (%d): %s", scriptContext->_scriptId, castId, script.handlerId.c_str());
-	}
+	script.handlerName = formatHandlerName(head->sp.ctx->_scriptId, castId, script.handlerName, head->sp.ctx->_scriptType, childScript);
 	script.pc = 0;
 	setScriptToDisplay(script);
 }
@@ -398,13 +386,7 @@ void showFuncList() {
 										ImGuiScript script = toImGuiScript(context._value->_scriptType, memberID, functionHandler._key);
 										script.byteOffsets = context._value->_functionByteOffsets[script.handlerId];
 										script.moviePath = movie->getArchive()->getPathName().toString();
-
-										// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler: script type
-										if (childScript) {
-											script.handlerName = Common::String::format("%d(p<%d>):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
-										} else {
-											script.handlerName = Common::String::format("%d(%d):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
-										}
+										script.handlerName = formatHandlerName(context._value->_scriptId, castId, script.handlerId, context._value->_scriptType, childScript);
 										addToOpenHandlers(script);
 									}
 								}
@@ -459,13 +441,7 @@ void showFuncList() {
 										ImGuiScript script = toImGuiScript(context._value->_scriptType, memberID, functionHandler._key);
 										script.byteOffsets = context._value->_functionByteOffsets[script.handlerId];
 										script.moviePath = movie->getArchive()->getPathName().toString();
-
-										// Naming convention: <script id> (<cast id/cast id of parent script>): name of handler: script type
-										if (childScript) {
-											script.handlerName = Common::String::format("%d(p<%d>):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
-										} else {
-											script.handlerName = Common::String::format("%d(%d):%s:%s", context._value->_scriptId, castId, script.handlerId.c_str(), scriptType2str(context._value->_scriptType));
-										}
+										script.handlerName = formatHandlerName(context._value->_scriptId, castId, script.handlerName, context._value->_scriptType, childScript);
 										addToOpenHandlers(script);
 									}
 								}


Commit: 65ed2697bbe1a983f60e82fe0965855d3064f492
    https://github.com/scummvm/scummvm/commit/65ed2697bbe1a983f60e82fe0965855d3064f492
Author: Malhar (themalharbdv2046 at gmail.com)
Date: 2025-09-04T16:34:27+02:00

Commit Message:
DIRECTOR: IMGUI: Minor formatting changes

Changed paths:
    engines/director/debugger/dt-internal.h
    engines/director/debugger/dt-score.cpp
    engines/director/debugger/dt-script-d2.cpp
    engines/director/debugger/dt-script-d4.cpp
    engines/director/debugger/dt-scripts.cpp


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index d70196c2dac..0d410bcb2ee 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -199,7 +199,7 @@ typedef struct ImGuiState {
 	} _hoveredScoreCast;
 
 	Common::Array<Common::Array<Common::Pair<uint, uint>>> _continuationData;
-	bool _loadedContinuationData;
+	bool _loadedContinuationData = false;
 
 	int _scoreMode = 0;
 	int _scoreFrameOffset = 1;
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 5ea80cc04cf..43e9f374683 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -73,10 +73,10 @@ static void buildContinuationData() {
 
 		uint currentContinuation = 1;
 		for (int f = 0; f < (int)numFrames; f++) {
-			Frame &frame = *score->_scoreCache[f];
+			const Frame &frame = *score->_scoreCache[f];
 			Sprite &sprite = *frame._sprites[ch];
 
-			Frame *prevFrame = (f == 0) ? nullptr : score->_scoreCache[f - 1];
+			const Frame *prevFrame = (f == 0) ? nullptr : score->_scoreCache[f - 1];
 			Sprite *prevSprite = (prevFrame) ? prevFrame->_sprites[ch] : nullptr;
 
 			if (prevSprite) {
@@ -91,10 +91,10 @@ static void buildContinuationData() {
 
 		currentContinuation = 1;
 		for (int f = (int)numFrames - 1; f >= 0; f--) {
-			Frame &frame = *score->_scoreCache[f];
+			const Frame &frame = *score->_scoreCache[f];
 			Sprite &sprite = *frame._sprites[ch];
 
-			Frame *nextFrame = (f == (int)numFrames - 1) ? nullptr : score->_scoreCache[f + 1];
+			const Frame *nextFrame = (f == (int)numFrames - 1) ? nullptr : score->_scoreCache[f + 1];
 			Sprite *nextSprite = (nextFrame) ? nextFrame->_sprites[ch] : nullptr;
 
 			if (nextSprite) {
@@ -178,7 +178,7 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 		if (f + _state->_scoreFrameOffset == (int)currentFrameNum)
 			ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, cell_bg_color);
 
-		if (ImGui::IsItemClicked(0)) {
+		if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
 			_state->_selectedScoreCast.frame = f + _state->_scoreFrameOffset - 1;
 			_state->_selectedScoreCast.channel = ch;
 		}
@@ -214,7 +214,7 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 		if (f != startCont || !(sprite._castId.member || sprite.isQDShape())) {
 			if (f == endCont && sprite._castId.member && mode == _state->_scoreMode) {
 				ImGui::PushFont(ImGui::GetIO().FontDefault);
-				ImGui::Text("-\uf819");
+				ImGui::TextUnformatted("-\uf819");
 				ImGui::PopFont();
 			}
 			continue;
@@ -225,11 +225,11 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 		switch (mode) {
 		case kModeMember:
 			if (sprite._castId.member)
-				ImGui::Text(Common::String::format("%d", sprite._castId.member).c_str());
+				ImGui::Text("%d", sprite._castId.member);
 			else if (sprite.isQDShape())
-				ImGui::Text("Q");
+				ImGui::TextUnformatted("Q");
 			else
-				ImGui::Text("  ");
+				ImGui::TextUnformatted("  ");
 			break;
 
 		case kModeInk:
@@ -237,11 +237,11 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 			break;
 
 		case kModeLocation:
-			ImGui::Text(Common::String::format("%d, %d", sprite._startPoint.x, sprite._startPoint.y).c_str());
+			ImGui::Text("%d, %d", sprite._startPoint.x, sprite._startPoint.y);
 			break;
 
 		case kModeBlend:
-			ImGui::Text(Common::String::format("%d", sprite._blendAmount).c_str());
+			ImGui::Text("%d", sprite._blendAmount);
 			break;
 
 		case kModeBehavior:
@@ -250,27 +250,27 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kChTempo:
 			if (frame._mainChannels.tempo)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.tempo).c_str());
+				ImGui::Text("%d", frame._mainChannels.tempo);
 			break;
 
 		case kChPalette:
 			if (frame._mainChannels.palette.paletteId.member)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.palette.paletteId.member).c_str());
+				ImGui::Text("%d", frame._mainChannels.palette.paletteId.member);
 			break;
 
 		case kChTransition:
 			if (frame._mainChannels.transType)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.transType).c_str());
+				ImGui::Text("%d", frame._mainChannels.transType);
 			break;
 
 		case kChSound1:
 			if (frame._mainChannels.sound1.member)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound1.member).c_str());
+				ImGui::Text("%d", frame._mainChannels.sound1.member);
 			break;
 
 		case kChSound2:
 			if (frame._mainChannels.sound2.member)
-				ImGui::Text(Common::String::format("%d", frame._mainChannels.sound2.member).c_str());
+				ImGui::Text("%d", frame._mainChannels.sound2.member);
 			break;
 
 		case kChScript:
@@ -279,12 +279,12 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 
 		case kModeExtended: // Render empty row
 		default:
-			ImGui::Text("  ");
+			ImGui::TextUnformatted("  ");
 		}
 
 		ImGui::PopID();
 
-		if (ImGui::IsItemClicked(0)) {
+		if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
 			_state->_selectedScoreCast.frame = f + _state->_scoreFrameOffset - 1;
 			_state->_selectedScoreCast.channel = ch;
 
@@ -418,11 +418,11 @@ void showScore() {
 			ImGui::BeginChild("Range", ImVec2(100.0f, 20.0f));
 
 			if (castMember || shape) {
-				ImGui::Text("\uf816"); ImGui::SameLine();	// line_start_circle
+				ImGui::TextUnformatted("\uf816"); ImGui::SameLine();	// line_start_circle
 				// the continuation data is 0-indexed but the frames are 1-indexed
 				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].first + 1); ImGui::SameLine(50);
 				ImGui::SetItemTooltip("Start Frame");
-				ImGui::Text("\uf819"); ImGui::SameLine();	// line_end_square
+				ImGui::TextUnformatted("\uf819"); ImGui::SameLine();	// line_end_square
 				// the continuation data is 0-indexed but the frames are 1-indexed
 				ImGui::Text("%4d", _state->_continuationData[_state->_selectedScoreCast.channel][_state->_selectedScoreCast.frame].second + 1); ImGui::SameLine();
 				ImGui::SetItemTooltip("End Frame");
@@ -683,7 +683,7 @@ void showChannels() {
 
 	if (ImGui::Begin("Channels", &_state->_w.channels)) {
 		Score *score = g_director->getCurrentMovie()->getScore();
-		Frame &frame = *score->_currentFrame;
+		const Frame &frame = *score->_currentFrame;
 
 		CastMemberID defaultPalette = g_director->getCurrentMovie()->_defaultPalette;
 		ImGui::Text("TMPO:   tempo: %d, skipFrameFlag: %d, blend: %d, currentFPS: %d",
@@ -789,7 +789,7 @@ void showChannels() {
 						displayScriptRef(sprite._scriptId);
 					} else {
 						ImGui::PushID(i + 1);
-						ImGui::Selectable("  ");
+						ImGui::TextUnformatted("  ");
 						ImGui::PopID();
 					}
 					ImGui::TableNextColumn();
diff --git a/engines/director/debugger/dt-script-d2.cpp b/engines/director/debugger/dt-script-d2.cpp
index 21bf36fbfd7..dc31440cba4 100644
--- a/engines/director/debugger/dt-script-d2.cpp
+++ b/engines/director/debugger/dt-script-d2.cpp
@@ -508,7 +508,7 @@ public:
 			ScriptContext *context = getScriptContext(obj, _script.id, *node->name);
 			if (context) {
 				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), *node->name);
-				Director::Movie *movie = g_director->getCurrentMovie();
+				const Director::Movie *movie = g_director->getCurrentMovie();
 
 				int castId = context->_id;
 				bool childScript = false;
diff --git a/engines/director/debugger/dt-script-d4.cpp b/engines/director/debugger/dt-script-d4.cpp
index 63535ec2cc4..81e218d0363 100644
--- a/engines/director/debugger/dt-script-d4.cpp
+++ b/engines/director/debugger/dt-script-d4.cpp
@@ -124,7 +124,7 @@ public:
 
 			if (context) {
 				ImGuiScript script = toImGuiScript(_script.type, CastMemberID(context->_id, _script.id.castLib), node.name);
-				Director::Movie *movie = g_director->getCurrentMovie();
+				const Director::Movie *movie = g_director->getCurrentMovie();
 
 				script.byteOffsets = context->_functionByteOffsets[script.handlerId];
 				script.moviePath = _script.moviePath;
diff --git a/engines/director/debugger/dt-scripts.cpp b/engines/director/debugger/dt-scripts.cpp
index 2c4c1a529df..46981eaf86d 100644
--- a/engines/director/debugger/dt-scripts.cpp
+++ b/engines/director/debugger/dt-scripts.cpp
@@ -118,7 +118,7 @@ static void renderCallStack(uint pc) {
 		return;
 	}
 
-	Movie *movie = g_director->getCurrentMovie();
+	const Movie *movie = g_director->getCurrentMovie();
 
 	ImGui::Text("Call stack:\n");
 	for (int i = 0; i < (int)callstack.size(); i++) {
@@ -294,7 +294,7 @@ static void updateCurrentScript() {
 
 	// show current script of the current stack frame
 	CFrame *head = callstack[callstack.size() - 1];
-	Director::Movie *movie = g_director->getCurrentMovie();
+	const Director::Movie *movie = g_director->getCurrentMovie();
 	ScriptContext *scriptContext = head->sp.ctx;
 	int castLibID = movie->getCast()->_castLibID;
 	int castId = head->sp.ctx->_id;
@@ -344,7 +344,7 @@ void showFuncList() {
 		const ImVec2 childSize = ImGui::GetContentRegionAvail();
 		ImGui::BeginChild("##functions", ImVec2(childSize.x, childSize.y));
 
-		Movie *movie = g_director->getCurrentMovie();
+		const Movie *movie = g_director->getCurrentMovie();
 		if (_state->_functions._showScriptContexts) {
 			for (auto cast : *movie->getCasts()) {
 				Common::String castName = Common::String::format("%d", cast._key);
@@ -548,7 +548,7 @@ void showExecutionContext() {
 	ImGui::SetNextWindowSize(ImVec2(500, 750), ImGuiCond_FirstUseEver);
 
 	Director::Lingo *lingo = g_director->getLingo();
-	Movie *movie = g_director->getCurrentMovie();
+	const Movie *movie = g_director->getCurrentMovie();
 
 	Window *currentWindow = g_director->getCurrentWindow();
 	bool scriptsRendered = false;
@@ -585,8 +585,7 @@ void showExecutionContext() {
 			ScriptContext* context = getScriptContext(current.id);
 
 			if (context) {
-				Common::String scriptInfo = Common::String::format("%d:%s type:%s", context->_id, context->getName().c_str(), scriptType2str(context->_scriptType));
-				ImGui::Text("%s", scriptInfo.c_str());
+				ImGui::Text("%d:%s type:%s", context->_id, context->getName().c_str(), scriptType2str(context->_scriptType));
 			}
 
 			ImGui::BeginDisabled(scriptData->_scripts.empty() || scriptData->_current == 0);




More information about the Scummvm-git-logs mailing list