aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-23 10:28:03 +0000
committerFilippos Karapetis2010-05-23 10:28:03 +0000
commitc874ff15a8e95acb85940ba5de0243b93077cc9d (patch)
tree7d3f79b70d745d775af70d665c10fabf28870dae /engines/sci/graphics
parentdd9bf70761f2de9771912984209422f1f63bd3e8 (diff)
downloadscummvm-rg350-c874ff15a8e95acb85940ba5de0243b93077cc9d.tar.gz
scummvm-rg350-c874ff15a8e95acb85940ba5de0243b93077cc9d.tar.bz2
scummvm-rg350-c874ff15a8e95acb85940ba5de0243b93077cc9d.zip
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
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/gui.cpp2
-rw-r--r--engines/sci/graphics/ports.cpp3
-rw-r--r--engines/sci/graphics/ports.h2
3 files changed, 4 insertions, 3 deletions
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);