diff options
author | Walter van Niftrik | 2018-08-02 10:56:49 +0200 |
---|---|---|
committer | Walter van Niftrik | 2019-07-16 16:24:19 +0200 |
commit | ce8a8409332ff28a80de918a5771baa20d6980d1 (patch) | |
tree | 99ce86ba7c7d343b8951490c41644e9383f342fe /engines/adl/adl.cpp | |
parent | 0cd761086a72e9fd83c23f1c6267fe79829f3f07 (diff) | |
download | scummvm-rg350-ce8a8409332ff28a80de918a5771baa20d6980d1.tar.gz scummvm-rg350-ce8a8409332ff28a80de918a5771baa20d6980d1.tar.bz2 scummvm-rg350-ce8a8409332ff28a80de918a5771baa20d6980d1.zip |
ADL: Remove APPLECHAR macro
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r-- | engines/adl/adl.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index 5da587f391..f8d61e563d 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -182,7 +182,7 @@ Common::String AdlEngine::inputString(byte prompt) const { Common::String native; for (uint i = 0; i < line.size(); ++i) - native += APPLECHAR(line[i]); + native += _display->asciiToNative(line[i]); _display->printString(native); // Set pause flag to activate regular behaviour of delay and inputKey @@ -214,7 +214,7 @@ Common::String AdlEngine::inputString(byte prompt) const { case Common::KEYCODE_BACKSPACE | 0x80: if (!s.empty()) { _display->moveCursorBackward(); - _display->setCharAtCursor(APPLECHAR(' ')); + _display->setCharAtCursor(_display->asciiToNative(' ')); s.deleteLastChar(); } break; @@ -233,7 +233,7 @@ byte AdlEngine::inputKey(bool showCursor) const { // If debug script is active, we fake a return press for the text overflow handling if (_inputScript && !_scriptPaused) - return APPLECHAR('\r'); + return _display->asciiToNative('\r'); if (showCursor) _display->showCursor(true); @@ -257,7 +257,7 @@ byte AdlEngine::inputKey(bool showCursor) const { // If debug script was activated in the meantime, abort input if (_inputScript && !_scriptPaused) - return APPLECHAR('\r'); + return _display->asciiToNative('\r'); _display->copyTextSurface(); g_system->delayMillis(16); @@ -991,7 +991,7 @@ byte AdlEngine::convertKey(uint16 ascii) const { Common::String AdlEngine::getLine() { while (1) { - Common::String line = inputString(APPLECHAR('?')); + Common::String line = inputString(_display->asciiToNative('?')); if (shouldQuit() || _isRestoring) return Common::String(); @@ -1010,9 +1010,10 @@ Common::String AdlEngine::getLine() { Common::String AdlEngine::getWord(const Common::String &line, uint &index) const { Common::String str; + const char spaceChar = _display->asciiToNative(' '); for (uint i = 0; i < 8; ++i) - str += APPLECHAR(' '); + str += spaceChar; int copied = 0; @@ -1020,7 +1021,7 @@ Common::String AdlEngine::getWord(const Common::String &line, uint &index) const while (1) { if (index == line.size()) return str; - if (line[index] != APPLECHAR(' ')) + if (line[index] != spaceChar) break; ++index; } @@ -1032,7 +1033,7 @@ Common::String AdlEngine::getWord(const Common::String &line, uint &index) const index++; - if (index == line.size() || line[index] == APPLECHAR(' ')) + if (index == line.size() || line[index] == spaceChar) return str; } } @@ -1249,7 +1250,7 @@ int AdlEngine::o_restart(ScriptEnv &e) { _display->printString(_strings.playAgain); Common::String input = inputString(); - if (input.size() == 0 || input[0] != APPLECHAR('N')) { + if (input.size() == 0 || input[0] != _display->asciiToNative('N')) { _isRestarting = true; _graphics->clearScreen(); _display->copyGfxSurface(); |