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

sev- noreply at scummvm.org
Thu Sep 5 17:32:52 UTC 2024


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

Summary:
c32617e977 QDENGINE: DT: Add Control Panel to the debugger


Commit: c32617e9775489acb95c9b0a4f379e64e0e8f076
    https://github.com/scummvm/scummvm/commit/c32617e9775489acb95c9b0a4f379e64e0e8f076
Author: kunxl-gg (tiwari.25 at iitj.ac.in)
Date: 2024-09-05T19:32:49+02:00

Commit Message:
QDENGINE: DT: Add Control Panel to the debugger

Signed-off-by: kunxl-gg <tiwari.25 at iitj.ac.in>

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 0314af3a919..c08665f74b3 100644
--- a/engines/qdengine/debugger/debugtools.cpp
+++ b/engines/qdengine/debugger/debugtools.cpp
@@ -78,6 +78,7 @@ ImGuiImage getImageID(Common::Path filename, int frameNum) {
 	animation->qda_load(filename);
 
 	qdAnimationFrame *frame = animation->get_frame(frameNum);
+	_state->_qdaToDisplayFrameCount = animation->num_frames();
 
 	int sx = 10, sy = 10;
 	if (frame) {
@@ -160,7 +161,6 @@ void showArchives() {
 						_state->_qdaToDisplay = it->getPathInArchive();
 						_state->_qdaToDisplayFrame = 0;
 					}
-
 				}
 
 				ImGui::TreePop();
@@ -174,6 +174,9 @@ void showArchives() {
 		{ // Right pane
 			ImGui::BeginChild("ChildR", ImVec2(ImGui::GetContentRegionAvail().x, ImGui::GetContentRegionAvail().y), ImGuiChildFlags_Border);
 
+			int totalFrames = _state->_qdaToDisplayFrameCount;
+
+
 			ImGuiImage imgID;
 			if (!_state->_qdaToDisplay.empty()) {
 				imgID = getImageID(_state->_qdaToDisplay, _state->_qdaToDisplayFrame);
@@ -184,6 +187,32 @@ void showArchives() {
 				ImGui::Text("Frame <none>");
 			}
 
+			ImGui::SameLine();
+			if (ImGui::Button("\ue045")) { // Skip Previous    // skip_previous
+				_state->_qdaToDisplayFrame = _state->_qdaToDisplayFrame + totalFrames - 1;
+				_state->_qdaToDisplayFrame %= totalFrames;
+			}
+			ImGui::SameLine();
+			ImGui::Button("\ue037"); // Play    // play_arrow
+			ImGui::SameLine();
+			if (ImGui::Button("\ue044")) { // Skip Next    // skip_next
+				_state->_qdaToDisplayFrame += 1;
+				_state->_qdaToDisplayFrame %= totalFrames;
+			}
+			ImGui::SameLine();
+			ImGui::Button("\ue020"); // Fast Rewind    // fast_rewind
+			ImGui::SameLine();
+			ImGui::Button("\ue01f"); // Fast Forward    // fast_forward
+			ImGui::SameLine();
+
+			// Frame Count
+			char buf[6];
+			snprintf(buf, 6, "%d", _state->_qdaToDisplayFrame);
+
+			ImGui::SetNextItemWidth(35);
+			ImGui::InputText("##frame", buf, 5, ImGuiInputTextFlags_CharsDecimal);
+			ImGui::SetItemTooltip("Frame");
+
 			ImGui::Separator();
 
 			if (!_state->_qdaToDisplay.empty()) {
diff --git a/engines/qdengine/debugger/dt-internal.h b/engines/qdengine/debugger/dt-internal.h
index f60b21aaab0..382e361c6d3 100644
--- a/engines/qdengine/debugger/dt-internal.h
+++ b/engines/qdengine/debugger/dt-internal.h
@@ -37,6 +37,7 @@ typedef struct ImGuiState {
 
 	Common::Path _qdaToDisplay;
 	int _qdaToDisplayFrame = -1;
+	int _qdaToDisplayFrameCount = 0;
 } ImGuiState;
 
 extern ImGuiState *_state;




More information about the Scummvm-git-logs mailing list