summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWildList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/MapWildList.cpp')
-rw-r--r--pokemod/MapWildList.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp
index 4b846246..681dd56f 100644
--- a/pokemod/MapWildList.cpp
+++ b/pokemod/MapWildList.cpp
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: pokemod/MapWildList.cpp
-// Purpose: Define a list of Pokémon that can be found on the map
+// Purpose: Define a list of species that can be found on the map
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Tue Mar 20 19:18:23 2007
@@ -22,6 +22,8 @@
#include "MapWildList.h"
+const char* PokeGen::PokeMod::MapWildList::ControlStr[PokeGen::PokeMod::MapWildList::End] = {"Grass", "Surfing", "Fishing", "Dive", "Headbutt", "Rock Smash"};
+
PokeGen::PokeMod::MapWildList::MapWildList(const Pokemod* par, const unsigned _id) :
Object(_id, par),
control(UINT_MAX),
@@ -268,11 +270,8 @@ unsigned PokeGen::PokeMod::MapWildList::GetPokemonCount() const
const PokeGen::PokeMod::MapWildListPokemon* PokeGen::PokeMod::MapWildList::NewPokemon(Ini* const ini)
{
unsigned i = 0;
- for (; i < GetPokemonCount(); ++i)
- {
- if (GetPokemonByID(i) == UINT_MAX)
- break;
- }
+ for (; (i < GetPokemonCount()) && (GetPokemonByID(i) != UINT_MAX); ++i)
+ ;
MapWildListPokemon newPokemon(pokemod, i);
if (ini)
newPokemon.ImportIni(*ini);