aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-07-03 14:05:06 +0200
committeruruk2013-07-03 14:05:06 +0200
commit8d03232cf85068f1ceb40940f92644fa6441310a (patch)
tree9f1d9f0e8d96f0bdb822278224e2816b22040bc5 /engines
parentf47bc39f64166a21d9cf592a680403bb62030273 (diff)
downloadscummvm-rg350-8d03232cf85068f1ceb40940f92644fa6441310a.tar.gz
scummvm-rg350-8d03232cf85068f1ceb40940f92644fa6441310a.tar.bz2
scummvm-rg350-8d03232cf85068f1ceb40940f92644fa6441310a.zip
AVALANCHE: Minor repair.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/gyro2.cpp4
-rw-r--r--engines/avalanche/trip6.cpp19
2 files changed, 7 insertions, 16 deletions
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index c86660e46e..5af1670af1 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -525,9 +525,7 @@ void Gyro::super_on() {
}
bool Gyro::mouse_near_text() {
- bool mouse_near_text_result;
- mouse_near_text_result = (my > 144) && (my < 188);
- return mouse_near_text_result;
+ return (my > 144) && (my < 188);
}
} // End of namespace Avalanche
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index d41fa10461..7fe643c9da 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -84,21 +84,14 @@ void triptype::appear(int16 wx, int16 wy, byte wf) {
bool triptype::collision_check() {
byte fv;
- bool collision_check_result = false;
- for (fv = 1; fv <= _tr->numtr; fv++) {
+ for (fv = 1; fv <= _tr->numtr; fv++)
if (_tr->tr[fv].quick && (_tr->tr[fv].whichsprite != whichsprite) &&
((x + a.xl) > _tr->tr[fv].x) &&
(x < (_tr->tr[fv].x + _tr->tr[fv].a.xl)) &&
- (_tr->tr[fv].y == y)) {
- collision_check_result = true;
- break;
- }
- // CHECKME: Only checks the first element of the for() statement.
- // Both lines should certainly be removed
- collision_check_result = false;
- return collision_check_result;
- }
- return collision_check_result;
+ (_tr->tr[fv].y == y))
+ return true;
+
+ return false;
}
void triptype::walk() {
@@ -318,7 +311,7 @@ void Trip::loadtrip() {
for (gm = 1; gm <= numtr; gm++)
tr[gm].original();
- // CHECKME: A 'i++' is missing somewhere, obviously!
+
for (int i = 0; i < sizeof(aa); i++)
aa[i] = 0;
}