aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorsluicebox2019-10-11 14:18:26 -0700
committersluicebox2019-10-11 14:18:26 -0700
commit511e5441e360bf283cafc48981580bea2e07a44b (patch)
tree91bea8871404a5e1f7d4b65c82a1777083f97680 /engines/sci
parentea01e42918b1582f774727fd0fceb0672762af45 (diff)
downloadscummvm-rg350-511e5441e360bf283cafc48981580bea2e07a44b.tar.gz
scummvm-rg350-511e5441e360bf283cafc48981580bea2e07a44b.tar.bz2
scummvm-rg350-511e5441e360bf283cafc48981580bea2e07a44b.zip
SCI32: Enable Mac code (remove ENABLE_SCI32_MAC)
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel.cpp4
-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
-rw-r--r--engines/sci/graphics/cursor32.cpp7
-rw-r--r--engines/sci/graphics/cursor32.h2
-rw-r--r--engines/sci/graphics/palette32.cpp4
-rw-r--r--engines/sci/resource.cpp2
9 files changed, 7 insertions, 24 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index ab332511d7..3cf5fd5b79 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -116,7 +116,7 @@ void Kernel::loadSelectorNames() {
Resource *r = _resMan->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS), 0);
bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY);
-#ifdef ENABLE_SCI32_MAC
+#ifdef ENABLE_SCI32
// Starting with KQ7, Mac versions have a BE name table. GK1 Mac and earlier (and all
// other platforms) always use LE.
const bool isBE = (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_2_1_EARLY
@@ -608,7 +608,7 @@ void Kernel::mapFunctions() {
continue;
}
-#ifdef ENABLE_SCI32_MAC
+#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") {
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index c1cce33e5d..f88afccfbe 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -644,10 +644,8 @@ reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv);
reg_t kWinDLL(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 21124606c7..4c2bb2fe4b 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -546,7 +546,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_MAC
+#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2_1_EARLY) // Set Mac cursor remap
g_sci->_gfxCursor32->setMacCursorRemapList(argc - 1, argv + 1);
else
@@ -662,12 +662,10 @@ 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 e6cd4ffc7f..1a34e82c5e 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_MAC
+#ifdef ENABLE_SCI32
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 0d7f03ca1e..2d195b1137 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -151,7 +151,7 @@ public:
}
};
-#ifdef ENABLE_SCI32_MAC
+#ifdef ENABLE_SCI32
// SCI32 Mac decided to add an extra byte (currently unknown in meaning) between
// the talker and the string...
class MessageReaderV4_MacSCI32 : public MessageReader {
@@ -211,8 +211,6 @@ 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);
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index a189f7405d..46fce8e673 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -196,7 +196,6 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
_cursorInfo.loopNo = loopNo;
_cursorInfo.celNo = celNo;
-#ifdef ENABLE_SCI32_MAC
if (!_macCursorRemap.empty() && viewId != -1) {
// Mac cursor handling
GuiResourceId viewNum = viewId;
@@ -241,9 +240,7 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
// The cursor will be drawn on next refresh
delete macCursor;
- } else
-#endif
- if (viewId != -1) {
+ } else if (viewId != -1) {
CelObjView view(viewId, loopNo, celNo);
_hotSpot = view._origin;
@@ -449,11 +446,9 @@ void GfxCursor32::move() {
}
}
-#ifdef ENABLE_SCI32_MAC
void GfxCursor32::setMacCursorRemapList(int cursorCount, reg_t *cursors) {
for (int i = 0; i < cursorCount; i++)
_macCursorRemap.push_back(cursors[i].toUint16());
}
-#endif
} // End of namespace Sci
diff --git a/engines/sci/graphics/cursor32.h b/engines/sci/graphics/cursor32.h
index fb07c49dbb..1dcd67970b 100644
--- a/engines/sci/graphics/cursor32.h
+++ b/engines/sci/graphics/cursor32.h
@@ -219,14 +219,12 @@ private:
*/
void move();
-#ifdef ENABLE_SCI32_MAC
public:
void setMacCursorRemapList(int cursorCount, reg_t *cursors);
private:
// Mac versions of games use a remap list to remap their cursors
Common::Array<uint16> _macCursorRemap;
-#endif
};
} // End of namespace Sci
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 803dc74044..e139a05188 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -531,15 +531,11 @@ void GfxPalette32::updateHardware() {
memset(bpal + (maxIndex + 1) * 3, 0, (255 - maxIndex - 1) * 3);
#endif
-#ifdef ENABLE_SCI32_MAC
if (g_sci->getPlatform() == Common::kPlatformMacintosh) {
bpal[255 * 3 ] = 0;
bpal[255 * 3 + 1] = 0;
bpal[255 * 3 + 2] = 0;
} else {
-#else
- {
-#endif
// The last color must always be white
bpal[255 * 3 ] = 255;
bpal[255 * 3 + 1] = 255;
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 8e48d0abd0..89ab6e0329 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -481,7 +481,7 @@ void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStrea
bool canBeCompressed = !(g_sci && g_sci->getGameId() == GID_KQ6) && isCompressableResource(resource->_id.getType());
uint32 uncompressedSize = 0;
-#ifdef ENABLE_SCI32_MAC
+#ifdef ENABLE_SCI32
// GK2 Mac is crazy. In its Patches resource fork, picture 2315 is not
// compressed and it is hardcoded in the executable to say that it's
// not compressed. Why didn't they just add four zeroes to the end of