summaryrefslogtreecommitdiffstats
path: root/pokemod/Map.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-02 18:12:48 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-02 18:12:48 +0000
commitc9afda3ab74614fb36986f96b7972c082f275eca (patch)
tree1b7c0b31950597d6ed562d94158dd3f8701496da /pokemod/Map.cpp
parentf71140fae5218ee9839ffcd4ec83abfded5124f4 (diff)
downloadsigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.gz
sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.xz
sigen-c9afda3ab74614fb36986f96b7972c082f275eca.zip
Finished off all PokeMod classes, added move validations, fixed up some GUI, various other fixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@18 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.cpp')
-rw-r--r--pokemod/Map.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp
index f0349f50..32728d90 100644
--- a/pokemod/Map.cpp
+++ b/pokemod/Map.cpp
@@ -25,16 +25,12 @@
extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::Map::Map(const unsigned _id)
+PokeGen::PokeMod::Map::Map(const unsigned _id) :
+ name(""),
+ flyWarp(UINT_MAX),
+ type(UINT_MAX)
{
LogCtor("Map", id);
- name = "";
- flyWarp = 0;
- type = 0;
- effects.clear();
- trainers.clear();
- warps.clear();
- wildLists.clear();
id = _id;
}
@@ -234,16 +230,16 @@ void PokeGen::PokeMod::Map::ImportIni(Ini &ini, const unsigned _id)
LogImportStart("Map");
if (_id == UINT_MAX)
{
- ini.GetValue("id", id, UINT_MAX);
+ ini.GetValue("id", id);
// Was there an id associated with the element?
if (id == UINT_MAX)
LogIdNotFound("Map");
}
else
id = _id;
- ini.GetValue("name", name, "");
- ini.GetValue("flyWarp", flyWarp, 0);
- ini.GetValue("type", type, 0);
+ ini.GetValue("name", name);
+ ini.GetValue("flyWarp", flyWarp);
+ ini.GetValue("type", type);
effects.clear();
trainers.clear();
warps.clear();
@@ -439,7 +435,7 @@ void PokeGen::PokeMod::Map::NewMapEffect(Ini *const ini)
void PokeGen::PokeMod::Map::DeleteMapEffect(const unsigned _id)
{
LogSubmoduleRemoveStart("Map", id, "effect", _id, name);
- for (std::vector<MapEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<MapEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
@@ -453,7 +449,7 @@ void PokeGen::PokeMod::Map::DeleteMapEffect(const unsigned _id)
void PokeGen::PokeMod::Map::DeleteMapEffect(const String &n)
{
LogSubmoduleRemoveStart("Map", id, "effect", n, name);
- for (std::vector<MapEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<MapEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetName() == n)
{
@@ -513,7 +509,7 @@ void PokeGen::PokeMod::Map::NewMapTrainer(Ini *const ini)
void PokeGen::PokeMod::Map::DeleteMapTrainer(const unsigned _id)
{
LogSubmoduleRemoveStart("Map", id, "trainer", _id, name);
- for (std::vector<MapTrainer>::const_iterator i = trainers.begin(); i != trainers.end(); ++i)
+ for (std::vector<MapTrainer>::iterator i = trainers.begin(); i != trainers.end(); ++i)
{
if (i->GetId() == _id)
{
@@ -527,7 +523,7 @@ void PokeGen::PokeMod::Map::DeleteMapTrainer(const unsigned _id)
void PokeGen::PokeMod::Map::DeleteMapTrainer(const String &n)
{
LogSubmoduleRemoveStart("Map", id, "trainer", n, name);
- for (std::vector<MapTrainer>::const_iterator i = trainers.begin(); i != trainers.end(); ++i)
+ for (std::vector<MapTrainer>::iterator i = trainers.begin(); i != trainers.end(); ++i)
{
if (i->GetName() == n)
{
@@ -587,7 +583,7 @@ void PokeGen::PokeMod::Map::NewMapWarp(Ini *const ini)
void PokeGen::PokeMod::Map::DeleteMapWarp(const unsigned _id)
{
LogSubmoduleRemoveStart("Map", id, "warp", _id, name);
- for (std::vector<MapWarp>::const_iterator i = warps.begin(); i != warps.end(); ++i)
+ for (std::vector<MapWarp>::iterator i = warps.begin(); i != warps.end(); ++i)
{
if (i->GetId() == _id)
{
@@ -601,7 +597,7 @@ void PokeGen::PokeMod::Map::DeleteMapWarp(const unsigned _id)
void PokeGen::PokeMod::Map::DeleteMapWarp(const String &n)
{
LogSubmoduleRemoveStart("Map", id, "warp", n, name);
- for (std::vector<MapWarp>::const_iterator i = warps.begin(); i != warps.end(); ++i)
+ for (std::vector<MapWarp>::iterator i = warps.begin(); i != warps.end(); ++i)
{
if (i->GetName() == n)
{
@@ -649,7 +645,7 @@ void PokeGen::PokeMod::Map::NewMapWildList(Ini *const ini)
void PokeGen::PokeMod::Map::DeleteMapWildList(const unsigned _id)
{
LogSubmoduleRemoveStart("Map", id, "wild list", _id, name);
- for (std::vector<MapWildList>::const_iterator i = wildLists.begin(); i != wildLists.end(); ++i)
+ for (std::vector<MapWildList>::iterator i = wildLists.begin(); i != wildLists.end(); ++i)
{
if (i->GetId() == _id)
{