aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-08-09 15:42:10 +0200
committeruruk2013-08-09 15:42:10 +0200
commit288abffafa889de25766f6c12c74a6d613c3b3bc (patch)
tree6990f1c0b246683d3153446831ae76d0c5cc4363 /engines
parent1443d8ce16fb870cddae900e15e0410f8ba085d5 (diff)
downloadscummvm-rg350-288abffafa889de25766f6c12c74a6d613c3b3bc.tar.gz
scummvm-rg350-288abffafa889de25766f6c12c74a6d613c3b3bc.tar.bz2
scummvm-rg350-288abffafa889de25766f6c12c74a6d613c3b3bc.zip
AVALANCHE: Repair Visa::unskrimble() and Scrolls::calldrivers().
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/gyro2.h2
-rw-r--r--engines/avalanche/roomnums.h3
-rw-r--r--engines/avalanche/scrolls2.cpp25
-rw-r--r--engines/avalanche/timeout2.cpp4
-rw-r--r--engines/avalanche/visa2.cpp2
5 files changed, 18 insertions, 18 deletions
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index 7573581047..854b5dfcc8 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -543,7 +543,7 @@ public:
byte cp, ledstatus, defaultled;
raw characters;
bool alive;
- char buffer[2000];
+ byte buffer[2000];
uint16 bufsize;
byte oldjw; /* Old joystick-way */
diff --git a/engines/avalanche/roomnums.h b/engines/avalanche/roomnums.h
index 9d31777da0..a6cb93b3a8 100644
--- a/engines/avalanche/roomnums.h
+++ b/engines/avalanche/roomnums.h
@@ -36,8 +36,7 @@ const byte r__nowhere = 0;
const byte r__yours = 1;
const byte r__outsideyours = 2;
const byte r__outsidespludwicks = 3;
-/*{ a corridor in your castle. = 3 }
-{ outside your castle = 5; }*/
+//{ outside your castle = 5; }
const byte r__musicroom = 7;
const byte r__outsideargentpub = 9;
const byte r__argentroad = 10;
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index e7c6eb0770..556658c5b6 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -265,7 +265,8 @@ void Scrolls::resetscrolldriver() { /* phew */
void Scrolls::dingdongbell() { /* Pussy's in the well. Who put her in? Little... */
byte fv;
- for (fv = 1; fv <= _vm->_gyro->scrollbells; fv ++) _vm->_lucerna->errorled(); /* ring the bell "x" times */
+ for (fv = 0; fv < _vm->_gyro->scrollbells; fv++)
+ _vm->_lucerna->errorled(); /* ring the bell "x" times */
}
void Scrolls::dodgem() { /* This moves the mouse pointer off the scroll so that you can read it. */
@@ -348,8 +349,8 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_logger->log_epsonroman(); /* Scrolls always START with Roman. */
lx = 0;
- ly = (_vm->_gyro->scrolln + 1) * 6;
- for (b = 0; b <= _vm->_gyro->scrolln; b++) {
+ ly = (_vm->_gyro->scrolln) * 6;
+ for (b = 0; b < _vm->_gyro->scrolln; b++) {
ex = _vm->_gyro->scroll[b].size() * 8;
if (lx < ex)
lx = ex;
@@ -420,7 +421,7 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
}
- for (b = 0; b <= _vm->_gyro->scrolln; b++) {
+ for (b = 0; b < _vm->_gyro->scrolln; b++) {
if (!_vm->_gyro->scroll[b].empty())
switch (_vm->_gyro->scroll[b][_vm->_gyro->scroll[b].size() - 1]) {
case kControlCenter: {
@@ -493,7 +494,7 @@ bool Scrolls::ask(Common::String question) {
}
void Scrolls::resetscroll() {
- _vm->_gyro->scrolln = 0;
+ _vm->_gyro->scrolln = 1;
for (int j = 0; j < 15; j ++)
if (!_vm->_gyro->scroll[j].empty())
_vm->_gyro->scroll[j].clear();
@@ -592,7 +593,7 @@ void Scrolls::calldrivers() {
} else
switch (_vm->_gyro->buffer[fv]) {
case kControlParagraph: {
- if ((_vm->_gyro->scrolln == 0) && (_vm->_gyro->scroll[0].empty()))
+ if ((_vm->_gyro->scrolln == 1) && (_vm->_gyro->scroll[0].empty()))
break;
if (call_spriterun)
@@ -618,7 +619,7 @@ void Scrolls::calldrivers() {
_vm->_gyro->scrollbells++;
break; // #7 = "Bel"
case kControlSpeechBubble: {
- if ((_vm->_gyro->scrolln == 0) && (_vm->_gyro->scroll[0].empty()))
+ if ((_vm->_gyro->scrolln == 1) && (_vm->_gyro->scroll[0].empty()))
break;
if (call_spriterun)
@@ -727,7 +728,7 @@ void Scrolls::calldrivers() {
call_spriterun = false;
_vm->_gyro->scrolln++;
- _vm->_gyro->scroll[_vm->_gyro->scrolln] = kControlQuestion;
+ _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] = kControlQuestion;
was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
if (was_virtual)
@@ -746,14 +747,14 @@ void Scrolls::calldrivers() {
break;
case kControlInsertSpaces:
for (nn = 0; nn < 9; nn++)
- _vm->_gyro->scroll[_vm->_gyro->scrolln] += ' ';
+ _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] += ' ';
break;
default: { // Add new char.
- if (_vm->_gyro->scroll[_vm->_gyro->scrolln].size() == 50) {
- solidify(_vm->_gyro->scrolln);
+ if (_vm->_gyro->scroll[_vm->_gyro->scrolln - 1].size() == 50) {
+ solidify(_vm->_gyro->scrolln - 1);
_vm->_gyro->scrolln++;
}
- _vm->_gyro->scroll[_vm->_gyro->scrolln] += _vm->_gyro->buffer[fv];
+ _vm->_gyro->scroll[_vm->_gyro->scrolln - 1] += _vm->_gyro->buffer[fv];
}
}
}
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 692d7320f3..cd6e4dc74f 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -607,8 +607,8 @@ void Timeout::arkata_shouts() {
if (_vm->_gyro->dna.teetotal)
return;
- // _vm->_visa->dixi('q', 76);
- warning("STUB: Timeout::arkata_shouts()");
+ _vm->_visa->dixi('q', 76);
+
set_up_timer(160, procarkata_shouts, reason_arkata_shouts);
}
diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp
index e2f83d636d..135ab216c6 100644
--- a/engines/avalanche/visa2.cpp
+++ b/engines/avalanche/visa2.cpp
@@ -50,7 +50,7 @@ bool Visa::report_dixi_errors = true;
void Visa::unskrimble() {
for (uint16 fv = 0; fv < _vm->_gyro->bufsize; fv++)
- _vm->_gyro->buffer[fv] = (~(_vm->_gyro->buffer[fv]) - fv + 1) % 256;
+ _vm->_gyro->buffer[fv] = (~(_vm->_gyro->buffer[fv] - (fv + 1))) % 256;
}
void Visa::do_the_bubble() {