diff options
Diffstat (limited to 'engines/sci/graphics/ports.cpp')
-rw-r--r-- | engines/sci/graphics/ports.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index a9bf81f013..6e53ef44c4 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -55,7 +55,7 @@ GfxPorts::~GfxPorts() { } void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *text16) { - int16 offTop = 10; + int16 offTop; _usesOldGfxFunctions = usesOldGfxFunctions; _paint16 = paint16; @@ -84,15 +84,33 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te else _styleUser = SCI_WINDOWMGR_STYLE_USER | SCI_WINDOWMGR_STYLE_TRANSPARENT; - // Jones, Slater, Hoyle 3&4 and Crazy Nicks Laura Bow/Kings Quest were called with parameter -Nw 0 0 200 320. - // Mother Goose (SCI1) uses -Nw 0 0 159 262. The game will later use SetPort so we don't need to set the other fields. + // Jones, Slater, Hoyle 3&4 and Crazy Nicks Laura Bow/Kings Quest were + // called with parameter -Nw 0 0 200 320. + // Mother Goose (SCI1) uses -Nw 0 0 159 262. The game will later use + // SetPort so we don't need to set the other fields. // This actually meant not skipping the first 10 pixellines in windowMgrPort - Common::String gameId = g_sci->getGameId(); - if (gameId == "jones" || gameId == "slater" || gameId == "hoyle3" || gameId == "hoyle4" || gameId == "cnick-laurabow" || gameId == "cnick-kq" || (gameId == "mothergoose" && getSciVersion() == SCI_VERSION_1_EARLY)) + switch (g_sci->getGameId()) { + case GID_JONES: + case GID_SLATER: + case GID_HOYLE3: + case GID_HOYLE4: + case GID_CNICK_LAURABOW: + case GID_CNICK_KQ: offTop = 0; - // Mixed-Up Fairy Tales (& its demo) uses -w 26 0 200 320. If we don't also do this we will get not-fully-removed windows everywhere - if (gameId == "fairytales") + break; + case GID_MOTHERGOOSE: + if (getSciVersion() == SCI_VERSION_1_EARLY) + offTop = 0; + break; + case GID_FAIRYTALES: + // Mixed-Up Fairy Tales (& its demo) uses -w 26 0 200 320. If we don't + // also do this we will get not-fully-removed windows everywhere. offTop = 26; + break; + default: + offTop = 10; + break; + } openPort(_wmgrPort); setPort(_wmgrPort); |