summaryrefslogtreecommitdiffstats
path: root/pokemod/Map.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-07-03 04:20:36 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-07-03 04:20:36 +0000
commit65cc463f1d91fe99acf1c4dd9bce7e0038593022 (patch)
tree95644c3c42a4a23db50dc42722cdeb4489427e14 /pokemod/Map.cpp
parent9102febc37475af113681eaaee02ecc2ea04b4da (diff)
Fixed Logging, minor fixes, got rid of NatureEffect, and started migration from wxGTK to Qt
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@22 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.cpp')
-rw-r--r--pokemod/Map.cpp203
1 files changed, 0 insertions, 203 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp
index 7e4eead6..42793c8d 100644
--- a/pokemod/Map.cpp
+++ b/pokemod/Map.cpp
@@ -228,209 +228,6 @@ void PokeGen::PokeMod::Map::Validate()
LogValidateOver("Map", id, isValid, name);
}
-#ifdef PG_DEBUG_WINDOW
-void PokeGen::PokeMod::Map::Validate(const wxListBox &output)
-{
- LogValidateStart("Map", id, name);
- if (name == "")
- {
- LogVarNotSet("Map", id, "Name", name);
- output.Append(ConsoleLogVarNotSet("Map", id, "name", name));
- isValid = false;
- }
- if (!GetWarp(flyWarp))
- {
- LogVarNotValid("Map", id, "flyWarp", name);
- output.Append(ConsoleLogVarNotValid("Map", id, "flyWarp", name));
- isValid = false;
- }
- if ((MTY_NONE < type) && (type < MTY_END))
- {
- LogVarNotValid("Map", id, "type", name);
- output.Append(ConsoleLogVarNotValid("Map", id, "type", name));
- isValid = false;
- }
- std::map<unsigned, unsigned> idChecker;
- std::map<String, unsigned> nameChecker;
- if (GetMapEffectCount())
- {
- for (std::vector<MapEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
- {
- LogSubmoduleIterate("Map", id, "effect", i->GetId(), name);
- if (!i->IsValid())
- isValid = false;
- if (GetWidth() <= i->GetCoordinateX())
- {
- LogVarNotValid("MapEffect", i->GetId(), "x", i->GetName());
- isValid = false;
- }
- if (GetHeight() <= i->GetCoordinateY())
- {
- LogVarNotValid("MapEffect", i->GetId(), "y", i->GetName());
- isValid = false;
- }
- ++idChecker[i->GetId()];
- ++nameChecker[i->GetName()];
- }
- for (std::map<unsigned, unsigned>::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateId("Map", id, "effect", i->first, name);
- output.Append(ConsoleLogDuplicateId("Map", id, "effect", i->first, name));
- isValid = false;
- }
- }
- for (std::map<String, unsigned>::const_iterator i = nameChecker.begin(); i != nameChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateSubmodule("Map", id, "effect", i->first, name);
- output.Append(ConsoleLogDuplicateSubmodule("Map", id, "effect", i->first, name));
- isValid = false;
- }
- }
- idChecker.clear();
- nameChecker.clear();
- }
- else
- {
- LogSubmoduleEmpty("Map", id, "effect", id, name);
- output.Append(ConsoleLogSubmoduleEmptyW("Map", id, "effect", name));
- }
- if (GetMapTrainerCount())
- {
- for (std::vector<MapTrainer>::iterator i = trainers.begin(); i != trainers.end(); ++i)
- {
- LogSubmoduleIterate("Map", id, "trainer", i->GetId(), name);
- if (!i->IsValid())
- isValid = false;
- if (GetWidth() <= i->GetCoordinateX())
- {
- LogVarNotValid("MapTrainer", i->GetId(), "x", i->GetName());
- isValid = false;
- }
- if (GetHeight() <= i->GetCoordinateY())
- {
- LogVarNotValid("MapTrainer", i->GetId(), "y", i->GetName());
- isValid = false;
- }
- ++idChecker[i->GetId()];
- ++nameChecker[i->GetName()];
- }
- for (std::map<unsigned, unsigned>::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateId("Map", id, "trainer", i->first, name);
- output.Append(ConsoleLogDuplicateId("Map", id, "trainer", i->first, name));
- isValid = false;
- }
- }
- for (std::map<String, unsigned>::const_iterator i = nameChecker.begin(); i != nameChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateSubmodule("Map", id, "trainer", i->first, name);
- output.Append(ConsoleLogDuplicateSubmodule("Map", id, "trainer", i->first, name));
- isValid = false;
- }
- }
- idChecker.clear();
- nameChecker.clear();
- }
- else
- {
- LogSubmoduleEmpty("Map", id, "trainer", id, name);
- output.Append(ConsoleLogSubmoduleEmptyW("Map", id, "trainer", name));
- }
- if (GetMapWarpCount())
- {
- for (std::vector<MapWarp>::iterator i = warps.begin(); i != warps.end(); ++i)
- {
- LogSubmoduleIterate("Map", id, "warp", i->GetId(), name);
- if (!i->IsValid())
- isValid = false;
- if (GetWidth() <= i->GetCoordinateX())
- {
- LogVarNotValid("MapWarp", i->GetId(), "x", i->GetName());
- isValid = false;
- }
- if (GetHeight() <= i->GetCoordinateY())
- {
- LogVarNotValid("MapWarp", i->GetId(), "y", i->GetName());
- isValid = false;
- }
- ++idChecker[i->GetId()];
- ++nameChecker[i->GetName()];
- }
- for (std::map<unsigned, unsigned>::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateId("Map", id, "warp", i->first, name);
- output.Append(ConsoleLogDuplicateId("Map", id, "warp", i->first, name));
- isValid = false;
- }
- }
- for (std::map<String, unsigned>::const_iterator i = nameChecker.begin(); i != nameChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateSubmodule("Map", id, "warp", i->first, name);
- output.Append(ConsoleLogDuplicateSubmodule("Map", id, "warp", i->first, name));
- isValid = false;
- }
- }
- idChecker.clear();
- }
- else
- {
- LogSubmoduleEmpty("Map", id, "warp", id, name);
- output.Append(ConsoleLogSubmoduleEmpty("Map", id, "warp", name));
- isValid = false;
- }
- if (GetMapWildListCount())
- {
- for (std::vector<MapWildList>::iterator i = wildLists.begin(); i != wildLists.end(); ++i)
- {
- LogSubmoduleIterate("Map", id, "wild list", i->GetId(), name);
- if (!i->IsValid())
- isValid = false;
- ++idChecker[i->GetId()];
- }
- for (std::map<unsigned, unsigned>::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i)
- {
- if (1 < i->second)
- {
- LogDuplicateId("Map", id, "effect", i->first, name);
- output.Append(ConsoleLogDuplicateId("Map", id, "effect", i->first, name));
- isValid = false;
- }
- }
- idChecker.clear();
- }
- else
- {
- LogSubmoduleEmpty("Map", id, "wild list", id, name);
- output.Append(ConsoleLogSubmoduleEmptyW("Map", id, "wild list", name));
- }
- for (unsigned i = 0; i < GetWidth(); ++i)
- {
- for (unsigned j = 0; j < GetHeight(); ++j)
- {
- if (!pokemod->GetTile(tiles[i][j]))
- {
- LogVarNotValid("Map", id, String("tiles[%u][%u]", i, j), name);
- output.Append(ConsoleLogVarNotValid("Map", id, String("tiles[%u][%u]", i, j), name));
- isValid = false;
- }
- }
- }
- LogValidateOver("Map", id, isValid, name);
-}
-#endif
-
void PokeGen::PokeMod::Map::ImportIni(Ini &ini, const unsigned _id)
{
LogImportStart("Map");