aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/gyro2.h2
-rw-r--r--engines/avalanche/scrolls2.cpp15
2 files changed, 8 insertions, 9 deletions
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index 971fbbdfc0..4e4cb0a75b 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -43,7 +43,7 @@ namespace Avalanche {
class AvalancheEngine;
-static const char numobjs = 18; /* always preface with a # */
+static const byte numobjs = 18; /* always preface with a # */
static const int16 maxobjs = 12; /* carry limit */
static const int16 numlockCode = 32; /* Code for Num Lock */
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 51d47a9e4d..32ad1c9085 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -198,8 +198,8 @@ void Scrolls::dialogue() {
void Scrolls::store_(byte what, tunetype &played) {
- memcpy(played+1, played+2, sizeof(played) - 1);
- played[31] = what;
+ memcpy(played + 1, played + 2, sizeof(played) - 1);
+ played[30] = what;
}
bool Scrolls::they_match(tunetype &played) {
@@ -207,10 +207,11 @@ bool Scrolls::they_match(tunetype &played) {
mistakes = 0;
- for (fv = 1; fv <= sizeof(played); fv++)
+ for (fv = 1; fv <= sizeof(played); fv++) {
if (played[fv] != _vm->_gyro->tune[fv]) {
mistakes += 1;
}
+ }
return mistakes < 5;
}
@@ -715,7 +716,7 @@ void Scrolls::calldrivers() {
return;
}
break;
- case kControlNegative: {
+ case kControlNegative:
switch (param) {
case 1:
display(lsd() + kControlToBuffer); // Insert cash balance. (Recursion)
@@ -755,9 +756,9 @@ void Scrolls::calldrivers() {
display(_vm->_gyro->get_better(_vm->_gyro->dna.box_contents) + '.');
}
break;
- case 11: {
+ case 11:
nn = 1;
- for (nnn = 0; nnn < numobjs; nnn++)
+ for (nnn = 0; nnn < numobjs; nnn++) {
if (_vm->_gyro->dna.obj[nnn]) {
nn++;
display(_vm->_gyro->get_better(nnn) + ", " + kControlToBuffer);
@@ -765,8 +766,6 @@ void Scrolls::calldrivers() {
}
break;
}
-
- }
break;
case kControlIcon:
use_icon = param;