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/MapTrainer.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/MapTrainer.cpp')
| -rw-r--r-- | pokemod/MapTrainer.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp index cd08037b..66b3b99b 100644 --- a/pokemod/MapTrainer.cpp +++ b/pokemod/MapTrainer.cpp @@ -58,7 +58,7 @@ bool PokeGen::PokeMod::MapTrainer::Validate() pokemod->ValidationMsg("Skin could't be found"); isValid = false; } - if (D_End_None <= direction) + if (DIR_End_None <= direction) { pokemod->ValidationMsg("Invalid direction"); isValid = false; @@ -209,7 +209,7 @@ void PokeGen::PokeMod::MapTrainer::SetSight(const unsigned s) bool PokeGen::PokeMod::MapTrainer::SetDirection(const unsigned d) { - if (d < D_End_None) + if (d < DIR_End_None) direction = d; return (direction == d); } @@ -285,7 +285,7 @@ QString PokeGen::PokeMod::MapTrainer::GetName() const return name; } -PokeGen::Point PokeGen::PokeMod::MapTrainer::GetCoordinate() const +PokeGen::PokeMod::Point PokeGen::PokeMod::MapTrainer::GetCoordinate() const { return coordinate; } @@ -325,7 +325,7 @@ QString PokeGen::PokeMod::MapTrainer::GetAI() const return ai; } -PokeGen::Flag PokeGen::PokeMod::MapTrainer::GetAppearFlag() const +PokeGen::PokeMod::Flag PokeGen::PokeMod::MapTrainer::GetAppearFlag() const { return appearFlag; } @@ -385,8 +385,11 @@ unsigned PokeGen::PokeMod::MapTrainer::GetPokemonCount() const const PokeGen::PokeMod::MapTrainerPokemon* PokeGen::PokeMod::MapTrainer::NewPokemon(Ini* const ini) { unsigned i = 0; - for (; (i < GetPokemonCount()) && (GetPokemonByID(i) != UINT_MAX); ++i) - ; + for (; i < GetPokemonCount(); ++i) + { + if (GetPokemonByID(i) == UINT_MAX) + break; + } MapTrainerPokemon newPokemon(pokemod, i); if (ini) newPokemon.ImportIni(*ini); |
