diff options
| author | Filippos Karapetis | 2007-08-02 01:04:44 +0000 |
|---|---|---|
| committer | Filippos Karapetis | 2007-08-02 01:04:44 +0000 |
| commit | 63f3d5b253fb38e810480d786369eeb1bed5f49e (patch) | |
| tree | 7ef8b0245f381e4558c191985428b8489ee47990 /engines/saga/interface.cpp | |
| parent | 6a82a3fbfcfda201655b55aea5fec13762e3cd95 (diff) | |
| download | scummvm-rg350-63f3d5b253fb38e810480d786369eeb1bed5f49e.tar.gz scummvm-rg350-63f3d5b253fb38e810480d786369eeb1bed5f49e.tar.bz2 scummvm-rg350-63f3d5b253fb38e810480d786369eeb1bed5f49e.zip | |
Partially implemented opcodes 87, 88 and 89, used in the help system of the IHNM demo. It's still buggy, though
svn-id: r28398
Diffstat (limited to 'engines/saga/interface.cpp')
| -rw-r--r-- | engines/saga/interface.cpp | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 941262e10e..6811f5ecd0 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -463,12 +463,18 @@ void Interface::setMode(int mode) { _vm->_render->setFlag(RF_DEMO_SUBST); break; case kPanelProtect: - _protectPanel.currentButton = NULL; - _textInputMaxWidth = _protectEdit->width - 10; - _textInput = true; - _textInputString[0] = 0; - _textInputStringLength = 0; - _textInputPos = _textInputStringLength + 1; + if (_vm->getGameType() == GType_ITE) { + // This is used as the copy protection panel in ITE + _protectPanel.currentButton = NULL; + _textInputMaxWidth = _protectEdit->width - 10; + _textInput = true; + _textInputString[0] = 0; + _textInputStringLength = 0; + _textInputPos = _textInputStringLength + 1; + } else { + // In the IHNM demo, this panel mode is set by the scripts + // to flip through the pages of the help system + } break; } @@ -671,18 +677,25 @@ bool Interface::processAscii(uint16 ascii) { keyBossExit(); break; case kPanelProtect: - if (_textInput && processTextInput(ascii)) { - return true; - } + if (_vm->getGameType() == GType_ITE) { + if (_textInput && processTextInput(ascii)) { + return true; + } - if (ascii == 27 || ascii == 13) { // Esc or Enter - _vm->_script->wakeUpThreads(kWaitTypeRequest); - _vm->_interface->setMode(kPanelMain); - - _protectHash = 0; + if (ascii == 27 || ascii == 13) { // Esc or Enter + _vm->_script->wakeUpThreads(kWaitTypeRequest); + _vm->_interface->setMode(kPanelMain); + + _protectHash = 0; - for (char *p = _textInputString; *p; p++) - _protectHash = (_protectHash << 1) + toupper(*p); + for (char *p = _textInputString; *p; p++) + _protectHash = (_protectHash << 1) + toupper(*p); + } + } else { + // In the IHNM demo, this panel mode is set by the scripts + // to flip through the pages of the help system + // Any keypress here returns the user back to the game + _vm->_scene->clearPsychicProfile(); } break; case kPanelPlacard: |
