aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/input.cpp
diff options
context:
space:
mode:
authorAndre Heider2009-08-12 07:37:45 +0000
committerAndre Heider2009-08-12 07:37:45 +0000
commitca7b4db0ae66fd93b5d4da91e067c80be6c50d3f (patch)
treeb444742eb4ad680b2f8f30e8d7fef2ef3aa29959 /engines/agos/input.cpp
parentdd9ceafb8b61429d63cb6d961bf5d7c3dd63c844 (diff)
downloadscummvm-rg350-ca7b4db0ae66fd93b5d4da91e067c80be6c50d3f.tar.gz
scummvm-rg350-ca7b4db0ae66fd93b5d4da91e067c80be6c50d3f.tar.bz2
scummvm-rg350-ca7b4db0ae66fd93b5d4da91e067c80be6c50d3f.zip
Removed duplicated functions.
svn-id: r43314
Diffstat (limited to 'engines/agos/input.cpp')
-rw-r--r--engines/agos/input.cpp137
1 files changed, 0 insertions, 137 deletions
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 82747dbfb9..35ed045675 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -624,141 +624,4 @@ bool AGOSEngine::processSpecialKeys() {
return verbCode;
}
-// Personal Nightmare specific
-void AGOSEngine_PN::clearInputLine() {
- _inputting = false;
- _inputReady = false;
- clearWindow(_windowArray[2]);
-}
-
-void AGOSEngine_PN::handleKeyboard() {
- if (!_inputReady)
- return;
-
- if (_hitCalled != 0) {
- mouseHit();
- }
-
- int16 chr = -1;
- if (_mouseString) {
- const char *strPtr = _mouseString;
- while (*strPtr != 0 && *strPtr != 13)
- addChar(*strPtr++);
- _mouseString = 0;
-
- chr = *strPtr;
- if (chr == 13) {
- addChar(13);
- }
- }
- if (_mouseString1 && chr != 13) {
- const char *strPtr = _mouseString1;
- while (*strPtr != 13)
- addChar(*strPtr++);
- _mouseString1 = 0;
-
- chr = *strPtr;
- if (chr == 13) {
- addChar(13);
- }
- }
- if (chr == -1) {
- if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || _keyPressed.keycode == Common::KEYCODE_RETURN) {
- chr = _keyPressed.keycode;
- addChar(chr);
- } else if (!(_videoLockOut & 0x10)) {
- chr = _keyPressed.ascii;
- if (chr >= 32)
- addChar(chr);
- }
- }
-
- if (chr == 13) {
- _mouseString = 0;
- _mouseString1 = 0;
- _mousePrintFG = 0;
- _inputReady = false;
- }
-
- _keyPressed.reset();
-}
-
-void AGOSEngine_PN::interact(char *buffer, uint8 size) {
- if (!_inputting) {
- memset(_keyboardBuffer, 0, sizeof(_keyboardBuffer));
- _intputCounter = 0;
- _inputMax = size;
- _inputWindow = _windowArray[_curWindow];
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
- _inputting = true;
- _inputReady = true;
- }
-
- while (!shouldQuit() && _inputReady) {
- if (!_noScanFlag && _scanFlag) {
- buffer[0] = 1;
- buffer[1] = 0;
- _scanFlag = 0;
- break;
- }
- delay(1);
- }
-
- if (!_inputReady) {
- memcpy(buffer, _keyboardBuffer, size);
- _inputting = false;
- }
-}
-
-void AGOSEngine_PN::addChar(uint8 chr) {
- if (chr == 13) {
- _keyboardBuffer[_intputCounter++] = chr;
- windowPutChar(_inputWindow, 13);
- } else if (chr == 8 && _intputCounter) {
- clearCursor(_inputWindow);
- windowPutChar(_inputWindow, 8);
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
-
- _keyboardBuffer[--_intputCounter] = 0;
- } else if (chr >= 32 && _intputCounter < _inputMax) {
- _keyboardBuffer[_intputCounter++] = chr;
-
- clearCursor(_inputWindow);
- windowPutChar(_inputWindow, chr);
- windowPutChar(_inputWindow, 128);
- windowPutChar(_inputWindow, 8);
- }
-}
-
-void AGOSEngine_PN::clearCursor(WindowBlock *window) {
- byte oldTextColor = window->textColor;
-
- window->textColor = window->fillColor;
- windowPutChar(window, 128);
- window->textColor = oldTextColor;
-
- windowPutChar(window, 8);
-}
-
-bool AGOSEngine_PN::processSpecialKeys() {
- if (shouldQuit())
- _exitCutscene = true;
-
- switch (_keyPressed.keycode) {
- case Common::KEYCODE_ESCAPE:
- _exitCutscene = true;
- break;
- case Common::KEYCODE_PAUSE:
- pause();
- break;
- default:
- break;
- }
-
- _keyPressed.reset();
- return false;
-}
-
} // End of namespace AGOS