From 65cc463f1d91fe99acf1c4dd9bce7e0038593022 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 3 Jul 2007 04:20:36 +0000 Subject: 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 --- pokemod/Map.cpp | 203 -------------------------------------------------------- 1 file changed, 203 deletions(-) (limited to 'pokemod/Map.cpp') 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 idChecker; - std::map nameChecker; - if (GetMapEffectCount()) - { - for (std::vector::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::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::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::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::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::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::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::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::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::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::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"); -- cgit