aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-17 22:24:39 -0500
committerMatthew Hoops2011-02-18 15:58:23 -0500
commit7b5792d6d2c605eded73118a8f73ceb2c29627e1 (patch)
tree685ee0b76da78e447b0871c191a206b554ee283b /engines/sci/graphics
parent84e632cc9d62e41bd7d87530c1e5f0e0212713d2 (diff)
downloadscummvm-rg350-7b5792d6d2c605eded73118a8f73ceb2c29627e1.tar.gz
scummvm-rg350-7b5792d6d2c605eded73118a8f73ceb2c29627e1.tar.bz2
scummvm-rg350-7b5792d6d2c605eded73118a8f73ceb2c29627e1.zip
SCI: Fix window height for some Mac SCI1/1.1 games
Some games have removed the menu bar from the screen. This also fixes King's Quest V's icon bar.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/ports.cpp9
-rw-r--r--engines/sci/graphics/screen.cpp20
-rw-r--r--engines/sci/graphics/screen.h2
3 files changed, 25 insertions, 6 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index 87f0c3d6a2..57c76126c0 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -106,7 +106,10 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te
offTop = 26;
break;
default:
- offTop = 10;
+ // For Mac games running with a height of 190, we do not have a menu bar
+ // so the top offset should be 0.
+ if (_screen->getHeight() == 190)
+ offTop = 0;
break;
}
@@ -575,10 +578,6 @@ void GfxPorts::priorityBandsInit(int16 bandCount, int16 top, int16 bottom) {
int16 y;
int32 bandSize;
- // This code is for 320x200 games only
- if (_screen->getHeight() != 200)
- return;
-
if (bandCount != -1)
_priorityBandCount = bandCount;
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index a0f402f833..b019853a2b 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -64,7 +64,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_height = 480;
} else {
_width = 320;
- _height = 200;
+ _height = getLowResScreenHeight();
}
// Japanese versions of games use hi-res font on upscaled version of the game.
@@ -717,4 +717,22 @@ int16 GfxScreen::kernelPicNotValid(int16 newPicNotValid) {
return oldPicNotValid;
}
+uint16 GfxScreen::getLowResScreenHeight() {
+ // Some Mac SCI1/1.1 games only take up 190 rows and do not
+ // have the menu bar.
+ if (g_sci->getPlatform() == Common::kPlatformMacintosh) {
+ switch (g_sci->getGameId()) {
+ case GID_FREDDYPHARKAS:
+ case GID_KQ5:
+ case GID_KQ6:
+ return 190;
+ default:
+ break;
+ }
+ }
+
+ // Everything else is 200
+ return 200;
+}
+
} // End of namespace Sci
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index 1d6b127adc..fc1f38ed41 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -181,6 +181,8 @@ private:
// This defines whether or not the font we're drawing is already scaled
// to the screen size (and we therefore should not upscale it ourselves).
bool _fontIsUpscaled;
+
+ uint16 getLowResScreenHeight();
};
} // End of namespace Sci