[Scummvm-git-logs] scummvm branch-2-1 -> edea6d6e4a6bf077c21882edb95b2c6b26ee9072
athrxx
athrxx at scummvm.org
Fri Jan 3 12:07:00 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:
7f03837c58 KYRA: (HOF) - minor cleanup
edea6d6e4a KYRA: minor AdLib driver fix
Commit: 7f03837c580d89cf80c343f83b811fdb027a23a7
https://github.com/scummvm/scummvm/commit/7f03837c580d89cf80c343f83b811fdb027a23a7
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-03T13:05:56+01:00
Commit Message:
KYRA: (HOF) - minor cleanup
Changed paths:
engines/kyra/engine/kyra_hof.cpp
engines/kyra/engine/kyra_hof.h
engines/kyra/resource/staticres.cpp
diff --git a/engines/kyra/engine/kyra_hof.cpp b/engines/kyra/engine/kyra_hof.cpp
index bc09be0..2e5d091 100644
--- a/engines/kyra/engine/kyra_hof.cpp
+++ b/engines/kyra/engine/kyra_hof.cpp
@@ -1460,8 +1460,8 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
if (track == -1)
return;
- int16 prio = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
- int16 file = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
+ int16 prio = READ_LE_INT16(&_ingameSoundIndex[track * 2 + 1]);
+ int16 file = READ_LE_INT16(&_ingameSoundIndex[track * 2]);
prio = prio <= 0 ? -prio : (prio * volume) >> 8;
if (file != -1 && _sound->useDigitalSfx()) {
diff --git a/engines/kyra/engine/kyra_hof.h b/engines/kyra/engine/kyra_hof.h
index 2763813..04ee2b6 100644
--- a/engines/kyra/engine/kyra_hof.h
+++ b/engines/kyra/engine/kyra_hof.h
@@ -642,7 +642,7 @@ protected:
int _cdaTrackTableFinaleSize;
const char *const *_ingameSoundList;
int _ingameSoundListSize;
- const uint16 *_ingameSoundIndex;
+ const int16 *_ingameSoundIndex;
int _ingameSoundIndexSize;
const uint16 *_ingameTalkObjIndex;
int _ingameTalkObjIndexSize;
diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp
index 2018c31..d97c4f0 100644
--- a/engines/kyra/resource/staticres.cpp
+++ b/engines/kyra/resource/staticres.cpp
@@ -977,14 +977,14 @@ void KyraEngine_LoK::loadMainScreen(int page) {
void KyraEngine_HoF::initStaticResource() {
_ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize);
_ingameSoundList = _staticres->loadStrings(k2IngameSfxFiles, _ingameSoundListSize);
- _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize);
+ _ingameSoundIndex = (const int16*)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize);
_musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize);
_musicFileListIngame = _staticres->loadStrings(k2IngameTracks, _musicFileListIngameSize);
_musicFileListFinale = _staticres->loadStrings(k2SeqplayFinaleTracks, _musicFileListFinaleSize);
_cdaTrackTableIntro = _staticres->loadRawData(k2SeqplayIntroCDA, _cdaTrackTableIntroSize);
_cdaTrackTableIngame = _staticres->loadRawData(k2IngameCDA, _cdaTrackTableIngameSize);
_cdaTrackTableFinale = _staticres->loadRawData(k2SeqplayFinaleCDA, _cdaTrackTableFinaleSize);
- _ingameTalkObjIndex = (const uint16 *)_staticres->loadRawData(k2IngameTalkObjIndex, _ingameTalkObjIndexSize);
+ _ingameTalkObjIndex = (const uint16*)_staticres->loadRawData(k2IngameTalkObjIndex, _ingameTalkObjIndexSize);
_ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize);
_itemAnimDefinition = _staticres->loadItemAnimDefinition(k2IngameShapeAnimData, _itemAnimDefinitionSize);
Commit: edea6d6e4a6bf077c21882edb95b2c6b26ee9072
https://github.com/scummvm/scummvm/commit/edea6d6e4a6bf077c21882edb95b2c6b26ee9072
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-03T13:05:56+01:00
Commit Message:
KYRA: minor AdLib driver fix
This commit extends a fix that was previously limited to the EOB games. It seems that the later games can also have situations where this becomes necessary (e. g. I noticed that the HOF title music went missing when aborting the intro via left click).
Changed paths:
engines/kyra/sound/drivers/adlib.cpp
diff --git a/engines/kyra/sound/drivers/adlib.cpp b/engines/kyra/sound/drivers/adlib.cpp
index de6b8a4..4f4ae14 100644
--- a/engines/kyra/sound/drivers/adlib.cpp
+++ b/engines/kyra/sound/drivers/adlib.cpp
@@ -245,8 +245,9 @@ void AdLibDriver::setupPrograms() {
// next sound (with a lower priority) starts which will cause that sound to be skipped. We simply
// restart incoming sounds during stop sound execution.
// UPDATE: This stilly applies after introduction of the _programQueue.
+ // UPDATE: This can also happen with the HOF main menu, so I commented out the version < 3 limitation.
QueueEntry retrySound;
- if (_version < 3 && _programQueue[_programQueueStart].id == 0)
+ if (/*_version < 3 &&*/ _programQueue[_programQueueStart].id == 0)
_retrySounds = true;
else if (_retrySounds)
retrySound = _programQueue[_programQueueStart];
More information about the Scummvm-git-logs
mailing list