[Scummvm-git-logs] scummvm master -> f683460ef97be8e3a1b6d2336f395099d17694af

sev- noreply at scummvm.org
Wed Oct 30 21:44:30 UTC 2024


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:
3be33e7931 SCUMM: Added missing override keyword
f683460ef9 QDENGINE: DT: Display visible scene objects


Commit: 3be33e79317ad36169d4514586ecf641462d5906
    https://github.com/scummvm/scummvm/commit/3be33e79317ad36169d4514586ecf641462d5906
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-30T22:44:15+01:00

Commit Message:
SCUMM: Added missing override keyword

Changed paths:
    engines/scumm/macgui/macgui_v5.h


diff --git a/engines/scumm/macgui/macgui_v5.h b/engines/scumm/macgui/macgui_v5.h
index d6023867c83..66642522469 100644
--- a/engines/scumm/macgui/macgui_v5.h
+++ b/engines/scumm/macgui/macgui_v5.h
@@ -40,7 +40,7 @@ public:
 
 	bool handleEvent(Common::Event event) override;
 
-	const Graphics::Font *getFontByScummId(int32 id);
+	const Graphics::Font *getFontByScummId(int32 id) override;
 
 	void setupCursor(int &width, int &height, int &hotspotX, int &hotspotY, int &animate) override;
 


Commit: f683460ef97be8e3a1b6d2336f395099d17694af
    https://github.com/scummvm/scummvm/commit/f683460ef97be8e3a1b6d2336f395099d17694af
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-30T22:44:16+01:00

Commit Message:
QDENGINE: DT: Display visible scene objects

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


diff --git a/engines/qdengine/debugger/debugtools.cpp b/engines/qdengine/debugger/debugtools.cpp
index 17daf2c85b2..fb02924212f 100644
--- a/engines/qdengine/debugger/debugtools.cpp
+++ b/engines/qdengine/debugger/debugtools.cpp
@@ -40,6 +40,9 @@
 #include "qdengine/qdcore/qd_animation.h"
 #include "qdengine/qdcore/qd_animation_frame.h"
 #include "qdengine/qdcore/qd_file_manager.h"
+#include "qdengine/qdcore/qd_game_dispatcher.h"
+#include "qdengine/qdcore/qd_game_object.h"
+#include "qdengine/qdcore/qd_game_scene.h"
 #include "qdengine/qdengine.h"
 #include "qdengine/system/graphics/gr_dispatcher.h"
 
@@ -404,6 +407,28 @@ void showArchives() {
 	ImGui::End();
 }
 
+void showSceneObjects() {
+	if (!_state->_showSceneObjects)
+		return;
+
+	ImGui::SetNextWindowPos(ImVec2(20, 20), ImGuiCond_FirstUseEver);
+	ImGui::SetNextWindowSize(ImVec2(300, 250), ImGuiCond_FirstUseEver);
+
+	if (ImGui::Begin("Scene Objects", &_state->_showSceneObjects)) {
+		qdGameScene *scene;
+		if (qdGameDispatcher::get_dispatcher() && ((scene = qdGameDispatcher::get_dispatcher()->get_active_scene()))) {
+			if (!scene->object_list().empty()) {
+				for (auto &it : g_engine->_visible_objects) {
+					if (ImGui::Selectable((char *)transCyrillic(it->name()), _state->_objectToDisplay == it->name())) {
+						_state->_objectToDisplay = it->name();
+					}
+				}
+			}
+		}
+	}
+	ImGui::End();
+}
+
 void onImGuiInit() {
 	ImGuiIO &io = ImGui::GetIO();
 	io.Fonts->AddFontDefault();
@@ -452,12 +477,14 @@ void onImGuiRender() {
 			ImGui::SeparatorText("Windows");
 
 			ImGui::MenuItem("Archives", NULL, &_state->_showArchives);
+			ImGui::MenuItem("Scene Objects", NULL, &_state->_showSceneObjects);
 			ImGui::EndMenu();
 		}
 		ImGui::EndMainMenuBar();
 	}
 
 	showArchives();
+	showSceneObjects();
 }
 
 void onImGuiCleanup() {
diff --git a/engines/qdengine/debugger/dt-internal.h b/engines/qdengine/debugger/dt-internal.h
index ff0fd254c4e..9f8da7b7523 100644
--- a/engines/qdengine/debugger/dt-internal.h
+++ b/engines/qdengine/debugger/dt-internal.h
@@ -47,10 +47,12 @@ struct FileTree {
 
 typedef struct ImGuiState {
 	bool _showArchives = false;
+	bool _showSceneObjects = false;
 
 	Common::HashMap<Common::String, ImGuiImage> _frames;
 
 	Common::Path _fileToDisplay;
+	Common::String _objectToDisplay;
 
 	int _qdaToDisplayFrame = -1;
 	int _qdaToDisplayFrameCount = 0;




More information about the Scummvm-git-logs mailing list