[Scummvm-git-logs] scummvm master -> 9f070d0736db8faef9a7c5bb8e7154eea18bdb59
athrxx
athrxx at scummvm.org
Sat Jan 11 20:27:39 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dbec5ad0e7 KYRA: (LOK) - fix possible invalid memory access
9f070d0736 KYRA: (HOF) - fix speech glitch (bug #11309)
Commit: dbec5ad0e740fb0c1fae44c94f2eae2357e223c1
https://github.com/scummvm/scummvm/commit/dbec5ad0e740fb0c1fae44c94f2eae2357e223c1
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-11T21:23:24+01:00
Commit Message:
KYRA: (LOK) - fix possible invalid memory access
It does not actually happen, but that's only due to the actual game script data...
Changed paths:
engines/kyra/graphics/screen.cpp
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index bbcada5..526c0fb 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -3173,19 +3173,20 @@ void Screen::shakeScreen(int times) {
static const int8 _shakeParaPC[] = { 32, 0, -4, 32, 0, 0 };
static const int8 _shakeParaFMTOWNS[] = { 32, 0, -4, 48, 0, 4, 32, -4, 0, 32, 4, 0, 32, 0, 0 };
- const int8 *data = _shakeParaPC;
+ const int8 *shakeData = _shakeParaPC;
int steps = ARRAYSIZE(_shakeParaPC) / 3;
// The FM-TOWNS version has a slightly better shake animation
// TODO: check PC-98 version
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- data = _shakeParaFMTOWNS;
+ shakeData = _shakeParaFMTOWNS;
steps = ARRAYSIZE(_shakeParaFMTOWNS) / 3;
}
Common::Event event;
while (times--) {
+ const int8 *data = shakeData;
for (int i = 0; i < steps; ++i) {
// The original PC version did not need an artificial delay, but we do or the shake will be
// too fast to be actually seen.
Commit: 9f070d0736db8faef9a7c5bb8e7154eea18bdb59
https://github.com/scummvm/scummvm/commit/9f070d0736db8faef9a7c5bb8e7154eea18bdb59
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-11T21:23:24+01:00
Commit Message:
KYRA: (HOF) - fix speech glitch (bug #11309)
(the original does not cut off the current speech playback when starting a new voc file, but rather waits for it to finish)
Changed paths:
engines/kyra/engine/kyra_hof.cpp
diff --git a/engines/kyra/engine/kyra_hof.cpp b/engines/kyra/engine/kyra_hof.cpp
index 2e5d091..6f303c1 100644
--- a/engines/kyra/engine/kyra_hof.cpp
+++ b/engines/kyra/engine/kyra_hof.cpp
@@ -1419,6 +1419,15 @@ void KyraEngine_HoF::snd_playVoiceFile(int id) {
assert(id >= 0 && id <= 9999999);
sprintf(vocFile, "%07d", id);
if (_sound->isVoicePresent(vocFile)) {
+ // Unlike the original I have added a timeout here. I have chosen a size that makes sure that it
+ // won't get triggered in any of the bug #11309 situations, but still avoids infinite hangups if
+ // something goes wrong.
+ uint32 end = _system->getMillis() + 2500;
+ while (snd_voiceIsPlaying() && _system->getMillis() < end && !skipFlag())
+ delay(10);
+ if (_system->getMillis() >= end && !skipFlag())
+ debugC(3, kDebugLevelSound, "KyraEngine_HoF::snd_playVoiceFile(): Speech finish wait timeout");
+
snd_stopVoice();
while (!_sound->voicePlay(vocFile, &_speechHandle)) {
More information about the Scummvm-git-logs
mailing list