aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/detection.cpp6
-rw-r--r--engines/sci/engine/game.cpp8
-rw-r--r--engines/sci/engine/kernel.cpp12
-rw-r--r--engines/sci/engine/kernel.h6
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/engine/kmovement.cpp2
-rw-r--r--engines/sci/engine/kpathing.cpp14
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/state.h2
-rw-r--r--engines/sci/engine/vm.cpp2
-rw-r--r--engines/sci/engine/vm.h4
-rw-r--r--engines/sci/gui/gui.cpp2
-rw-r--r--engines/sci/gui/gui_windowmgr.cpp4
-rw-r--r--engines/sci/gui/gui_windowmgr.h2
-rw-r--r--engines/sci/gui32/gui32.cpp2
15 files changed, 35 insertions, 35 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 8f4b3f6618..526b91acb1 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -314,9 +314,9 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
return 0;
}
reg_t game_obj = segMan->lookupScriptExport(0, 0);
- const char *gameName = segMan->getObjectName(game_obj);
- debug(2, "Detected ID: \"%s\" at %04x:%04x", gameName, PRINT_REG(game_obj));
- s_fallbackDesc.gameid = convertSierraGameId(gameName, &s_fallbackDesc.flags);
+ const char *gameId = segMan->getObjectName(game_obj);
+ debug(2, "Detected ID: \"%s\" at %04x:%04x", gameId, PRINT_REG(game_obj));
+ s_fallbackDesc.gameid = convertSierraGameId(gameId, &s_fallbackDesc.flags);
delete segMan;
// Try to determine the game language
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index bc7307e940..d6b4c9cdb7 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -95,9 +95,9 @@ static const OldNewIdTableEntry s_oldNewTable[] = {
{ "", "", false, "" }
};
-const char *convertSierraGameId(const char *gameName, uint32 *gameFlags) {
+const char *convertSierraGameId(const char *gameId, uint32 *gameFlags) {
// Convert the id to lower case, so that we match all upper/lower case variants.
- Common::String sierraId = gameName;
+ Common::String sierraId = gameId;
sierraId.toLowercase();
// TODO: SCI32 IDs
@@ -412,9 +412,9 @@ int game_init(EngineState *s) {
// The first entry in the export table of script 0 points to the game object
s->_gameObj = s->_segMan->lookupScriptExport(0, 0);
uint32 gameFlags = 0; // unused
- s->_gameName = convertSierraGameId(s->_segMan->getObjectName(s->_gameObj), &gameFlags);
+ s->_gameId = convertSierraGameId(s->_segMan->getObjectName(s->_gameObj), &gameFlags);
- debug(2, " \"%s\" at %04x:%04x", s->_gameName.c_str(), PRINT_REG(s->_gameObj));
+ debug(2, " \"%s\" at %04x:%04x", s->_gameId.c_str(), PRINT_REG(s->_gameObj));
#ifdef INCLUDE_OLDGFX
s->_menubar = new Menubar(); // Create menu bar
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index c0a93837f7..b8385f72dc 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -378,11 +378,11 @@ SciKernelFunction kfunct_mappers[] = {
{NULL, NULL, NULL} // Terminator
};
-Kernel::Kernel(ResourceManager *resMan, Common::String gameName) : _resMan(resMan) {
+Kernel::Kernel(ResourceManager *resMan, Common::String gameId) : _resMan(resMan) {
loadSelectorNames();
mapSelectors(); // Map a few special selectors for later use
- loadKernelNames(gameName);
+ loadKernelNames(gameId);
mapFunctions(); // Map the kernel functions
}
@@ -714,7 +714,7 @@ void kernel_sleep(SciEvent *event, uint32 msecs ) {
}
}
-void Kernel::setDefaultKernelNames(Common::String gameName) {
+void Kernel::setDefaultKernelNames(Common::String gameId) {
_kernelNames = Common::StringList(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR);
// Some (later) SCI versions replaced CanBeHere by CantBeHere
@@ -748,7 +748,7 @@ void Kernel::setDefaultKernelNames(Common::String gameName) {
case SCI_VERSION_1_1:
// In SCI1.1, this kernel function is empty, apart from KQ6CD,
// where it has been replaced with kPortrait
- if (gameName == "kq6")
+ if (gameId == "kq6")
_kernelNames[0x26] = "Portrait";
else
_kernelNames[0x26] = "Dummy";
@@ -762,7 +762,7 @@ void Kernel::setDefaultKernelNames(Common::String gameName) {
}
}
-bool Kernel::loadKernelNames(Common::String gameName) {
+bool Kernel::loadKernelNames(Common::String gameId) {
_kernelNames.clear();
#ifdef ENABLE_SCI32
@@ -772,7 +772,7 @@ bool Kernel::loadKernelNames(Common::String gameName) {
setKernelNamesSci2();
else
#endif
- setDefaultKernelNames(gameName);
+ setDefaultKernelNames(gameId);
return true;
}
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 75276c9228..b1c1ab738f 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -61,7 +61,7 @@ public:
/**
* Initializes the SCI kernel
*/
- Kernel(ResourceManager *resMan, Common::String gameName);
+ Kernel(ResourceManager *resMan, Common::String gameId);
~Kernel();
uint getSelectorNamesSize() const;
@@ -95,12 +95,12 @@ private:
* name table of the resource (the format changed between version 0 and 1).
* @return true on success, false on failure
*/
- bool loadKernelNames(Common::String gameName);
+ bool loadKernelNames(Common::String gameId);
/**
* Sets the default kernel function names, based on the SCI version used
*/
- void setDefaultKernelNames(Common::String gameName);
+ void setDefaultKernelNames(Common::String gameId);
#ifdef ENABLE_SCI32
/**
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 3ed5b405ad..d553b5d0e2 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -507,7 +507,7 @@ reg_t kBaseSetter(EngineState *s, int argc, reg_t *argv) {
// WORKAROUND for a problem in LSL1VGA. This allows the casino door to be opened,
// till the actual problem is found
- if (s->_gameName == "lsl1sci" && s->currentRoomNumber() == 300) {
+ if (s->_gameId == "lsl1sci" && s->currentRoomNumber() == 300) {
int top = GET_SEL32V(s->_segMan, object, brTop);
PUT_SEL32V(s->_segMan, object, brTop, top + 2);
}
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 935b3de8d4..3702035c2d 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -332,7 +332,7 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
}
// FIXME: find out why iceman needs this and we ask for version > SCI01
- if ((getSciVersion() > SCI_VERSION_01) || (s->_gameName == "iceman"))
+ if ((getSciVersion() > SCI_VERSION_01) || (s->_gameId == "iceman"))
if (completed)
invoke_selector(INV_SEL(mover, moveDone, kStopOnInvalidSelector), 0);
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index c4cb899262..c988a94c98 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1297,7 +1297,7 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
// WORKAROUND: broken polygon in lsl1sci, room 350, after opening elevator
// Polygon has 17 points but size is set to 19
- if ((size == 19) && (s->_gameName == "lsl1sci")) {
+ if ((size == 19) && (s->_gameId == "lsl1sci")) {
if ((s->currentRoomNumber() == 350)
&& (read_point(segMan, points, 18) == Common::Point(108, 137))) {
debug(1, "Applying fix for broken polygon in lsl1sci, room 350");
@@ -1307,21 +1307,21 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
#ifdef OLD_PATHFINDING
// WORKAROUND: self-intersecting polygons in ECO, rooms 221, 280 and 300
- if ((size == 11) && (s->_gameName == "ecoquest")) {
+ if ((size == 11) && (s->_gameId == "ecoquest")) {
if ((s->currentRoomNumber() == 300)
&& (read_point(segMan, points, 10) == Common::Point(221, 0))) {
debug(1, "Applying fix for self-intersecting polygon in ECO, room 300");
size = 10;
}
}
- if ((size == 12) && (s->_gameName == "ecoquest")) {
+ if ((size == 12) && (s->_gameId == "ecoquest")) {
if ((s->currentRoomNumber() == 280)
&& (read_point(segMan, points, 11) == Common::Point(238, 189))) {
debug(1, "Applying fix for self-intersecting polygon in ECO, room 280");
size = 10;
}
}
- if ((size == 16) && (s->_gameName == "ecoquest")) {
+ if ((size == 16) && (s->_gameId == "ecoquest")) {
if ((s->currentRoomNumber() == 221)
&& (read_point(segMan, points, 1) == Common::Point(419, 175))) {
debug(1, "Applying fix for self-intersecting polygon in ECO, room 221");
@@ -1335,7 +1335,7 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
for (i = skip; i < size; i++) {
#ifdef OLD_PATHFINDING
- if (size == 35 && (i == 20 || i == 21) && s->_gameName == "sq1sci" &&
+ if (size == 35 && (i == 20 || i == 21) && s->_gameId == "sq1sci" &&
s->currentRoomNumber() == 66) {
if (i == 20 && read_point(segMan, points, 20) == Common::Point(0, 104)) {
debug(1, "Applying fix for self-intersecting polygon in SQ1, room 66");
@@ -1527,14 +1527,14 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
// WORKAROUND LSL5 room 660. Priority glitch due to us choosing a different path
// than SSCI. Happens when Patti walks to the control room.
- if ((s->_gameName == "lsl5") && (s->currentRoomNumber() == 660) && (Common::Point(67, 131) == *new_start) && (Common::Point(229, 101) == *new_end)) {
+ if ((s->_gameId == "lsl5") && (s->currentRoomNumber() == 660) && (Common::Point(67, 131) == *new_start) && (Common::Point(229, 101) == *new_end)) {
debug(1, "[avoidpath] Applying fix for priority problem in LSL5, room 660");
pf_s->_prependPoint = new_start;
new_start = new Common::Point(77, 107);
}
#ifdef OLD_PATHFINDING
- if (s->_gameName == "longbow" && s->currentRoomNumber() == 210)
+ if (s->_gameId == "longbow" && s->currentRoomNumber() == 210)
fixLongbowRoom210(pf_s, *new_start, *new_end);
#endif
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index cee1825b0b..645d8d203f 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -944,7 +944,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
#ifdef INCLUDE_OLDGFX
retval->pic_priority_table = (int *)(retval->gfx_state->pic) ? retval->gfx_state->pic->priorityTable : NULL;
#endif
- retval->_gameName = s->_gameName;
+ retval->_gameId = s->_gameId;
#ifdef USE_OLD_MUSIC_FUNCTIONS
retval->_sound._it = NULL;
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 69006710ad..54fb14c24e 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -140,7 +140,7 @@ public:
Kernel *_kernel;
Vocabulary *_voc;
- Common::String _gameName; /**< Designation of the primary object (which inherits from Game) */
+ Common::String _gameId; /**< Designation of the primary object (which inherits from Game) */
/* Non-VM information */
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 2d335a3904..c483da7723 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1843,7 +1843,7 @@ static EngineState *_game_run(EngineState *&s, int restoring) {
int game_run(EngineState **_s) {
EngineState *s = *_s;
- debugC(2, kDebugLevelVM, "Calling %s::play()\n", s->_gameName.c_str());
+ debugC(2, kDebugLevelVM, "Calling %s::play()\n", s->_gameId.c_str());
_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play); // Call the play selector
// Now: Register the first element on the execution stack-
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 93116dc675..69e77fc9ff 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -461,11 +461,11 @@ void script_uninstantiate(SegManager *segMan, int script_nr);
/**
* Converts the builtin Sierra game IDs to the ones we use in ScummVM
- * @param[in] gameName The internal game name
+ * @param[in] gameId The internal game ID
* @param[in] gameFlags The game's flags, which are adjusted accordingly for demos
* @return The equivalent ScummVM game id
*/
-const char *convertSierraGameId(const char *gameName, uint32 *gameFlags);
+const char *convertSierraGameId(const char *gameId, uint32 *gameFlags);
/**
* Initializes an SCI game
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index a5be962870..33d124cc54 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -89,7 +89,7 @@ void SciGui::init(bool usesOldGfxFunctions) {
_usesOldGfxFunctions = usesOldGfxFunctions;
_gfx->init(_text);
- _windowMgr->init(_s->_gameName);
+ _windowMgr->init(_s->_gameId);
_menu->init(_s->gfx_state);
initPriorityBands();
}
diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp
index b957abde14..d2defb9d35 100644
--- a/engines/sci/gui/gui_windowmgr.cpp
+++ b/engines/sci/gui/gui_windowmgr.cpp
@@ -52,7 +52,7 @@ SciGuiWindowMgr::~SciGuiWindowMgr() {
// TODO: Clear _windowList and delete all stuff in it?
}
-void SciGuiWindowMgr::init(Common::String gameName) {
+void SciGuiWindowMgr::init(Common::String gameId) {
int16 offTop = 10;
_wmgrPort = new GuiPort(0);
@@ -61,7 +61,7 @@ void SciGuiWindowMgr::init(Common::String gameName) {
// Jones sierra sci was called with parameter -Nw 0 0 200 320
// this actually meant not skipping the first 10 pixellines in windowMgrPort
- if (gameName == "jones")
+ if (gameId == "jones")
offTop = 0;
_gfx->OpenPort(_wmgrPort);
diff --git a/engines/sci/gui/gui_windowmgr.h b/engines/sci/gui/gui_windowmgr.h
index 09c8951717..483df9efc5 100644
--- a/engines/sci/gui/gui_windowmgr.h
+++ b/engines/sci/gui/gui_windowmgr.h
@@ -36,7 +36,7 @@ public:
SciGuiWindowMgr(SciGui *gui, SciGuiScreen *screen, SciGuiGfx *gfx, SciGuiText *text);
~SciGuiWindowMgr();
- void init(Common::String gameName);
+ void init(Common::String gameId);
int16 isFrontWindow(GuiWindow *wnd);
void BeginUpdate(GuiWindow *wnd);
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 19105112b3..fab3cb1d6c 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -450,7 +450,7 @@ void SciGui32::setPortPic(Common::Rect rect, int16 picTop, int16 picLeft, bool i
// LSL6 calls kSetPort to extend the screen to draw the Gui. If we free all resources
// here, the background picture is freed too, and this makes everything a big mess.
// FIXME/TODO: This code really needs to be rewritten to conform to the original behavior
- if (_s->_gameName != "lsl6") {
+ if (_s->_gameId != "lsl6") {
_s->gfx_state->pic_port_bounds = gfx_rect(picLeft, picTop, rect.right, rect.bottom);
// FIXME: Should really only invalidate all loaded pic resources here;