From e4378d5bac1b2467190e21333a037a6af34bba52 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jul 2012 13:17:04 +0300 Subject: SCI: Better handling for Phantasmagoria's odd screen size Still not right, as the width isn't set --- engines/sci/graphics/frameout.cpp | 13 +++---------- engines/sci/graphics/screen.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'engines/sci/graphics') diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index defc55edb2..b13c7f4dce 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -132,18 +132,11 @@ void GfxFrameout::kernelAddPlane(reg_t object) { tmpRunningHeight = 200; } - // HACK: Game scripts in Phantasmagoria 1 seem to use a very odd internal - // resolution, or some other extra calculation is taking place. - // Changing the internal script dimensions to these odd values fixes - // object positioning, but makes the interface picture slightly bigger, - // thus there is a small gap between the room picture and the interface - // edges, plus a couple of pixels of the picture are cut off in the - // bottom. - // FIXME: Find how to properly handle the script dimensions in - // Phantasmagoria. This can't be right. + // HACK: Phantasmagoria 1 sets a window size of 630x450. + // We can't set a width of 630, as that messes up the pitch, so we hack + // the internal script width here if (g_sci->getGameId() == GID_PHANTASMAGORIA) { tmpRunningWidth = 325; - tmpRunningHeight = 213; } _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 4020518b72..3030fb4386 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -97,6 +97,13 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { break; } + // Phantasmagoria 1 sets a window area of 630x450 + if (g_sci->getGameId() == GID_PHANTASMAGORIA) { + // TODO: Also set width to 630 (can't be set right now, as it messes up + // the pitch). For now, a hack has been placed in GfxFrameout::kernelAddPlane() + _height = 450; + } + _displayPixels = _displayWidth * _displayHeight; _visualScreen = (byte *)calloc(_pixels, 1); _priorityScreen = (byte *)calloc(_pixels, 1); -- cgit v1.2.3