diff options
author | Travis Howell | 2004-07-20 11:30:15 +0000 |
---|---|---|
committer | Travis Howell | 2004-07-20 11:30:15 +0000 |
commit | 6225285a59f11df5acbe3ac1e64f1592a8a441e1 (patch) | |
tree | 41fc2c67a715617164c8c555e1f12af40d801bd9 | |
parent | 8ad464b49863c8842426a6fe839faf2ddd54d926 (diff) | |
download | scummvm-rg350-6225285a59f11df5acbe3ac1e64f1592a8a441e1.tar.gz scummvm-rg350-6225285a59f11df5acbe3ac1e64f1592a8a441e1.tar.bz2 scummvm-rg350-6225285a59f11df5acbe3ac1e64f1592a8a441e1.zip |
Add support for version key in The Dig
svn-id: r14285
-rw-r--r-- | scumm/dialogs.cpp | 7 | ||||
-rw-r--r-- | scumm/dialogs.h | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 19 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
4 files changed, 24 insertions, 6 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index d2534e6b7b..edf71a0c62 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -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) { diff --git a/scumm/dialogs.h b/scumm/dialogs.h index 54a260b621..ad0cdcc541 100644 --- a/scumm/dialogs.h +++ b/scumm/dialogs.h @@ -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); }; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 90475c65c6..525896872d 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -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); diff --git a/scumm/scumm.h b/scumm/scumm.h index 4a4cd4e1dd..ceaac6c4f8 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -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() |