aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-06-06 22:41:44 +0200
committerStrangerke2014-06-06 22:41:44 +0200
commitec0d6b916ddc2dd5bd232a2909b4a035eea4a4c8 (patch)
tree37034045d8f35f466b61ed2ee503f1910f45575a
parentb830b8498fcbf4a8a8fc3cba466c44f03602c25c (diff)
downloadscummvm-rg350-ec0d6b916ddc2dd5bd232a2909b4a035eea4a4c8.tar.gz
scummvm-rg350-ec0d6b916ddc2dd5bd232a2909b4a035eea4a4c8.tar.bz2
scummvm-rg350-ec0d6b916ddc2dd5bd232a2909b4a035eea4a4c8.zip
CRUISE: Reduce the scope of several variables in processActorWalk()
-rw-r--r--engines/cruise/perso.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/cruise/perso.cpp b/engines/cruise/perso.cpp
index 3a599bca22..66c9718b95 100644
--- a/engines/cruise/perso.cpp
+++ b/engines/cruise/perso.cpp
@@ -172,23 +172,20 @@ void processActorWalk(MovementEntry &resx_y, int16 *inc_droite, int16 *inc_droit
int16 *inc_chemin, point* cor_joueur,
int16 solution0[NUM_NODES + 3][2], int16 *inc_jo1, int16 *inc_jo2,
int16 *dir_perso, int16 *inc_jo0, int16 num) {
- int x1, x2, y1, y2;
- int i, u;
-
- u = 0;
+ int u = 0;
inc_jo = *inc_jo0;
- i = *inc_chemin;
+ int i = *inc_chemin;
if (!*inc_droite) {
- x1 = solution0[i][0];
- y1 = solution0[i][1];
+ int x1 = solution0[i][0];
+ int y1 = solution0[i][1];
i++;
if (solution0[i][0] != -1) {
do {
if (solution0[i][0] != -2) {
- x2 = solution0[i][0];
- y2 = solution0[i][1];
+ int x2 = solution0[i][0];
+ int y2 = solution0[i][1];
if ((x1 == x2) && (y1 == y2)) {
resx_y.x = -1;
resx_y.y = -1;