aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-08 15:03:23 +0000
committerMatthew Hoops2011-02-08 15:03:23 +0000
commit85f8dc5dee6fbe78fc5cd30094205cf2ed259fec (patch)
tree5ba8a77a5fed4c5f8484d3d3925e3146eeba3fc6 /engines/sci
parent8f3324f6ba648381953bd5538a0f1aa1507da480 (diff)
downloadscummvm-rg350-85f8dc5dee6fbe78fc5cd30094205cf2ed259fec.tar.gz
scummvm-rg350-85f8dc5dee6fbe78fc5cd30094205cf2ed259fec.tar.bz2
scummvm-rg350-85f8dc5dee6fbe78fc5cd30094205cf2ed259fec.zip
SCI: Add detection for Freddy Pharkas Mac
svn-id: r55828
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/detection_tables.h7
-rw-r--r--engines/sci/graphics/cursor.cpp24
-rw-r--r--engines/sci/graphics/screen.cpp2
-rw-r--r--engines/sci/graphics/view.cpp6
-rw-r--r--engines/sci/sci.cpp3
5 files changed, 28 insertions, 14 deletions
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 6be384a243..4193984aaf 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -582,6 +582,13 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE },
+ // Freddy Pharkas - English Macintosh
+ {"freddypharkas", "", {
+ {"Data1", 0, "ef7cbd62727989818f1cfae69c9fd61d", 3038492},
+ {"Data2", 0, "2424b418f7d52c385cea4701f529c69a", 4721732},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO_NOSPEECH },
+
// Fun Seeker's Guide - English DOS
// SCI interpreter version 0.000.506
{"funseeker", "", {
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 258900a3fb..fa75fe7286 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -432,17 +432,21 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
// automatically.
if (_macCursorRemap.empty()) {
- // The scripts have given us no remapping, so let's try to do this manually.
- // First try and see if the view resource exists. If it does, we're just using
- // that cursor (QFG1/Hoyle4 do not use Mac cursors, although they have them).
- if (_resMan->testResource(ResourceId(kResourceTypeView, viewNum))) {
- CursorMan.disableCursorPalette(true);
- kernelSetView(viewNum, loopNum, celNum, hotspot);
- return;
+ // QFG1/Freddy use a straight viewNum->cursor ID mapping
+ if (g_sci->getGameId() != GID_QFG1VGA && g_sci->getGameId() != GID_FREDDYPHARKAS) {
+ // The scripts have given us no remapping, so let's try to do this manually.
+ // First try and see if the view resource exists. If it does, we're just using
+ // that cursor (Hoyle4 does not use Mac cursors, although it has them).
+ if (_resMan->testResource(ResourceId(kResourceTypeView, viewNum))) {
+ CursorMan.disableCursorPalette(true);
+ kernelSetView(viewNum, loopNum, celNum, hotspot);
+ return;
+ } else if (g_sci->getGameId() == GID_KQ6) {
+ // KQ6 seems to use this mapping for its cursors
+ viewNum = loopNum * 1000 + celNum;
+ } else
+ error("Unknown Mac cursor %d", viewNum);
}
-
- // KQ6 seems to use this mapping for its cursors
- viewNum = loopNum * 1000 + celNum;
} else {
// If we do have the list, we'll be using a remap based on what the
// scripts have given us.
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 39b5e5a0e1..896ac0db22 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -134,6 +134,8 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
// to accommodate for the icon bar. Of course, both KQ6 and QFG1 VGA differ in size.
if (g_sci->getGameId() == GID_KQ6)
initGraphics(_displayWidth, _displayHeight + 26, _displayWidth > 320);
+ else if (g_sci->getGameId() == GID_FREDDYPHARKAS)
+ initGraphics(_displayWidth, _displayHeight + 28, _displayWidth > 320);
else
error("Unknown SCI1.1 Mac game");
} else
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index 5726057a69..0c43fef270 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -456,10 +456,10 @@ void GfxView::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCou
literalPtr = _resourceData + celInfo->offsetLiteral;
if (celInfo->offsetRLE) {
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
+ // KQ6/Freddy Pharkas use byte lengths, all others use uint16
+ // The SCI devs must have realized that a max of 255 pixels wide
// was not very good for 320 or 640 width games.
- bool hasByteLengths = (g_sci->getGameId() == GID_KQ6);
+ bool hasByteLengths = (g_sci->getGameId() == GID_KQ6 || g_sci->getGameId() == GID_FREDDYPHARKAS);
// compression for SCI1.1+ Mac
while (pixelNo < pixelCount) {
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index ce2f2de85d..c69e35df6d 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -756,7 +756,8 @@ bool SciEngine::isCD() const {
}
bool SciEngine::hasMacIconBar() const {
- return _resMan->isSci11Mac() && getSciVersion() == SCI_VERSION_1_1 && getGameId() == GID_KQ6;
+ return _resMan->isSci11Mac() && getSciVersion() == SCI_VERSION_1_1 &&
+ (getGameId() == GID_KQ6 || getGameId() == GID_FREDDYPHARKAS);
}
Common::String SciEngine::getSavegameName(int nr) const {