mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 11:11:28 +00:00
Add support for version key in The Dig
svn-id: r14285
This commit is contained in:
parent
8ad464b498
commit
6225285a59
@ -77,7 +77,8 @@ static ResString string_map_table_v7[] = {
|
||||
{73, "cancel"}, //boot11
|
||||
{74, "quit"}, //boot12
|
||||
{75, "ok"}, //boot13
|
||||
{85, "game paused"}, // boot3
|
||||
{85, "game paused"}, // boot3
|
||||
{96, "the dig v1.0"},
|
||||
|
||||
/* this is the almost complete string map for v7
|
||||
{63, "how may I serve you?"},
|
||||
@ -602,8 +603,8 @@ void InfoDialog::setInfoText(const String& message) {
|
||||
|
||||
#pragma mark -
|
||||
|
||||
PauseDialog::PauseDialog(ScummEngine *scumm)
|
||||
: InfoDialog(scumm, 10) {
|
||||
PauseDialog::PauseDialog(ScummEngine *scumm, int res)
|
||||
: InfoDialog(scumm, res) {
|
||||
}
|
||||
|
||||
void PauseDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
|
||||
|
@ -141,7 +141,7 @@ protected:
|
||||
|
||||
class PauseDialog : public InfoDialog {
|
||||
public:
|
||||
PauseDialog(ScummEngine *scumm);
|
||||
PauseDialog(ScummEngine *scumm, int res);
|
||||
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
|
||||
};
|
||||
|
||||
|
@ -372,7 +372,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_version(gs.version),
|
||||
_heversion(gs.heversion),
|
||||
_features(gs.features),
|
||||
gdi(this), _pauseDialog(0), _optionsDialog(0), _mainMenuDialog(0),
|
||||
gdi(this), _pauseDialog(0), _optionsDialog(0), _mainMenuDialog(0), _versionDialog(0),
|
||||
_targetName(detector->_targetName) {
|
||||
|
||||
// Add default file directories.
|
||||
@ -437,6 +437,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_pauseDialog = NULL;
|
||||
_optionsDialog = NULL;
|
||||
_mainMenuDialog = NULL;
|
||||
_versionDialog = NULL;
|
||||
_fastMode = 0;
|
||||
_actors = NULL;
|
||||
_inventory = NULL;
|
||||
@ -946,6 +947,7 @@ ScummEngine::~ScummEngine() {
|
||||
delete _pauseDialog;
|
||||
delete _optionsDialog;
|
||||
delete _mainMenuDialog;
|
||||
delete _versionDialog;
|
||||
|
||||
delete _sound;
|
||||
free(_languageBuffer);
|
||||
@ -2009,6 +2011,13 @@ void ScummEngine::processKbd(bool smushMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// COMI version string is hard coded
|
||||
// FT version strings are partly hard coded too
|
||||
if (_gameId == GID_DIG && _lastKeyHit == VAR(VAR_VERSION)) {
|
||||
versionDialog();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_version <= 2) || (_features & GF_FMTOWNS))
|
||||
saveloadkey = 5; // F5
|
||||
else if ((_version <= 3) || (_gameId == GID_SAMNMAX) || (_gameId == GID_CMI))
|
||||
@ -2694,10 +2703,16 @@ int ScummEngine::runDialog(Dialog &dialog) {
|
||||
|
||||
void ScummEngine::pauseDialog() {
|
||||
if (!_pauseDialog)
|
||||
_pauseDialog = new PauseDialog(this);
|
||||
_pauseDialog = new PauseDialog(this, 10);
|
||||
runDialog(*_pauseDialog);
|
||||
}
|
||||
|
||||
void ScummEngine::versionDialog() {
|
||||
if (!_versionDialog)
|
||||
_versionDialog = new PauseDialog(this, 11);
|
||||
runDialog(*_versionDialog);
|
||||
}
|
||||
|
||||
void ScummEngine::mainMenuDialog() {
|
||||
if (!_mainMenuDialog)
|
||||
_mainMenuDialog = new MainMenuDialog(this);
|
||||
|
@ -418,6 +418,7 @@ public:
|
||||
|
||||
protected:
|
||||
Dialog *_pauseDialog;
|
||||
Dialog *_versionDialog;
|
||||
Dialog *_optionsDialog;
|
||||
Dialog *_mainMenuDialog;
|
||||
|
||||
@ -426,6 +427,7 @@ protected:
|
||||
void confirmexitDialog();
|
||||
void confirmrestartDialog();
|
||||
void pauseDialog();
|
||||
void versionDialog();
|
||||
void mainMenuDialog();
|
||||
public:
|
||||
void optionsDialog(); // Used by MainMenuDialog::handleCommand()
|
||||
|
Loading…
x
Reference in New Issue
Block a user