diff options
Diffstat (limited to 'engines/avalanche/parser.cpp')
-rw-r--r-- | engines/avalanche/parser.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index 86f46c1f08..4ce8249eb0 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -93,16 +93,7 @@ void Parser::plotText() { _vm->_graphics->drawBar(24, 161, 640, 169, black); // Black out the line of the text. - // Draw the text. Similar to chalk(), but here we don't have to bother with the color of the characters. - for (byte i = 0; i < _vm->_parser->_inputText.size(); i++) - for (byte j = 0; j < 8; j++) { - byte pixel = _vm->_gyro->characters[_vm->_parser->_inputText[i]][j]; - for (byte bit = 0; bit < 8; bit++) { - byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *_vm->_graphics->getPixel(24 + i * 8 + 7 - bit, 161 + j) = white; - } - } + _vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->characters, 8, 24, 161, white); cursorOn(); _vm->_gyro->super_on(); @@ -134,19 +125,9 @@ int16 Parser::pos(const Common::String &crit, const Common::String &src) { } void Parser::drawCursor() { - // Draw the '_' character. Similar to plotText(). - char cursor = '_'; - - for (byte j = 0; j < 8; j++) { - byte pixel = _vm->_gyro->characters[cursor][j]; - for (byte bit = 0; bit < 8; bit++) { - byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *_vm->_graphics->getPixel(24 + _inputTextPos * 8 + 7 - bit, 161 + j) = white; - } - } - - + // Draw the '_' character. + for (byte bit = 0; bit < 8; bit++) + *_vm->_graphics->getPixel(24 + _inputTextPos * 8 + 7 - bit, 168) = white; bytefield bf; bf.x1 = _inputTextPos + 1; |