AVALANCHE: Move wipeText() from Basher to Parser, implement it. Fix parts of Acci::do_that().

This commit is contained in:
uruk 2013-07-29 11:27:31 +02:00
parent e08980c7a4
commit e32110339e
6 changed files with 27 additions and 12 deletions

View file

@ -1121,13 +1121,16 @@ void Acci::do_that() {
if (thats == Common::String(nowt)) {
thats = "";
if (!thats.empty())
thats.clear();
return;
}
if (_vm->_gyro->weirdword)
return;
if (thing < '\310')
thing -= 49; /* "Slip" */
if (thing < 200)
thing -= 49; // "Slip"
/*
if ((!_vm->_gyro->alive) &
@ -1760,12 +1763,12 @@ void Acci::do_that() {
switch (person) {
case pardon:
case _vm->_gyro->pavalot:
case '\0':
case 0:
if (!_vm->_gyro->dna.avvy_is_awake) {
_vm->_gyro->dna.avvy_is_awake = true;
_vm->_lucerna->points(1);
_vm->_gyro->dna.avvy_in_bed = true;
_vm->_celer->show_one(3); /* Picture of Avvy, awake in bed. */
_vm->_celer->show_one(2); /* Picture of Avvy, awake in bed. */
if (_vm->_gyro->dna.teetotal)
_vm->_visa->dixi('d', 13);
} else

View file

@ -123,7 +123,7 @@ public:
Common::String thats;
Common::String unknown;
Common::String realwords[11];
char verb, person, thing, thing2;
byte verb, person, thing, thing2;
bool polite;

View file

@ -78,10 +78,6 @@ void Basher::init() {
#endif
}
void Basher::wipetext() {
warning("STUB: Basher::wipetext()");
}
/*procedure cursor;
begin
if curflash=0 then

View file

@ -70,8 +70,6 @@ private:
bool entering_filename;
void wipetext();
char firstchar(Common::String x);
void typein();

View file

@ -79,6 +79,8 @@ void Parser::handleReturn() {
_inputTextBackup = _inputText;
_vm->_acci->parse();
_vm->_acci->do_that();
_inputText.clear();
wipeText();
}
}
}
@ -148,4 +150,18 @@ void Parser::drawCursor() {
_vm->_trip->getset[fv].remember(bf);
}
void Parser::wipeText() {
if (_vm->_gyro->mouse_near_text())
_vm->_gyro->super_off();
cursorOff();
_vm->_graphics->drawBar(24, 161, 640, 169, black); // Black out the line of the text.
_quote = true;
_inputTextPos = 0;
cursorOn();
_vm->_gyro->super_on();
}
} // End of namespace Avalanche

View file

@ -65,6 +65,8 @@ private:
void drawCursor();
void wipeText();
};
} // End of namespace Avalanche