diff options
author | uruk | 2013-07-27 21:48:28 +0200 |
---|---|---|
committer | uruk | 2013-07-27 21:48:28 +0200 |
commit | 31f8e91444a17c9d48cbcb409c067d470cb7c36a (patch) | |
tree | 3c8508cebe7f7f42eb7692f4b90a6b92fc754859 /engines | |
parent | eec48fa42e83f7bf364d61c8d2d687ad2a758830 (diff) | |
download | scummvm-rg350-31f8e91444a17c9d48cbcb409c067d470cb7c36a.tar.gz scummvm-rg350-31f8e91444a17c9d48cbcb409c067d470cb7c36a.tar.bz2 scummvm-rg350-31f8e91444a17c9d48cbcb409c067d470cb7c36a.zip |
AVALANCHE: Rename variables in Parser. Add _leftMargin to Parser. Fix _leftMargins in Basher.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/avalot.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/basher2.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/basher2.h | 1 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 14 | ||||
-rw-r--r-- | engines/avalanche/parser.h | 7 |
5 files changed, 17 insertions, 17 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index ceaf754601..772a6c7573 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -89,8 +89,8 @@ void Avalot::setup() { _vm->_lucerna->load_digits(); _vm->_gyro->cheat = false; _vm->_gyro->cp = 0; - _vm->_parser->inputTextPos = 0; - _vm->_parser->quote = true; + _vm->_parser->_inputTextPos = 0; + _vm->_parser->_quote = true; _vm->_gyro->ledstatus = 177; _vm->_gyro->defaultled = 2; /* TSkellern:=0; { Replace with a more local variable sometime }*/ diff --git a/engines/avalanche/basher2.cpp b/engines/avalanche/basher2.cpp index c91b3af751..dcd315839a 100644 --- a/engines/avalanche/basher2.cpp +++ b/engines/avalanche/basher2.cpp @@ -179,10 +179,10 @@ void Basher::filename_edit() { void Basher::normal_edit() { entering_filename = false; - left_margin = 1; - if (!_vm->_parser->inputText.empty()) - _vm->_parser->inputText.clear(); - _vm->_parser->inputTextPos = 0; + _vm->_parser->_leftMargin = 0; + if (!_vm->_parser->_inputText.empty()) + _vm->_parser->_inputText.clear(); + _vm->_parser->_inputTextPos = 0; } } // End of namespace Avalanche. diff --git a/engines/avalanche/basher2.h b/engines/avalanche/basher2.h index 3459144cd4..0c865d43d3 100644 --- a/engines/avalanche/basher2.h +++ b/engines/avalanche/basher2.h @@ -73,7 +73,6 @@ private: AvalancheEngine *_vm; bool entering_filename; - byte left_margin; void wipetext(); diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index d8cd37a236..7429fd9820 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -39,17 +39,17 @@ void Parser::handleInputText(const Common::Event &event) { if (_vm->_dropdown->ddm_o.menunow) { _vm->_dropdown->parsekey(inChar, _vm->_enhanced->extd); } else { - if (inputText.size() < 76) { + if (_inputText.size() < 76) { if ((inChar == '"') || (inChar == '`')) { - if (quote) + if (_quote) inChar = '`'; else inChar = '"'; - quote = !quote; // quote - unquote + _quote = !_quote; // quote - unquote } - inputText.insertChar(inChar, inputTextPos); - inputTextPos++; + _inputText.insertChar(inChar, _inputTextPos); + _inputTextPos++; plotText(); } else _vm->_gyro->blip(); @@ -65,9 +65,9 @@ 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 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]; + 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) diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h index da6ef6eabc..e10ca15b82 100644 --- a/engines/avalanche/parser.h +++ b/engines/avalanche/parser.h @@ -35,9 +35,10 @@ class AvalancheEngine; class Parser { public: - Common::String inputText; - byte inputTextPos; - bool quote; // 66 or 99 next? + Common::String _inputText; + byte _inputTextPos; + bool _quote; // 66 or 99 next? + byte _leftMargin; |