[Scummvm-cvs-logs] scummvm master -> c8ac76b22bfd676bb72a850a141730022d6d476c
eriktorbjorn
eriktorbjorn at telia.com
Mon Apr 6 10:43:52 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c8ac76b22b MADS: Show first character of the Rex Nebular copy protection word
Commit: c8ac76b22bfd676bb72a850a141730022d6d476c
https://github.com/scummvm/scummvm/commit/c8ac76b22bfd676bb72a850a141730022d6d476c
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-04-06T10:42:16+02:00
Commit Message:
MADS: Show first character of the Rex Nebular copy protection word
Changed paths:
engines/mads/nebular/dialogs_nebular.cpp
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 731e7e9..1071579 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -438,24 +438,31 @@ void CopyProtectionDialog::show() {
_vm->_screen.copyRectToScreen(inputArea);
_vm->_screen.updateScreen();
+ bool firstTime = true;
+
while (!_vm->shouldQuit()) {
- while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) {
- _vm->_events->delay(1);
- }
+ if (!firstTime) {
+ while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) {
+ _vm->_events->delay(1);
+ }
- if (_vm->shouldQuit())
- break;
+ if (_vm->shouldQuit())
+ break;
- curKey = _vm->_events->getKey();
-
- if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER)
- break;
- else if (curKey.keycode == Common::KEYCODE_BACKSPACE)
- _textInput.deleteLastChar();
- else if (_textInput.size() < 14)
- _textInput += curKey.ascii;
+ curKey = _vm->_events->getKey();
+
+ if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER)
+ break;
+ else if (curKey.keycode == Common::KEYCODE_BACKSPACE)
+ _textInput.deleteLastChar();
+ else if (_textInput.size() < 14)
+ _textInput += curKey.ascii;
- _vm->_events->_pendingKeys.clear();
+ _vm->_events->_pendingKeys.clear();
+ } else {
+ firstTime = false;
+ _textInput = _hogEntry._word[0];
+ }
_vm->_screen.copyFrom(origInput, Common::Rect(0, 0, inputArea.width(), inputArea.height()), Common::Point(inputArea.left, inputArea.top));
_font->writeString(&_vm->_screen, _textInput,
More information about the Scummvm-git-logs
mailing list