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

sev- noreply at scummvm.org
Fri Sep 12 18:49:22 UTC 2025


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

Summary:
ab50c4be85 DIRECTOR: Fix Score SpriteInfo loading and added toString() method


Commit: ab50c4be85ec01bb92716836cd45f59b4de3d4f1
    https://github.com/scummvm/scummvm/commit/ab50c4be85ec01bb92716836cd45f59b4de3d4f1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-12T20:48:49+02:00

Commit Message:
DIRECTOR: Fix Score SpriteInfo loading and added toString() method

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


diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 764a3f0cf4e..03f34ce114d 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -888,10 +888,10 @@ void showChannels() {
 									ImGui::SameLine();
 									ImGui::Text(",%d", behavior.initOffset);
 								}
+								delete stream;
 							} else {
 								ImGui::Text(" ");
 							}
-							delete stream;
 						} else {
 							ImGui::PushID(i + 1);
 							ImGui::TextUnformatted("  ");
diff --git a/engines/director/score.h b/engines/director/score.h
index 72244c41568..cf5e8a27045 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -108,9 +108,25 @@ struct SpriteInfo {
 
 		keyFrames.clear();
 		while (!stream.eos()) {
-			keyFrames.push_back((int32)stream.readUint32());
+			int32 frame = (int32)stream.readUint32();
+			if (stream.eos())
+				break;
+			keyFrames.push_back(frame);
 		}
 	}
+
+	Common::String toString() const {
+		Common::String s;
+		s += Common::String::format("startFrame: %d, endFrame: %d, xtraInfo: %d, flags: 0x%x, channelNum: %d\n",
+			startFrame, endFrame, xtraInfo, flags, channelNum);
+		s += Common::String::format("  tweenInfo: curvature: %d, flags: 0x%x, easeIn: %d, easeOut: %d\n",
+			tweenInfo.curvature, tweenInfo.flags, tweenInfo.easeIn, tweenInfo.easeOut);
+		s += "  keyFrames: ";
+		for (size_t i = 0; i < keyFrames.size(); i++) {
+			s += Common::String::format("%d ", keyFrames[i]);
+		}
+		return s;
+	}
 };
 
 class Score {




More information about the Scummvm-git-logs mailing list