diff options
author | Strangerke | 2013-09-04 18:55:02 +0200 |
---|---|---|
committer | Strangerke | 2013-09-04 18:55:02 +0200 |
commit | a952ae3f8761a390de73a5e9031f9f233041f099 (patch) | |
tree | c351bdec14460e02773ca0b2346ee2d829961106 /engines | |
parent | 08e8e92e3a0206b963dacfeecc96b75008c88c02 (diff) | |
download | scummvm-rg350-a952ae3f8761a390de73a5e9031f9f233041f099.tar.gz scummvm-rg350-a952ae3f8761a390de73a5e9031f9f233041f099.tar.bz2 scummvm-rg350-a952ae3f8761a390de73a5e9031f9f233041f099.zip |
AVALANCHE: Fix some more GCC warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/gyro2.h | 2 | ||||
-rw-r--r-- | engines/avalanche/scrolls2.cpp | 15 |
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; |