From 9df74402e5474652b7a041bc4f9d9ec4ac6a0db6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 17 Aug 2010 20:36:28 +0000 Subject: SCI: Added a warning dialog on game startup for versions of Longbow with known buggy scripts (containing game stopping bugs), which have been patched by Sierra svn-id: r52172 --- engines/sci/sci.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 7a9a786121..54a28a80c4 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -173,6 +173,8 @@ SciEngine::~SciEngine() { g_sci = 0; } +extern void showScummVMDialog(const Common::String &message); + Common::Error SciEngine::run() { g_eventRec.registerRandomSource(_rng, "sci"); @@ -288,6 +290,26 @@ Common::Error SciEngine::run() { } } + // Show any special warnings for buggy scripts with severe game bugs, + // which have been patched by Sierra + if (getGameId() == GID_LONGBOW) { + // Longbow 1.0 has a buggy script which prevents the game + // from progressing during the Green Man riddle sequence. + // A patch for this buggy script has been released by Sierra, + // and is necessary to complete the game without issues. + // The patched script is included in Longbow 1.1. + // Refer to bug #3036609. + Resource *buggyScript = _resMan->findResource(ResourceId(kResourceTypeScript, 180), 0); + + if (buggyScript->size == 12354 || buggyScript->size == 12362) { + showScummVMDialog("A known buggy game script has been detected, which could " + "prevent you from progressing later on in the game, during " + "the sequence with the Green Man's riddles. Please, apply " + "the latest patch for this game by Sierra to avoid possible " + "problems"); + } + } + runGame(); ConfMan.flushToDisk(); -- cgit v1.2.3 From 0c5561105cd0b3255a26549f2752db8f9ffdd277 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 23 Aug 2010 20:29:13 +0000 Subject: SCI: storing game super class address now inside SciEngine svn-id: r52311 --- engines/sci/sci.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 54a28a80c4..b3c049362e 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -201,7 +201,8 @@ Common::Error SciEngine::run() { // Add the after market GM patches for the specified game, if they exist _resMan->addNewGMPatch(_gameId); - _gameObj = _resMan->findGameObject(); + _gameObjectAddress = _resMan->findGameObject(); + _gameSuperClassAddress = NULL_REG; SegManager *segMan = new SegManager(_resMan); @@ -212,6 +213,7 @@ Common::Error SciEngine::run() { // Create debugger console. It requires GFX to be initialized _console = new Console(this); _kernel = new Kernel(_resMan, segMan); + _features = new GameFeatures(segMan, _kernel); // Only SCI0, SCI01 and SCI1 EGA games used a parser _vocabulary = (getSciVersion() <= SCI_VERSION_1_EGA) ? new Vocabulary(_resMan, false) : NULL; @@ -231,6 +233,14 @@ Common::Error SciEngine::run() { return Common::kUnknownError; } + // we try to find the super class address of the game object, we can't do that earlier + const Object *gameObject = segMan->getObject(_gameObjectAddress); + if (!gameObject) { + warning("Could not get game object, aborting..."); + return Common::kUnknownError; + } + _gameSuperClassAddress = gameObject->getSuperClassSelector(); + script_adjust_opcode_formats(); // Must be called after game_init(), as they use _features @@ -250,9 +260,9 @@ Common::Error SciEngine::run() { if (selectedLanguage == Common::EN_ANY) { // and english was selected as language if (SELECTOR(printLang) != -1) // set text language to english - writeSelectorValue(segMan, _gameObj, SELECTOR(printLang), 1); + writeSelectorValue(segMan, _gameObjectAddress, SELECTOR(printLang), 1); if (SELECTOR(parseLang) != -1) // and set parser language to english as well - writeSelectorValue(segMan, _gameObj, SELECTOR(parseLang), 1); + writeSelectorValue(segMan, _gameObjectAddress, SELECTOR(parseLang), 1); } } @@ -444,8 +454,8 @@ void SciEngine::initStackBaseWithSelector(Selector selector) { _gamestate->stack_base[1] = NULL_REG; // Register the first element on the execution stack - if (!send_selector(_gamestate, _gameObj, _gameObj, _gamestate->stack_base, 2, _gamestate->stack_base)) { - _console->printObject(_gameObj); + if (!send_selector(_gamestate, _gameObjectAddress, _gameObjectAddress, _gamestate->stack_base, 2, _gamestate->stack_base)) { + _console->printObject(_gameObjectAddress); error("initStackBaseWithSelector: error while registering the first selector in the call stack"); } -- cgit v1.2.3 From e93eaa0d95381573bfa5986216a18a871ae02412 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 23 Aug 2010 23:04:07 +0000 Subject: SCI: some more work on replacing restore dialog svn-id: r52314 --- engines/sci/sci.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index b3c049362e..07c8d42cb6 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -254,6 +254,9 @@ Common::Error SciEngine::run() { debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion())); + // ENABLE THIS FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE + //patchGameSaveRestore(segMan); + if (_gameDescription->flags & ADGF_ADDENGLISH) { // if game is multilingual Common::Language selectedLanguage = Common::parseLanguage(ConfMan.get("language")); @@ -327,6 +330,47 @@ Common::Error SciEngine::run() { return Common::kNoError; } +static byte patchGameRestore[] = { + 0x39, 0x02, // pushi 02 + 0x76, // push0 + 0x38, 0xff, 0xff, // pushi -1 + 0x43, 0xff, 0x04, // call kRestoreGame (will get fixed directly) + 0x48, // ret +}; + +void SciEngine::patchGameSaveRestore(SegManager *segMan) { + const Object *gameSuperObject = segMan->getObject(_gameSuperClassAddress); + const uint16 gameSuperMethodCount = gameSuperObject->getMethodCount(); + reg_t methodAddress; + Script *script = NULL; + const byte *scriptRestorePtr = NULL; + const uint16 kernelCount = _kernel->getKernelNamesSize(); + byte kernelIdRestore = 0; + + for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) { + Common::String kernelName = _kernel->getKernelName(kernelNr); + if (kernelName == "RestoreGame") + kernelIdRestore = kernelNr; + } + + for (uint16 methodNr = 0; methodNr < gameSuperMethodCount; methodNr++) { + uint16 selectorId = gameSuperObject->getFuncSelector(methodNr); + Common::String methodName = _kernel->getSelectorName(selectorId); + if (methodName == "restore") { + methodAddress = gameSuperObject->getFunction(methodNr); + script = segMan->getScript(methodAddress.segment); + scriptRestorePtr = script->getBuf(methodAddress.offset); + break; + } + } + if (scriptRestorePtr) { + // Now patch in our code + byte *patchPtr = (byte *)scriptRestorePtr; + memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); + patchPtr[7] = kernelIdRestore; + } +} + bool SciEngine::initGame() { // Script 0 needs to be allocated here before anything else! int script0Segment = _gamestate->_segMan->getScriptSegment(0, SCRIPT_GET_LOCK); -- cgit v1.2.3 From f1f24b7b28995ef78886c6a55a93ec2f13e62465 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 08:31:57 +0000 Subject: SCI: bit more work on restore dialog replacing (works now, if enabled - but music isn't yet paused) svn-id: r52317 --- engines/sci/sci.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 07c8d42cb6..fdd3d5e379 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -254,8 +254,8 @@ Common::Error SciEngine::run() { debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion())); - // ENABLE THIS FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE - //patchGameSaveRestore(segMan); + // Patch in our save/restore code, so that dialogs are replaced + patchGameSaveRestore(segMan); if (_gameDescription->flags & ADGF_ADDENGLISH) { // if game is multilingual @@ -347,6 +347,9 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { const uint16 kernelCount = _kernel->getKernelNamesSize(); byte kernelIdRestore = 0; + // DISABLE NEXT LINE FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE + return; + for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) { Common::String kernelName = _kernel->getKernelName(kernelNr); if (kernelName == "RestoreGame") @@ -521,6 +524,7 @@ void SciEngine::runGame() { _gamestate->_segMan->resetSegMan(); initGame(); initStackBaseWithSelector(SELECTOR(play)); + patchGameSaveRestore(_gamestate->_segMan); _gamestate->gameIsRestarting = GAMEISRESTARTING_RESTART; if (_gfxMenu) _gfxMenu->reset(); @@ -529,6 +533,7 @@ void SciEngine::runGame() { _gamestate->abortScriptProcessing = kAbortNone; _gamestate->_executionStack.clear(); initStackBaseWithSelector(SELECTOR(replay)); + patchGameSaveRestore(_gamestate->_segMan); _gamestate->shrinkStackToBase(); _gamestate->abortScriptProcessing = kAbortNone; } else { -- cgit v1.2.3 From d5d8434fd65dd201118ec54e1dd2ee2cbba653bd Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 09:00:53 +0000 Subject: SCI: now pausing/unpausing music in replaced restore dialog dialog will not get replaced in sci32, nor in mother goose. Enable by adding "scireplacedialog" inside scummvm section of scummvm.ini file. Note: this feature is experimental svn-id: r52318 --- engines/sci/sci.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index fdd3d5e379..7f262416a0 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -347,8 +347,20 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { const uint16 kernelCount = _kernel->getKernelNamesSize(); byte kernelIdRestore = 0; - // DISABLE NEXT LINE FOR REPLACING SIERRA GAME RESTORE DIALOG WITH SCUMMVM RESTORE - return; + // this feature is currently not supported on SCI32 + if (getSciVersion() >= SCI_VERSION_2) + return; + + switch (_gameId) { + case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs + return; + default: + break; + } + + Common::String replaceDialogOption = ConfMan.get("scireplacedialog", Common::ConfigManager::kApplicationDomain); + if (replaceDialogOption == "") + return; for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) { Common::String kernelName = _kernel->getKernelName(kernelNr); -- cgit v1.2.3 From b192de5423f0823b2431b102fe1d1b752f30b29e Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 09:11:53 +0000 Subject: SCI: changing signature of kRestoreGame and changing patch code accordingly svn-id: r52320 --- engines/sci/sci.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 7f262416a0..a190bbb7d2 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -331,10 +331,11 @@ Common::Error SciEngine::run() { } static byte patchGameRestore[] = { - 0x39, 0x02, // pushi 02 + 0x39, 0x03, // pushi 03 0x76, // push0 0x38, 0xff, 0xff, // pushi -1 - 0x43, 0xff, 0x04, // call kRestoreGame (will get fixed directly) + 0x76, // push0 + 0x43, 0xff, 0x06, // call kRestoreGame (will get fixed directly) 0x48, // ret }; @@ -382,7 +383,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { // Now patch in our code byte *patchPtr = (byte *)scriptRestorePtr; memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); - patchPtr[7] = kernelIdRestore; + patchPtr[8] = kernelIdRestore; } } -- cgit v1.2.3 From 10a1806f32a3fc67f8deb6adb496919793977440 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 13:37:24 +0000 Subject: SCI: fixing const cast warning making clone happy :D svn-id: r52339 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index a190bbb7d2..455cfafe11 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -381,7 +381,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { } if (scriptRestorePtr) { // Now patch in our code - byte *patchPtr = (byte *)scriptRestorePtr; + byte *patchPtr = const_cast(scriptRestorePtr); memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); patchPtr[8] = kernelIdRestore; } -- cgit v1.2.3 From af6492fa4577df301abaf76c040cd70d26073009 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 13:50:55 +0000 Subject: SCI: some work on replacing save dialog svn-id: r52341 --- engines/sci/sci.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 455cfafe11..2f71a716da 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -343,10 +343,11 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { const Object *gameSuperObject = segMan->getObject(_gameSuperClassAddress); const uint16 gameSuperMethodCount = gameSuperObject->getMethodCount(); reg_t methodAddress; - Script *script = NULL; - const byte *scriptRestorePtr = NULL; const uint16 kernelCount = _kernel->getKernelNamesSize(); + const byte *scriptRestorePtr = NULL; byte kernelIdRestore = 0; + const byte *scriptSavePtr = NULL; + byte kernelIdSave = 0; // this feature is currently not supported on SCI32 if (getSciVersion() >= SCI_VERSION_2) @@ -367,6 +368,8 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { Common::String kernelName = _kernel->getKernelName(kernelNr); if (kernelName == "RestoreGame") kernelIdRestore = kernelNr; + if (kernelName == "SaveGame") + kernelIdSave = kernelNr; } for (uint16 methodNr = 0; methodNr < gameSuperMethodCount; methodNr++) { @@ -374,17 +377,32 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { Common::String methodName = _kernel->getSelectorName(selectorId); if (methodName == "restore") { methodAddress = gameSuperObject->getFunction(methodNr); - script = segMan->getScript(methodAddress.segment); + Script *script = segMan->getScript(methodAddress.segment); scriptRestorePtr = script->getBuf(methodAddress.offset); break; } + if (methodName == "save") { + methodAddress = gameSuperObject->getFunction(methodNr); + Script *script = segMan->getScript(methodAddress.segment); + scriptSavePtr = script->getBuf(methodAddress.offset); + break; + } } + + switch (_gameId) { + case GID_FAIRYTALES: // fairy tales automatically saves w/o dialog + scriptSavePtr = NULL; + default: + break; + } + if (scriptRestorePtr) { // Now patch in our code byte *patchPtr = const_cast(scriptRestorePtr); memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); patchPtr[8] = kernelIdRestore; } + // Saving is not yet patched } bool SciEngine::initGame() { -- cgit v1.2.3 From 5fbe5f049bfe26a2a788dc8736b3186b53d52248 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 14:40:18 +0000 Subject: SCI: more work on replacing save dialog also removing some previous code, because it wont work that way svn-id: r52342 --- engines/sci/sci.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 2f71a716da..9ed6a6932b 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -330,12 +330,12 @@ Common::Error SciEngine::run() { return Common::kNoError; } -static byte patchGameRestore[] = { +static byte patchGameRestoreSave[] = { 0x39, 0x03, // pushi 03 0x76, // push0 0x38, 0xff, 0xff, // pushi -1 0x76, // push0 - 0x43, 0xff, 0x06, // call kRestoreGame (will get fixed directly) + 0x43, 0xff, 0x06, // call kRestoreGame/kSaveGame (will get fixed directly) 0x48, // ret }; @@ -381,12 +381,6 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { scriptRestorePtr = script->getBuf(methodAddress.offset); break; } - if (methodName == "save") { - methodAddress = gameSuperObject->getFunction(methodNr); - Script *script = segMan->getScript(methodAddress.segment); - scriptSavePtr = script->getBuf(methodAddress.offset); - break; - } } switch (_gameId) { @@ -399,10 +393,15 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { if (scriptRestorePtr) { // Now patch in our code byte *patchPtr = const_cast(scriptRestorePtr); - memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); + memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); patchPtr[8] = kernelIdRestore; } - // Saving is not yet patched + //if (scriptSavePtr) { + // // Now patch in our code + // byte *patchPtr = const_cast(scriptSavePtr); + // memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); + // patchPtr[8] = kernelIdSave; + //} } bool SciEngine::initGame() { -- cgit v1.2.3 From cd61674010a1e539d0ff5eac69a0bd44c43dff09 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Aug 2010 14:58:29 +0000 Subject: SCI: Check for the existence of script 180 before accessing it. Fixes the Longbow demo svn-id: r52344 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 9ed6a6932b..1f4f3bd383 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -314,7 +314,7 @@ Common::Error SciEngine::run() { // Refer to bug #3036609. Resource *buggyScript = _resMan->findResource(ResourceId(kResourceTypeScript, 180), 0); - if (buggyScript->size == 12354 || buggyScript->size == 12362) { + if (buggyScript && (buggyScript->size == 12354 || buggyScript->size == 12362)) { showScummVMDialog("A known buggy game script has been detected, which could " "prevent you from progressing later on in the game, during " "the sequence with the Green Man's riddles. Please, apply " -- cgit v1.2.3 From 01a8fc604b00279be181c0ce8decfc8e44242270 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 24 Aug 2010 15:11:53 +0000 Subject: SCI: replacing save dialog as well experimental feature - enable by putting "scireplacedialog=true" inside scummvm section of scummvm.ini LSL6 currently loses the ability to quicksave, when using the feature. Although i don't see it as a huge loss. That way it's now possible to save to up to 100 slots instead of just 20. svn-id: r52345 --- engines/sci/sci.cpp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 1f4f3bd383..17872a5737 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -340,6 +340,8 @@ static byte patchGameRestoreSave[] = { }; void SciEngine::patchGameSaveRestore(SegManager *segMan) { + const Object *gameObject = segMan->getObject(_gameObjectAddress); + const uint16 gameMethodCount = gameObject->getMethodCount(); const Object *gameSuperObject = segMan->getObject(_gameSuperClassAddress); const uint16 gameSuperMethodCount = gameSuperObject->getMethodCount(); reg_t methodAddress; @@ -372,6 +374,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { kernelIdSave = kernelNr; } + // Search for gameobject-superclass ::restore for (uint16 methodNr = 0; methodNr < gameSuperMethodCount; methodNr++) { uint16 selectorId = gameSuperObject->getFuncSelector(methodNr); Common::String methodName = _kernel->getSelectorName(selectorId); @@ -379,6 +382,22 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { methodAddress = gameSuperObject->getFunction(methodNr); Script *script = segMan->getScript(methodAddress.segment); scriptRestorePtr = script->getBuf(methodAddress.offset); + } + if (methodName == "save") { + methodAddress = gameSuperObject->getFunction(methodNr); + Script *script = segMan->getScript(methodAddress.segment); + scriptSavePtr = script->getBuf(methodAddress.offset); + } + } + + // Search for gameobject ::save, if there is one patch that one instead + for (uint16 methodNr = 0; methodNr < gameMethodCount; methodNr++) { + uint16 selectorId = gameObject->getFuncSelector(methodNr); + Common::String methodName = _kernel->getSelectorName(selectorId); + if (methodName == "save") { + methodAddress = gameObject->getFunction(methodNr); + Script *script = segMan->getScript(methodAddress.segment); + scriptSavePtr = script->getBuf(methodAddress.offset); break; } } @@ -396,12 +415,12 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); patchPtr[8] = kernelIdRestore; } - //if (scriptSavePtr) { - // // Now patch in our code - // byte *patchPtr = const_cast(scriptSavePtr); - // memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); - // patchPtr[8] = kernelIdSave; - //} + if (scriptSavePtr) { + // Now patch in our code + byte *patchPtr = const_cast(scriptSavePtr); + memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); + patchPtr[8] = kernelIdSave; + } } bool SciEngine::initGame() { -- cgit v1.2.3 From a55dbc831db197408729296fd01a5852de49d9ce Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 25 Aug 2010 10:38:09 +0000 Subject: SCI: making loading from ScummVM menu work correctly using a trick for indirectly calling GameObject::init and then restoring, fixes text color/font code issues, also removing all the hackery svn-id: r52379 --- engines/sci/sci.cpp | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 17872a5737..ee2d370b61 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -270,37 +270,23 @@ Common::Error SciEngine::run() { } // Check whether loading a savestate was requested - int saveSlot = ConfMan.getInt("save_slot"); - if (saveSlot >= 0) { - reg_t restoreArgv[2] = { NULL_REG, make_reg(0, saveSlot) }; // special call (argv[0] is NULL) - kRestoreGame(_gamestate, 2, restoreArgv); + // Check whether loading a savestate was requested + int directSaveSlotLoading = ConfMan.getInt("save_slot"); + if (directSaveSlotLoading >= 0) { + // call GameObject::play (like normally) + initStackBaseWithSelector(SELECTOR(play)); + // We set this, so that the game automatically quit right after init + _gamestate->variables[VAR_GLOBAL][4] = TRUE_REG; - // TODO: The best way to do the following would be to invoke Game::init - // here and stop when the room is about to be changed, otherwise some - // game initialization won't take place + _gamestate->_executionStackPosChanged = false; + run_vm(_gamestate); - // Set audio language for KQ5CD (bug #3039477) - if (g_sci->getGameId() == GID_KQ5 && Common::File::exists("AUDIO001.002")) { - reg_t doAudioArgv[2] = { make_reg(0, 9), make_reg(0, 1) }; - kDoAudio(_gamestate, 2, doAudioArgv); - } + // As soon as we get control again, actually restore the game + reg_t restoreArgv[2] = { NULL_REG, make_reg(0, directSaveSlotLoading) }; // special call (argv[0] is NULL) + kRestoreGame(_gamestate, 2, restoreArgv); - // Initialize the game menu, if there is one. - // This is not done when loading, so we must do it manually. - reg_t menuBarObj = _gamestate->_segMan->findObjectByName("MenuBar"); - if (menuBarObj.isNull()) - menuBarObj = _gamestate->_segMan->findObjectByName("TheMenuBar"); // LSL2 - if (menuBarObj.isNull()) - menuBarObj = _gamestate->_segMan->findObjectByName("menuBar"); // LSL6 - if (!menuBarObj.isNull()) { - // Reset abortScriptProcessing before initializing the game menu, so that the - // VM call performed by invokeSelector will actually run. - _gamestate->abortScriptProcessing = kAbortNone; - Object *menuBar = _gamestate->_segMan->getObject(menuBarObj); - // Invoke the first method (init) of the menuBar object - invokeSelector(_gamestate, menuBarObj, menuBar->getFuncSelector(0), 0, _gamestate->stack_base); - _gamestate->abortScriptProcessing = kAbortLoadGame; - } + // this indirectly calls GameObject::init, which will setup menu, text font/color codes etc. + // without this games would be pretty badly broken } // Show any special warnings for buggy scripts with severe game bugs, -- cgit v1.2.3 From fa04c9dd38ec560427298a705037076a32a9c27a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 27 Aug 2010 23:21:08 +0000 Subject: SCI: Fixed bug #3054613, "QFG character saves, naming convention" svn-id: r52419 --- engines/sci/sci.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index ee2d370b61..c7309a8415 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -639,9 +639,11 @@ Common::String SciEngine::getSavegamePattern() const { Common::String SciEngine::getFilePrefix() const { if (_gameId == GID_QFG2) { // Quest for Glory 2 wants to read files from Quest for Glory 1 (EGA/VGA) to import character data - if (_gamestate->currentRoomNumber() == 805) - return "qfg1"; - // TODO: Include import-room for qfg1vga + if (_gamestate->currentRoomNumber() == 805) { + // Check if there are any QFG1VGA games - bug #3054613 + Common::StringArray saveNames = g_engine->getSaveFileManager()->listSavefiles("qfg1vga-*.sav"); + return (saveNames.size() > 0) ? "qfg1vga" : "qfg1"; + } } else if (_gameId == GID_QFG3) { // Quest for Glory 3 wants to read files from Quest for Glory 2 to import character data if (_gamestate->currentRoomNumber() == 54) -- cgit v1.2.3 From 3f1f894e8eeb091153963b8b936b533f78f17e4a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 29 Aug 2010 00:17:56 +0000 Subject: SCI: Added proper handling of QFG exported character files. Now, QFG2, 3 and 4 may read exported characters from all other QFG games, like the originals did. Fixes bug #3054692 - "QFG2/QFG3 Import issues". svn-id: r52430 --- engines/sci/sci.cpp | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index c7309a8415..cb36ebd0f5 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -637,36 +637,40 @@ Common::String SciEngine::getSavegamePattern() const { } Common::String SciEngine::getFilePrefix() const { - if (_gameId == GID_QFG2) { - // Quest for Glory 2 wants to read files from Quest for Glory 1 (EGA/VGA) to import character data - if (_gamestate->currentRoomNumber() == 805) { - // Check if there are any QFG1VGA games - bug #3054613 - Common::StringArray saveNames = g_engine->getSaveFileManager()->listSavefiles("qfg1vga-*.sav"); - return (saveNames.size() > 0) ? "qfg1vga" : "qfg1"; - } - } else if (_gameId == GID_QFG3) { - // Quest for Glory 3 wants to read files from Quest for Glory 2 to import character data - if (_gamestate->currentRoomNumber() == 54) - return "qfg2"; - } else if (_gameId == GID_QFG4) { - // Quest for Glory 4 wants to read files from Quest for Glory 3 to import character data - if (_gamestate->currentRoomNumber() == 54) - return "qfg3"; - } return _targetName; } Common::String SciEngine::wrapFilename(const Common::String &name) const { - return getFilePrefix() + "-" + name; + // Do not wrap the game prefix when reading files in QFG import screens. + // That way, we can read exported characters from all QFG games, as + // intended. + return !isQFGImportScreen() ? getFilePrefix() + "-" + name : name; } Common::String SciEngine::unwrapFilename(const Common::String &name) const { Common::String prefix = getFilePrefix() + "-"; - if (name.hasPrefix(prefix.c_str())) + // Do not unwrap the file name when reading files in QFG import screens. + // We don't wrap the game ID prefix in these screens in order to read + // save states from all QFG games. + if (name.hasPrefix(prefix.c_str()) && !isQFGImportScreen()) return Common::String(name.c_str() + prefix.size()); return name; } +bool SciEngine::isQFGImportScreen() const { + if (_gameId == GID_QFG2 && _gamestate->currentRoomNumber() == 805) { + // QFG2 character import screen + return true; + } else if (_gameId == GID_QFG3 && _gamestate->currentRoomNumber() == 54) { + // QFG3 character import screen + return true; + } else if (_gameId == GID_QFG4 && _gamestate->currentRoomNumber() == 54) { + return true; + } else { + return false; + } +} + void SciEngine::pauseEngineIntern(bool pause) { _mixer->pauseAll(pause); } -- cgit v1.2.3 From ff7476d9f17c84623d544a2bb68b4cebe9d79fa4 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 29 Aug 2010 15:13:25 +0000 Subject: SCI: adding virtual lists for qfg-import rooms now lists import files of all possible games, adds game title before that, removes game prefixes for all files svn-id: r52441 --- engines/sci/sci.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index cb36ebd0f5..f9f89ea1ae 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -641,34 +641,27 @@ Common::String SciEngine::getFilePrefix() const { } Common::String SciEngine::wrapFilename(const Common::String &name) const { - // Do not wrap the game prefix when reading files in QFG import screens. - // That way, we can read exported characters from all QFG games, as - // intended. - return !isQFGImportScreen() ? getFilePrefix() + "-" + name : name; + return getFilePrefix() + "-" + name; } Common::String SciEngine::unwrapFilename(const Common::String &name) const { Common::String prefix = getFilePrefix() + "-"; - // Do not unwrap the file name when reading files in QFG import screens. - // We don't wrap the game ID prefix in these screens in order to read - // save states from all QFG games. - if (name.hasPrefix(prefix.c_str()) && !isQFGImportScreen()) + if (name.hasPrefix(prefix.c_str())) return Common::String(name.c_str() + prefix.size()); return name; } -bool SciEngine::isQFGImportScreen() const { +int SciEngine::inQfGImportRoom() const { if (_gameId == GID_QFG2 && _gamestate->currentRoomNumber() == 805) { // QFG2 character import screen - return true; + return 2; } else if (_gameId == GID_QFG3 && _gamestate->currentRoomNumber() == 54) { // QFG3 character import screen - return true; + return 3; } else if (_gameId == GID_QFG4 && _gamestate->currentRoomNumber() == 54) { - return true; - } else { - return false; + return 4; } + return 0; } void SciEngine::pauseEngineIntern(bool pause) { -- cgit v1.2.3 From 839945795e25fee251c76e7d88b2a667a8349252 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 31 Aug 2010 10:53:27 +0000 Subject: SCI: enable new kDoBresen/InitBresen enable replacement of save/load dialogs per default add config-var "sci_originalsaveload" for not replacing dialogs add config-var "sci_dither" for enabling dithering in EGA games new kDoBresen fix qfg2 walk against wall bug (#3053131) and hoyle3 unreadable dice bug (#3036922) svn-id: r52467 --- engines/sci/sci.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index f9f89ea1ae..03d065258d 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -257,6 +257,11 @@ Common::Error SciEngine::run() { // Patch in our save/restore code, so that dialogs are replaced patchGameSaveRestore(segMan); + // Switch off undithering, if requested by user + Common::String ditherOption = ConfMan.get("sci_dither"); + if (ditherOption != "") + _gfxScreen->debugUnditherSetState(false); + if (_gameDescription->flags & ADGF_ADDENGLISH) { // if game is multilingual Common::Language selectedLanguage = Common::parseLanguage(ConfMan.get("language")); @@ -348,8 +353,8 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { break; } - Common::String replaceDialogOption = ConfMan.get("scireplacedialog", Common::ConfigManager::kApplicationDomain); - if (replaceDialogOption == "") + Common::String originalSaveLoadOption = ConfMan.get("sci_originalsaveload"); + if (originalSaveLoadOption != "") return; for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) { -- cgit v1.2.3 From 737b9bc632e1d70ae331a53b07411f9efd6c9eee Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 31 Aug 2010 11:27:01 +0000 Subject: SCI: Remove duplicate comment line. svn-id: r52468 --- engines/sci/sci.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 03d065258d..1f53d5ec18 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -274,7 +274,6 @@ Common::Error SciEngine::run() { } } - // Check whether loading a savestate was requested // Check whether loading a savestate was requested int directSaveSlotLoading = ConfMan.getInt("save_slot"); if (directSaveSlotLoading >= 0) { -- cgit v1.2.3 From aae0d9284e96196d96ed76c4bdf0b5086acbe28e Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 31 Aug 2010 11:38:07 +0000 Subject: SCI: renaming config-variables "sci_dither" got removed, "undither" renamed to "sci_undither". Also changed logic for handling "sci_originalsaveload" svn-id: r52469 --- engines/sci/sci.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 1f53d5ec18..28d9e34859 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -179,8 +179,9 @@ Common::Error SciEngine::run() { g_eventRec.registerRandomSource(_rng, "sci"); // Assign default values to the config manager, in case settings are missing - ConfMan.registerDefault("undither", "true"); - ConfMan.registerDefault("enable_fb01", "false"); + ConfMan.registerDefault("sci_undither", "true"); + ConfMan.registerDefault("sci_originalsaveload", "false"); + ConfMan.registerDefault("sci_enable_fb01", "false"); _resMan = new ResourceManager(); assert(_resMan); @@ -208,7 +209,7 @@ Common::Error SciEngine::run() { // Initialize the game screen _gfxScreen = new GfxScreen(_resMan); - _gfxScreen->debugUnditherSetState(ConfMan.getBool("undither")); + _gfxScreen->debugUnditherSetState(ConfMan.getBool("sci_undither")); // Create debugger console. It requires GFX to be initialized _console = new Console(this); @@ -257,11 +258,6 @@ Common::Error SciEngine::run() { // Patch in our save/restore code, so that dialogs are replaced patchGameSaveRestore(segMan); - // Switch off undithering, if requested by user - Common::String ditherOption = ConfMan.get("sci_dither"); - if (ditherOption != "") - _gfxScreen->debugUnditherSetState(false); - if (_gameDescription->flags & ADGF_ADDENGLISH) { // if game is multilingual Common::Language selectedLanguage = Common::parseLanguage(ConfMan.get("language")); @@ -352,8 +348,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { break; } - Common::String originalSaveLoadOption = ConfMan.get("sci_originalsaveload"); - if (originalSaveLoadOption != "") + if (ConfMan.getBool("sci_originalsaveload")) return; for (uint16 kernelNr = 0; kernelNr < kernelCount; kernelNr++) { -- cgit v1.2.3 From 4ecb2b6047744bf5675529b1d6df8b46ef55ac20 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 31 Aug 2010 11:51:43 +0000 Subject: SCI: renaming fb01-enable to "native_fb01" svn-id: r52471 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 28d9e34859..e65fe9ff33 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -181,7 +181,7 @@ Common::Error SciEngine::run() { // Assign default values to the config manager, in case settings are missing ConfMan.registerDefault("sci_undither", "true"); ConfMan.registerDefault("sci_originalsaveload", "false"); - ConfMan.registerDefault("sci_enable_fb01", "false"); + ConfMan.registerDefault("native_fb01", "false"); _resMan = new ResourceManager(); assert(_resMan); -- cgit v1.2.3 From 81eb3cfba157b3c45095734d5e9177a199d0c351 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 1 Sep 2010 09:48:00 +0000 Subject: SCI: disable dialog replacement for jones fixes odd crash right at the start, although you can't save/restore in jones o_O (fixes bug #3057080) svn-id: r52479 --- engines/sci/sci.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index e65fe9ff33..57f9b41140 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -343,6 +343,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { switch (_gameId) { case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs + case GID_JONES: // gets confused, when we patch us in, although the game isn't able to save/restore o_O return; default: break; -- cgit v1.2.3 From 64313cd7f10267c29d7e3b963c7bd0ff2e1c7f1a Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 1 Sep 2010 19:20:17 +0000 Subject: SCI: set master volume correctly and merge it together with global volume, fixes bug #3053104) svn-id: r52484 --- engines/sci/sci.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 57f9b41140..4b5888a245 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -45,6 +45,7 @@ #include "sci/engine/selector.h" // for SELECTOR #include "sci/sound/audio.h" +#include "sci/sound/music.h" #include "sci/sound/soundcmd.h" #include "sci/graphics/animate.h" #include "sci/graphics/cache.h" @@ -678,7 +679,7 @@ void SciEngine::syncSoundSettings() { int soundVolumeMusic = (mute ? 0 : ConfMan.getInt("music_volume")); if (_gamestate && g_sci->_soundCmd) { - int vol = (soundVolumeMusic + 1) * SoundCommandParser::kMaxSciVolume / Audio::Mixer::kMaxMixerVolume; + int vol = (soundVolumeMusic + 1) * MUSIC_MASTERVOLUME_MAX / Audio::Mixer::kMaxMixerVolume; g_sci->_soundCmd->setMasterVolume(vol); } } -- cgit v1.2.3 From d87fa1c8903ba21a2ce5d5946947a50af841700a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 2 Sep 2010 21:50:00 +0000 Subject: SCI: Show a warning window regarding GM in some games. Sierra has released a patch adding after market General MIDI support for 8 SCI1 games (LSL1, LSL5, Hoyle 3, SQ1, SQ4, Eco1 floppy, Longbow and Fairy Tales). If the user has selected the General MIDI music driver in one of these games and no associated MIDI patch is found, show an informational dialog on game startup in order to inform the user to download Sierra's MIDI patch, together with some short instructions. svn-id: r52500 --- engines/sci/sci.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 4b5888a245..8fc0f667d3 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -310,6 +310,39 @@ Common::Error SciEngine::run() { } } + // Show a warning if the user has selected a General MIDI device, no GM patch exists + // (i.e. patch 4) and the game is one of the known 8 SCI1 games that Sierra has provided + // after market patches for in their "General MIDI Utility". + if (_soundCmd->getMusicType() == MT_GM) { + if (!_resMan->findResource(ResourceId(kResourceTypePatch, 4), 0)) { + switch (getGameId()) { + case GID_ECOQUEST: + case GID_HOYLE3: + case GID_LSL1: + case GID_LSL5: + case GID_LONGBOW: + case GID_SQ1: + case GID_SQ4: + case GID_FAIRYTALES: + showScummVMDialog("You have selected General MIDI as a sound device. Sierra " + "has provided after-market support for General MIDI for this " + "game in their \"General MIDI Utility\". Please, apply this " + "patch in order to enjoy MIDI music with this game. Once you " + "have obtained it, you can unpack all of the included *.PAT " + "files in your ScummVM extras folder and ScummVM will add the " + "appropriate patch automatically. Alternatively, you can follow " + "the instructions in the READ.ME file included in the patch and " + "rename the associated *.PAT file to 4.PAT and place it in the " + "game folder. Without this patch, General MIDI music for this " + "game will sound badly distorted."); + break; + default: + break; + } + } + } + + runGame(); ConfMan.flushToDisk(); -- cgit v1.2.3 From cb0e54034dbed6a3fc34b391f42ff5a97b2e26e0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 7 Sep 2010 15:09:59 +0000 Subject: SCI: Now distinguishing between native MT-32 MIDI from GM devices when checking for the existence of after market GM patches svn-id: r52620 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 8fc0f667d3..9170473745 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -313,7 +313,7 @@ Common::Error SciEngine::run() { // Show a warning if the user has selected a General MIDI device, no GM patch exists // (i.e. patch 4) and the game is one of the known 8 SCI1 games that Sierra has provided // after market patches for in their "General MIDI Utility". - if (_soundCmd->getMusicType() == MT_GM) { + if (_soundCmd->getMusicType() == MT_GM && !ConfMan.getBool("native_mt32")) { if (!_resMan->findResource(ResourceId(kResourceTypePatch, 4), 0)) { switch (getGameId()) { case GID_ECOQUEST: -- cgit v1.2.3 From 3e4e74138727c3dc2210694ef2daaae2d0bc22d3 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 8 Sep 2010 12:42:00 +0000 Subject: SCI: don't replace save/restore in hoyle1 fixes hoyle1 not starting anymore svn-id: r52635 --- engines/sci/sci.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 9170473745..e4188a10f1 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -377,7 +377,8 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { switch (_gameId) { case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs - case GID_JONES: // gets confused, when we patch us in, although the game isn't able to save/restore o_O + case GID_JONES: // gets confused, when we patch us in, the game is only able to save to 1 slot, so hooking is not required + case GID_HOYLE1: // gets confused, although the game doesnt support saving/restoring at all return; default: break; -- cgit v1.2.3 From 54865f48371076dd280ad9f22b14e50da62d0eaf Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 8 Sep 2010 12:45:42 +0000 Subject: SCI: dont replace save/restore in hoyle2 too svn-id: r52636 --- engines/sci/sci.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index e4188a10f1..3fe398f426 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -379,6 +379,7 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs case GID_JONES: // gets confused, when we patch us in, the game is only able to save to 1 slot, so hooking is not required case GID_HOYLE1: // gets confused, although the game doesnt support saving/restoring at all + case GID_HOYLE2: // gets confused, see hoyle1 return; default: break; -- cgit v1.2.3