From c874ff15a8e95acb85940ba5de0243b93077cc9d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 23 May 2010 10:28:03 +0000 Subject: Cleaned up the game ID code: - The game ID is now obtained from ScummVM ID directly, not by converting Sierra's internal ID - Moved the code which reads the internal Sierra ID inside the resource manager - Moved the code which converts the internal Sierra ID to ScummVM's IDs together with the rest of the detection code svn-id: r49152 --- engines/sci/graphics/gui.cpp | 2 +- engines/sci/graphics/ports.cpp | 3 ++- engines/sci/graphics/ports.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/sci/graphics') diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 46f7fcd689..29ab64ddb2 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -92,7 +92,7 @@ void SciGui::resetEngineState(EngineState *s) { } void SciGui::init(bool usesOldGfxFunctions) { - _ports->init(usesOldGfxFunctions, this, _paint16, _text16, _s->_gameId); + _ports->init(usesOldGfxFunctions, this, _paint16, _text16); _paint16->init(_animate, _text16); } diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index ab3291dd79..cdb6fe4ae1 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -54,7 +54,7 @@ GfxPorts::~GfxPorts() { delete _menuPort; } -void GfxPorts::init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, GfxText16 *text16, Common::String gameId) { +void GfxPorts::init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, GfxText16 *text16) { int16 offTop = 10; _usesOldGfxFunctions = usesOldGfxFunctions; @@ -88,6 +88,7 @@ void GfxPorts::init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, // Jones, Slater and Hoyle 3 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 == "mothergoose" && getSciVersion() == SCI_VERSION_1_EARLY)) offTop = 0; diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h index 0876d9e442..c8ce6b3470 100644 --- a/engines/sci/graphics/ports.h +++ b/engines/sci/graphics/ports.h @@ -45,7 +45,7 @@ public: GfxPorts(SegManager *segMan, GfxScreen *screen); ~GfxPorts(); - void init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, GfxText16 *text16, Common::String gameId); + void init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, GfxText16 *text16); void kernelSetActive(uint16 portId); Common::Rect kernelGetPicWindow(int16 &picTop, int16 &picLeft); -- cgit v1.2.3