[Scummvm-git-logs] scummvm master -> 5f16aacfcffe56e195378508cba279d0806fd830
sev-
noreply at scummvm.org
Mon Sep 29 22:14:42 UTC 2025
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ebe2547d68 BAGEL: Add missing override keyword
5154572bf8 DIRECTOR: Clarified movie and Xtra file extensions for D6+
db59e325fc DIRECTOR: LINGO: Some behaviors may have missing scripts
bd07545d35 DIRECTOR: LINGO: Iterate over scriptInstantiations rather than behaviors
f72b2f3469 DIRECTOR: Fix accessing internal palettes
5f16aacfcf DIRECTOR: Made frame stepping more prominent in the logs
Commit: ebe2547d6807fa9f305a2f0db01195675ef9bebe
https://github.com/scummvm/scummvm/commit/ebe2547d6807fa9f305a2f0db01195675ef9bebe
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:18+02:00
Commit Message:
BAGEL: Add missing override keyword
Changed paths:
engines/bagel/hodjnpodj/metagame/gtl/citemdlg.h
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/citemdlg.h b/engines/bagel/hodjnpodj/metagame/gtl/citemdlg.h
index a203555e2d5..d347ad48575 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/citemdlg.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/citemdlg.h
@@ -89,7 +89,7 @@ protected:
// Generated message map functions
//{{AFX_MSG(CItemDialog)
- afx_msg void OnActivate(unsigned int nState, CWnd *, bool);
+ afx_msg void OnActivate(unsigned int nState, CWnd *, bool) override;
afx_msg void OnPaint();
virtual void OnOK() override;
virtual void OnCancel() override;
Commit: 5154572bf885e09a0e81b48bcdba8552f32897aa
https://github.com/scummvm/scummvm/commit/5154572bf885e09a0e81b48bcdba8552f32897aa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:22+02:00
Commit Message:
DIRECTOR: Clarified movie and Xtra file extensions for D6+
Changed paths:
engines/director/util.cpp
diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index f58ce91cfdb..c6e9bb2a0de 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -947,6 +947,7 @@ Common::Path findMoviePath(const Common::String &path, bool currentFolder, bool
const char *extsD3[] = { ".MMM", nullptr };
const char *extsD4[] = { ".DIR", ".DXR", ".EXE", nullptr };
const char *extsD5[] = { ".DIR", ".DXR", ".CST", ".CXT", ".EXE", nullptr };
+ const char *extsD6[] = { ".DIR", ".DXR", ".CST", ".CXT", ".EXE", ".DCR", ".DCT", nullptr };
const char **exts = nullptr;
if (g_director->getVersion() < 400) {
@@ -956,8 +957,7 @@ Common::Path findMoviePath(const Common::String &path, bool currentFolder, bool
} else if (g_director->getVersion() >= 500 && g_director->getVersion() < 600) {
exts = extsD5;
} else {
- warning("findMoviePath(): file extensions not yet supported for version %d, falling back to D5", g_director->getVersion());
- exts = extsD5;
+ exts = extsD6;
}
Common::Path result = findPath(path, currentFolder, searchPaths, false, exts);
@@ -971,10 +971,7 @@ Common::Path findXLibPath(const Common::String &path, bool currentFolder, bool s
const char **exts = nullptr;
if (g_director->getVersion() < 500) {
exts = extsD3;
- } else if (g_director->getVersion() < 600) {
- exts = extsD5;
} else {
- warning("findXLibPath(): file extensions not yet supported for version %d, falling back to D5", g_director->getVersion());
exts = extsD5;
}
Commit: db59e325fcd30623f135fada91cf73ebea270758
https://github.com/scummvm/scummvm/commit/db59e325fcd30623f135fada91cf73ebea270758
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:22+02:00
Commit Message:
DIRECTOR: LINGO: Some behaviors may have missing scripts
This is fine, as it is possible to remove script after you
reference to it as a behavior.
melements-win has a lot of these
Changed paths:
engines/director/lingo/lingo-events.cpp
engines/director/lingo/lingo.h
diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp
index 96930947124..c1a4d6dacbc 100644
--- a/engines/director/lingo/lingo-events.cpp
+++ b/engines/director/lingo/lingo-events.cpp
@@ -772,7 +772,15 @@ void Score::killScriptInstances(int frameNum) {
Datum Score::createScriptInstance(BehaviorElement *behavior) {
// Instantiate the behavior
- g_lingo->push(_movie->getScriptContext(kScoreScript, behavior->memberID));
+ ScriptContext *scr = _movie->getScriptContext(kScoreScript, behavior->memberID);
+
+ // Some movies have behaviors with missing scripts
+ if (scr == nullptr) {
+ debugC(7, kDebugLingoExec, "Score::createScriptInstance(): Missing script for behavior %s", behavior->toString().c_str());
+ return Datum();
+ }
+
+ g_lingo->push(scr);
LC::call("new", 1, true);
Datum instance = g_lingo->pop();
@@ -864,7 +872,9 @@ void Score::createScriptInstances(int frameNum) {
Datum instance = createScriptInstance(&sprite->_behaviors[j]);
if (instance.type != OBJECT) {
- warning("Score::createScriptInstances(): Could not instantiate behavior %s", sprite->_behaviors[j].toString().c_str());
+ if (!instance.isVoid())
+ warning("Score::createScriptInstances(): Could not instantiate behavior %s", sprite->_behaviors[j].toString().c_str());
+
continue;
}
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index f702e93fdba..a05bd2a1f26 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -177,6 +177,7 @@ struct Datum { /* interpreter stack type */
bool isCastRef() const;
bool isArray() const;
bool isNumeric() const;
+ bool isVoid() const { return type == VOID; }
const char *type2str(bool ilk = false) const;
Commit: bd07545d352da827fe4eab5bdd5ccb2711339f6d
https://github.com/scummvm/scummvm/commit/bd07545d352da827fe4eab5bdd5ccb2711339f6d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:22+02:00
Commit Message:
DIRECTOR: LINGO: Iterate over scriptInstantiations rather than behaviors
Since some behaviors could refer to non-existent scripts and we skip
their creation, we may have shorted scriptInstantiations list, which
would lead to a superfluous warning of "index out of range"
Changed paths:
engines/director/lingo/lingo-events.cpp
diff --git a/engines/director/lingo/lingo-events.cpp b/engines/director/lingo/lingo-events.cpp
index c1a4d6dacbc..246d73c1ad0 100644
--- a/engines/director/lingo/lingo-events.cpp
+++ b/engines/director/lingo/lingo-events.cpp
@@ -539,15 +539,14 @@ void Movie::queueEvent(Common::Queue<LingoEvent> &queue, LEvent event, int targe
case kEventMouseWithin: // D6+
if (_vm->getVersion() >= 600) {
if (pointedSpriteId != 0) {
- Sprite *sprite = _score->getSpriteById(pointedSpriteId);
- if (sprite) {
- // Generate event for each behavior, and pass through for all but the last one.
- // This is to allow multiple behaviors on a single sprite to each have a
- // chance to handle the event.
- for (uint i = 0; i < sprite->_behaviors.size(); i++) {
- bool passThrough = (i != sprite->_behaviors.size() - 1);
- queue.push(LingoEvent(event, eventId, kSpriteHandler, passThrough, pos, channelId, i));
- }
+ Channel *channel = _score->_channels[channelId];
+
+ // Generate event for each behavior, and pass through for all but the last one.
+ // This is to allow multiple behaviors on a single sprite to each have a
+ // chance to handle the event.
+ for (uint i = 0; i < channel->_scriptInstanceList.size(); i++) {
+ bool passThrough = (i != channel->_scriptInstanceList.size() - 1);
+ queue.push(LingoEvent(event, eventId, kSpriteHandler, passThrough, pos, channelId, i));
}
if (event == kEventBeginSprite || event == kEventEndSprite || event == kEventMouseUpOutSide) {
Commit: f72b2f3469e6407f0fdf834e721f643f041fdbbc
https://github.com/scummvm/scummvm/commit/f72b2f3469e6407f0fdf834e721f643f041fdbbc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:22+02:00
Commit Message:
DIRECTOR: Fix accessing internal palettes
In D6+ it is widespread to refer to internal palettes with CastLib 0.
Since we keep them in hash with CastLib -1, patch the requested
reference to avoid unnecessary warnings and return the requested
thing
Changed paths:
engines/director/director.h
engines/director/graphics.cpp
diff --git a/engines/director/director.h b/engines/director/director.h
index b3091d5ba97..120e68900df 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -200,8 +200,8 @@ public:
void shiftPalette(int startIndex, int endIndex, bool reverse);
void syncPalette();
void clearPalettes();
- PaletteV4 *getPalette(const CastMemberID &id);
- bool hasPalette(const CastMemberID &id);
+ PaletteV4 *getPalette(CastMemberID id);
+ bool hasPalette(CastMemberID id);
void loadDefaultPalettes();
const Common::HashMap<CastMemberID, PaletteV4> &getLoadedPalettes() { return _loadedPalettes; }
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 1bc50e6484f..3c527294525 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -133,10 +133,14 @@ void DirectorEngine::loadDefaultPalettes() {
_loaded4Palette = PaletteV4(CastMemberID(kClutGrayscale, -1), grayscale4Palette, 4);
}
-PaletteV4 *DirectorEngine::getPalette(const CastMemberID &id) {
+PaletteV4 *DirectorEngine::getPalette(CastMemberID id) {
if (id.isNull())
return nullptr;
+ // Reference to internal palettes
+ if (id.member < 0)
+ id.castLib = -1; // Ensure we use the default palette set
+
if (!_loadedPalettes.contains(id)) {
warning("DirectorEngine::getPalette(): Palette %s not found, hash %x", id.asString().c_str(), id.hash());
return nullptr;
@@ -145,7 +149,11 @@ PaletteV4 *DirectorEngine::getPalette(const CastMemberID &id) {
return &_loadedPalettes[id];
}
-bool DirectorEngine::hasPalette(const CastMemberID &id) {
+bool DirectorEngine::hasPalette(CastMemberID id) {
+ // Reference to internal palettes
+ if (id.member < 0)
+ id.castLib = -1; // Ensure we use the default palette set
+
return _loadedPalettes.contains(id);
}
Commit: 5f16aacfcffe56e195378508cba279d0806fd830
https://github.com/scummvm/scummvm/commit/5f16aacfcffe56e195378508cba279d0806fd830
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-09-30T00:14:22+02:00
Commit Message:
DIRECTOR: Made frame stepping more prominent in the logs
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 401e813872d..7c79a7d5037 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -649,7 +649,9 @@ void Score::update() {
// set the delay time/condition until the next frame
updateNextFrameTime();
- debugC(1, kDebugEvents, "****************************** Current frame: %d, time: %d", _curFrameNumber, g_system->getMillis(false));
+ debugC(1, kDebugEvents, "##############################");
+ debugC(1, kDebugEvents, "###### Current frame: %d, time: %d", _curFrameNumber, g_system->getMillis(false));
+ debugC(1, kDebugEvents, "##############################");
g_debugger->frameHook();
// movie could have been stopped by a window switch or a debug flag
More information about the Scummvm-git-logs
mailing list