diff options
author | Strangerke | 2014-06-01 01:21:32 +0200 |
---|---|---|
committer | Strangerke | 2014-06-01 01:21:32 +0200 |
commit | 1dbcd7498804f4b59280e3599e2d1c7f864a5228 (patch) | |
tree | 0ace66f0cc1b65026e4ae0c9b9779168293ecaf4 /engines/cruise/actor.cpp | |
parent | 7d24e1471c445fbf49b3efbb8d046eb26db849cd (diff) | |
download | scummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.tar.gz scummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.tar.bz2 scummvm-rg350-1dbcd7498804f4b59280e3599e2d1c7f864a5228.zip |
CRUISE: Reduce the scope of variables used in the for loops
Diffstat (limited to 'engines/cruise/actor.cpp')
-rw-r--r-- | engines/cruise/actor.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp index ab3b581825..0a7bbfe86a 100644 --- a/engines/cruise/actor.cpp +++ b/engines/cruise/actor.cpp @@ -426,16 +426,13 @@ void explore(int depart, int arrivee) { } void chemin0(int depart, int arrivee) { - int i; - //int y=30; - prem = 0; prem2 = 0; dist_chemin = 0; idsol = 0; solmax = 999; - for (i = 0; i < 20 + 1; i++) + for (int i = 0; i < 20 + 1; i++) fl[i] = -1; X = 0, Y = 30; @@ -582,10 +579,9 @@ int16 computePathfinding(MovementEntry &moveInfo, int16 x, int16 y, int16 destX, } if (!flagCt) { - int i; int16 *ptr; - - for (i = 0; i < NUM_PERSONS; i++) { // 10 = num perso + int i = 0; + for (; i < NUM_PERSONS; i++) { // 10 = num perso if (!persoTable[i]) { break; } |