[Scummvm-git-logs] scummvm master -> 993529e20dc48b4f55e998d6f680df6e9d038344
neuromancer
noreply at scummvm.org
Sat Sep 12 20:25:06 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
7b71074adb EEM: added console command to unlock case books
993529e20d EEM: added workaround to repain broken audio samples in EEM1 mac cd release
Commit: 7b71074adb3c0f88ec179af874f8c4f268ddccbe
https://github.com/scummvm/scummvm/commit/7b71074adb3c0f88ec179af874f8c4f268ddccbe
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-09-12T22:24:45+02:00
Commit Message:
EEM: added console command to unlock case books
Changed paths:
A engines/eem/console.cpp
A engines/eem/console.h
engines/eem/eem.cpp
engines/eem/eem.h
engines/eem/module.mk
engines/eem/ui.cpp
diff --git a/engines/eem/console.cpp b/engines/eem/console.cpp
new file mode 100644
index 00000000000..de01e067080
--- /dev/null
+++ b/engines/eem/console.cpp
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "eem/console.h"
+#include "eem/eem.h"
+
+namespace EEM {
+
+Debugger::Debugger(EEMEngine *vm) : GUI::Debugger(), _vm(vm) {
+ registerCmd("unlock", WRAP_METHOD(Debugger, cmdUnlock));
+}
+
+bool Debugger::cmdUnlock(int argc, const char **argv) {
+ if (_vm->isDemo()) {
+ debugPrintf("The demo only contains the practice mystery.\n");
+ return true;
+ }
+
+ const uint maxBook = _vm->mysteryTierCount();
+ if (argc != 2) {
+ debugPrintf("Usage: unlock <book> (1-%u)\n", maxBook);
+ return true;
+ }
+
+ char *end;
+ const long book = strtol(argv[1], &end, 10);
+ if (end == argv[1] || *end != '\0' || book < 1 || book > (long)maxBook) {
+ debugPrintf("Book must be a number from 1 to %u.\n", maxBook);
+ return true;
+ }
+
+ _vm->_pendingBookUnlock = (uint8)book;
+ debugPrintf("Book %ld unlocked. Choose A Mystery will list its unsolved cases.\n", book);
+ return true;
+}
+
+} // End of namespace EEM
diff --git a/engines/eem/console.h b/engines/eem/console.h
new file mode 100644
index 00000000000..450c772c859
--- /dev/null
+++ b/engines/eem/console.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef EEM_CONSOLE_H
+#define EEM_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace EEM {
+
+class EEMEngine;
+
+class Debugger : public GUI::Debugger {
+public:
+ Debugger(EEMEngine *vm);
+
+private:
+ EEMEngine *_vm;
+
+ bool cmdUnlock(int argc, const char **argv);
+};
+
+} // End of namespace EEM
+
+#endif
diff --git a/engines/eem/eem.cpp b/engines/eem/eem.cpp
index ccb235c372c..77a5c692b79 100644
--- a/engines/eem/eem.cpp
+++ b/engines/eem/eem.cpp
@@ -42,6 +42,7 @@
#include "video/flic_decoder.h"
#include "eem/audio.h"
+#include "eem/console.h"
#include "eem/detection.h"
#include "eem/eem.h"
#include "eem/installer.h"
@@ -324,6 +325,7 @@ EEMEngine::EEMEngine(OSystem *syst, const ADGameDescription *gameDesc)
_variant = kVariantLondonCD;
setAnimScripts(isLondon(), isMacTalkie());
_language = gameDesc ? gameDesc->language : Common::EN_ANY;
+ setDebugger(new Debugger(this));
}
EEMEngine::~EEMEngine() {
diff --git a/engines/eem/eem.h b/engines/eem/eem.h
index c263726f307..7654c23d174 100644
--- a/engines/eem/eem.h
+++ b/engines/eem/eem.h
@@ -124,6 +124,8 @@ constexpr Common::Rect kPdaPartnerFootMapRect (Common::Point( 7, 177), 50, 23)
constexpr Common::Rect kPdaPartnerHeadHintRect (Common::Point( 5, 80), 39, 30);
class EEMEngine : public Engine {
+ friend class Debugger;
+
public:
EEMEngine(OSystem *syst, const ADGameDescription *gameDesc);
~EEMEngine() override;
@@ -624,6 +626,8 @@ private:
/// `_PlayerRecord.SolvedMysteries[55]`. 0=unsolved, 1=solved, 2=first-try.
uint8 _mysteriesSolved[55] = {};
uint8 _chainStage = 1;
+ // Applied on case selection to preserve the current case's difficulty.
+ uint8 _pendingBookUnlock = 0;
bool _voiceOn = true;
bool _musicOn = true;
diff --git a/engines/eem/module.mk b/engines/eem/module.mk
index 04d47310120..25bd80d83d3 100644
--- a/engines/eem/module.mk
+++ b/engines/eem/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS = \
animation.o \
audio.o \
clues.o \
+ console.o \
coords.o \
eem.o \
font.o \
diff --git a/engines/eem/ui.cpp b/engines/eem/ui.cpp
index 94c5cba287a..f9d9ef2f1f4 100644
--- a/engines/eem/ui.cpp
+++ b/engines/eem/ui.cpp
@@ -2614,7 +2614,8 @@ void EEMEngine::doActionScreen() {
const bool haveTier3 = mysteryTierRange(3, loT, hiT);
const bool anySolved3 = haveTier3 && anyMysterySolved(loT, hiT);
- const bool chooseOn = !isDemo() && _chainStage < 4;
+ const uint pendingBookUnlock = _pendingBookUnlock;
+ const bool chooseOn = !isDemo() && (_chainStage < 4 || pendingBookUnlock != 0);
const bool practiceOn = isDemo() || _chainStage <= 1;
const bool scrap1On =
_chainStage >= 2 || (_chainStage == 1 && anySolved1);
@@ -2738,6 +2739,10 @@ void EEMEngine::doActionScreen() {
continue;
}
}
+ if (_pendingBookUnlock != pendingBookUnlock) {
+ _nextScreen = kScreenAction;
+ return;
+ }
if (confirmed) {
v.pick = pick;
drawActionMenuFrame(v);
@@ -2795,6 +2800,7 @@ void EEMEngine::doActionScreen() {
// EEM2: 1abf:022a + 1cd3:0a9d)
void EEMEngine::doCaseSelection() {
const uint kMaxMystery = isLondon() ? 50 : 54;
+ const uint pendingBookUnlock = _pendingBookUnlock;
CursorMan.showMouse(true);
setSitePalette(0);
@@ -2815,7 +2821,7 @@ void EEMEngine::doCaseSelection() {
const int kKdAnimY = 0x50;
uint book;
- switch (_chainStage) {
+ switch (pendingBookUnlock ? pendingBookUnlock : _chainStage) {
case 2: book = 2; break;
case 3: book = isLondon() ? 2 : 3; break;
default: book = 1; break;
@@ -3000,6 +3006,10 @@ void EEMEngine::doCaseSelection() {
continue;
}
}
+ if (_pendingBookUnlock != pendingBookUnlock) {
+ _nextScreen = kScreenChooseMystery;
+ return;
+ }
const uint32 now = g_system->getMillis();
const bool chooserTick = now - submenuLastTick >= kChooserCycleMillis;
if (chooserTick) {
@@ -3024,6 +3034,10 @@ void EEMEngine::doCaseSelection() {
_mystery.clear();
return;
}
+ if (pendingBookUnlock) {
+ _chainStage = pendingBookUnlock;
+ _pendingBookUnlock = 0;
+ }
resetSiteArrivalState();
if (_audio && !isFloppy())
_audio->initMysterySounds(mn);
Commit: 993529e20dc48b4f55e998d6f680df6e9d038344
https://github.com/scummvm/scummvm/commit/993529e20dc48b4f55e998d6f680df6e9d038344
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-09-12T22:24:45+02:00
Commit Message:
EEM: added workaround to repain broken audio samples in EEM1 mac cd release
Changed paths:
A engines/eem/mac_sound_patches.h
engines/eem/resource.cpp
diff --git a/engines/eem/mac_sound_patches.h b/engines/eem/mac_sound_patches.h
new file mode 100644
index 00000000000..678cdab8a1d
--- /dev/null
+++ b/engines/eem/mac_sound_patches.h
@@ -0,0 +1,251 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef EEM_MAC_SOUND_PATCHES_H
+#define EEM_MAC_SOUND_PATCHES_H
+
+#include "common/scummsys.h"
+
+namespace EEM {
+
+// EEM1 Mac CD, m49.dbd: restore missing sample high bits in damaged csnd resources.
+// Offsets and CRCs refer to the complete decoded snd resource.
+// DOS PCM confirms 104 clips; csnd 1019/1041 have the same isolated bit drops.
+struct MacSoundPatch {
+ uint32 decodedSize;
+ uint32 crc;
+ uint16 offsetIndex;
+ uint16 offsetCount;
+};
+
+const uint32 kMacSoundPatchOffsets[] = {
+ 17969, 25763, 33182, 36348, 38762, 20891, 26942, 30102, 59934, 63573,
+ 75676, 75784, 81981, 98385, 129334, 135277, 135494, 5138, 6913, 24950,
+ 32264, 27755, 33342, 38080, 3400, 5968, 76136, 84819, 95451, 16871,
+ 19573, 44331, 56361, 57947, 13886, 28133, 31112, 3255, 12958, 22085,
+ 23497, 23823, 31317, 82807, 3958, 23673, 24191, 27805, 46879, 57152,
+ 3199, 13751, 33935, 9448, 15070, 16848, 18500, 12550, 119371, 9322,
+ 12883, 41146, 103673, 114840, 118894, 152695, 162354, 182943, 185022, 191032,
+ 191361, 197799, 30921, 44369, 50797, 50912, 70383, 86285, 86940, 95198,
+ 106130, 119149, 163386, 165867, 5151, 17855, 45957, 99387, 100845, 110645,
+ 6391, 9420, 33784, 43125, 72828, 79905, 17386, 23498, 47578, 50441,
+ 62696, 64224, 39944, 65065, 67604, 83079, 85890, 10336, 13412, 23301,
+ 49990, 19550, 20747, 23047, 34689, 62030, 3748, 6929, 14391, 20294,
+ 40610, 43787, 834, 6186, 11671, 20989, 36255, 46612, 49918, 52820,
+ 1306, 9381, 13677, 47681, 53725, 15377, 72537, 78469, 369, 6005,
+ 23848, 78265, 11872, 28951, 57118, 74635, 78453, 80058, 85824, 92185,
+ 95620, 31418, 53904, 55011, 79832, 94160, 24223, 32571, 42269, 45288,
+ 48735, 51216, 53015, 58307, 60173, 69705, 71355, 7472, 32078, 10641,
+ 38999, 49663, 100327, 150137, 154634, 160900, 5526, 13087, 37539, 38873,
+ 57300, 63192, 122776, 125080, 150270, 176598, 180323, 192101, 195483, 202060,
+ 214245, 240096, 252358, 4533, 70660, 115340, 130847, 139974, 143931, 156327,
+ 222279, 225132, 231595, 255874, 271210, 2446, 26957, 42338, 46072, 62203,
+ 70931, 72464, 86745, 91362, 43750, 57560, 78618, 108631, 109056, 126235,
+ 146997, 147430, 187347, 191581, 212076, 220461, 222323, 250289, 255379, 3477,
+ 11236, 15272, 18124, 19327, 27097, 31260, 44323, 48603, 54834, 55057,
+ 82504, 84041, 95247, 103043, 152718, 173152, 194478, 204000, 208052, 218960,
+ 225308, 228710, 238034, 257005, 2192, 2300, 4647, 7959, 14027, 23599,
+ 24025, 33288, 42601, 55595, 61969, 8364, 12098, 14842, 15950, 20394,
+ 21274, 22039, 29435, 4457, 7535, 7975, 11054, 21108, 38324, 40190,
+ 62948, 67650, 68312, 80153, 48987, 71823, 76158, 89674, 92188, 92519,
+ 102402, 106904, 110306, 36595, 71276, 53886, 59053, 3751, 8505, 36072,
+ 38927, 45629, 45737, 94184, 94733, 96499, 99789, 2083, 16441, 22632,
+ 56424, 1497, 11281, 11830, 17539, 32105, 47676, 55441, 41666, 46280,
+ 48251, 65680, 67552, 71270, 72616, 76880, 77211, 89515, 35808, 58151,
+ 53986, 85068, 97143, 97251, 10589, 42890, 40943, 42786, 45425, 65664,
+ 72123, 98541, 104587, 127519, 142082, 4524, 10992, 22935, 53596, 10365,
+ 16450, 66389, 81383, 88833, 90706, 108879, 112002, 118246, 140179, 160944,
+ 173121, 195750, 205401, 207014, 210097, 213384, 9057, 15402, 24424, 41139,
+ 48996, 56658, 69886, 83528, 98127, 114566, 119165, 126078, 131558, 135936,
+ 178035, 179753, 196440, 2639, 9772, 26937, 30254, 59555, 64049, 66573,
+ 86203, 93968, 112201, 124108, 2666, 4830, 11132, 17441, 35243, 38567,
+ 52334, 71293, 78961, 92229, 3171, 42836, 45751, 49848, 68157, 31973,
+ 34616, 50965, 60465, 76761, 77513, 80083, 81679, 87557, 27631, 29388,
+ 31527, 63113, 85143, 109333, 136597, 149067, 163364, 165086, 169025, 173798,
+ 190538, 3735, 6484, 8070, 14088, 36941, 44805, 64523, 31907, 33327,
+ 37740, 59952, 77438, 89339, 116749, 118611, 664, 5496, 7260, 19218,
+ 29236, 42709, 50266, 59149, 77571, 79436, 4051, 7748, 10158, 16920,
+ 46804, 59507, 66833, 78037, 93169, 119280, 122658, 124192, 126939, 127488,
+ 136982, 140936, 143237, 158380, 592, 3583, 7973, 12597, 12918, 18381,
+ 31819, 45505, 75917, 18253, 35129, 71228, 77210, 101276, 110053, 123164,
+ 10964, 31368, 8552, 8660, 11227, 37228, 48452, 64011, 71491, 6891,
+ 26758, 16702, 22829, 33425, 38932, 43104, 50783, 53794, 88991, 95547,
+ 96993, 99895, 113509, 118562, 118670, 120065, 124451, 126013, 152752, 159948,
+ 174148, 3508, 28928, 47423, 105923, 116342, 167698, 193346, 198021, 204082,
+ 213040, 228630, 267890, 283015, 3331, 31441, 62103, 67866, 85276, 92453,
+ 94280, 100319, 108621, 108729, 141123, 147316, 167050, 177911, 187368, 209738,
+ 213423, 216631, 218769, 224328, 247143, 256627, 266469, 270728, 294790, 5091,
+ 15974, 23517, 59141, 76964, 53988, 63501, 78505, 79567, 82406, 95719,
+ 104217, 110656, 121618, 160981, 174838, 178849, 179172, 180443, 194618, 196037,
+ 241002, 243975, 262114, 278967, 280675, 288407, 1982, 23130, 23238, 36299,
+ 36407, 42494, 46040, 112926, 120347, 126445, 137646, 142500, 155004, 155112,
+ 162871, 176899, 182664, 224439, 248472, 273362, 280545, 6680, 6788, 50841,
+ 52839, 58651, 63424, 66737, 76171, 78048, 92907, 4249, 7239, 30520,
+ 40467, 70586, 90281, 118439, 124121, 127211, 127691, 140256, 160237, 187167,
+ 10433, 17711, 58065, 59936, 78636, 91074, 95384, 106316, 137265, 143763,
+ 149823, 159589, 162125, 22054, 30948, 61507, 61615, 139312, 139420, 147113,
+ 8362, 8470, 25889, 43971, 57296, 60063, 63280, 69527, 86230, 100689,
+ 132054, 133470, 136518, 198030, 231752, 238762, 14794, 33060, 35353, 61804,
+ 90487, 104067, 114394, 143473, 156532, 183573, 215324, 220008, 220165, 226905,
+ 231002, 233129, 233237, 234892, 249907, 251175, 2833, 4605, 8497, 39087,
+ 49859, 57602, 59641, 62677, 71654, 81128, 109043, 111699, 113248, 137201,
+ 159529, 161525, 163521, 183561, 198826, 223949, 243000, 244541, 255831, 7170,
+ 11269, 19252, 31488, 69882, 81435, 87648, 95210, 132180, 147182, 167480,
+ 173026, 184100, 215825, 215933, 241974, 16936, 25993, 36998, 40497, 48987,
+ 89359, 99505, 104883, 107016, 109902, 127844, 227724, 227907, 231544, 237788,
+ 241672, 243289, 248839, 275287, 275547, 277195, 25825, 25933, 27657, 35799,
+ 50199, 50734, 119650, 13758, 20064, 23286, 66264, 87921, 96679, 103043,
+ 106456, 139245, 166815, 167815, 200208, 206056, 227289, 278620, 305813, 314179,
+ 6840, 18608, 25444, 25552, 54708, 59835, 64842, 101580, 151067, 661,
+ 34813, 84647, 87943, 105267, 129132, 146354, 177316, 187190, 199433, 221149,
+ 64006, 107894, 111029, 156467, 157543, 212044, 218388, 218499, 229136, 232729,
+ 265018, 269432, 282338, 18403, 20155, 32871, 66136, 79242, 1525, 1633,
+ 1741, 3362, 84355, 93268, 15780, 15888, 34168, 45204, 84080, 113488,
+ 116911, 123186, 142163, 158459, 171257, 173141, 195106, 195214, 38392, 48272,
+ 51203, 51467, 54884, 81137, 91118, 96212, 98132, 112696, 112804, 114674,
+ 116222, 121019, 131350, 134817, 156087, 165493, 178436, 180347, 188462, 206637,
+ 215155, 232066, 242159, 34443, 58389, 115746, 142528, 145316, 148726, 178450,
+ 208250, 218379, 241613, 241807, 257884, 280020, 285911, 294920, 303730, 311410,
+ 4962, 10997, 22601, 29592, 63827, 66702, 68573, 135051, 2201, 2614,
+ 81238, 127561, 138605, 146948, 149433, 6281, 35688, 59550, 92540, 107902,
+ 116857, 122695, 2048, 8438, 14159, 48195, 110765, 130569, 146069, 3818,
+ 6122, 11948, 16243, 36686, 53766, 56202, 58733, 59912, 61783, 64883,
+ 97066, 99126, 99436, 102041, 123792, 14798, 16303, 40385, 44920, 56035,
+ 61754, 63266, 69306, 82889, 14775, 33734, 35352, 39172, 43816, 72046,
+ 75838, 77767, 82202, 94414, 96031, 106275, 179310, 189592, 232584, 18058,
+ 51550, 77065, 90137, 156875, 158643, 164694, 177350, 177579, 177687, 178179,
+ 187769, 189437, 55574, 55682, 105204, 108491, 120244, 145662, 155035, 188811,
+ 208499, 17511, 31955, 49207, 63389, 66778, 95268, 132218, 144810, 20675,
+ 46544, 11124,
+};
+
+const MacSoundPatch kMacSoundPatches[] = {
+ { 34143, 0xbac4a275, 0, 1 }, // csnd 1001
+ { 87271, 0x5424d735, 1, 4 }, // csnd 1002
+ { 150191, 0xd7b906f8, 5, 12 }, // csnd 1003
+ { 82679, 0x3d656976, 17, 4 }, // csnd 1004
+ { 61517, 0x58d61285, 21, 3 }, // csnd 1005
+ { 106641, 0x693ebd99, 24, 5 }, // csnd 1006
+ { 65867, 0xb9037c83, 29, 5 }, // csnd 1007
+ { 71657, 0x5409e7e6, 34, 3 }, // csnd 1008
+ { 101615, 0xdb63e6cb, 37, 7 }, // csnd 1009
+ { 64737, 0x1e83439b, 44, 6 }, // csnd 1010
+ { 91919, 0xbc4622f1, 50, 3 }, // csnd 1011
+ { 42635, 0x1aa1237b, 53, 4 }, // csnd 1012
+ { 129915, 0x1a777816, 57, 2 }, // csnd 1013
+ { 220227, 0xede8263f, 59, 13 }, // csnd 1015
+ { 175723, 0xd3e84439, 72, 12 }, // csnd 1016
+ { 127909, 0xae009551, 84, 6 }, // csnd 1017
+ { 88709, 0x47f6327f, 90, 6 }, // csnd 1018
+ { 73163, 0x421f4ded, 96, 6 }, // csnd 1019
+ { 99775, 0x45170d0b, 102, 5 }, // csnd 1020
+ { 55836, 0xf13e0d0d, 107, 2 }, // csnd 1021
+ { 60485, 0xac2d1c62, 109, 2 }, // csnd 1022
+ { 66537, 0x42e8bc49, 111, 5 }, // csnd 1023
+ { 61123, 0x59f22de3, 116, 6 }, // csnd 1024
+ { 63655, 0xad23b6d1, 122, 8 }, // csnd 1025
+ { 67663, 0x07f1427c, 130, 5 }, // csnd 1026
+ { 127705, 0xd68d95b9, 135, 3 }, // csnd 1027
+ { 95981, 0x2b6605fe, 138, 4 }, // csnd 1030
+ { 145523, 0x5e185ae0, 142, 9 }, // csnd 1031
+ { 99817, 0x812d25ee, 151, 5 }, // csnd 1032
+ { 86827, 0xfeb38051, 156, 11 }, // csnd 1033
+ { 46563, 0x9c99024c, 167, 2 }, // csnd 1034
+ { 178591, 0xf3b6dc3b, 169, 7 }, // csnd 1036
+ { 265109, 0x057096f7, 176, 17 }, // csnd 1037
+ { 290585, 0xa4383be7, 193, 12 }, // csnd 1038
+ { 109235, 0x67f16ff9, 205, 9 }, // csnd 1039
+ { 277741, 0x1d0ad227, 214, 15 }, // csnd 1040
+ { 279275, 0x0f5f20c2, 229, 25 }, // csnd 1041
+ { 118651, 0x4bec71ec, 254, 11 }, // csnd 1042
+ { 37265, 0x023c9d4d, 265, 8 }, // csnd 1043
+ { 93777, 0x1078cf2a, 273, 11 }, // csnd 1044
+ { 164859, 0x3c1a99b6, 284, 9 }, // csnd 1045
+ { 81178, 0xf5342735, 293, 2 }, // csnd 1046
+ { 73749, 0x1645df01, 295, 2 }, // csnd 1047
+ { 104494, 0x07c18476, 297, 10 }, // csnd 1048
+ { 67329, 0x1639a568, 307, 4 }, // csnd 1049
+ { 69339, 0x5d9e9794, 311, 7 }, // csnd 1050
+ { 115015, 0x34e9ddc6, 318, 10 }, // csnd 1051
+ { 73377, 0x5559335e, 328, 2 }, // csnd 1052
+ { 107637, 0xd0432865, 330, 4 }, // csnd 1053
+ { 45171, 0xd40cde0f, 334, 2 }, // csnd 1054
+ { 150263, 0xeb59d80d, 336, 9 }, // csnd 1055
+ { 65293, 0x74d8c200, 345, 4 }, // csnd 1056
+ { 220261, 0x1d217609, 349, 17 }, // csnd 1057
+ { 207193, 0x3c134862, 366, 17 }, // csnd 1058
+ { 140849, 0x88813d2b, 383, 11 }, // csnd 1059
+ { 113643, 0xdf4033a5, 394, 10 }, // csnd 1060
+ { 90881, 0x6bc75368, 404, 5 }, // csnd 1061
+ { 100052, 0x4e7d3aac, 409, 9 }, // csnd 1062
+ { 205047, 0xab4e6198, 418, 13 }, // csnd 1064
+ { 76435, 0x1ffb08bc, 431, 7 }, // csnd 1065
+ { 144339, 0xf8a7a0e6, 438, 8 }, // csnd 1066
+ { 104969, 0x57930e2d, 446, 10 }, // csnd 1067
+ { 162516, 0x751e0f30, 456, 18 }, // csnd 1068
+ { 104113, 0xb3e4e962, 474, 9 }, // csnd 1069
+ { 145983, 0xe2e8d371, 483, 7 }, // csnd 1070
+ { 98063, 0xba9983a8, 490, 2 }, // csnd 1071
+ { 98181, 0x66a10ddc, 492, 7 }, // csnd 1072
+ { 29313, 0xf26293f2, 499, 2 }, // csnd 1073
+ { 184301, 0x1ce7a22a, 501, 20 }, // csnd 1075
+ { 298259, 0x3a31af38, 521, 13 }, // csnd 1076
+ { 304693, 0xe704e845, 534, 25 }, // csnd 1077
+ { 109651, 0x79ea021a, 559, 5 }, // csnd 1078
+ { 296905, 0xc21f3bd8, 564, 22 }, // csnd 1079
+ { 294393, 0x0fea7cc7, 586, 21 }, // csnd 1080
+ { 123393, 0xa084e522, 607, 10 }, // csnd 1081
+ { 197183, 0x92974af3, 617, 13 }, // csnd 1082
+ { 252223, 0x84629154, 630, 13 }, // csnd 1083
+ { 202679, 0x7b4a484b, 643, 7 }, // csnd 1084
+ { 262259, 0xf32c9d4a, 650, 16 }, // csnd 1085
+ { 269843, 0x16b5e4c9, 666, 20 }, // csnd 1086
+ { 273715, 0x1d1d0749, 686, 23 }, // csnd 1087
+ { 267379, 0x0fb410ae, 709, 16 }, // csnd 1088
+ { 284949, 0x32bc83f5, 725, 21 }, // csnd 1089
+ { 128545, 0xd0a7a6b7, 746, 7 }, // csnd 1090
+ { 340091, 0xfddd5859, 753, 17 }, // csnd 1091
+ { 168389, 0xeb907600, 770, 9 }, // csnd 1092
+ { 234469, 0x2caeaab2, 779, 11 }, // csnd 1093
+ { 293939, 0xd1da61c9, 790, 13 }, // csnd 1094
+ { 84837, 0x5968ee6d, 803, 5 }, // csnd 1095
+ { 108669, 0xdf48d07a, 808, 6 }, // csnd 1096
+ { 217869, 0xbc6dd9da, 814, 14 }, // csnd 1097
+ { 259593, 0x2c6c92c1, 828, 25 }, // csnd 1098
+ { 331771, 0x7bf3d291, 853, 17 }, // csnd 1099
+ { 154949, 0xe156e2f8, 870, 8 }, // csnd 1100
+ { 238967, 0x45379e60, 878, 7 }, // csnd 1101
+ { 41819, 0x3f764019, 885, 2 }, // csnd 1102
+ { 134747, 0xaf5ee76f, 887, 5 }, // csnd 1103
+ { 173401, 0xadf676d1, 892, 7 }, // csnd 1104
+ { 150451, 0x1e68c677, 899, 16 }, // csnd 1105
+ { 125484, 0xbf30e103, 915, 9 }, // csnd 1106
+ { 246977, 0x71039bc8, 924, 15 }, // csnd 1107
+ { 256789, 0x0fce2d2b, 939, 13 }, // csnd 1108
+ { 228591, 0x13f47b93, 952, 9 }, // csnd 1109
+ { 180835, 0xded019ac, 961, 8 }, // csnd 1110
+ { 160291, 0x40bb0d0f, 969, 2 }, // csnd 1111
+ { 73717, 0xa77576eb, 971, 1 }, // csnd 1112
+};
+
+} // End of namespace EEM
+
+#endif
diff --git a/engines/eem/resource.cpp b/engines/eem/resource.cpp
index e33f0353283..7df85119e81 100644
--- a/engines/eem/resource.cpp
+++ b/engines/eem/resource.cpp
@@ -21,6 +21,7 @@
#include "common/compression/dcl.h"
#include "common/array.h"
+#include "common/crc.h"
#include "common/debug.h"
#include "common/endian.h"
#include "common/file.h"
@@ -31,6 +32,7 @@
#include "graphics/pixelformat.h"
#include "eem/detection.h"
+#include "eem/mac_sound_patches.h"
#include "eem/resource.h"
namespace EEM {
@@ -218,6 +220,19 @@ Common::SeekableReadStream *decompressMacSound(Common::SeekableReadStream &strea
}
}
+ for (const MacSoundPatch &patch : kMacSoundPatches) {
+ if (patch.decodedSize != decodedSize)
+ continue;
+ const Common::CRC32 crc;
+ if (crc.crcFast(decoded, decodedSize) != patch.crc)
+ continue;
+ for (uint i = 0; i < patch.offsetCount; i++)
+ decoded[kMacSoundPatchOffsets[patch.offsetIndex + i]] |= 0x80;
+ debugC(1, kDebugSound, "decompressMacSound: repaired %u damaged samples",
+ patch.offsetCount);
+ break;
+ }
+
return new Common::MemoryReadStream(decoded, decodedSize, DisposeAfterUse::YES);
}
More information about the Scummvm-git-logs
mailing list