aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-02 15:33:33 +0000
committerMatthew Hoops2011-02-02 15:33:33 +0000
commit24e983610dfb118c943d6a1867bf3ea5d81e18e4 (patch)
tree63a4e5ec4e86e82fcb64597e6ccc47dff1368992 /engines/sci/graphics
parent3c04db1ebff91fc4ec26ab8fd56e6c85d1390afc (diff)
downloadscummvm-rg350-24e983610dfb118c943d6a1867bf3ea5d81e18e4.tar.gz
scummvm-rg350-24e983610dfb118c943d6a1867bf3ea5d81e18e4.tar.bz2
scummvm-rg350-24e983610dfb118c943d6a1867bf3ea5d81e18e4.zip
SCI: Fix GK1 Mac views, the game now starts
svn-id: r55721
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/palette.cpp4
-rw-r--r--engines/sci/graphics/screen.cpp6
-rw-r--r--engines/sci/graphics/view.cpp2
3 files changed, 9 insertions, 3 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 60931e2100..81278ca4b6 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -113,7 +113,7 @@ void GfxPalette::createFromData(byte *data, int bytesLeft, Palette *paletteOut)
}
// palette formats in here are not really version exclusive, we can not use sci-version to differentiate between them
// they were just called that way, because they started appearing in sci1.1 for example
- if ((data[0] == 0 && data[1] == 1) || (data[0] == 0 && data[1] == 0 && READ_LE_UINT16(data + 29) == 0)) {
+ if ((data[0] == 0 && data[1] == 1) || (data[0] == 0 && data[1] == 0 && READ_SCI11ENDIAN_UINT16(data + 29) == 0)) {
// SCI0/SCI1 palette
palFormat = SCI_PAL_FORMAT_VARIABLE; // CONSTANT;
palOffset = 260;
@@ -123,7 +123,7 @@ void GfxPalette::createFromData(byte *data, int bytesLeft, Palette *paletteOut)
// SCI1.1 palette
palFormat = data[32];
palOffset = 37;
- palColorStart = READ_LE_UINT16(data + 25); palColorCount = READ_LE_UINT16(data + 29);
+ palColorStart = READ_SCI11ENDIAN_UINT16(data + 25); palColorCount = READ_SCI11ENDIAN_UINT16(data + 29);
}
switch (palFormat) {
case SCI_PAL_FORMAT_CONSTANT:
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 80edb0b830..696e7efea0 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -53,6 +53,12 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
#endif
}
+#ifdef ENABLE_SCI32
+ // GK1 Mac uses a 640x480 resolution too
+ if (g_sci->getGameId() == GID_GK1 && g_sci->getPlatform() == Common::kPlatformMacintosh)
+ _upscaledHires = GFX_SCREEN_UPSCALED_640x480;
+#endif
+
if (_resMan->detectHires()) {
_width = 640;
_height = 480;
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 603169a931..458b147795 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -448,7 +448,7 @@ void GfxView::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCou
} else {
literalPtr = _resourceData + celInfo->offsetLiteral;
if (celInfo->offsetRLE) {
- if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_1_1) {
+ if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() == SCI_VERSION_1_1) {
// KQ6 uses byte lengths, all others use uint16
// The SCI devs must have quickly realized that a max of 255 pixels wide
// was not very good for 320 or 640 width games.