From 359be0c0665d9fed898ad1c511614a76ee92e331 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 17 Jun 2010 23:14:34 +0000 Subject: SCI: Change SciEngine's 'char *getGameID()' to 'Common::String getGameId()' svn-id: r49968 --- engines/sci/graphics/palette.cpp | 6 +++--- engines/sci/graphics/picture.cpp | 4 ++-- engines/sci/graphics/ports.cpp | 2 +- engines/sci/graphics/screen.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/sci/graphics') diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 1b2e5f410e..35741dedf7 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -66,11 +66,11 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen) // and those will overwrite the current palette in that case // Quest for Glory 3 demo and police quest 1 vga behave the same interpreter wise and all have glitches, if we don't // switch back - if (!strcmp(g_sci->getGameID(), "laurabow2") && (g_sci->isDemo())) + if (g_sci->getGameId() == "laurabow2" && (g_sci->isDemo())) _alwaysForceRealMerge = true; - if (!strcmp(g_sci->getGameID(), "qfg3") && (g_sci->isDemo())) + else if (g_sci->getGameId() == "qfg3" && (g_sci->isDemo())) _alwaysForceRealMerge = true; - if (!strcmp(g_sci->getGameID(), "pq1sci")) + else if (g_sci->getGameId() == "pq1sci") _alwaysForceRealMerge = true; } diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index a59153f116..0b62a558ca 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -437,7 +437,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) { memcpy(&EGApalettes[i], &vector_defaultEGApalette, sizeof(vector_defaultEGApalette)); memcpy(&EGApriority, &vector_defaultEGApriority, sizeof(vector_defaultEGApriority)); - if (strcmp(g_sci->getGameID(), "iceman") == 0) { + if (g_sci->getGameId() == "iceman") { // WORKAROUND: we remove certain visual&priority lines in underwater rooms of iceman, when not dithering the // picture. Normally those lines aren't shown, because they share the same color as the dithered // fill color combination. When not dithering, those lines would appear and get distracting. @@ -532,7 +532,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) { // inside picture data for such games case PIC_OP_SET_PATTERN: if (_resourceType >= SCI_PICTURE_TYPE_SCI11) { - if (strcmp(g_sci->getGameID(), "sq4") == 0) { + if (g_sci->getGameId() == "sq4") { // WORKAROUND: For SQ4 / for some pictures handle this like a terminator // This picture includes garbage data, first a set pattern w/o parameter and then short pattern // I guess that garbage is a left over from the sq4-floppy (sci1) to sq4-cd (sci1.1) conversion diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index c964ccd346..b762872357 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -87,7 +87,7 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te // 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(); + 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/screen.cpp b/engines/sci/graphics/screen.cpp index 0e054d5a76..82ff478da2 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -97,9 +97,9 @@ GfxScreen::GfxScreen(ResourceManager *resMan, int16 width, int16 height, int ups if (_resMan->isSci11Mac() && getSciVersion() == SCI_VERSION_1_1) { // For SCI1.1 Mac, we need to expand the screen to accommodate for // the icon bar. Of course, both KQ6 and QFG1 VGA differ in size. - if (!scumm_stricmp(g_sci->getGameID(), "kq6")) + if (g_sci->getGameId() == "kq6") initGraphics(_displayWidth, _displayHeight + 26, _displayWidth > 320); - else if (!scumm_stricmp(g_sci->getGameID(), "qfg1")) + else if (g_sci->getGameId() == "qfg1") initGraphics(_displayWidth, _displayHeight + 20, _displayWidth > 320); else error("Unknown SCI1.1 Mac game"); -- cgit v1.2.3