[Scummvm-git-logs] scummvm master -> 48d2d9752c081b6570b639a6f25b7fac064ed994

sev- noreply at scummvm.org
Mon Sep 8 22:46:38 UTC 2025


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

Summary:
4f3f54952b DIRECTOR: Added more insights on RTE0 format
48d2d9752c DIRECTOR: DT: Initial code for window selection in Score


Commit: 4f3f54952b89c07d6908424c23ba7c9c3971d31c
    https://github.com/scummvm/scummvm/commit/4f3f54952b89c07d6908424c23ba7c9c3971d31c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-09T00:05:47+02:00

Commit Message:
DIRECTOR: Added more insights on RTE0 format

Changed paths:
    engines/director/castmember/richtext.cpp


diff --git a/engines/director/castmember/richtext.cpp b/engines/director/castmember/richtext.cpp
index 670981e339e..0b6d8308aa6 100644
--- a/engines/director/castmember/richtext.cpp
+++ b/engines/director/castmember/richtext.cpp
@@ -108,6 +108,12 @@ void RichTextCastMember::load() {
 	// RTE0: Editor data, used only by the Authoring Tool
 	// RTE1: Plain text data
 	// RTE2: Bitmap representation for rendering
+	//
+	// RTE0 is using Paige editor by Hermes, which was recently
+	// open sourced. So, if anyone wants to look into internals,
+	// https://github.com/nmatavka/Hermes-Paige/tree/main
+	// the pgReadDoc() is the code entry:
+	// https://github.com/nmatavka/Hermes-Paige/blob/main/PGSOURCE/PGREAD.C#L767
 	uint rte0id = 0;
 	uint rte1id = 0;
 	uint rte2id = 0;


Commit: 48d2d9752c081b6570b639a6f25b7fac064ed994
    https://github.com/scummvm/scummvm/commit/48d2d9752c081b6570b639a6f25b7fac064ed994
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-09T00:46:25+02:00

Commit Message:
DIRECTOR: DT: Initial code for window selection in Score

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


diff --git a/engines/director/debugger/dt-internal.h b/engines/director/debugger/dt-internal.h
index 1533263ddff..a5d26b6ca7f 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -205,6 +205,7 @@ typedef struct ImGuiState {
 	Common::Array<Common::Array<Common::Pair<uint, uint>>> _continuationData;
 	bool _loadedContinuationData = false;
 
+	Common::String _scoreWindow;
 	int _scoreMode = 0;
 	int _scoreFrameOffset = 1;
 	int _scorePageSlider = 0;
diff --git a/engines/director/debugger/dt-save-state.cpp b/engines/director/debugger/dt-save-state.cpp
index 8a1e91c3842..eb8c932f6bb 100644
--- a/engines/director/debugger/dt-save-state.cpp
+++ b/engines/director/debugger/dt-save-state.cpp
@@ -90,6 +90,9 @@ void saveCurrentState() {
 	}
 	json["Log"] = new Common::JSONValue(log);
 
+	// Other settings
+	json["ScoreWindow"] = new Common::JSONValue(_state->_scoreWindow);
+
 	// Save the JSON
 	Common::JSONValue save(json);
 	debugC(7, kDebugImGui, "ImGui::Saved state: %s", save.stringify().c_str());
@@ -168,6 +171,9 @@ void loadSavedState() {
 		_state->_logger->addLog(iter->asString().c_str());
 	}
 
+	// Load other settings
+	_state->_scoreWindow = saved->asObject()["ScoreWindow"]->asString();
+
 	free(data);
 	delete saved;
 	delete savedState;
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 06cb3304848..57c116f8b35 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -350,6 +350,50 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
 	ImGui::PopFont();
 }
 
+void windowList(Common::String *target) {
+	const Common::Array<Window *> *windowList = g_director->getWindowList();
+	const Common::String selWin = *target;
+
+	Common::String stage = g_director->getStage()->getCurrentMovie()->getMacName();
+
+	// Check if the relevant window is gone
+	bool found = false;
+	for (auto window : (*windowList)) {
+		if (window->getCurrentMovie()->getMacName() == selWin) {
+			// Found the selected window
+			found = true;
+			break;
+		}
+	}
+
+	// Our default is Stage
+	if (selWin.empty() || windowList->empty() || !found)
+		*target = stage;
+
+	ImGui::Text("Window:");
+	ImGui::SameLine();
+
+	if (ImGui::BeginCombo("##window", selWin.c_str())) {
+		bool selected = (*target == stage);
+		if (ImGui::Selectable(stage.c_str(), selected))
+			*target = stage;
+
+		if (selected)
+			ImGui::SetItemDefaultFocus();
+
+		for (auto window : (*windowList)) {
+			Common::String winName = window->getCurrentMovie()->getMacName();
+			selected = (*target == winName);
+			if (ImGui::Selectable(winName.c_str(), selected))
+				*target = winName;
+
+			if (selected)
+				ImGui::SetItemDefaultFocus();
+		}
+		ImGui::EndCombo();
+	}
+}
+
 void showScore() {
 	if (!_state->_w.score)
 		return;
@@ -363,6 +407,8 @@ void showScore() {
 	ImGui::SetNextWindowSize(windowSize, ImGuiCond_FirstUseEver);
 
 	if (ImGui::Begin("Score", &_state->_w.score)) {
+		windowList(&_state->_scoreWindow);
+
 		Score *score = g_director->getCurrentMovie()->getScore();
 		uint numFrames = score->_scoreCache.size();
 		Cast *cast = g_director->getCurrentMovie()->getCast();




More information about the Scummvm-git-logs mailing list