aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/kernel.cpp')
-rw-r--r--engines/sci/engine/kernel.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 46051ef145..8d55790ad2 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -132,7 +132,7 @@ void Kernel::loadSelectorNames() {
return;
}
- int count = isBE ? READ_BE_UINT16(r->data) : READ_LE_UINT16(r->data) + 1; // Counter is slightly off
+ int count = (isBE ? READ_BE_UINT16(r->data) : READ_LE_UINT16(r->data)) + 1; // Counter is slightly off
for (int i = 0; i < count; i++) {
int offset = isBE ? READ_BE_UINT16(r->data + 2 + i * 2) : READ_LE_UINT16(r->data + 2 + i * 2);
@@ -536,7 +536,7 @@ void Kernel::mapFunctions() {
SciVersion myVersion = getSciVersion();
switch (g_sci->getPlatform()) {
- case Common::kPlatformPC:
+ case Common::kPlatformDOS:
case Common::kPlatformFMTowns:
platformMask = SIGFOR_DOS;
break;
@@ -585,6 +585,17 @@ void Kernel::mapFunctions() {
continue;
}
+#ifdef ENABLE_SCI32
+ // HACK: Phantasmagoria Mac uses a modified kDoSound (which *nothing*
+ // else seems to use)!
+ if (g_sci->getPlatform() == Common::kPlatformMacintosh && g_sci->getGameId() == GID_PHANTASMAGORIA && kernelName == "DoSound") {
+ _kernelFuncs[id].function = kDoSoundPhantasmagoriaMac;
+ _kernelFuncs[id].signature = parseKernelSignature("DoSoundPhantasmagoriaMac", "i.*");
+ _kernelFuncs[id].name = "DoSoundPhantasmagoriaMac";
+ continue;
+ }
+#endif
+
// If the name is known, look it up in s_kernelMap. This table
// maps kernel func names to actual function (pointers).
SciKernelMapEntry *kernelMap = s_kernelMap;