diff options
author | Paul Gilbert | 2019-08-29 21:08:53 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-08-29 21:08:53 -0700 |
commit | 9f7cadaf8a059977ead55aae8cb94d6cb91f3f26 (patch) | |
tree | 003b0c0b59e573361a7ad3d0aed1f09608790f2b /engines/xeen/patcher.cpp | |
parent | 6d4e398fb6d0f4b14cbb636560e9e068cd4be1a2 (diff) | |
download | scummvm-rg350-9f7cadaf8a059977ead55aae8cb94d6cb91f3f26.tar.gz scummvm-rg350-9f7cadaf8a059977ead55aae8cb94d6cb91f3f26.tar.bz2 scummvm-rg350-9f7cadaf8a059977ead55aae8cb94d6cb91f3f26.zip |
XEEN: Shift getting specific game Id to an engine method
Diffstat (limited to 'engines/xeen/patcher.cpp')
-rw-r--r-- | engines/xeen/patcher.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
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]; |