[Scummvm-git-logs] scummvm master -> 20a21491671ad4b3ae30907251e4e6fce6700352
sev-
noreply at scummvm.org
Thu Sep 4 19:05:16 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:
20a2149167 DIRECTOR: DT: Use Sprite colors coming from Score
Commit: 20a21491671ad4b3ae30907251e4e6fce6700352
https://github.com/scummvm/scummvm/commit/20a21491671ad4b3ae30907251e4e6fce6700352
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-04T21:05:03+02:00
Commit Message:
DIRECTOR: DT: Use Sprite colors coming from Score
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 0d410bcb2ee..4c162124382 100644
--- a/engines/director/debugger/dt-internal.h
+++ b/engines/director/debugger/dt-internal.h
@@ -152,14 +152,16 @@ 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, 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
+ // They come from the Authoring tool
+ ImColor _contColors[6] = {
+ ImColor(IM_COL32(0xce, 0xce, 0xff, 0x80)), // 0xceceff,
+ ImColor(IM_COL32(0xff, 0xff, 0xce, 0x80)), // 0xffffce,
+ ImColor(IM_COL32(0xce, 0xff, 0xce, 0x80)), // 0xceffce,
+ ImColor(IM_COL32(0xce, 0xff, 0xff, 0x80)), // 0xceffff,
+ ImColor(IM_COL32(0xff, 0xce, 0xff, 0x80)), // 0xffceff,
+ ImColor(IM_COL32(0xff, 0xce, 0x9c, 0x80)), // 0xffce9c,
};
ImColor _channel_selected_col = ImColor(IM_COL32(0x94, 0x00, 0xD3, 0xFF));
diff --git a/engines/director/debugger/dt-score.cpp b/engines/director/debugger/dt-score.cpp
index 43e9f374683..e9dc5faef2c 100644
--- a/engines/director/debugger/dt-score.cpp
+++ b/engines/director/debugger/dt-score.cpp
@@ -47,16 +47,6 @@ const char *modes2[] = {
ICON_MS_FORMS_APPS_SCRIPT, "Script", // forms_apps_script
};
-// These are the score channel colors coming from the Authoring Tool
-const uint32 scoreColors[6] = {
- 0xceceff,
- 0xffffce,
- 0xceffce,
- 0xceffff,
- 0xffceff,
- 0xffce9c,
-};
-
static void buildContinuationData() {
if (_state->_loadedContinuationData) {
return;
@@ -162,14 +152,14 @@ 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];
+ _state->_colors._contColorIndex = frame._sprites[ch]->_colorcode & 0x07;
+ if (_state->_colors._contColorIndex > 5)
+ _state->_colors._contColorIndex = 0;
+
ImGui::TableNextColumn();
int startCont = _state->_continuationData[ch][f].first;
@@ -189,10 +179,6 @@ static void displayScoreChannel(int ch, int mode, int modeSel) {
}
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 &&
@@ -644,8 +630,6 @@ 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);
More information about the Scummvm-git-logs
mailing list