SHERLOCK: 3DO: Hook up Save/Load buttons to ScummVM's dialogs
This commit is contained in:
parent
8b3dd18aca
commit
1f5afe5c84
4 changed files with 62 additions and 19 deletions
|
@ -102,8 +102,7 @@ static const SherlockGameDescription gameDescriptions[] = {
|
||||||
Common::EN_ANY,
|
Common::EN_ANY,
|
||||||
Common::kPlatform3DO,
|
Common::kPlatform3DO,
|
||||||
ADGF_UNSTABLE,
|
ADGF_UNSTABLE,
|
||||||
GUIO6(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVES, GAMEOPTION_FADE_STYLE, GAMEOPTION_HELP_STYLE,
|
GUIO4(GAMEOPTION_FADE_STYLE, GAMEOPTION_HELP_STYLE,GAMEOPTION_PORTRAITS_ON, GAMEOPTION_WINDOW_STYLE)
|
||||||
GAMEOPTION_PORTRAITS_ON, GAMEOPTION_WINDOW_STYLE)
|
|
||||||
},
|
},
|
||||||
GType_SerratedScalpel,
|
GType_SerratedScalpel,
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "engines/util.h"
|
#include "engines/util.h"
|
||||||
|
#include "gui/saveload.h"
|
||||||
|
#include "common/translation.h"
|
||||||
#include "sherlock/scalpel/scalpel.h"
|
#include "sherlock/scalpel/scalpel.h"
|
||||||
#include "sherlock/scalpel/scalpel_fixed_text.h"
|
#include "sherlock/scalpel/scalpel_fixed_text.h"
|
||||||
#include "sherlock/scalpel/scalpel_map.h"
|
#include "sherlock/scalpel/scalpel_map.h"
|
||||||
|
@ -1218,6 +1220,27 @@ void ScalpelEngine::flushBrumwellMirror() {
|
||||||
_screen->slamArea(137, 18, 47, 56);
|
_screen->slamArea(137, 18, 47, 56);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScalpelEngine::showScummVMSaveDialog() {
|
||||||
|
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
|
||||||
|
|
||||||
|
int slot = dialog->runModalWithCurrentTarget();
|
||||||
|
if (slot >= 0) {
|
||||||
|
Common::String desc = dialog->getResultString();
|
||||||
|
|
||||||
|
saveGameState(slot, desc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScalpelEngine::showScummVMRestoreDialog() {
|
||||||
|
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
|
||||||
|
|
||||||
|
int slot = dialog->runModalWithCurrentTarget();
|
||||||
|
if (slot >= 0) {
|
||||||
|
loadGameState(slot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Scalpel
|
} // End of namespace Scalpel
|
||||||
|
|
||||||
} // End of namespace Sherlock
|
} // End of namespace Sherlock
|
||||||
|
|
|
@ -128,6 +128,16 @@ public:
|
||||||
* This clears the mirror in scene 12 (mansion drawing room) in case anything messed draw over it
|
* This clears the mirror in scene 12 (mansion drawing room) in case anything messed draw over it
|
||||||
*/
|
*/
|
||||||
void flushBrumwellMirror();
|
void flushBrumwellMirror();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the ScummVM restore savegame dialog
|
||||||
|
*/
|
||||||
|
void showScummVMSaveDialog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the ScummVM restore savegame dialog
|
||||||
|
*/
|
||||||
|
void showScummVMRestoreDialog();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Scalpel
|
} // End of namespace Scalpel
|
||||||
|
|
|
@ -1273,6 +1273,7 @@ void ScalpelUserInterface::doLookControl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScalpelUserInterface::doMainControl() {
|
void ScalpelUserInterface::doMainControl() {
|
||||||
|
ScalpelEngine &vm = *(ScalpelEngine *)_vm;
|
||||||
Events &events = *_vm->_events;
|
Events &events = *_vm->_events;
|
||||||
ScalpelInventory &inv = *(ScalpelInventory *)_vm->_inventory;
|
ScalpelInventory &inv = *(ScalpelInventory *)_vm->_inventory;
|
||||||
ScalpelSaveManager &saves = *(ScalpelSaveManager *)_vm->_saves;
|
ScalpelSaveManager &saves = *(ScalpelSaveManager *)_vm->_saves;
|
||||||
|
@ -1382,24 +1383,34 @@ void ScalpelUserInterface::doMainControl() {
|
||||||
journalControl();
|
journalControl();
|
||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
pushButton(10);
|
if (IS_3DO) {
|
||||||
|
if (_temp == 10) {
|
||||||
// Create a thumbnail of the current screen before the files dialog is shown, in case
|
pushButton(10);
|
||||||
// the user saves the game
|
vm.showScummVMRestoreDialog();
|
||||||
saves.createThumbnail();
|
} else if (_temp == 11) {
|
||||||
|
pushButton(11);
|
||||||
_selector = _oldSelector = -1;
|
vm.showScummVMSaveDialog();
|
||||||
|
}
|
||||||
if (_vm->_showOriginalSavesDialog) {
|
|
||||||
// Show the original dialog
|
|
||||||
_menuMode = FILES_MODE;
|
|
||||||
saves.drawInterface();
|
|
||||||
_windowOpen = true;
|
|
||||||
} else {
|
} else {
|
||||||
// Show the ScummVM GMM instead
|
pushButton(10);
|
||||||
_vm->_canLoadSave = true;
|
|
||||||
_vm->openMainMenuDialog();
|
// Create a thumbnail of the current screen before the files dialog is shown, in case
|
||||||
_vm->_canLoadSave = false;
|
// the user saves the game
|
||||||
|
saves.createThumbnail();
|
||||||
|
|
||||||
|
_selector = _oldSelector = -1;
|
||||||
|
|
||||||
|
if (_vm->_showOriginalSavesDialog) {
|
||||||
|
// Show the original dialog
|
||||||
|
_menuMode = FILES_MODE;
|
||||||
|
saves.drawInterface();
|
||||||
|
_windowOpen = true;
|
||||||
|
} else {
|
||||||
|
// Show the ScummVM GMM instead
|
||||||
|
_vm->_canLoadSave = true;
|
||||||
|
_vm->openMainMenuDialog();
|
||||||
|
_vm->_canLoadSave = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue