aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
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/graphics
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/graphics')
-rw-r--r--engines/sci/graphics/cursor32.cpp89
-rw-r--r--engines/sci/graphics/cursor32.h2
-rw-r--r--engines/sci/graphics/palette32.cpp4
3 files changed, 53 insertions, 42 deletions
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index 6eb708531f..74fbafa2f0 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -184,48 +184,8 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
_cursorInfo.loopNo = loopNo;
_cursorInfo.celNo = celNo;
- if (_macCursorRemap.empty() && viewId != -1) {
- CelObjView view(viewId, loopNo, celNo);
-
- _hotSpot = view._origin;
- _width = view._width;
- _height = view._height;
-
- // SSCI never increased the size of cursors, but some of the cursors
- // in early SCI32 games were designed for low-resolution display mode
- // and so are kind of hard to pick out when running in high-resolution
- // mode.
- // To address this, we make some slight adjustments to cursor display
- // in these early games:
- // GK1: All the cursors are increased in size since they all appear to
- // be designed for low-res display.
- // PQ4: We only make the cursors bigger if they are above a set
- // threshold size because inventory items usually have a
- // high-resolution cursor representation.
- bool pixelDouble = false;
- if (g_sci->_gfxFrameout->_isHiRes &&
- (g_sci->getGameId() == GID_GK1 ||
- (g_sci->getGameId() == GID_PQ4 && _width <= 22 && _height <= 22))) {
-
- _width *= 2;
- _height *= 2;
- _hotSpot.x *= 2;
- _hotSpot.y *= 2;
- pixelDouble = true;
- }
-
- _cursor.data = (byte *)realloc(_cursor.data, _width * _height);
- _cursor.rect = Common::Rect(_width, _height);
- memset(_cursor.data, 255, _width * _height);
- _cursor.skipColor = 255;
-
- Buffer target(_width, _height, _cursor.data);
- if (pixelDouble) {
- view.draw(target, _cursor.rect, Common::Point(0, 0), false, 2, 2);
- } else {
- view.draw(target, _cursor.rect, Common::Point(0, 0), false);
- }
- } else if (!_macCursorRemap.empty() && viewId != -1) {
+#ifdef ENABLE_SCI32_MAC
+ if (!_macCursorRemap.empty() && viewId != -1) {
// Mac cursor handling
GuiResourceId viewNum = viewId;
@@ -269,6 +229,49 @@ 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) {
+ CelObjView view(viewId, loopNo, celNo);
+
+ _hotSpot = view._origin;
+ _width = view._width;
+ _height = view._height;
+
+ // SSCI never increased the size of cursors, but some of the cursors
+ // in early SCI32 games were designed for low-resolution display mode
+ // and so are kind of hard to pick out when running in high-resolution
+ // mode.
+ // To address this, we make some slight adjustments to cursor display
+ // in these early games:
+ // GK1: All the cursors are increased in size since they all appear to
+ // be designed for low-res display.
+ // PQ4: We only make the cursors bigger if they are above a set
+ // threshold size because inventory items usually have a
+ // high-resolution cursor representation.
+ bool pixelDouble = false;
+ if (g_sci->_gfxFrameout->_isHiRes &&
+ (g_sci->getGameId() == GID_GK1 ||
+ (g_sci->getGameId() == GID_PQ4 && _width <= 22 && _height <= 22))) {
+
+ _width *= 2;
+ _height *= 2;
+ _hotSpot.x *= 2;
+ _hotSpot.y *= 2;
+ pixelDouble = true;
+ }
+
+ _cursor.data = (byte *)realloc(_cursor.data, _width * _height);
+ _cursor.rect = Common::Rect(_width, _height);
+ memset(_cursor.data, 255, _width * _height);
+ _cursor.skipColor = 255;
+
+ Buffer target(_width, _height, _cursor.data);
+ if (pixelDouble) {
+ view.draw(target, _cursor.rect, Common::Point(0, 0), false, 2, 2);
+ } else {
+ view.draw(target, _cursor.rect, Common::Point(0, 0), false);
+ }
} else {
_hotSpot = Common::Point(0, 0);
_width = _height = 1;
@@ -462,9 +465,11 @@ 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 5872744aec..562a2c50de 100644
--- a/engines/sci/graphics/cursor32.h
+++ b/engines/sci/graphics/cursor32.h
@@ -109,7 +109,9 @@ public:
*/
void clearRestrictedArea();
+#ifdef ENABLE_SCI32_MAC
void setMacCursorRemapList(int cursorCount, reg_t *cursors);
+#endif
virtual void saveLoadWithSerializer(Common::Serializer &ser);
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index d878b8554f..9a2fa2c36c 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -530,12 +530,16 @@ void GfxPalette32::updateHardware() {
memset(bpal + (maxIndex + 1) * 3, 0, (255 - maxIndex - 1) * 3);
#endif
+#ifdef ENABLE_SCI32_MAC
if (g_sci->getPlatform() != Common::kPlatformMacintosh) {
// The last color must always be white
bpal[255 * 3 ] = 255;
bpal[255 * 3 + 1] = 255;
bpal[255 * 3 + 2] = 255;
} else {
+#else
+ {
+#endif
bpal[255 * 3 ] = 0;
bpal[255 * 3 + 1] = 0;
bpal[255 * 3 + 2] = 0;