diff options
author | Filippos Karapetis | 2007-09-21 20:19:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-21 20:19:12 +0000 |
commit | 47b8dbbf525ecc90ca869dca7219e3c22e6f79b5 (patch) | |
tree | 85807a15bd14115eaa700962e4ba27808b64620e /engines | |
parent | e35221f4cabba9213766862f81049a2d86d782a3 (diff) | |
download | scummvm-rg350-47b8dbbf525ecc90ca869dca7219e3c22e6f79b5.tar.gz scummvm-rg350-47b8dbbf525ecc90ca869dca7219e3c22e6f79b5.tar.bz2 scummvm-rg350-47b8dbbf525ecc90ca869dca7219e3c22e6f79b5.zip |
Fix regression caused by the latest cleanups
svn-id: r29011
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 6e4dbddd7a..c4d8906982 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -1254,6 +1254,7 @@ void Mickey::inventory() { void Mickey::randomize() { int iHint = 0; + int iPlanet = 0; memset(game.iPlanetXtal, 0, sizeof(game.iPlanetXtal)); memset(game.iClue, 0, sizeof(game.iClue)); @@ -1264,11 +1265,12 @@ void Mickey::randomize() { for (int i = 1; i < 8; i++) { do { // Earth (planet 0) and Uranus (planet 8) are excluded - game.iPlanetXtal[i] = _vm->rnd(IDI_MSA_MAX_PLANET - 2); - } while (planetIsAlreadyAssigned(game.iPlanetXtal[i])); + iPlanet = _vm->rnd(IDI_MSA_MAX_PLANET - 2); + } while (planetIsAlreadyAssigned(iPlanet)); + game.iPlanetXtal[i] = iPlanet; iHint = _vm->rnd(5) - 1; // clues are 0-4 - game.iClue[i] = IDO_MSA_NEXT_PIECE[game.iPlanetXtal[i]][iHint]; + game.iClue[i] = IDO_MSA_NEXT_PIECE[iPlanet][iHint]; } game.fPlanetsInitialized = true; |