[Scummvm-git-logs] scummvm master -> f31021ae16f7a870ba41c6a4491855199a6bc526
aquadran
noreply at scummvm.org
Sun Jul 19 06:41:34 UTC 2026
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:
f31021ae16 WINTERMUTE: Added two W/A for script, listening recording in SOTV2 make it workable
Commit: f31021ae16f7a870ba41c6a4491855199a6bc526
https://github.com/scummvm/scummvm/commit/f31021ae16f7a870ba41c6a4491855199a6bc526
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2026-07-19T08:41:21+02:00
Commit Message:
WINTERMUTE: Added two W/A for script, listening recording in SOTV2 make it workable
Changed paths:
engines/wintermute/base/base_game.cpp
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index dc8713ee4b6..255236d7a70 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -1421,6 +1421,13 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
uint32 time = stack->pop()->getInt();
+ if (BaseEngine::instance().getGameId() == "sotv2") {
+ // script shifting sound position by -2998
+ // which cause issue with our sound stream.
+ // W/A shift forward by 2998
+ time += 2998;
+ }
+
if (DID_FAIL(setMusicStartTime(channel, time))) {
stack->pushBool(false);
} else {
@@ -1445,7 +1452,16 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
stack->pushInt(0);
} else {
- stack->pushInt(_music[channel]->getPositionTime());
+ uint32 pos = _music[channel]->getPositionTime();
+ if (BaseEngine::instance().getGameId() == "sotv2") {
+ // when sound stream end, it's returning position as 0
+ // this confuse game script due position slider is slower
+ // get length of sound instead
+ if (pos == 0) {
+ pos = _music[channel]->getLength();
+ }
+ }
+ stack->pushInt(pos);
}
return STATUS_OK;
}
More information about the Scummvm-git-logs
mailing list