diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/message.cpp | 36 | ||||
-rw-r--r-- | engines/sci/resource_audio.cpp | 8 |
2 files changed, 44 insertions, 0 deletions
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index aa961c9a85..5d1607ccee 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -255,6 +255,42 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re t.verb = 1; } + if (g_sci->getGameId() == GID_QFG4 && g_sci->isCD() && stack.getModule() == 520 && + t.noun == 2 && t.verb == 59 && t.cond == 0) { + // The CD edition mangled the Rusalka flowers dialogue. - bug #10849 + // In the floppy edition, there are 3 lines, the first from + // the narrator, then two from Rusalka. The CD edition omits + // narration and only has the 3rd text, with the 2nd audio! The + // 3rd audio is orphaned but available. + // + // We only restore Rusalka's lines, providing the correct text + // for seq:1 to match the audio. We respond to seq:2 requests + // with Rusalka's last text. The orphaned audio (seq:3) has its + // tuple adjusted to seq:2 in resource_audio.cpp. + if (t.seq == 1) { + record.tuple = t; + record.refTuple = MessageTuple(); + record.talker = 28; + record.string = "Thank you for the beautiful flowers. No one has been so nice to me since I can remember."; + record.length = 89; + delete reader; + return true; + } else if (t.seq == 2) { + // The CD edition ships with this text at seq:1. + // Look it up instead of hardcoding. + t.seq = 1; + if (!reader->findRecord(t, record)) { + delete reader; + return false; + } + t.seq = 2; // Prevent an endless 2=1 -> 2=1 -> 2=1... loop. + record.tuple.seq = 2; // Make the record seq:2 to get the seq:2 audio. + record.refTuple = MessageTuple(); + delete reader; + return true; + } + } + if (g_sci->getGameId() == GID_LAURABOW2 && !g_sci->isCD() && stack.getModule() == 1885 && t.noun == 1 && t.verb == 6 && t.cond == 16 && t.seq == 4 && (g_sci->getEngineState()->currentRoomNumber() == 350 || diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp index 61628081b2..dfc3d2fcfb 100644 --- a/engines/sci/resource_audio.cpp +++ b/engines/sci/resource_audio.cpp @@ -468,6 +468,14 @@ int ResourceManager::readAudioMapSCI11(IntMapResourceSource *map) { n = 0x17010001; } + // QFG4CD has an orphaned audio36 resource that additionally has the wrong tuple. + // The audio36 tuple is 520 2 59 0 3. The message would be 520 2 59 0 2. bug #10849 + // We restore the missing message in message.cpp. + if (g_sci->getGameId() == GID_QFG4 && g_sci->isCD() && + map->_mapNumber == 520 && n == 0x023b0003) { + n = 0x023b0002; + } + if (isEarly) { offset = ptr.getUint32LE(); ptr += 4; |