aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorColin Snover2017-09-24 22:27:02 -0500
committerColin Snover2017-09-24 22:56:59 -0500
commit743082ac8c9aa295db25bdcd47242913d7f6c02a (patch)
treea1309d3472a6a8262b45fbb5ea6c750ad87b29b3 /engines/sci/engine
parent5bb3ca5a6b83691628502525d463a788df54a4d1 (diff)
downloadscummvm-rg350-743082ac8c9aa295db25bdcd47242913d7f6c02a.tar.gz
scummvm-rg350-743082ac8c9aa295db25bdcd47242913d7f6c02a.tar.bz2
scummvm-rg350-743082ac8c9aa295db25bdcd47242913d7f6c02a.zip
SCI32: Disable all SCI32 Mac code
This code is currently untestable and is almost certainly at least partly based on guesswork & not actual reverse-engineering (as was the case for all other pre-2015 SCI32 code), so future developers interested in adding SCI32 Mac support should use it only as an intermediate reference rather than as known good code.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.cpp8
-rw-r--r--engines/sci/engine/kernel.h2
-rw-r--r--engines/sci/engine/kmisc.cpp4
-rw-r--r--engines/sci/engine/ksound.cpp2
-rw-r--r--engines/sci/engine/message.cpp4
5 files changed, 15 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 72c074ffed..fd64198bb7 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -122,10 +122,14 @@ void Kernel::loadSelectorNames() {
Resource *r = _resMan->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS), 0);
bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY);
+#ifdef ENABLE_SCI32_MAC
// Starting with KQ7, Mac versions have a BE name table. GK1 Mac and earlier (and all
// other platforms) always use LE.
- bool isBE = (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_2_1_EARLY
+ const bool isBE = (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_2_1_EARLY
&& g_sci->getGameId() != GID_GK1);
+#else
+ const bool isBE = false;
+#endif
if (!r) { // No such resource?
// Check if we have a table for this game
@@ -610,7 +614,7 @@ void Kernel::mapFunctions() {
continue;
}
-#ifdef ENABLE_SCI32
+#ifdef ENABLE_SCI32_MAC
// 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") {
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 7e576f5b98..69a86ae9d5 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -650,8 +650,10 @@ reg_t kAddLine(EngineState *s, int argc, reg_t *argv);
reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv);
reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv);
+#ifdef ENABLE_SCI32_MAC
// Phantasmagoria Mac Special Kernel Function
reg_t kDoSoundPhantasmagoriaMac(EngineState *s, int argc, reg_t *argv);
+#endif
// SCI3 Kernel functions
reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 62dc2b22ef..49d2d9fa08 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -529,7 +529,7 @@ reg_t kMacPlatform(EngineState *s, int argc, reg_t *argv) {
// In SCI1, its usage is still unknown
// In SCI1.1, it's NOP
// In SCI32, it's used for remapping cursor ID's
-#ifdef ENABLE_SCI32
+#ifdef ENABLE_SCI32_MAC
if (getSciVersion() >= SCI_VERSION_2_1_EARLY) // Set Mac cursor remap
g_sci->_gfxCursor32->setMacCursorRemapList(argc - 1, argv + 1);
else
@@ -643,10 +643,12 @@ reg_t kPlatform32(EngineState *s, int argc, reg_t *argv) {
case Common::kPlatformWindows:
return make_reg(0, kSciPlatformWindows);
case Common::kPlatformMacintosh:
+#ifdef ENABLE_SCI32_MAC
// For Mac versions, kPlatform(0) with other args has more functionality
if (argc > 1)
return kMacPlatform(s, argc - 1, argv + 1);
else
+#endif
return make_reg(0, kSciPlatformMacintosh);
default:
error("Unknown platform %d", g_sci->getPlatform());
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index ee4f8efd9a..bbfadf1c53 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -70,7 +70,7 @@ CREATE_DOSOUND_FORWARD(DoSoundSetVolume)
CREATE_DOSOUND_FORWARD(DoSoundSetPriority)
CREATE_DOSOUND_FORWARD(DoSoundSetLoop)
-#ifdef ENABLE_SCI32
+#ifdef ENABLE_SCI32_MAC
reg_t kDoSoundPhantasmagoriaMac(EngineState *s, int argc, reg_t *argv) {
// Phantasmagoria Mac (and seemingly no other game (!)) uses this
// cutdown version of kDoSound.
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index baa926166a..d8e2d48367 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -149,7 +149,7 @@ public:
}
};
-#ifdef ENABLE_SCI32
+#ifdef ENABLE_SCI32_MAC
// SCI32 Mac decided to add an extra byte (currently unknown in meaning) between
// the talker and the string...
class MessageReaderV4_MacSCI32 : public MessageReader {
@@ -202,6 +202,8 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re
case 4:
#ifdef ENABLE_SCI32
case 5: // v5 seems to be compatible with v4
+#endif
+#ifdef ENABLE_SCI32_MAC
// SCI32 Mac is different than SCI32 DOS/Win here
if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_2_1_EARLY)
reader = new MessageReaderV4_MacSCI32(*res);