Skip to content

Commit

Permalink
SCUMM: Support playing most RuSCUMM versions without patching manually
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder committed Mar 11, 2023
1 parent f53bbba commit 645625a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions engines/scumm/scumm.cpp
Expand Up @@ -20,6 +20,7 @@
*/

#include "common/config-manager.h"
#include "common/compression/clickteam.h"
#include "common/debug-channels.h"
#include "common/macresman.h"
#include "common/md5.h"
Expand All @@ -40,6 +41,7 @@
#include "scumm/charset.h"
#include "scumm/costume.h"
#include "scumm/debugger.h"
#include "scumm/detection_tables.h"
#include "scumm/dialogs.h"
#include "scumm/file.h"
#include "scumm/file_nes.h"
Expand Down Expand Up @@ -888,6 +890,22 @@ Common::Error ScummEngine::init() {

const Common::FSNode gameDataDir(ConfMan.get("path"));

for (uint i = 0; ruScummPatcherTable[i].patcherName; i++) {
if (ruScummPatcherTable[i].gameid == _game.id && (_game.variant == nullptr || strcmp(_game.variant, ruScummPatcherTable[i].variant) == 0)) {
Common::File *f = new Common::File();
if (f->open(ruScummPatcherTable[i].patcherName)) {
Common::Archive *patcher = Common::ClickteamInstaller::openPatch(f, Common::ClickteamInstaller::ClickteamVersion::MANIAC_MANSION_PRCA,
true, true, &SearchMan, DisposeAfterUse::YES);
if (patcher) {
SearchMan.add("ruscumm", patcher, 2);
break;
}
}
delete f;
}
}


ConfMan.registerDefault("original_gui", true);
if (ConfMan.hasKey("original_gui", _targetName)) {
_useOriginalGUI = ConfMan.getBool("original_gui");
Expand Down

0 comments on commit 645625a

Please sign in to comment.