aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-29 11:27:31 +0200
committeruruk2013-07-29 11:27:31 +0200
commite32110339e710072b2f3bbf12b3248d26f2a6032 (patch)
treeaa4f7a6279ff396a83bb459649ef7be80b380f96 /engines/avalanche
parente08980c7a4ac8b56f4503205dd8488e91d14fddf (diff)
downloadscummvm-rg350-e32110339e710072b2f3bbf12b3248d26f2a6032.tar.gz
scummvm-rg350-e32110339e710072b2f3bbf12b3248d26f2a6032.tar.bz2
scummvm-rg350-e32110339e710072b2f3bbf12b3248d26f2a6032.zip
AVALANCHE: Move wipeText() from Basher to Parser, implement it. Fix parts of Acci::do_that().
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/acci2.cpp13
-rw-r--r--engines/avalanche/acci2.h2
-rw-r--r--engines/avalanche/basher2.cpp4
-rw-r--r--engines/avalanche/basher2.h2
-rw-r--r--engines/avalanche/parser.cpp16
-rw-r--r--engines/avalanche/parser.h2
6 files changed, 27 insertions, 12 deletions
diff --git a/engines/avalanche/acci2.cpp b/engines/avalanche/acci2.cpp
index 914ca545dc..1f237a8a89 100644
--- a/engines/avalanche/acci2.cpp
+++ b/engines/avalanche/acci2.cpp
@@ -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
diff --git a/engines/avalanche/acci2.h b/engines/avalanche/acci2.h
index 6a42c083fd..0660f497b3 100644
--- a/engines/avalanche/acci2.h
+++ b/engines/avalanche/acci2.h
@@ -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;
diff --git a/engines/avalanche/basher2.cpp b/engines/avalanche/basher2.cpp
index 0df3b39b0d..6bbf8b290f 100644
--- a/engines/avalanche/basher2.cpp
+++ b/engines/avalanche/basher2.cpp
@@ -78,10 +78,6 @@ void Basher::init() {
#endif
}
-void Basher::wipetext() {
- warning("STUB: Basher::wipetext()");
-}
-
/*procedure cursor;
begin
if curflash=0 then
diff --git a/engines/avalanche/basher2.h b/engines/avalanche/basher2.h
index bc62fe67cf..f4a78f4d42 100644
--- a/engines/avalanche/basher2.h
+++ b/engines/avalanche/basher2.h
@@ -70,8 +70,6 @@ private:
bool entering_filename;
- void wipetext();
-
char firstchar(Common::String x);
void typein();
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 5a23a24e69..5fbc31e594 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -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
diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h
index 1cfb21bb52..2a34839920 100644
--- a/engines/avalanche/parser.h
+++ b/engines/avalanche/parser.h
@@ -65,6 +65,8 @@ private:
void drawCursor();
+ void wipeText();
+
};
} // End of namespace Avalanche