From c85698e87fd745fbf2c6800032626771fb57df93 Mon Sep 17 00:00:00 2001 From: Enrico Horn Date: Thu, 19 Sep 2013 22:08:06 +0200 Subject: SCI: Add detection entry for the German version of RAMA --- engines/sci/detection_tables.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engines/sci') diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 92e77cead9..9a31e2557b 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3297,6 +3297,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // RAMA - German Windows CD + {"rama", "", { + {"resmap.001", 0, "f68cd73308c46977a9632dfc618e1e38", 8338}, + {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70595521}, + {"resmap.002", 0, "891fc2f5d9e23e7d9a9454acc7aaae52", 12082}, + {"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128508558}, + {"resmap.003", 0, "222096000bd83a1d56577114a452cccf", 1636}, + {"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6954219}, + AD_LISTEND}, + Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // RAMA - Italian Windows CD (from glorifindel) // SCI interpreter version 3.000.000 (a guess?) {"rama", "", { -- cgit v1.2.3 From ac0c890bccfb0a15cd739be60228c4de5a7afeab Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 21 Sep 2013 14:59:26 +0300 Subject: SCI: Add source of the checksums for RAMA German --- engines/sci/detection_tables.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 9a31e2557b..d0a0db2a3b 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3297,17 +3297,17 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // RAMA - German Windows CD - {"rama", "", { - {"resmap.001", 0, "f68cd73308c46977a9632dfc618e1e38", 8338}, - {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70595521}, - {"resmap.002", 0, "891fc2f5d9e23e7d9a9454acc7aaae52", 12082}, - {"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128508558}, - {"resmap.003", 0, "222096000bd83a1d56577114a452cccf", 1636}, - {"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6954219}, - AD_LISTEND}, - Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - + // RAMA - German Windows CD (from farmboy0, in pull request 397) + {"rama", "", { + {"resmap.001", 0, "f68cd73308c46977a9632dfc618e1e38", 8338}, + {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70595521}, + {"resmap.002", 0, "891fc2f5d9e23e7d9a9454acc7aaae52", 12082}, + {"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128508558}, + {"resmap.003", 0, "222096000bd83a1d56577114a452cccf", 1636}, + {"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6954219}, + AD_LISTEND}, + Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // RAMA - Italian Windows CD (from glorifindel) // SCI interpreter version 3.000.000 (a guess?) {"rama", "", { -- cgit v1.2.3 From 4443793b97761ab1dc1fb312a4092211356b008e Mon Sep 17 00:00:00 2001 From: m-kiewitz Date: Sat, 21 Sep 2013 14:27:16 +0200 Subject: SCI: sfx/music priority int16 fixes bug #3615038 it seems that sound system up till SCI0_LATE uses int16, afterwards it seems they changed to byte main music object (conMusic) in Laura Bow 1 uses -1 as priority. This was truncated to 255 till now, which resulted in many sound effects not getting played, because those used priority 0 --- engines/sci/engine/savegame.cpp | 5 ++++- engines/sci/engine/savegame.h | 3 ++- engines/sci/sound/music.h | 2 +- engines/sci/sound/soundcmd.cpp | 7 +++++-- 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index c8076ec819..fa9363abe3 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -600,7 +600,10 @@ void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(dataInc); s.syncAsSint16LE(ticker); s.syncAsSint16LE(signal, VER(17)); - s.syncAsByte(priority); + if (s.getVersion() >= 31) // ffs. sound/music.h -> priority + s.syncAsSint16LE(priority); + else + s.syncAsByte(priority); s.syncAsSint16LE(loop, VER(17)); s.syncAsByte(volume); s.syncAsByte(hold, VER(17)); diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 1d899b0d37..f1f02f89f2 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,6 +37,7 @@ struct EngineState; * * Version - new/changed feature * ============================= + * 31 - priority for sound effects/music is now a signed int16, instead of a byte * 30 - synonyms * 29 - system strings * 28 - heap @@ -55,7 +56,7 @@ struct EngineState; */ enum { - CURRENT_SAVEGAME_VERSION = 30, + CURRENT_SAVEGAME_VERSION = 31, MINIMUM_SAVEGAME_VERSION = 14 }; diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index 5924a0fd12..b582e7f1a9 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -70,7 +70,7 @@ public: uint16 dataInc; uint16 ticker; uint16 signal; - byte priority; + int16 priority; // must be int16, at least in Laura Bow 1, main music (object conMusic) uses priority -1 uint16 loop; int16 volume; int16 hold; diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index b0102a002b..90ad51b5d8 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -116,7 +116,10 @@ void SoundCommandParser::processInitSound(reg_t obj) { newSound->resourceId = resourceId; newSound->soundObj = obj; newSound->loop = readSelectorValue(_segMan, obj, SELECTOR(loop)); - newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF; + if (_soundVersion <= SCI_VERSION_0_LATE) + newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)); + else + newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF; if (_soundVersion >= SCI_VERSION_1_EARLY) newSound->volume = CLIP(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX); newSound->reverb = -1; // initialize to SCI invalid, it'll be set correctly in soundInitSnd() below @@ -428,7 +431,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) { int16 objVol = CLIP(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255); if (objVol != musicSlot->volume) _music->soundSetVolume(musicSlot, objVol); - uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); + int32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); if (objPrio != musicSlot->priority) _music->soundSetPriority(musicSlot, objPrio); return acc; -- cgit v1.2.3 From 158d12e555abe05e6e08a026c156097e48b2802f Mon Sep 17 00:00:00 2001 From: m-kiewitz Date: Sat, 21 Sep 2013 14:34:42 +0200 Subject: SCI: abbrev. ffs to FE and priority check fix --- engines/sci/engine/savegame.cpp | 2 +- engines/sci/sound/soundcmd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index fa9363abe3..c60b50a964 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -600,7 +600,7 @@ void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(dataInc); s.syncAsSint16LE(ticker); s.syncAsSint16LE(signal, VER(17)); - if (s.getVersion() >= 31) // ffs. sound/music.h -> priority + if (s.getVersion() >= 31) // FE sound/music.h -> priority s.syncAsSint16LE(priority); else s.syncAsByte(priority); diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 90ad51b5d8..e36c5705ab 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -431,7 +431,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) { int16 objVol = CLIP(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255); if (objVol != musicSlot->volume) _music->soundSetVolume(musicSlot, objVol); - int32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); + int16 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); if (objPrio != musicSlot->priority) _music->soundSetPriority(musicSlot, objPrio); return acc; -- cgit v1.2.3 From 97b255ab33fa5fcd4507573e77cd42a8406e1b55 Mon Sep 17 00:00:00 2001 From: m-kiewitz Date: Sat, 21 Sep 2013 19:41:45 +0200 Subject: SCI: fix dataInc signalling fixes bug #3035159 we set signal in parseNextEvent on dataInc events, which then effectively triggered 2 cues through kDoSoundUpdateCues instead of one. Fixes Freddy Pharkas Ballad intro on floppy + demos --- engines/sci/sound/midiparser_sci.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/sci') diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 4b4333a37c..b367eeead0 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -444,7 +444,6 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { if (_dataincAdd) { _dataincAdd = false; _pSnd->dataInc += _dataincToAdd; - _pSnd->signal = 0x7f + _pSnd->dataInc; debugC(4, kDebugLevelSound, "datainc %04x", _dataincToAdd); } if (_signalSet) { -- cgit v1.2.3