diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-10-26 20:46:09 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-10-26 20:46:09 +0000 |
| commit | 4385af885daf460a18e236f08509358f764b2c8c (patch) | |
| tree | 6c2838312dd7f42769280e24e8abc16b53c165cb /pokemod/Map.cpp | |
| parent | 1f08afc80c73087bf9bde639754670548b89fc9f (diff) | |
Reverted repo back to rev24 because committing of rev25 messed up
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@26 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.cpp')
| -rw-r--r-- | pokemod/Map.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 1b1ac145..d3c23879 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -22,8 +22,6 @@ #include "Map.h" -const char* PokeGen::PokeMod::Map::TypeStr[PokeGen::PokeMod::Map::End] = {"Outdoor", "Dungeon", "Building"}; - PokeGen::PokeMod::Map::Map(const Pokemod* par, const unsigned _id) : Object(_id, par), name(""), @@ -376,8 +374,11 @@ unsigned PokeGen::PokeMod::Map::GetEffectCount() const const PokeGen::PokeMod::MapEffect* PokeGen::PokeMod::Map::NewEffect(Ini* const ini) { unsigned i = 0; - for (; (i < GetEffectCount()) && (GetEffectByID(i) != UINT_MAX); ++i) - ; + for (; i < GetEffectCount(); ++i) + { + if (GetEffectByID(i) == UINT_MAX) + break; + } MapEffect newEffect(pokemod, i); if (ini) newEffect.ImportIni(*ini); @@ -420,8 +421,11 @@ unsigned PokeGen::PokeMod::Map::GetTrainerCount() const const PokeGen::PokeMod::MapTrainer* PokeGen::PokeMod::Map::NewTrainer(Ini* const ini) { unsigned i = 0; - for (; (i < GetTrainerCount()) && (GetTrainerByID(i) != UINT_MAX); ++i) - ; + for (; i < GetTrainerCount(); ++i) + { + if (GetTrainerByID(i) == UINT_MAX) + break; + } MapTrainer newTrainer(pokemod, i); if (ini) newTrainer.ImportIni(*ini); @@ -464,8 +468,11 @@ unsigned PokeGen::PokeMod::Map::GetWarpCount() const const PokeGen::PokeMod::MapWarp* PokeGen::PokeMod::Map::NewWarp(Ini* const ini) { unsigned i = 0; - for (; (i < GetWarpCount()) && (GetWarpByID(i) != UINT_MAX); ++i) - ; + for (; i < GetWarpCount(); ++i) + { + if (GetWarpByID(i) == UINT_MAX) + break; + } MapWarp newWarp(pokemod, i); if (ini) newWarp.ImportIni(*ini); @@ -508,8 +515,11 @@ unsigned PokeGen::PokeMod::Map::GetWildListCount() const const PokeGen::PokeMod::MapWildList* PokeGen::PokeMod::Map::NewWildList(Ini* const ini) { unsigned i = 0; - for (; (i < GetWildListCount()) && (GetWildListByID(i) != UINT_MAX); ++i) - ; + for (; i < GetWildListCount(); ++i) + { + if (GetWildListByID(i) == UINT_MAX) + break; + } MapWildList newWildList(pokemod, i); if (ini) newWildList.ImportIni(*ini); |
