diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/detection.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/patcher.cpp | 12 | ||||
-rw-r--r-- | engines/xeen/xeen.h | 7 |
3 files changed, 18 insertions, 9 deletions
diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp index c542c8d18d..315b169655 100644 --- a/engines/xeen/detection.cpp +++ b/engines/xeen/detection.cpp @@ -45,6 +45,14 @@ uint32 XeenEngine::getGameID() const { return _gameDescription->gameID; } +uint32 XeenEngine::getSpecificGameId() const { + uint gameId = g_vm->getGameID(); + if (gameId == GType_WorldOfXeen) + gameId = _files->_ccNum ? GType_DarkSide : GType_Clouds; + + return gameId; +} + uint32 XeenEngine::getGameFeatures() const { return _gameDescription->features; } diff --git a/engines/xeen/patcher.cpp b/engines/xeen/patcher.cpp index b401549442..0c5976241e 100644 --- a/engines/xeen/patcher.cpp +++ b/engines/xeen/patcher.cpp @@ -49,7 +49,7 @@ const byte DS_MAP116[] = { 9, 10, 6, 4, 2, OP_TakeOrGive, 0, 0, 103, 127 }; const byte DS_MAP62_PIT1[] = { 9, 11, 8, DIR_ALL, 4, OP_FallToMap, 61, 11, 8, 0 }; const byte DS_MAP62_PIT2[] = { 9, 7, 4, DIR_ALL, 4, OP_FallToMap, 61, 7, 4, 0 }; -#define SCRIPT_PATCHES_COUNT 6 +#define SCRIPT_PATCHES_COUNT 5 static const ScriptEntry SCRIPT_PATCHES[] = { { GType_DarkSide, 54, DS_MAP54_LINE8 }, // Fix curtain on level 2 of Ellinger's Tower { GType_Swords, 53, SW_MAP53_LINE8 }, // Fix chest in Hart having gems, but saying "Nothing Here" @@ -81,13 +81,10 @@ void Patcher::patch() { } void Patcher::patchScripts() { - FileManager &files = *g_vm->_files; Map &map = *g_vm->_map; Party &party = *g_vm->_party; - uint gameId = g_vm->getGameID(); - if (gameId == GType_WorldOfXeen) - gameId = files._ccNum ? GType_DarkSide : GType_Clouds; + uint gameId = g_vm->getSpecificGameId(); for (int patchIdx = 0; patchIdx < SCRIPT_PATCHES_COUNT; ++patchIdx) { const ScriptEntry &se = SCRIPT_PATCHES[patchIdx]; @@ -114,14 +111,11 @@ void Patcher::patchScripts() { } void Patcher::patchObjects() { - FileManager &files = *g_vm->_files; Map &map = *g_vm->_map; Party &party = *g_vm->_party; const MazeData *mapData = map.mazeDataSurrounding(); - int gameId = g_vm->getGameID(); - if (gameId == GType_WorldOfXeen) - gameId = files._ccNum ? GType_DarkSide : GType_Clouds; + int gameId = g_vm->getSpecificGameId(); for (int roCtr = 0; roCtr < REMOVE_OBJECTS_COUNT; ++roCtr) { const ObjectEntry &oe = REMOVE_OBJECTS[roCtr]; diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h index 2ac4ee4ec6..178aaf1b9b 100644 --- a/engines/xeen/xeen.h +++ b/engines/xeen/xeen.h @@ -205,6 +205,13 @@ public: Common::Platform getPlatform() const; uint16 getVersion() const; uint32 getGameID() const; + + /** + * Returns the game Id, but with a reuslt of Clouds or Dark Side for World of Xeen, + * depending on which side the player is currently on + */ + uint32 getSpecificGameId() const; + uint32 getGameFeatures() const; bool getIsCD() const; |