From 3595239f08f2bc1df32ef22ed6de9bde10ca3384 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 4 Jun 2007 01:35:20 +0000 Subject: Style cleanup, minor Matrix fixes, duplication validations, Pokemod methods git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@19 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- Changelog | 12 + ai/Layer.cpp | 4 +- ai/Layer.h | 2 +- ai/Net.h | 2 +- ai/Node.cpp | 6 +- ai/Node.h | 2 +- pokegen.depend | 141 ++- pokegen.layout | 257 +---- pokemod/Ability.cpp | 61 +- pokemod/AbilityEffect.cpp | 60 +- pokemod/Author.cpp | 314 ++--- pokemod/Author.h | 2 +- pokemod/Badge.cpp | 15 +- pokemod/CoinItem.cpp | 14 +- pokemod/CoinList.cpp | 86 +- pokemod/CoinList.h | 3 +- pokemod/Debug.cpp | 4 +- pokemod/Debug.h | 17 +- pokemod/Dialog.cpp | 7 +- pokemod/EggGroup.cpp | 9 +- pokemod/Flag.cpp | 6 +- pokemod/Frac.cpp | 15 +- pokemod/Ini.cpp | 2 +- pokemod/Ini.h | 2 +- pokemod/Item.cpp | 66 +- pokemod/Item.h | 3 +- pokemod/ItemEffect.cpp | 25 +- pokemod/ItemStorage.cpp | 7 +- pokemod/Map.cpp | 297 ++++- pokemod/Map.h | 1 + pokemod/MapEffect.cpp | 37 +- pokemod/MapTrainer.cpp | 78 +- pokemod/MapTrainer.h | 1 + pokemod/MapTrainerTeam.cpp | 10 +- pokemod/MapWarp.cpp | 48 +- pokemod/MapWildList.cpp | 91 +- pokemod/MapWildList.h | 6 +- pokemod/MapWildPokemon.cpp | 10 +- pokemod/Matrix.h | 23 +- pokemod/Move.cpp | 136 ++- pokemod/Move.h | 1 + pokemod/MoveEffect.cpp | 13 +- pokemod/Nature.cpp | 62 +- pokemod/Nature.h | 2 +- pokemod/NatureEffect.cpp | 10 +- pokemod/Object.cpp | 1 - pokemod/Path.cpp | 2 - pokemod/Point.cpp | 1 - pokemod/Point.h | 4 +- pokemod/Pokemod.cpp | 2611 +++++++++++++++++++++++++++++++++++++++++- pokemod/Pokemod.h | 208 +++- pokemod/Pokemon.cpp | 467 +++++--- pokemod/Pokemon.h | 1 + pokemod/PokemonAbility.cpp | 14 +- pokemod/PokemonEvolution.cpp | 14 +- pokemod/PokemonItem.cpp | 10 +- pokemod/PokemonMove.cpp | 4 +- pokemod/PokemonNature.cpp | 14 +- pokemod/Ref.cpp | 1 - pokemod/Ref.h | 2 - pokemod/Status.cpp | 83 +- pokemod/Status.h | 1 + pokemod/StatusEffect.cpp | 13 +- pokemod/Store.cpp | 85 +- pokemod/Store.h | 3 +- pokemod/String.cpp | 2 +- pokemod/TODO | 28 +- pokemod/Tile.cpp | 52 +- pokemod/Time.cpp | 8 +- pokemod/Type.cpp | 5 +- pokemodr/gui/PokeModr.pjd | 523 +++++++-- pokemodr/gui/mainWindow.cpp | 1254 ++++++++++---------- pokemodr/gui/mainWindow.h | 23 +- 73 files changed, 5688 insertions(+), 1716 deletions(-) diff --git a/Changelog b/Changelog index 10e1c846..e871cf98 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,15 @@ +----------------- +Rev: 19 +Date: 3 June 2007 +User: MathStuf +----------------- +[FIX] Matrix insertion error +[ADD] ID duplication checks for submodules +[ADD] Duplicate checks for submodules +[FIX] AStyle formatter run over all source files +[FIX] Stylistic clean up +[ADD] Pokemod methods + ----------------- Rev: 18 Date: 2 June 2007 diff --git a/ai/Layer.cpp b/ai/Layer.cpp index 97ba87b6..5ba794a1 100644 --- a/ai/Layer.cpp +++ b/ai/Layer.cpp @@ -51,7 +51,7 @@ void PokeGen::NeuralNetwork::Layer::DeleteNode(int n) void PokeGen::NeuralNetwork::Layer::UpdateBias(int n) { if (n < 0) - bias.push_back((abs(std::rand())%201)/100.0); + bias.push_back((abs(std::rand()) % 201) / 100.0); else if (n < GetNumNodes()) bias.erase(bias.begin() + n); else @@ -69,7 +69,7 @@ void PokeGen::NeuralNetwork::Layer::RandomizeWeights() { bias.clear(); for (int i = 0; i < child->GetNumNodes(); ++i) - bias.push_back((abs(std::rand())%201)/100.0); + bias.push_back((abs(std::rand()) % 201) / 100.0); for (int i = 0; i < GetNumNodes(); ++i) nodes[i].RandomizeWeights(); } diff --git a/ai/Layer.h b/ai/Layer.h index c7f6fa4f..22b35c82 100644 --- a/ai/Layer.h +++ b/ai/Layer.h @@ -27,7 +27,7 @@ #include #include #include "Node.h" -#include "../pokemod/Xml.h" +#include "../pokemod/Ini.h" namespace PokeGen { diff --git a/ai/Net.h b/ai/Net.h index 798a05dc..17bbb85f 100644 --- a/ai/Net.h +++ b/ai/Net.h @@ -25,7 +25,7 @@ #define __NEURAL_NET__ #include "Layer.h" -#include "../pokemod/Xml.h" +#include "../pokemod/Ini.h" namespace PokeGen { diff --git a/ai/Node.cpp b/ai/Node.cpp index c95d6eae..9fc723d6 100644 --- a/ai/Node.cpp +++ b/ai/Node.cpp @@ -40,7 +40,7 @@ void PokeGen::NeuralNetwork::Node::UpdateWeights(int n) { if (n < 0) { - weights.push_back((abs(std::rand())%201)/100.0); + weights.push_back((abs(std::rand()) % 201) / 100.0); weightChanges.push_back(0); } else if (n < ownerLayer->child->GetNumNodes()) @@ -87,7 +87,7 @@ void PokeGen::NeuralNetwork::Node::RandomizeWeights() weights.clear(); int i = 0; for (; i < ownerLayer->child->GetNumNodes(); ++i) - weights.push_back((abs(std::rand())%201)/100.0); + weights.push_back((abs(std::rand()) % 201) / 100.0); weightChanges.clear(); weightChanges.resize(i - 1, 0); } @@ -208,5 +208,5 @@ void PokeGen::NeuralNetwork::Node::CalculateValue() void PokeGen::NeuralNetwork::Node::DumpData(const std::string &f) { - + // TODO (Ben#1#): Dump NeuralNode data } diff --git a/ai/Node.h b/ai/Node.h index 76f6d55b..35d2cb17 100644 --- a/ai/Node.h +++ b/ai/Node.h @@ -29,7 +29,7 @@ #include #include #include "Layer.h" -#include "../pokemod/Xml.h" +#include "../pokemod/Ini.h" namespace PokeGen { diff --git a/pokegen.depend b/pokegen.depend index e7236859..584957c2 100644 --- a/pokegen.depend +++ b/pokegen.depend @@ -1,13 +1,13 @@ # depslib dependency file v1.0 -1180801356 source:h:\ben\programming\pc\pokegen\src\pokemod\flag.cpp +1180843850 source:h:\ben\programming\pc\pokegen\src\pokemod\flag.cpp "Flag.h" -1180748126 h:\ben\programming\pc\pokegen\src\pokemod\flag.h +1180848044 h:\ben\programming\pc\pokegen\src\pokemod\flag.h "Debug.h" "Ini.h" "Ref.h" -1180750732 h:\ben\programming\pc\pokegen\src\pokemod\debug.h +1180848064 h:\ben\programming\pc\pokegen\src\pokemod\debug.h @@ -19,87 +19,87 @@ -1180745264 h:\ben\programming\pc\pokegen\src\pokemod\frac.h +1180848048 h:\ben\programming\pc\pokegen\src\pokemod\frac.h "Debug.h" "Ini.h" -1180717482 h:\ben\programming\pc\pokegen\src\pokemod\ini.h +1180899300 h:\ben\programming\pc\pokegen\src\pokemod\ini.h "String.h" -1180752882 h:\ben\programming\pc\pokegen\src\pokemod\ref.h +1180890016 h:\ben\programming\pc\pokegen\src\pokemod\ref.h "String.h" -1180732976 source:h:\ben\programming\pc\pokegen\src\pokemod\ini.cpp +1180847176 source:h:\ben\programming\pc\pokegen\src\pokemod\ini.cpp "Ini.h" -1180050768 source:h:\ben\programming\pc\pokegen\src\pokemod\object.cpp +1180847420 source:h:\ben\programming\pc\pokegen\src\pokemod\object.cpp "Object.h" -1180185454 h:\ben\programming\pc\pokegen\src\pokemod\object.h +1180847938 h:\ben\programming\pc\pokegen\src\pokemod\object.h "Debug.h" "Ini.h" -1178468486 source:h:\ben\programming\pc\pokegen\src\pokemod\path.cpp +1180847452 source:h:\ben\programming\pc\pokegen\src\pokemod\path.cpp "Path.h" -1178468482 h:\ben\programming\pc\pokegen\src\pokemod\path.h +1180847932 h:\ben\programming\pc\pokegen\src\pokemod\path.h "String.h" -1180750750 source:h:\ben\programming\pc\pokegen\src\pokemod\point.cpp +1180847462 source:h:\ben\programming\pc\pokegen\src\pokemod\point.cpp "Point.h" -1180750680 h:\ben\programming\pc\pokegen\src\pokemod\point.h +1180901382 h:\ben\programming\pc\pokegen\src\pokemod\point.h "Debug.h" "Ini.h" -1180717382 source:h:\ben\programming\pc\pokegen\src\pokemod\string.cpp +1180847696 source:h:\ben\programming\pc\pokegen\src\pokemod\string.cpp "String.h" -1179887976 source:h:\ben\programming\pc\pokegen\src\pokemod\debug.cpp +1180843688 source:h:\ben\programming\pc\pokegen\src\pokemod\debug.cpp "Debug.h" -1180185144 source:h:\ben\programming\pc\pokegen\src\pokemod\ref.cpp +1180889888 source:h:\ben\programming\pc\pokegen\src\pokemod\ref.cpp "Ref.h" -1180744572 source:h:\ben\programming\pc\pokegen\src\pokemod\type.cpp +1180847608 source:h:\ben\programming\pc\pokegen\src\pokemod\type.cpp "Type.h" 1180184954 h:\ben\programming\pc\pokegen\src\pokemod\type.h "Object.h" "String.h" -1180744576 source:h:\ben\programming\pc\pokegen\src\pokemod\time.cpp +1180847616 source:h:\ben\programming\pc\pokegen\src\pokemod\time.cpp "Time.h" 1180184978 h:\ben\programming\pc\pokegen\src\pokemod\time.h "Object.h" "String.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\egggroup.cpp +1180843820 source:h:\ben\programming\pc\pokegen\src\pokemod\egggroup.cpp "EggGroup.h" -1180186118 h:\ben\programming\pc\pokegen\src\pokemod\egggroup.h +1180848052 h:\ben\programming\pc\pokegen\src\pokemod\egggroup.h "Object.h" "String.h" -1180744582 source:h:\ben\programming\pc\pokegen\src\pokemod\author.cpp +1180843074 source:h:\ben\programming\pc\pokegen\src\pokemod\author.cpp "Author.h" -1180186276 h:\ben\programming\pc\pokegen\src\pokemod\author.h +1180848088 h:\ben\programming\pc\pokegen\src\pokemod\author.h "Object.h" "String.h" -1180801322 source:h:\ben\programming\pc\pokegen\src\pokemod\badge.cpp +1180843064 source:h:\ben\programming\pc\pokegen\src\pokemod\badge.cpp "Badge.h" -1180186240 h:\ben\programming\pc\pokegen\src\pokemod\badge.h +1180848080 h:\ben\programming\pc\pokegen\src\pokemod\badge.h "Object.h" "String.h" "Ref.h" @@ -107,8 +107,11 @@ "Frac.h" "Pokemod.h" -1180798567 h:\ben\programming\pc\pokegen\src\pokemod\pokemod.h +1180913025 h:\ben\programming\pc\pokegen\src\pokemod\pokemod.h + + + "pokemod_inc.h" "Object.h" "Ref.h" @@ -118,28 +121,31 @@ "CoinList.h" "Dialog.h" "EggGroup.h" + "Ini.h" "Item.h" "ItemStorage.h" "Map.h" "Move.h" "Nature.h" + "Point.h" "Pokemon.h" "Status.h" "Store.h" + "String.h" "Tile.h" "Time.h" "Type.h" -1180564326 h:\ben\programming\pc\pokegen\src\pokemod\pokemod_inc.h +1180848102 h:\ben\programming\pc\pokegen\src\pokemod\pokemod_inc.h "Pokemod.h" -1180577044 h:\ben\programming\pc\pokegen\src\pokemod\ability.h +1180847892 h:\ben\programming\pc\pokegen\src\pokemod\ability.h "Object.h" "String.h" "AbilityEffect.h" -1180561758 h:\ben\programming\pc\pokegen\src\pokemod\abilityeffect.h +1180848092 h:\ben\programming\pc\pokegen\src\pokemod\abilityeffect.h "Object.h" "String.h" "Pokemod.h" @@ -148,60 +154,64 @@ "Type.h" "Ref.h" -1180577394 h:\ben\programming\pc\pokegen\src\pokemod\coinlist.h +1180848070 h:\ben\programming\pc\pokegen\src\pokemod\coinlist.h + "Object.h" "String.h" "Pokemod.h" "CoinItem.h" -1180564688 h:\ben\programming\pc\pokegen\src\pokemod\coinitem.h +1180848072 h:\ben\programming\pc\pokegen\src\pokemod\coinitem.h "Object.h" "String.h" "Pokemod.h" -1180732956 h:\ben\programming\pc\pokegen\src\pokemod\item.h +1180848034 h:\ben\programming\pc\pokegen\src\pokemod\item.h + "Object.h" "String.h" "Pokemod.h" "ItemEffect.h" -1180562838 h:\ben\programming\pc\pokegen\src\pokemod\itemeffect.h +1180848030 h:\ben\programming\pc\pokegen\src\pokemod\itemeffect.h "Object.h" "String.h" "Pokemod.h" -1180185816 h:\ben\programming\pc\pokegen\src\pokemod\itemstorage.h +1180848028 h:\ben\programming\pc\pokegen\src\pokemod\itemstorage.h "Object.h" "String.h" -1180577550 h:\ben\programming\pc\pokegen\src\pokemod\nature.h +1180847952 h:\ben\programming\pc\pokegen\src\pokemod\nature.h "Object.h" "String.h" "NatureEffect.h" -1180396026 h:\ben\programming\pc\pokegen\src\pokemod\natureeffect.h +1180847944 h:\ben\programming\pc\pokegen\src\pokemod\natureeffect.h "Object.h" "String.h" "Frac.h" "Pokemod.h" -1180577644 h:\ben\programming\pc\pokegen\src\pokemod\move.h +1180887030 h:\ben\programming\pc\pokegen\src\pokemod\move.h + "Object.h" "String.h" "MoveEffect.h" -1180565222 h:\ben\programming\pc\pokegen\src\pokemod\moveeffect.h +1180847958 h:\ben\programming\pc\pokegen\src\pokemod\moveeffect.h "Object.h" "String.h" "Pokemod.h" "Frac.h" -1180566104 h:\ben\programming\pc\pokegen\src\pokemod\store.h +1180891282 h:\ben\programming\pc\pokegen\src\pokemod\store.h + "Object.h" "String.h" "Pokemod.h" @@ -209,15 +219,15 @@ 1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\dialog.cpp "Dialog.h" -1180186138 h:\ben\programming\pc\pokegen\src\pokemod\dialog.h +1180848058 h:\ben\programming\pc\pokegen\src\pokemod\dialog.h "Object.h" "String.h" "Pokemod.h" -1180733002 source:h:\ben\programming\pc\pokegen\src\pokemod\frac.cpp +1180843936 source:h:\ben\programming\pc\pokegen\src\pokemod\frac.cpp "Frac.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\itemstorage.cpp +1180844756 source:h:\ben\programming\pc\pokegen\src\pokemod\itemstorage.cpp "ItemStorage.h" 1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\natureeffect.cpp @@ -459,11 +469,12 @@ "String.h" "Pokemod.h" -1180744532 source:h:\ben\programming\pc\pokegen\src\pokemod\ability.cpp +1180844557 source:h:\ben\programming\pc\pokegen\src\pokemod\ability.cpp "Ability.h" -1180577780 h:\ben\programming\pc\pokegen\src\pokemod\map.h +1180848012 h:\ben\programming\pc\pokegen\src\pokemod\map.h + "Object.h" "String.h" "Matrix.h" @@ -472,13 +483,13 @@ "MapWarp.h" "MapWildList.h" -1180801447 h:\ben\programming\pc\pokegen\src\pokemod\matrix.h +1180914775 h:\ben\programming\pc\pokegen\src\pokemod\matrix.h "Point.h" "Frac.h" "Ini.h" -1180753200 h:\ben\programming\pc\pokegen\src\pokemod\mapeffect.h +1180848008 h:\ben\programming\pc\pokegen\src\pokemod\mapeffect.h "Object.h" "String.h" "Flag.h" @@ -486,8 +497,9 @@ "Path.h" "Dialog.h" -1180756212 h:\ben\programming\pc\pokegen\src\pokemod\maptrainer.h +1180848004 h:\ben\programming\pc\pokegen\src\pokemod\maptrainer.h + "Object.h" "String.h" "Flag.h" @@ -496,15 +508,16 @@ "Dialog.h" "MapTrainerTeam.h" -1180732834 h:\ben\programming\pc\pokegen\src\pokemod\maptrainerteam.h +1180848000 h:\ben\programming\pc\pokegen\src\pokemod\maptrainerteam.h "Object.h" "String.h" "Pokemod.h" "Pokemon.h" "Item.h" -1180736158 h:\ben\programming\pc\pokegen\src\pokemod\pokemon.h +1180841588 h:\ben\programming\pc\pokegen\src\pokemod\pokemon.h + "Object.h" "String.h" "Frac.h" @@ -521,7 +534,7 @@ "String.h" "Pokemod.h" -1180753270 h:\ben\programming\pc\pokegen\src\pokemod\mapwarp.h +1180847988 h:\ben\programming\pc\pokegen\src\pokemod\mapwarp.h "Object.h" "String.h" "Flag.h" @@ -529,21 +542,22 @@ "Map.h" "Dialog.h" -1180728830 h:\ben\programming\pc\pokegen\src\pokemod\mapwildlist.h +1180918088 h:\ben\programming\pc\pokegen\src\pokemod\mapwildlist.h "Object.h" "String.h" "Pokemod.h" "MapWildPokemon.h" -1180732716 h:\ben\programming\pc\pokegen\src\pokemod\mapwildpokemon.h +1180847978 h:\ben\programming\pc\pokegen\src\pokemod\mapwildpokemon.h "Object.h" "String.h" "Pokemod.h" "Pokemon.h" -1180800787 h:\ben\programming\pc\pokegen\src\pokemod\status.h +1180890028 h:\ben\programming\pc\pokegen\src\pokemod\status.h + "Object.h" "String.h" "Pokemod.h" @@ -554,7 +568,7 @@ "String.h" "Pokemod.h" -1180801003 h:\ben\programming\pc\pokegen\src\pokemod\statuseffect.h +1180801004 h:\ben\programming\pc\pokegen\src\pokemod\statuseffect.h "Object.h" "String.h" "Pokemod.h" @@ -564,39 +578,42 @@ 1180801281 source:h:\ben\programming\pc\pokegen\src\pokemod\abilityeffect.cpp "AbilityEffect.h" -1180744582 source:h:\ben\programming\pc\pokegen\src\pokemod\coinitem.cpp +1180903058 source:h:\ben\programming\pc\pokegen\src\pokemod\coinitem.cpp "CoinItem.h" -1180744582 source:h:\ben\programming\pc\pokegen\src\pokemod\coinlist.cpp +1180844482 source:h:\ben\programming\pc\pokegen\src\pokemod\coinlist.cpp "CoinList.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\item.cpp +1180844604 source:h:\ben\programming\pc\pokegen\src\pokemod\item.cpp "Item.h" 1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\maptrainerteam.cpp "MapTrainerTeam.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\mapwildlist.cpp +1180918072 source:h:\ben\programming\pc\pokegen\src\pokemod\mapwildlist.cpp "MapWildList.h" 1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\mapwildpokemon.cpp "MapWildPokemon.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\nature.cpp +1180890178 source:h:\ben\programming\pc\pokegen\src\pokemod\nature.cpp "Nature.h" -1180623298 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemod.cpp +1180916341 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemod.cpp "Pokemod.h" -1180744584 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemon.cpp +1180886988 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemon.cpp "Pokemon.h" 1180744586 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonevolution.cpp "PokemonEvolution.h" -1180800841 source:h:\ben\programming\pc\pokegen\src\pokemod\status.cpp +1180890334 source:h:\ben\programming\pc\pokegen\src\pokemod\status.cpp "Status.h" -1180744578 source:h:\ben\programming\pc\pokegen\src\pokemod\tile.cpp +1180847656 source:h:\ben\programming\pc\pokegen\src\pokemod\tile.cpp "Tile.h" +1180846358 source:h:\ben\programming\pc\pokegen\src\pokemod\map.cpp + "Map.h" + diff --git a/pokegen.layout b/pokegen.layout index 964923fd..d6bff811 100644 --- a/pokegen.layout +++ b/pokegen.layout @@ -1,310 +1,175 @@ - - - + + + - + - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - - - - + - - + + - - - - - - - + - + - - - - - - - - - - - + + - + - + - + - + - + - + - - - - - - - - - - - - - + - - + + - + - - - - - - - - - - + - - + + - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - - - - + - - + + - + - - - - - - - - - - - - - + - + - + - + - - - - + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - + - - - - + - - + + - - + + - - - - - - - + - - - - - + + - - - - - - - - - - - - - - - diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp index 102348c8..01396882 100644 --- a/pokemod/Ability.cpp +++ b/pokemod/Ability.cpp @@ -25,7 +25,7 @@ #include "Ability.h" PokeGen::PokeMod::Ability::Ability(const unsigned _id) : - name("") + name("") { LogCtor("Ability", id); id = _id; @@ -47,22 +47,38 @@ PokeGen::PokeMod::Ability::~Ability() void PokeGen::PokeMod::Ability::Validate() { LogValidateStart("Ability", id, name); - // Make sure the name is set to something if (name == "") { - LogVarNotSet("Ability", id, "Name", name); + LogVarNotSet("Ability", id, "name"); isValid = false; } - // Check if there are any effects defined if (GetAbilityEffectCount()) { - // Validate each effect + std::map idChecker; + std::map effectChecker; for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { LogSubmoduleIterate("Ability", id, "effect", i->GetId(), name); - // If an effect isn't valid, neither is the ability if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Ability", id, "effect", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Ability", id, "effect", i->first, name); + isValid = false; + } } } else @@ -77,23 +93,41 @@ void PokeGen::PokeMod::Ability::Validate() void PokeGen::PokeMod::Ability::Validate(const wxListBox &output) { LogValidateStart("Ability", id, name); - // Make sure the name is set to something if (name == "") { - LogVarNotSet("Ability", id, "Name", name); - output.Append(ConsoleLogVarNotSet("Ability", id, "Name", name)); + LogVarNotSet("Ability", id, "name"); + output.Append(ConsoleLogVarNotSet("Ability", id, "name")); isValid = false; } - // Check if there are any effects defined if (GetAbilityEffectCount()) { - // Validate each effect + std::map idChecker; + std::map effectChecker; for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { LogSubmoduleIterate("Ability", id, "effect", i->GetId(), name); - // If an effect isn't valid, neither is the ability if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Ability", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateId("Ability", id, "effect", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Ability", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateSubmodule("Ability", id, "effect", i->first, name)); + isValid = false; + } } } else @@ -112,7 +146,6 @@ void PokeGen::PokeMod::Ability::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("Ability"); } @@ -126,7 +159,6 @@ void PokeGen::PokeMod::Ability::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::Ability::ExportIni(std::ofstream &fout) const { LogExportStart("Ability", id, name); - // Make elements Ini exAbility("ability"); exAbility.AddField("id", id); exAbility.AddField("name", name); @@ -169,7 +201,6 @@ unsigned PokeGen::PokeMod::Ability::GetAbilityEffectCount() const void PokeGen::PokeMod::Ability::NewAbilityEffect(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetAbilityEffectCount(); ++i) { if (!GetAbilityEffect(i)) diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp index 7c50fdc8..2247c37e 100644 --- a/pokemod/AbilityEffect.cpp +++ b/pokemod/AbilityEffect.cpp @@ -26,14 +26,14 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::AbilityEffect::AbilityEffect(const unsigned _id) : - chance(1, 1), - effect(UINT_MAX), - val1(UINT_MAX), - val2(UINT_MAX), - val3(UINT_MAX), - trigger(UINT_MAX), - tval1(UINT_MAX), - tval2(UINT_MAX) + chance(1, 1), + effect(UINT_MAX), + val1(UINT_MAX), + val2(UINT_MAX), + val3(UINT_MAX), + trigger(UINT_MAX), + tval1(UINT_MAX), + tval2(UINT_MAX) { LogCtor("AbilityEffect", _id); id = _id; @@ -226,7 +226,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (AE_END <= effect) { LogVarNotValid("AbilityEffect", id, "effect"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "effect")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "effect")); isValid = false; } else @@ -237,7 +237,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if ((BST_END <= val1) || ((val1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit())) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -245,7 +245,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (!curPokeMod.GetStatus(val1)) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -253,7 +253,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (!curPokeMod.GetAbility(val1)) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -261,7 +261,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (PA_END <= val1) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -269,7 +269,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (ABIT_END <= val1) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -277,7 +277,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (!curPokeMod.GetType(val1)) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } break; @@ -285,7 +285,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (W_END_ALL <= val1) { LogVarNotValid("AbilityEffect", id, "val1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val1")); isValid = false; } } @@ -295,7 +295,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (BM_END <= val2) { LogVarNotValid("AbilityEffect", id, "val2"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val2")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val2")); isValid = false; } break; @@ -304,7 +304,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (CA_END <= val2) { LogVarNotValid("AbilityEffect", id, "val2"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val2")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val2")); isValid = false; } break; @@ -312,7 +312,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (ABI_END <= val2) { LogVarNotValid("AbilityEffect", id, "val2"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val2")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val2")); isValid = false; } break; @@ -320,7 +320,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (BO_END <= val2) { LogVarNotValid("AbilityEffect", id, "val2"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val2")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val2")); isValid = false; } } @@ -337,7 +337,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if ((val3 < 0) || (100 < val3)) { LogVarNotValid("AbilityEffect", id, "val3"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val3")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val3")); isValid = false; } break; @@ -345,7 +345,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if ((val3 < -6) || (6 < val3)) { LogVarNotValid("AbilityEffect", id, "val3"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "val3")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "val3")); isValid = false; } } @@ -353,7 +353,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (AT_END <= trigger) { LogVarNotValid("AbilityEffect", id, "trigger"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "trigger")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "trigger")); isValid = false; } else @@ -364,7 +364,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (W_END_ALL <= tval1) { LogVarNotValid("AbilityEffect", id, "tVal1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); isValid = false; } break; @@ -372,7 +372,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (!curPokeMod.GetType(tval1)) { LogVarNotValid("AbilityEffect", id, "tVal1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); isValid = false; } break; @@ -380,7 +380,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (SI_END <= tval1) { LogVarNotValid("AbilityEffect", id, "tVal1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); isValid = false; } break; @@ -388,7 +388,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if ((BST_END <= tval1) || ((tval1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit())) { LogVarNotValid("AbilityEffect", id, "tVal1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); isValid = false; } break; @@ -396,7 +396,7 @@ void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output) if (!curPokeMod.GetStatus(tval1)) { LogVarNotValid("AbilityEffect", id, "tVal1"); - output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); + output.Append(OutputLogVarNotValid("AbilityEffect", id, "tVal1")); isValid = false; } } @@ -412,7 +412,6 @@ void PokeGen::PokeMod::AbilityEffect::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("AbilityEffect"); } @@ -438,8 +437,7 @@ void PokeGen::PokeMod::AbilityEffect::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::AbilityEffect::ExportIni(std::ofstream &fout, const String &ability) const { LogExportStart("AbilityEffect", id); - // Make elements - Ini exAbilityEffect(ability + " abilityEffect"); + Ini exAbilityEffect("abilityEffect " + ability); exAbilityEffect.AddField("id", id); exAbilityEffect.AddField("chance-n", chance.GetNum()); exAbilityEffect.AddField("chance-d", chance.GetDenom()); diff --git a/pokemod/Author.cpp b/pokemod/Author.cpp index fadd0893..20d34db3 100644 --- a/pokemod/Author.cpp +++ b/pokemod/Author.cpp @@ -24,9 +24,9 @@ #include "Author.h" PokeGen::PokeMod::Author::Author(const unsigned _id) : - name(""), - email(""), - role("") + name(""), + email(""), + role("") { LogCtor("Author", id); id = _id; @@ -96,158 +96,158 @@ void PokeGen::PokeMod::Author::Validate(const wxListBox &output) LogValNotSet("Author", "role", id, name); output.Append(ConsoleLogValNotSet("Author", "role", id, name))); isValid = false; - } - LogValidateOver("Author", isValid, id, name); -} + } + LogValidateOver("Author", isValid, id, name); + } #endif - -void PokeGen::PokeMod::Author::ImportIni(Ini &ini, const unsigned _id) -{ - LogImportStart("Author"); - String curName; - if (_id == UINT_MAX) - { - ini.GetValue("id", id); - if (id == UINT_MAX) - LogIdNotFound("Author"); - } - else - id = _id; - ini.GetValue("name", name); - ini.GetValue("email", email); - ini.GetValue("role", role); - LogImportOver("Author", id, name); -} - -void PokeGen::PokeMod::Author::ExportIni(std::ofstream &fout) const -{ - LogExportStart("Author", id, name); - // Declare the elements - Ini exAuthor("author"); - exAuthor.AddField("id", id); - exAuthor.AddField("name", name); - exAuthor.AddField("email", email); - exAuthor.AddField("role", role); - exAuthor.Export(fout); - LogExportOver("Author", id, name); -} - -void PokeGen::PokeMod::Author::SetName(const String &n) -{ - LogSetVar("Author", id, "name", n, name); - name = n; -} - -void PokeGen::PokeMod::Author::SetEmail(const String &e) -{ - LogSetVar("Author", id, "email", e, name); - email = e; -} - -void PokeGen::PokeMod::Author::SetRole(const String &r) -{ - LogSetVar("Author", id, "role", r, name); - role = r; -} - -PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetName() const -{ - LogFetchVar("Author", id, "name", name); - return name; -} - -PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetEmail() const -{ - LogFetchVar("Author", id, "email", email, name); - return email; -} - -PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetRole() const -{ - LogFetchVar("Author", id, "role", role, name); - return role; -} - -bool PokeGen::PokeMod::Author::IsValidEmail() const -{ - bool valid = true; - Log(String("Author: Validating email of %d (%s)", id, name.c_str()), PM_DEBUG_DEBUG); - EmailCheck stage = EM_NAME; - int count = 0; - for (unsigned i = 0; (i < email.length()) && valid; ++i) - { - switch (stage) - { - case EM_NAME: - switch (email[i]) - { - // Only allow alphanumerics and '%-_.' in the name - case 'a' ... 'z': - case 'A' ... 'Z': - case '0' ... '9': - case '%': - case '-': - case '_': - case '.': - ++count; - break; - // Move to the next part if '@' is encountered - case '@': - if (!count) - valid = false; - count = 0; - stage = EM_HOST; - break; - // Not valid if anything else is encountered - default: - valid = false; - } - break; - case EM_HOST: - switch (email[i]) - { - // Only allow alphanumerics and '%-_.' in the host - case 'a' ... 'z': - case 'A' ... 'Z': - case '0' ... '9': - case '-': - ++count; - break; - // Move to the next part if '.' is encountered - case '.': - if (!count) - valid = false; - count = 0; - stage = EM_DOMAIN; - break; - // Not valid if anything else is encountered - default: - valid = false; - } - break; - case EM_DOMAIN: - switch (email[i]) - { - // Only allow alphanumerics and '%-_.' in the host - case 'a' ... 'z': - case 'A' ... 'Z': - ++count; - break; - // Move to the next domain extension if '.' is encountered - case '.': - if (!count) - valid = false; - count = 0; - break; - // Not valid if anything else is encountered - default: - valid = false; - } - } - } - // Make sure the domain was entered and the extension is in the valid range - if ((stage != EM_DOMAIN) || (count < 2) || (4 < count)) - valid = false; - Log(String("Author: Validated email of %d (%s) as %s", id, name.c_str(), valid ? "valid" : "invalid"), PM_DEBUG_DEBUG); - return valid; -} + + void PokeGen::PokeMod::Author::ImportIni(Ini &ini, const unsigned _id) + { + LogImportStart("Author"); + String curName; + if (_id == UINT_MAX) + { + ini.GetValue("id", id); + if (id == UINT_MAX) + LogIdNotFound("Author"); + } + else + id = _id; + ini.GetValue("name", name); + ini.GetValue("email", email); + ini.GetValue("role", role); + LogImportOver("Author", id, name); + } + + void PokeGen::PokeMod::Author::ExportIni(std::ofstream &fout) const + { + LogExportStart("Author", id, name); + Ini exAuthor("author"); + exAuthor.AddField("id", id); + exAuthor.AddField("name", name); + exAuthor.AddField("email", email); + exAuthor.AddField("role", role); + exAuthor.Export(fout); + LogExportOver("Author", id, name); + } + + void PokeGen::PokeMod::Author::SetName(const String &n) + { + LogSetVar("Author", id, "name", n, name); + name = n; + } + + void PokeGen::PokeMod::Author::SetEmail(const String &e) + { + LogSetVar("Author", id, "email", e, name); + email = e; + } + + void PokeGen::PokeMod::Author::SetRole(const String &r) + { + LogSetVar("Author", id, "role", r, name); + role = r; + } + + PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetName() const + { + LogFetchVar("Author", id, "name", name); + return name; + } + + PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetEmail() const + { + LogFetchVar("Author", id, "email", email, name); + return email; + } + + PokeGen::PokeMod::String PokeGen::PokeMod::Author::GetRole() const + { + LogFetchVar("Author", id, "role", role, name); + return role; + } + + bool PokeGen::PokeMod::Author::IsValidEmail() const + { + bool valid = true; + Log(String("Author: Validating email of %d (%s)", id, name.c_str()), PM_DEBUG_DEBUG); + EmailCheck stage = EM_NAME; + int count = 0; + for (unsigned i = 0; (i < email.length()) && valid; ++i) + { + switch (stage) + { + case EM_NAME: + switch (email[i]) + { + // Only allow alphanumerics and '%-_.' in the name + case 'a' ... 'z': + case 'A' ... 'Z': + case '0' ... '9': + case '%': + case '-': + case '_': + case '.': + ++count; + break; + // Move to the next part if '@' is encountered + case '@': + if (!count) + valid = false; + count = 0; + stage = EM_HOST; + break; + // Not valid if anything else is encountered + default: + valid = false; + } + break; + case EM_HOST: + switch (email[i]) + { + // Only allow alphanumerics and '%-_.' in the host + case 'a' ... 'z': + case 'A' ... 'Z': + case '0' ... '9': + case '-': + ++count; + break; + // Move to the next part if '.' is encountered + case '.': + if (!count) + valid = false; + count = 0; + stage = EM_DOMAIN; + break; + // Not valid if anything else is encountered + default: + valid = false; + } + break; + case EM_DOMAIN: + switch (email[i]) + { + // Only allow alphanumerics and '%-_.' in the host + case 'a' ... 'z': + case 'A' ... 'Z': + ++count; + break; + // Move to the next domain extension if '.' is encountered + case '.': + if (!count) + valid = false; + count = 0; + break; + // Not valid if anything else is encountered + default: + valid = false; + } + } + } + // Make sure the domain was entered and the extension is in the valid range + if ((stage != EM_DOMAIN) || (count < 2) || (4 < count)) + valid = false; + Log(String("Author: Validated email of %d (%s) as %s", id, name.c_str(), valid ? "valid" : "invalid"), PM_DEBUG_DEBUG); + return valid; + } + diff --git a/pokemod/Author.h b/pokemod/Author.h index 33ebb39e..dacdb900 100644 --- a/pokemod/Author.h +++ b/pokemod/Author.h @@ -59,7 +59,7 @@ namespace PokeGen EM_NAME = 0, EM_HOST = 1, EM_DOMAIN = 2 - }; + }; bool IsValidEmail() const; diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp index 3b99508d..70911bc9 100644 --- a/pokemod/Badge.cpp +++ b/pokemod/Badge.cpp @@ -27,10 +27,10 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::Badge::Badge(const unsigned _id) : - name(""), - face(""), - badge(""), - obey(0) + name(""), + face(""), + badge(""), + obey(0) { LogCtor("Badge", _id); for (unsigned i = 0; i < STH_END_GSC; ++i) @@ -130,15 +130,14 @@ void PokeGen::PokeMod::Badge::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("Badge"); } else id = _id; - ini.GetValue("name", name, ""); - ini.GetValue("face", face, ""); - ini.GetValue("badge", badge, ""); + ini.GetValue("name", name); + ini.GetValue("face", face); + ini.GetValue("badge", badge); ini.GetValue("obey", obey, 0); for (int i = 0; i < STH_END_GSC; ++i) { diff --git a/pokemod/CoinItem.cpp b/pokemod/CoinItem.cpp index db7e560d..726234bd 100644 --- a/pokemod/CoinItem.cpp +++ b/pokemod/CoinItem.cpp @@ -26,10 +26,10 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::CoinItem::CoinItem(const unsigned _id) : - type(CIT_ITEM), - object(UINT_MAX), - amount(1), - cost(0) + type(CIT_ITEM), + object(UINT_MAX), + amount(1), + cost(0) { LogCtor("CoinItem", _id); id = _id; @@ -124,7 +124,6 @@ void PokeGen::PokeMod::CoinItem::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("CoinItem"); } @@ -140,10 +139,9 @@ void PokeGen::PokeMod::CoinItem::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::CoinItem::ExportIni(std::ofstream &fout, const String &coinList) const { LogExportStart("CoinItem", id); - // Make elements - Ini exCoinItem(coinList + " CoinItem"); + Ini exCoinItem("coinItem " + coinList); exCoinItem.AddField("id", id); - exCoinItem.AddField("type",type); + exCoinItem.AddField("type", type); exCoinItem.AddField("object", object); exCoinItem.AddField("amount", amount); exCoinItem.AddField("cost", cost); diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp index 08bc019d..5a3c3fc2 100644 --- a/pokemod/CoinList.cpp +++ b/pokemod/CoinList.cpp @@ -27,8 +27,8 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::CoinList::CoinList(const unsigned _id) : - name(""), - value(0) + name(""), + value(0) { LogCtor("CoinList", _id); id = _id; @@ -57,11 +57,43 @@ void PokeGen::PokeMod::CoinList::Validate() } if (GetCoinItemCount()) { - for (unsigned i = 0; i < GetCoinItemCount(); ++i) + std::map idChecker; + std::map itemChecker; + std::map pokemonChecker; + for (std::vector::iterator i = items.begin(); i != items.end(); ++i) { - LogSubmoduleIterate("CoinList", id, "item", i, name); - if (!items[i].IsValid()) + LogSubmoduleIterate("CoinList", id, "item", i->GetId(), name); + if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + if (i->GetType() == CIT_ITEM) + ++itemChecker[i->GetObjectString()]; + else if (i->GetType() == CIT_POKEMON) + ++pokemonChecker[i->GetObjectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("CoinList", id, "coin item", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = itemChecker.begin(); i != itemChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("CoinList", id, "item", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = pokemonChecker.begin(); i != pokemonChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("CoinList", id, "Pokémon", i->first, name); + isValid = false; + } } } else @@ -84,11 +116,46 @@ void PokeGen::PokeMod::CoinList::Validate(const wxListBox &output) } if (GetCoinItemCount()) { - for (unsigned i = 0; i < GetCoinItemCount(); ++i) + std::map idChecker; + std::map itemChecker; + std::map pokemonChecker; + for (std::vector::iterator i = items.begin(); i != items.end(); ++i) + { + LogSubmoduleIterate("CoinList", id, "item", i->GetId(), name); + if (!i->IsValid()) + isValid = false; + ++idChecker[i->GetId()]; + if (i->GetType() == CIT_ITEM) + ++itemChecker[i->GetObjectString()]; + else if (i->GetType() == CIT_POKEMON) + ++pokemonChecker[i->GetObjectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("CoinList", id, "coin item", i->first, name); + output.Append(ConsoleLogDuplicateId("CoinList", id, "coin item", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = itemChecker.begin(); i != itemChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("CoinList", id, "item", i->first, name); + output.Append(ConsoleLogDuplicateSubmodule("CoinList", id, "item", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = pokemonChecker.begin(); i != pokemonChecker.end(); ++i) { - LogSubmoduleIterate("CoinList", id, "item", i, name); - if (!items[i].IsValid()) + if (1 < i->second) + { + LogDuplicateSubmodule("CoinList", id, "Pokémon", i->first, name); + output.Append(ConsoleLogDuplicateSubmodule("CoinList", id, "Pokémon", i->first, name)); isValid = false; + } } } else @@ -107,7 +174,6 @@ void PokeGen::PokeMod::CoinList::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("CoinList"); } @@ -122,7 +188,6 @@ void PokeGen::PokeMod::CoinList::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::CoinList::ExportIni(std::ofstream &fout) const { LogExportStart("CoinList", id, name); - // Make elements Ini exCoinList("coinList"); exCoinList.AddField("id", id); exCoinList.AddField("name", name); @@ -190,7 +255,6 @@ unsigned PokeGen::PokeMod::CoinList::GetCoinItemCount() const void PokeGen::PokeMod::CoinList::NewCoinItem(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetCoinItemCount(); ++i) { if (!GetCoinItem(i)) diff --git a/pokemod/CoinList.h b/pokemod/CoinList.h index b9016cb0..d31489ce 100644 --- a/pokemod/CoinList.h +++ b/pokemod/CoinList.h @@ -26,6 +26,7 @@ #define __POKEMOD_COINLIST__ #include +#include #include "Object.h" #include "String.h" #include "Pokemod.h" @@ -50,7 +51,7 @@ namespace PokeGen String GetName() const; unsigned GetValue() const; - + const CoinItem *GetCoinItem(const unsigned _id) const; const CoinItem *GetCoinItem(const String &n) const; unsigned GetCoinItemCount() const; diff --git a/pokemod/Debug.cpp b/pokemod/Debug.cpp index 87a9b7e0..389c3138 100644 --- a/pokemod/Debug.cpp +++ b/pokemod/Debug.cpp @@ -31,7 +31,7 @@ extern debugWindow PokeModDebugWindow; int PokeModDebugLevel; -void PokeGen::PokeMod::Log(const char *msg, int level) +void PokeGen::PokeMod::Log(const char *msg, const int level) { // Actual strings of the debugging levels const char *PokeModDebugStr[8] = {"Emergency", "Alert", "Critical Error", "Error", "Warning", "Notice", "Info", "Debug"}; @@ -81,7 +81,7 @@ void PokeGen::PokeMod::Log(const char *msg, int level) #else // Empty function if debugging isn't wanted -void PokeGen::PokeMod::Log(const String &msg, int level) +void PokeGen::PokeMod::Log(const String &msg, const int level) { return; } diff --git a/pokemod/Debug.h b/pokemod/Debug.h index 1cbbc685..b212426a 100644 --- a/pokemod/Debug.h +++ b/pokemod/Debug.h @@ -24,8 +24,6 @@ #ifndef __POKEMOD_DEBUG__ #define __POKEMOD_DEBUG__ -// TODO (Ben#1#): Comment logging functions - #define PM_DEBUG #ifdef PM_DEBUG @@ -385,6 +383,21 @@ namespace PokeGen Log(String("%s: Failed to remove %s %s from %u%s", module, subName, subStr, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR); } + inline void LogDuplicateId(const char *module, const unsigned id, const char *subName, const unsigned subId, const char *name = NULL) + { + Log(String("%s: Duplicate ID for %s of %u found in %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR); + } + + inline void LogDuplicateSubmodule(const char *module, const unsigned id, const char *subName, const unsigned subVal, const char *name = NULL) + { + Log(String("%s: Duplicate %s of %u found in %u%s", module, subName, subVal, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR); + } + + inline void LogDuplicateSubmodule(const char *module, const unsigned id, const char *subName, const char *subVal, const char *name = NULL) + { + Log(String("%s: Duplicate %s of %s found in %u%s", module, subName, subVal, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR); + } + /* inline void Log(const char *module, const unsigned id, const char *name = NULL) { Log(String("%s: ", module, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_); diff --git a/pokemod/Dialog.cpp b/pokemod/Dialog.cpp index c7677cf1..23f09e1b 100644 --- a/pokemod/Dialog.cpp +++ b/pokemod/Dialog.cpp @@ -26,7 +26,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::Dialog::Dialog(const unsigned _id) : - dialog("") + dialog("") { LogCtor("Dialog", _id); id = _id; @@ -53,6 +53,7 @@ void PokeGen::PokeMod::Dialog::Validate() { LogValidateStart("Dialog", id); // TODO (Validation#1#): Dialog Validation +# warning "Dialog Validation" LogValidateOver("Dialog", id, isValid); } @@ -62,7 +63,6 @@ void PokeGen::PokeMod::Dialog::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("Dialog"); } @@ -75,7 +75,6 @@ void PokeGen::PokeMod::Dialog::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::Dialog::ExportIni(std::ofstream &fout) const { LogExportStart("Dialog", id); - // Make elements Ini exDialog("dialog"); exDialog.AddField("id", id); exDialog.AddField("dialog", dialog); @@ -148,5 +147,5 @@ void PokeGen::PokeMod::Dialog::InsertDialogCommand(const unsigned cmd, const uns void PokeGen::PokeMod::Dialog::InsertDialogCommand(const String &cmd, const unsigned pos) { - // TODO (Ben#1#): Dialog commands + InsertDialogCommand(FindIn(DC_END, cmd, DialogCommandStr), pos); } diff --git a/pokemod/EggGroup.cpp b/pokemod/EggGroup.cpp index 5c77efab..8556fd77 100644 --- a/pokemod/EggGroup.cpp +++ b/pokemod/EggGroup.cpp @@ -24,7 +24,7 @@ #include "EggGroup.h" PokeGen::PokeMod::EggGroup::EggGroup(const unsigned _id) : - name("") + name("") { LogCtor("EggGroup", _id); id = _id; @@ -48,7 +48,7 @@ void PokeGen::PokeMod::EggGroup::Validate() LogValidateStart("EggGroup", id, name); if (name == "") { - LogVarNotSet("EggGroup", id, "name", name); + LogVarNotSet("EggGroup", id, "name"); isValid = false; } LogValidateOver("EggGroup", id, isValid, name); @@ -87,7 +87,6 @@ void PokeGen::PokeMod::EggGroup::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::EggGroup::ExportIni(std::ofstream &fout) const { LogExportStart("EggGroup", id, name); - // Declare the elements Ini exType("eggGroup"); exType.AddField("id", id); exType.AddField("name", name); @@ -97,12 +96,12 @@ void PokeGen::PokeMod::EggGroup::ExportIni(std::ofstream &fout) const void PokeGen::PokeMod::EggGroup::SetName(const String &n) { - LogSetVar("EggGroup", id, "name", n, name); + LogSetVar("EggGroup", id, "name", n); name = n; } PokeGen::PokeMod::String PokeGen::PokeMod::EggGroup::GetName() const { - LogFetchVar("EggGroup", id, "name", name, name); + LogFetchVar("EggGroup", id, "name", name); return name; } diff --git a/pokemod/Flag.cpp b/pokemod/Flag.cpp index 2cff5267..e83e0bd5 100644 --- a/pokemod/Flag.cpp +++ b/pokemod/Flag.cpp @@ -24,8 +24,8 @@ #include "Flag.h" PokeGen::PokeMod::Flag::Flag(const unsigned f, const unsigned s) : - flag(f), - status(0) + flag(f), + status(0) { LogCtor("Flag", 0); } @@ -48,7 +48,6 @@ void PokeGen::PokeMod::Flag::ImportIni(Ini &ini) void PokeGen::PokeMod::Flag::ExportIni(std::ofstream &fout, const String &val) const { LogExportStart("Flag", 0); - // Declare the elements Ini exFlag(val); exFlag.AddField("flag", flag); exFlag.AddField("status", status); @@ -77,7 +76,6 @@ void PokeGen::PokeMod::Flag::SetFlag(const unsigned f) void PokeGen::PokeMod::Flag::SetStatus(const unsigned s) { LogSetVar("Flag", 0, "status", s); - // Avoid errors status = (s ? ((s > FV_UNSET) ? FV_SET : FV_IGNORE) : FV_UNSET); } diff --git a/pokemod/Frac.cpp b/pokemod/Frac.cpp index 7d919f1b..9341e6a5 100644 --- a/pokemod/Frac.cpp +++ b/pokemod/Frac.cpp @@ -24,9 +24,9 @@ #include "Frac.h" PokeGen::PokeMod::Frac::Frac(const bool i) : - num(1), - denom(1), - improper(i) + num(1), + denom(1), + improper(i) { Log("Frac: Initializing", PM_DEBUG_DEBUG); } @@ -49,9 +49,7 @@ void PokeGen::PokeMod::Frac::ImportIni(Ini &ini) void PokeGen::PokeMod::Frac::ExportIni(std::ofstream &fout, const String &val) { Log(String("Frac Export: Starting %u/%u as %s", num, denom, val.c_str()), PM_DEBUG_INFO); - // Reduce fraction before storing Reduce(); - // Declare the elements Ini exFrac(val); exFrac.AddField("num", num); exFrac.AddField("denom", denom); @@ -76,7 +74,6 @@ void PokeGen::PokeMod::Frac::Set(const unsigned n, const unsigned d, const bool void PokeGen::PokeMod::Frac::SetNum(const unsigned n) { - // Make sure the numerator is less than the denominator if proper if ((n <= denom) || improper) { Log(String("Frac: Setting numerator to %u (%u/%u)", n, n, denom), PM_DEBUG_DEBUG); @@ -88,7 +85,6 @@ void PokeGen::PokeMod::Frac::SetNum(const unsigned n) void PokeGen::PokeMod::Frac::SetDenom(const unsigned d) { - // Make sure the denominator isn't 0 if (d) { Log(String("Frac: Setting denominator to %u", d), PM_DEBUG_DEBUG); @@ -96,7 +92,6 @@ void PokeGen::PokeMod::Frac::SetDenom(const unsigned d) } else Log("Frac: Attempting to set denominator to 0", PM_DEBUG_DEBUG); - // Set the numerator to less than the denominator if proper if ((num <= denom) && !improper) { Log(String("Frac: Setting numerator to 1 after denominator reset to (%u)", d), PM_DEBUG_DEBUG); @@ -138,10 +133,8 @@ float PokeGen::PokeMod::Frac::GetValue() const void PokeGen::PokeMod::Frac::Reduce() { Log(String("Frac: Reducing %u/%u", num, denom), PM_DEBUG_DEBUG); - // Iterate until i is greater than the square root on num - for (unsigned i = 2; i * i <= num; ++i) + for (unsigned i = 2; i <= (num < denom ? num : denom); ++i) { - // Keep iterating while i is a factor of both while (!((num % i) || (denom % i))) { num /= i; diff --git a/pokemod/Ini.cpp b/pokemod/Ini.cpp index af99da47..6fd7347f 100644 --- a/pokemod/Ini.cpp +++ b/pokemod/Ini.cpp @@ -24,7 +24,7 @@ #include "Ini.h" PokeGen::PokeMod::Ini::Ini(const String &n) : - name(n) + name(n) { } diff --git a/pokemod/Ini.h b/pokemod/Ini.h index 4539fee9..79b1c07f 100644 --- a/pokemod/Ini.h +++ b/pokemod/Ini.h @@ -64,7 +64,7 @@ namespace PokeGen POS_FIELD = 0, POS_VALUE = 1 }; - + bool Load(std::ifstream &file); String name; diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp index 7a2457d1..1e9d1c2c 100644 --- a/pokemod/Item.cpp +++ b/pokemod/Item.cpp @@ -26,11 +26,11 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::Item::Item(const unsigned _id) : - name(""), - sellable(false), - type(UINT_MAX), - price(0), - description("") + name(""), + sellable(false), + type(UINT_MAX), + price(0), + description("") { LogCtor("Item", _id); id = _id; @@ -64,11 +64,31 @@ void PokeGen::PokeMod::Item::Validate() } if (GetItemEffectCount()) { - for (unsigned i = 0; i < GetItemEffectCount(); ++i) + std::map idChecker; + std::map effectChecker; + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { - LogSubmoduleIterate("Item", id, "effect", i, name); - if (!effects[i].IsValid()) + LogSubmoduleIterate("Item", id, "effect", i->GetId(), name); + if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Item", id, "effect", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Item", id, "effect", i->first, name); + isValid = false; + } } } else @@ -97,11 +117,33 @@ void PokeGen::PokeMod::Item::Validate(const wxListBox &output) } if (GetItemEffectCount()) { - for (unsigned i = 0; i < GetItemEffectCount(); ++i) + std::map idChecker; + std::map effectChecker; + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) + { + LogSubmoduleIterate("Item", id, "effect", i->GetId(), name); + if (!i->IsValid()) + isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Item", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateId("Item", id, "effect", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) { - LogSubmoduleIterate("Item", id, "effect", i, name); - if (!effects[i].IsValid()) + if (1 < i->second) + { + LogDuplicateSubmodule("Item", id, "effect", i->first, name); + output.Append(LogDuplicateSubmodule("Item", id, "effect", i->first, name)); isValid = false; + } } } else @@ -120,7 +162,6 @@ void PokeGen::PokeMod::Item::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("Item"); } @@ -249,7 +290,6 @@ unsigned PokeGen::PokeMod::Item::GetItemEffectCount() const void PokeGen::PokeMod::Item::NewItemEffect(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetItemEffectCount(); ++i) { if (!GetItemEffect(i)) diff --git a/pokemod/Item.h b/pokemod/Item.h index c509fc53..82ad57bd 100644 --- a/pokemod/Item.h +++ b/pokemod/Item.h @@ -25,6 +25,7 @@ #define __POKEMOD_ITEM__ #include +#include #include "Object.h" #include "String.h" #include "Pokemod.h" @@ -57,7 +58,7 @@ namespace PokeGen String GetTypeString() const; unsigned GetPrice() const; String GetDescription() const; - + const ItemEffect *GetItemEffect(const unsigned _id) const; unsigned GetItemEffectCount() const; void NewItemEffect(Ini *const ini = NULL); diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp index ecc3566a..61b5c674 100644 --- a/pokemod/ItemEffect.cpp +++ b/pokemod/ItemEffect.cpp @@ -25,18 +25,18 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; -PokeGen::PokeMod::ItemEffect::ItemEffect(const unsigned _id) +PokeGen::PokeMod::ItemEffect::ItemEffect(const unsigned _id) : + overworld(false), + battle(false), + held(false), + effect(UINT_MAX), + val1(UINT_MAX), + val2(UINT_MAX), + val3(1, 1), + val4(UINT_MAX), + val5(UINT_MAX) { LogCtor("ItemEffect", _id); - overworld = false; - battle = false; - held = false; - effect = UINT_MAX; - val1 = INT_MAX; - val2 = INT_MAX; - val3.Set(1, 1); - val4 = UINT_MAX; - val5 = UINT_MAX; id = _id; } @@ -61,6 +61,7 @@ void PokeGen::PokeMod::ItemEffect::Validate() { LogValidateStart("ItemEffect", id); // TODO (Validation#1#): ItemEffect Validation +# warning "ItemEffect Validation" LogValidateOver("ItemEffect", id, isValid); } @@ -70,7 +71,6 @@ void PokeGen::PokeMod::ItemEffect::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("ItemEffect"); } @@ -95,7 +95,6 @@ void PokeGen::PokeMod::ItemEffect::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::ItemEffect::ExportIni(std::ofstream &fout, const String &item) const { LogExportStart("ItemEffect", id); - // Make elements Ini exItemEffect(item + " itemEffect"); exItemEffect.AddField("id", id); exItemEffect.AddField("overworld", overworld); @@ -178,6 +177,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1) case IE_MAP: case IE_ITEMFINDER: case IE_BIKE: + case IE_SCOPE: LogNoUse("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]); break; case IE_LEVEL_BOOST: @@ -203,7 +203,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1) LogOutOfRange("ItemEffect", id, "val1", v1, "effect", "Modify Stat (Battle)"); break; case IE_FISH: - case IE_SCOPE: case IE_COIN: case IE_COIN_CASE: val1 = v1; diff --git a/pokemod/ItemStorage.cpp b/pokemod/ItemStorage.cpp index 57f09ef5..591f4d8d 100644 --- a/pokemod/ItemStorage.cpp +++ b/pokemod/ItemStorage.cpp @@ -73,8 +73,8 @@ void PokeGen::PokeMod::ItemStorage::Validate(const wxListBox &output) } if (!player) { - LogVarNotValid("ItemStorage", id, "player"); - output.Append(ConsoleLogVarNotValid("ItemStorage", id, "player")); + LogVarNotValid("ItemStorage", id, "player", name); + output.Append(ConsoleLogVarNotValid("ItemStorage", id, "player", name)); isValid = false; } LogValidateOver("ItemStorage", id, isValid, name); @@ -87,13 +87,12 @@ void PokeGen::PokeMod::ItemStorage::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("ItemStorage"); } else id = _id; - ini.GetValue("name", name, ""); + ini.GetValue("name", name); ini.GetValue("computer", computer, 0); ini.GetValue("player", player, 1); LogImportOver("ItemStorage", id, name); diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index 32728d90..20db2d5d 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -26,9 +26,9 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::Map::Map(const unsigned _id) : - name(""), - flyWarp(UINT_MAX), - type(UINT_MAX) + name(""), + flyWarp(UINT_MAX), + type(UINT_MAX) { LogCtor("Map", id); id = _id; @@ -50,7 +50,6 @@ PokeGen::PokeMod::Map::~Map() void PokeGen::PokeMod::Map::Validate() { LogValidateStart("Map", id, name); - // Make sure the name is set to something if (name == "") { LogVarNotSet("Map", id, "name"); @@ -66,65 +65,166 @@ void PokeGen::PokeMod::Map::Validate() LogVarNotValid("Map", id, "type", name); isValid = false; } - // Check if there are any effects defined + std::map idChecker; + std::map nameChecker; if (GetMapEffectCount()) { - // Validate each effect for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { LogSubmoduleIterate("Map", id, "effect", i->GetId(), name); - // If an effect isn't valid, neither is the map 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); + 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); + isValid = false; + } + } + idChecker.clear(); + nameChecker.clear(); } else LogSubmoduleEmpty("Map", id, "effect", name); - // Check if there are any trainers defined if (GetMapTrainerCount()) { - // Validate each trainer for (std::vector::iterator i = trainers.begin(); i != trainers.end(); ++i) { LogSubmoduleIterate("Map", id, "trainer", i->GetId(), name); - // If a trainer isn't valid, neither is the map 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); + 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); + isValid = false; + } + } + idChecker.clear(); + nameChecker.clear(); } else LogSubmoduleEmpty("Map", id, "trainer", name); - // Check if there are any warps defined if (GetMapWarpCount()) { - // Validate each warp for (std::vector::iterator i = warps.begin(); i != warps.end(); ++i) { LogSubmoduleIterate("Map", id, "warp", i->GetId(), name); - // If a warp isn't valid, neither is the map 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); + 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); + isValid = false; + } + } + idChecker.clear(); + nameChecker.clear(); } else { LogSubmoduleEmpty("Map", id, "warp", name); isValid = false; } - // Check if there are any wild lists defined if (GetMapWildListCount()) { - // Validate each wild list for (std::vector::iterator i = wildLists.begin(); i != wildLists.end(); ++i) { LogSubmoduleIterate("Map", id, "wild list", i->GetId(), name); - // If a wildList isn't valid, neither is the map 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); + isValid = false; + } } + idChecker.clear(); } else LogSubmoduleEmpty("Map", id, "effect", name); + for (unsigned i = 0; i < GetWidth(); ++i) + { + for (unsigned j = 0; j < GetHeight(); ++j) + { + if (!curPokeMod.GetTile(tiles[i][j])) + { + LogVarNotValid("Map", id, String("tiles[%u][%u]", i, j), name); + isValid = false; + } + } + } LogValidateOver("Map", id, isValid, name); } @@ -132,7 +232,6 @@ void PokeGen::PokeMod::Map::Validate() void PokeGen::PokeMod::Map::Validate(const wxListBox &output) { LogValidateStart("Map", id, name); - // Make sure the name is set to something if (name == "") { LogVarNotSet("Map", id, "Name", name); @@ -142,60 +241,148 @@ void PokeGen::PokeMod::Map::Validate(const wxListBox &output) if (!GetWarp(flyWarp)) { LogVarNotValid("Map", id, "flyWarp", name); - output.append(ConsoleLogVarNotValid("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)); + output.Append(ConsoleLogVarNotValid("Map", id, "type", name)); isValid = false; } - // Check if there are any effects defined + std::map idChecker; + std::map nameChecker; if (GetMapEffectCount()) { - // Validate each effect for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { LogSubmoduleIterate("Map", id, "effect", i->GetId(), name); - // If an effect isn't valid, neither is the map 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)); } - // Check if there are any trainers defined if (GetMapTrainerCount()) { - // Validate each trainer for (std::vector::iterator i = trainers.begin(); i != trainers.end(); ++i) { LogSubmoduleIterate("Map", id, "trainer", i->GetId(), name); - // If a trainer isn't valid, neither is the map 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)); } - // Check if there are any warps defined if (GetMapWarpCount()) { - // Validate each warp for (std::vector::iterator i = warps.begin(); i != warps.end(); ++i) { LogSubmoduleIterate("Map", id, "warp", i->GetId(), name); - // If a warp isn't valid, neither is the map 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 { @@ -203,23 +390,42 @@ void PokeGen::PokeMod::Map::Validate(const wxListBox &output) output.Append(ConsoleLogSubmoduleEmpty("Map", id, "warp", name)); isValid = false; } - // Check if there are any wild lists defined if (GetMapWildListCount()) { - // Validate each wild list for (std::vector::iterator i = wildLists.begin(); i != wildLists.end(); ++i) { LogSubmoduleIterate("Map", id, "wild list", i->GetId(), name); - // If a wild list isn't valid, neither is the Map 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, "effect", id, name); - output.Append(ConsoleLogSubmoduleEmpty("Map", id, "effect", name)); - isValid = false; + 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 (!curPokeMod.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); } @@ -231,15 +437,24 @@ void PokeGen::PokeMod::Map::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("Map"); } else id = _id; + unsigned i; + unsigned j; ini.GetValue("name", name); ini.GetValue("flyWarp", flyWarp); ini.GetValue("type", type); + ini.GetValue("width", i, 0); + ini.GetValue("height", j, 0); + tiles.resize(i, j, Frac(1, 1)); + for (unsigned i = 0; i < GetWidth(); ++i) + { + for (unsigned j = 0; j < GetHeight(); ++j) + ini.GetValue(String("tiles-%u-%u", i, j), tiles[i][j]); + } effects.clear(); trainers.clear(); warps.clear(); @@ -250,12 +465,18 @@ void PokeGen::PokeMod::Map::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::Map::ExportIni(std::ofstream &fout) const { LogExportStart("Map", id, name); - // Make elements Ini exMap("Map"); exMap.AddField("id", id); exMap.AddField("name", name); exMap.AddField("flyWarp", flyWarp); exMap.AddField("type", type); + exMap.AddField("width", GetWidth()); + exMap.AddField("height", GetHeight()); + for (unsigned i = 0; i < GetWidth(); ++i) + { + for (unsigned j = 0; j < GetWidth(); ++j) + exMap.AddField(String("tiles-%u-%u", i, j), tiles[i][j]); + } exMap.Export(fout); for (std::vector::const_iterator i = effects.begin(); i != effects.end(); ++i) i->ExportIni(fout, name); @@ -419,7 +640,6 @@ unsigned PokeGen::PokeMod::Map::GetMapEffectCount() const void PokeGen::PokeMod::Map::NewMapEffect(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapEffectCount(); ++i) { if (!GetMapEffect(i)) @@ -493,7 +713,6 @@ unsigned PokeGen::PokeMod::Map::GetMapTrainerCount() const void PokeGen::PokeMod::Map::NewMapTrainer(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapTrainerCount(); ++i) { if (!GetMapTrainer(i)) @@ -567,7 +786,6 @@ unsigned PokeGen::PokeMod::Map::GetMapWarpCount() const void PokeGen::PokeMod::Map::NewMapWarp(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapWarpCount(); ++i) { if (!GetMapWarp(i)) @@ -629,7 +847,6 @@ unsigned PokeGen::PokeMod::Map::GetMapWildListCount() const void PokeGen::PokeMod::Map::NewMapWildList(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapWildListCount(); ++i) { if (!GetMapWildList(i)) diff --git a/pokemod/Map.h b/pokemod/Map.h index 70ecbb28..3afaca5f 100644 --- a/pokemod/Map.h +++ b/pokemod/Map.h @@ -25,6 +25,7 @@ #define __POKEMOD_MAP__ #include +#include #include "Object.h" #include "String.h" #include "Matrix.h" diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp index 35022b16..2735fd78 100644 --- a/pokemod/MapEffect.cpp +++ b/pokemod/MapEffect.cpp @@ -26,16 +26,16 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapEffect::MapEffect(const unsigned _id) : - name(""), - coordinate(0, 0), - existFlag(0, 0), - skin(""), - effect(UINT_MAX), - val1(UINT_MAX), - val2(UINT_MAX), - direction(UINT_MAX), - isTransparent(false), - dialog(UINT_MAX) + name(""), + coordinate(0, 0), + existFlag(0, 0), + skin(""), + effect(UINT_MAX), + val1(UINT_MAX), + val2(UINT_MAX), + direction(UINT_MAX), + isTransparent(false), + dialog(UINT_MAX) { LogCtor("MapEffect", _id); id = _id; @@ -57,14 +57,15 @@ PokeGen::PokeMod::MapEffect::~MapEffect() void PokeGen::PokeMod::MapEffect::Validate() { LogValidateStart("MapEffect", id, name); - // TODO (Ben#1#): MapEffect validation + // TODO (Validation#1#): MapEffect validation +# warning "MapEffect Validation" LogValidateOver("MapEffect", id, isValid, name); } #ifdef PG_DEBUG_WINDOW void PokeGen::PokeMod::MapEffect::Validate(const wxListBox &output) { - + } #endif @@ -205,7 +206,7 @@ void PokeGen::PokeMod::MapEffect::SetEffect(const String &e) void PokeGen::PokeMod::MapEffect::SetVal1(const unsigned v1) { LogSetVar("MapEffect", id, "val1", v1, name); - switch(effect) + switch (effect) { default: LogNotSet("MapEffect", id, "val1", v1, "effect"); @@ -215,7 +216,7 @@ void PokeGen::PokeMod::MapEffect::SetVal1(const unsigned v1) void PokeGen::PokeMod::MapEffect::SetVal2(const unsigned v2) { LogSetVar("MapEffect", id, "val2", v2, name); - switch(effect) + switch (effect) { default: LogNotSet("MapEffect", id, "val2", v2, "effect"); @@ -224,7 +225,7 @@ void PokeGen::PokeMod::MapEffect::SetVal2(const unsigned v2) void PokeGen::PokeMod::MapEffect::SetVal2(const String &v2) { - switch(effect) + switch (effect) { default: LogNotSet("MapEffect", id, "val2", v2, "effect"); @@ -253,7 +254,7 @@ void PokeGen::PokeMod::MapEffect::SetDialog(const unsigned d) { LogSetVar("MapEffect", id, "dialog", d, name); if (curPokeMod.GetDialog(d)) - dialog = d; + dialog = d; } PokeGen::PokeMod::String PokeGen::PokeMod::MapEffect::GetName() const @@ -340,9 +341,9 @@ PokeGen::PokeMod::String PokeGen::PokeMod::MapEffect::GetVal2String() const { LogFetchVar("MapEffect", id, "val2 string", val2, name); String ret = ""; - switch(effect) + switch (effect) { - // TODO (Ben#1#): Effect code + // TODO (Ben#1#): Effect code } return ret; } diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp index a42299a3..5516e7e3 100644 --- a/pokemod/MapTrainer.cpp +++ b/pokemod/MapTrainer.cpp @@ -26,17 +26,17 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapTrainer::MapTrainer(const unsigned _id) : - name(""), - coordinate(0, 0), - skin(""), - sight(0), - direction(UINT_MAX), - ai(""), - appearFlag(0, 0), - overworldDialog(UINT_MAX), - winDialog(UINT_MAX), - loseDialog(UINT_MAX), - leadPokemon(UINT_MAX) + name(""), + coordinate(0, 0), + skin(""), + sight(0), + direction(UINT_MAX), + ai(""), + appearFlag(0, 0), + overworldDialog(UINT_MAX), + winDialog(UINT_MAX), + loseDialog(UINT_MAX), + leadPokemon(UINT_MAX) { LogCtor("MapTrainer", _id); id = _id; @@ -104,16 +104,23 @@ void PokeGen::PokeMod::MapTrainer::Validate() LogVarNotValid("MapTrainer", id, "leadPokemon", name); isValid = false; } - // Check if there are any Pokémon defined if (GetMapTrainerTeamCount()) { - // Validate each Pokémon + std::map idChecker; for (std::vector::iterator i = team.begin(); i != team.end(); ++i) { LogSubmoduleIterate("MapTrainer", id, "team Pokémon", i->GetId(), name); - // If a Pokémon isn't valid, neither is the ability 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("MapTrainer", id, "team Pokémon", i->first, name); + isValid = false; + } } } else @@ -131,7 +138,7 @@ void PokeGen::PokeMod::MapTrainer::Validate(const wxListBox &output) if (name == "") { LogVarNotSet("MapTrainer", id, "name"); - output.append(ConsoleLogVarNotSet("MapTrainer", id, "name")); + output.Append(ConsoleLogVarNotSet("MapTrainer", id, "name")); isValid = false; } if (!skin.DoesExist()) @@ -139,19 +146,19 @@ void PokeGen::PokeMod::MapTrainer::Validate(const wxListBox &output) if (skin == "") { LogVarNotSet("MapTrainer", id, "skin", name); - output.append(ConsoleLogVarNotSet("MapTrainer", id, "skin", name)); + output.Append(ConsoleLogVarNotSet("MapTrainer", id, "skin", name)); } else { LogVarNotValid("MapTrainer", id, "skin", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "skin", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "skin", name)); } isValid = false; } if (DIR_END_NONE <= direction) { LogVarNotValid("MapTrainer", id, "direction", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "direction", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "direction", name)); isValid = false; } if (!ai.DoesExist()) @@ -159,55 +166,63 @@ void PokeGen::PokeMod::MapTrainer::Validate(const wxListBox &output) if (ai == "") { LogVarNotSet("MapTrainer", id, "ai", name); - output.append(ConsoleLogVarNotSet("MapTrainer", id, "ai", name)); + output.Append(ConsoleLogVarNotSet("MapTrainer", id, "ai", name)); } else { LogVarNotValid("MapTrainer", id, "ai", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "ai", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "ai", name)); } isValid = false; } if (!curPokeMod.GetDialog(overworldDialog)) { LogVarNotValid("MapTrainer", id, "overworldDialog", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "overworldDialog", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "overworldDialog", name)); isValid = false; } if (!curPokeMod.GetDialog(winDialog)) { LogVarNotValid("MapTrainer", id, "winDialog", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "winDialog", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "winDialog", name)); isValid = false; } if (!curPokeMod.GetDialog(loseDialog)) { LogVarNotValid("MapTrainer", id, "loseDialog", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "loseDialog", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "loseDialog", name)); isValid = false; } if (!GetMapTrainerTeam(leadPokemon)) { LogVarNotValid("MapTrainer", id, "leadPokemon", name); - output.append(ConsoleLogVarNotValid("MapTrainer", id, "leadPokemon", name)); + output.Append(ConsoleLogVarNotValid("MapTrainer", id, "leadPokemon", name)); isValid = false; } - // Check if there are any Pokémon defined if (GetMapTrainerTeamCount()) { - // Validate each Pokémon + std::map idChecker; for (std::vector::iterator i = team.begin(); i != team.end(); ++i) { LogSubmoduleIterate("MapTrainer", id, "team Pokémon", i->GetId(), name); - // If a Pokémon isn't valid, neither is the ability if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + } + for (std::map::const_iterator i = idChecekr.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("MapTrainer", id, "team Pokémon", i->first, name); + output.Append(ConsoleLogDuplicateId("MapTrainer", id, "team Pokémon", i->first, name)); + isValid = false; + } } } else { LogSubmoduleEmpty("MapTrainer", id, "team Pokémon", name); - output.append(ConsoleLogSubmoduleEmpty("MapTrainer", id, "team Pokémon", name)); + output.Append(ConsoleLogSubmoduleEmpty("MapTrainer", id, "team Pokémon", name)); isValid = false; } LogValidateOver("MapTrainer", id, isValid, name); @@ -248,7 +263,7 @@ void PokeGen::PokeMod::MapTrainer::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MapTrainer::ExportIni(std::ofstream &fout, const String &map) const { LogExportStart("MapTrainer", id, name); - Ini exMapTrainer(map + "MapTrainer"); + Ini exMapTrainer("mapTrainer " + map); exMapTrainer.AddField("id", id); exMapTrainer.AddField("name", name); exMapTrainer.AddField("name", name); @@ -364,14 +379,14 @@ void PokeGen::PokeMod::MapTrainer::SetOverworldDialog(const unsigned o) { LogSetVar("MapTrainer", id, "overworldDialog", o, name); if (curPokeMod.GetDialog(o)) - overworldDialog = o; + overworldDialog = o; } void PokeGen::PokeMod::MapTrainer::SetWinDialog(const unsigned w) { LogSetVar("MapTrainer", id, "winDialog", w, name); if (curPokeMod.GetDialog(w)) - winDialog = w; + winDialog = w; } PokeGen::PokeMod::String PokeGen::PokeMod::MapTrainer::GetName() const @@ -534,7 +549,6 @@ unsigned PokeGen::PokeMod::MapTrainer::GetMapTrainerTeamCount() const void PokeGen::PokeMod::MapTrainer::NewMapTrainerTeam(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapTrainerTeamCount(); ++i) { if (!GetMapTrainerTeam(i)) diff --git a/pokemod/MapTrainer.h b/pokemod/MapTrainer.h index ba6692e3..ed319d4e 100644 --- a/pokemod/MapTrainer.h +++ b/pokemod/MapTrainer.h @@ -25,6 +25,7 @@ #define __POKEMOD_MAPTRAINER__ #include +#include #include "Object.h" #include "String.h" #include "Flag.h" diff --git a/pokemod/MapTrainerTeam.cpp b/pokemod/MapTrainerTeam.cpp index bd7c59d6..6e61bee9 100644 --- a/pokemod/MapTrainerTeam.cpp +++ b/pokemod/MapTrainerTeam.cpp @@ -26,9 +26,9 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapTrainerTeam::MapTrainerTeam(const unsigned _id) : - species(UINT_MAX), - level(1), - item(UINT_MAX) + species(UINT_MAX), + level(1), + item(UINT_MAX) { LogCtor("MapTrainerTeam", _id); id = _id; @@ -100,7 +100,6 @@ void PokeGen::PokeMod::MapTrainerTeam::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("MapTrainerTeam"); } @@ -115,8 +114,7 @@ void PokeGen::PokeMod::MapTrainerTeam::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MapTrainerTeam::ExportIni(std::ofstream &fout, const String &map, const unsigned trainerId) const { LogExportStart("MapTrainerTeam", id); - // Make elements - Ini exMapTrainerTeam(map + String(" %u MapTrainerTeam", trainerId)); + Ini exMapTrainerTeam(String("MapTrainerTeam %u ", trainerId) + map); exMapTrainerTeam.AddField("id", id); exMapTrainerTeam.AddField("species", species); exMapTrainerTeam.AddField("level", level); diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index 3fbf3cf4..ee7e4e5f 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -26,20 +26,20 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapWarp::MapWarp(const unsigned _id) : - name(""), - coordinate(0, 0), - fromUp(false), - fromDown(false), - fromLeft(false), - fromRight(false), - directionOut(UINT_MAX), - warpType(UINT_MAX), - isBiking(false), - isFlash(false), - toMap(UINT_MAX), - toWarp(UINT_MAX), - workingFlag(0, 0), - dialog(UINT_MAX) + name(""), + coordinate(0, 0), + fromUp(false), + fromDown(false), + fromLeft(false), + fromRight(false), + directionOut(UINT_MAX), + warpType(UINT_MAX), + isBiking(false), + isFlash(false), + toMap(UINT_MAX), + toWarp(UINT_MAX), + workingFlag(0, 0), + dialog(UINT_MAX) { LogCtor("MapWarp", _id); id = _id; @@ -109,25 +109,25 @@ void PokeGen::PokeMod::MapWarp::Validate(const wxListBox &output) if (name == "") { LogVarNotSet("MapWarp", id, "name"); - output.append(ConsoleLogVarNotSet("MapWarp", id, "name")); + output.Append(ConsoleLogVarNotSet("MapWarp", id, "name")); isValid = false; } if (!fromUp && !fromDown && !fromLeft && !fromRight) { LogVarNotSet("MapWarp", id, "directions", name); - output.append(ConsoleLogVarNotSet("MapWarp", id, "directions", name)); + output.Append(ConsoleLogVarNotSet("MapWarp", id, "directions", name)); isValid = false; } if (DIR_END_NONE <= directionOut) { LogVarNotValid("MapWarp", id, "directionOut", name); - output.append(ConsoleLogVarNotValid("MapWarp", id, "directionOut", name)); + output.Append(ConsoleLogVarNotValid("MapWarp", id, "directionOut", name)); isValid = false; } if (WT_END <= warpType) { LogVarNotValid("MapWarp", id, "warpType", name); - output.append(ConsoleLogVarNotValid("MapWarp", id, "warpType", name)); + output.Append(ConsoleLogVarNotValid("MapWarp", id, "warpType", name)); isValid = false; } if (const Map *m = curPokeMod.GetMap(toMap)) @@ -135,20 +135,20 @@ void PokeGen::PokeMod::MapWarp::Validate(const wxListBox &output) if (!m->GetMapWarp(toWarp)) { LogVarNotValid("MapWarp", id, "toWarp"); - output.append(ConsoleLogVarNotValid("MapWarp", id, "toWarp")); + output.Append(ConsoleLogVarNotValid("MapWarp", id, "toWarp")); isValid = false; } } else { LogVarNotValid("MapWarp", id, "toMap"); - output.append(ConsoleLogVarNotValid("MapWarp", id, "toMap")); + output.Append(ConsoleLogVarNotValid("MapWarp", id, "toMap")); isValid = false; } if (!curPokeMod.GetDialog(dialog)) { LogVarNotValid("MapWarp", id, "dialog"); - output.append(ConsoleLogVarNotValid("MapWarp", id, "dialog")); + output.Append(ConsoleLogVarNotValid("MapWarp", id, "dialog")); isValid = false; } LogValidateOver("MapWarp", id, isValid, name); @@ -192,7 +192,7 @@ void PokeGen::PokeMod::MapWarp::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MapWarp::ExportIni(std::ofstream &fout, const String &map) const { LogExportStart("MapWarp", id, name); - Ini exMapWarp(map + " mapWarp"); + Ini exMapWarp("mapWarp " + map); exMapWarp.AddField("id", id); exMapWarp.AddField("coordinate-x", coordinate.GetX()); exMapWarp.AddField("coordinate-y", coordinate.GetY()); @@ -318,8 +318,8 @@ void PokeGen::PokeMod::MapWarp::SetToMap(const String &t) LogSetVar("MapWarp", id, "toMap string", t, name); if (const Map *m = curPokeMod.GetMap(t)) { - toMap = m->GetId(); - toWarp = UINT_MAX; + toMap = m->GetId(); + toWarp = UINT_MAX; } } diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index d7dab5f5..6ffdcf28 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -26,9 +26,9 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapWildList::MapWildList(const unsigned _id) : - control(UINT_MAX), - value(INT_MAX), - scope(INT_MAX) + control(UINT_MAX), + value(INT_MAX), + scope(INT_MAX) { LogCtor("MapWildList", _id); id = _id; @@ -54,15 +54,35 @@ void PokeGen::PokeMod::MapWildList::Validate() #endif { LogValidateStart("MapWildList", id); + unsigned i = 0; + unsigned j = 0; + bool temp = false; if (CTRL_END <= control) { LogVarNotValid("MapWildList", id, "control"); - isValid = true; + isValid = false; } else if (control == CTRL_FISHING) { - // TODO (Ben#1#): Value validation + if (const Item *item = curPokeMod.GetItem(value)) + { + while ((i < item->GetItemEffectCount()) || !temp) + { + if (const ItemEffect *e = item->GetItemEffect(j++)) + { + ++i; + if (e->GetEffect() == IE_FISH) + temp = true; + } + } + } + if (!temp) + { + LogVarNotValid("ItemEffect", id, "value"); + isValid = false; + } } + std::map idChecker; for (std::vector::const_iterator i = times.begin(); i != times.end(); ++i) { if (!curPokeMod.GetTime(*i)) @@ -70,8 +90,42 @@ void PokeGen::PokeMod::MapWildList::Validate() LogVarNotValid("MapWildList", id, "times"); isValid = false; } + ++idChecker[*i]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("MapWildList", id, "times", i->first); + isValid = false; + } + } + if (scope != UINT_MAX) + { + temp = false; + if (const Item *item = curPokeMod.GetItem(scope)) + { + i = 0; + j = 0; + while (i < item->GetItemEffectCount()) + { + if (const ItemEffect *e = item->GetItemEffect(j++)) + { + ++i; + if (e->GetEffect() == IE_SCOPE) + { + temp = true; + break; + } + } + } + } + if (!temp) + { + LogVarNotValid("ItemEffect", id, "value"); + isValid = false; + } } - // TODO (Ben#1#): Scope validation LogValidateOver("MapWildList", id, isValid); } @@ -81,7 +135,6 @@ void PokeGen::PokeMod::MapWildList::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("MapWildList"); } @@ -106,7 +159,6 @@ void PokeGen::PokeMod::MapWildList::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MapWildList::ExportIni(std::ofstream &fout, const String &map) const { LogExportStart("MapWildList", id); - // Make elements Ini exMapWildList(map + " mapWildList"); exMapWildList.AddField("id", id); exMapWildList.AddField("control", control); @@ -130,11 +182,11 @@ void PokeGen::PokeMod::MapWildList::SetControl(const unsigned c) void PokeGen::PokeMod::MapWildList::SetValue(const unsigned v) { - unsigned i = 0; - unsigned j = 0; LogSetVar("MapWildList", id, "value", v); if (const Item *item = curPokeMod.GetItem(v)) { + unsigned i = 0; + unsigned j = 0; while (i < item->GetItemEffectCount()) { if (const ItemEffect *effect = item->GetItemEffect(j++)) @@ -142,7 +194,7 @@ void PokeGen::PokeMod::MapWildList::SetValue(const unsigned v) ++i; if (effect->GetEffect() == IE_FISH) { - value = effect->GetVal1(); + value = v; break; } } @@ -187,17 +239,22 @@ void PokeGen::PokeMod::MapWildList::SetTime(const String &ts, const bool t) void PokeGen::PokeMod::MapWildList::SetScope(const unsigned s) { LogSetVar("MapWildList", id, "scope", s); - unsigned i = 0; - unsigned j = 0; + if (s == UINT_MAX) + { + scope = UINT_MAX; + return; + } if (const Item *item = curPokeMod.GetItem(s)) { + unsigned i = 0; + unsigned j = 0; while (i < item->GetItemEffectCount()) { if (const ItemEffect *effect = item->GetItemEffect(j++)) { ++i; if (effect->GetEffect() == IE_SCOPE) - scope = effect->GetVal1(); + scope = s; } } } @@ -206,6 +263,11 @@ void PokeGen::PokeMod::MapWildList::SetScope(const unsigned s) void PokeGen::PokeMod::MapWildList::SetScope(const String &s) { LogSetVar("MapWildList", id, "scope string", s); + if (s == "None") + { + scope = UINT_MAX; + return; + } if (const Item *i = curPokeMod.GetItem(s)) SetScope(i->GetId()); } @@ -280,7 +342,6 @@ unsigned PokeGen::PokeMod::MapWildList::GetMapWildPokemonCount() const void PokeGen::PokeMod::MapWildList::NewMapWildPokemon(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMapWildPokemonCount(); ++i) { if (!GetMapWildPokemon(i)) diff --git a/pokemod/MapWildList.h b/pokemod/MapWildList.h index 56499367..f1817879 100644 --- a/pokemod/MapWildList.h +++ b/pokemod/MapWildList.h @@ -57,7 +57,7 @@ namespace PokeGen bool GetTime(const unsigned ts) const; bool GetTime(const String &ts) const; int GetScope() const; - + const MapWildPokemon *GetMapWildPokemon(const unsigned _id) const; const MapWildPokemon *GetMapWildPokemon(const String &n) const; unsigned GetMapWildPokemonCount() const; @@ -70,9 +70,9 @@ namespace PokeGen # endif unsigned control; - int value; + unsigned value; std::vector times; - int scope; + unsigned scope; std::vector pokemon; }; diff --git a/pokemod/MapWildPokemon.cpp b/pokemod/MapWildPokemon.cpp index 07a4dee3..cc42f3b4 100644 --- a/pokemod/MapWildPokemon.cpp +++ b/pokemod/MapWildPokemon.cpp @@ -26,9 +26,9 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::MapWildPokemon::MapWildPokemon(const unsigned _id) : - pokemon(UINT_MAX), - level(1), - weight(1) + pokemon(UINT_MAX), + level(1), + weight(1) { LogCtor("MapWildPokemon", _id); id = _id; @@ -100,7 +100,6 @@ void PokeGen::PokeMod::MapWildPokemon::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("MapWildPokemon"); } @@ -115,8 +114,7 @@ void PokeGen::PokeMod::MapWildPokemon::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MapWildPokemon::ExportIni(std::ofstream &fout, const String &map, const unsigned listId) const { LogExportStart("MapWildPokemon", id); - // Make elements - Ini exMapWildPokemon(map + String(" %u mapWildPokemon", listId)); + Ini exMapWildPokemon(String("mapWildPokemon %u ", listId) + map); exMapWildPokemon.AddField("id", id); exMapWildPokemon.AddField("pokemon", pokemon); exMapWildPokemon.AddField("level", level); diff --git a/pokemod/Matrix.h b/pokemod/Matrix.h index c4ea42c0..7b78bcec 100644 --- a/pokemod/Matrix.h +++ b/pokemod/Matrix.h @@ -37,13 +37,13 @@ namespace PokeGen { public: MatrixBase() : - width(0), - height(0) + width(0), + height(0) { } MatrixBase(const unsigned w, const unsigned h, const T &d = T()) : - width(w), - height(h) + width(w), + height(h) { matrix.resize(w, std::vector(h, d)); } @@ -64,7 +64,7 @@ namespace PokeGen if (height < pos) return false; for (typename std::vector< std::vector >::iterator i = matrix.begin(); i != matrix.end(); ++i) - i->insert(pos, d); + i->insert(i->begin() + pos, d); ++height; return true; } @@ -72,7 +72,7 @@ namespace PokeGen { if (width < pos) return false; - matrix.insert(pos, std::vector(height, d)); + matrix.insert(matrix.begin() + pos, std::vector(height, d)); ++width; return true; } @@ -93,6 +93,10 @@ namespace PokeGen --width; return true; } + void Clear() + { + matrix.clear(); + } bool Set(const unsigned row, const unsigned col, const T &s) { @@ -101,6 +105,13 @@ namespace PokeGen (matrix.begin() + col)->assign(row, s); return true; } + void Resize(const unsigned w, const unsigned h, const T &d = T()) + { + Clear(); + width = w; + height = h; + matrix.resize(w, std::vector(h, d)); + } T Get(const unsigned row, const unsigned col) const { diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 6dee45f6..5aa55267 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -25,28 +25,25 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; -PokeGen::PokeMod::Move::Move(const unsigned _id) +PokeGen::PokeMod::Move::Move(const unsigned _id) : + name(""), + accuracy(1, 1), + power(0), + type(UINT_MAX), + special(false), + powerPoints(0), + target(UINT_MAX), + ignoreAccuracy(false), + ignoreFlinch(false), + sound(false), + description(""), + contestType(UINT_MAX), + contestPoints(0), + jamPoints(0), + contestEffect(UINT_MAX), + contestTarget(UINT_MAX) { LogCtor("Move", _id); - name = ""; - accuracy.Set(1, 1); - power = 0; - type = UINT_MAX; - special = false; - powerPoints = 1; - target = UINT_MAX; - numTargets = 0; - targetChoice = UINT_MAX; - ignoreAccuracy = false; - ignoreFlinch = false; - sound = false; - description = ""; - contestType = UINT_MAX; - contestPoints = 0; - jamPoints = 0; - contestEffect = UINT_MAX; - contestTarget = UINT_MAX; - effects.clear(); id = _id; } @@ -120,6 +117,40 @@ void PokeGen::PokeMod::Move::Validate() isValid = false; } } + if (GetMoveEffectCount()) + { + std::map idChecker; + std::map effectChecker; + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) + { + LogSubmoduleIterate("Move", id, "effect", i->GetId(), name); + if (!i->IsValid()) + isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Move", id, "effect", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Move", id, "effect", i->first, name); + isValid = false; + } + } + } + else + { + LogSubmoduleEmpty("Move", id, "effect", name); + isValid = false; + } LogValidateOver("Move", id, name); } @@ -127,40 +158,40 @@ void PokeGen::PokeMod::Move::Validate() void PokeGen::PokeMod::Move::Validate(const wxListBox &output) { LogValidateStart("Move", id, name); - if (name == "" + if (name == "") { LogVarNotSet("Move", id, "name"); - output.append(ConsoleLogVarNotSet("Move", id, "name");); + output.Append(ConsoleLogVarNotSet("Move", id, "name");); isValid = ""; } if (!curPokeMod.GetType(type)) { LogVarNotValid("Move", id, "type", name); - output.append(ConsoleLogVarNotValid("Move", id, "type", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "type", name)); isValid = false; } if (!powerPoints) { LogVarNotValid("Move", id, "powerPoints", name); - output.append(ConsoleLogVarNotValid("Move", id, "powerPoints", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "powerPoints", name)); isValid = false; } if (TAR_END <= target) { LogVarNotValid("Move", id, "target", name); - output.append(ConsoleLogVarNotValid("Move", id, "target", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "target", name)); isValid = false; } if (!targets || (curPokeMod.GetMaxFight() << 1) < numTargets) { LogVarNotValid("Move", id, "numTargets", name); - output.append(ConsoleLogVarNotValid("Move", id, "numTargets", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "numTargets", name)); isValid = false; } if (CHC_END <= targetChoice) { LogVarNotValid("Move", id, "targetChoice", name); - output.append(ConsoleLogVarNotValid("Move", id, "targetChoice", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "targetChoice", name)); isValid = false; } if (curPokeMod.IsContestAllowed()) @@ -168,28 +199,65 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output) if (COTY_END <= contestType) { LogVarNotValid("Move", id, "contestType", name); - output.append(ConsoleLogVarNotValid("Move", id, "contestType", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "contestType", name)); isValid = false; } if (!contestPoints) { LogVarNotValid("Move", id, "contestPoints", name); - output.append(ConsoleLogVarNotValid("Move", id, "contestPoints", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "contestPoints", name)); isValid = false; } if (CONE_END <= contestEffect) { LogVarNotValid("Move", id, "contestEffect", name); - output.append(ConsoleLogVarNotValid("Move", id, "contestEffect", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "contestEffect", name)); isValid = false; } if (CONT_END <= contestTarget) { LogVarNotValid("Move", id, "contestTarget", name); - output.append(ConsoleLogVarNotValid("Move", id, "contestTarget", name)); + output.Append(ConsoleLogVarNotValid("Move", id, "contestTarget", name)); isValid = false; } } + if (GetMoveEffectCount()) + { + std::map idChecker; + std::map effectChecker; + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) + { + LogSubmoduleIterate("Move", id, "effect", i->GetId(), name); + if (!i->IsValid()) + isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Move", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateId("Move", id, "effect", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Move", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateSubmodule("Move", id, "effect", i->first, name)); + isValid = false; + } + } + } + else + { + LogSubmoduleEmpty("Move", id, "effect", name); + output.Append(ConsoleLogSubmoduleEmpty("Move", id, "effect", name)); + isValid = false; + } LogValidateOver("Move", id, move); } #endif @@ -207,7 +275,7 @@ void PokeGen::PokeMod::Move::ImportIni(Ini &ini, const unsigned _id) id = _id; unsigned i; unsigned j; - ini.GetValue("name", name, ""); + ini.GetValue("name", name); ini.GetValue("accuracy-n", i, 1); ini.GetValue("accuracy-d", j, 1); accuracy.Set(i, j); @@ -392,7 +460,7 @@ void PokeGen::PokeMod::Move::SetContestPoints(const int c) void PokeGen::PokeMod::Move::SetJamPoints(const int j) { - LogSetVar("Move", id, "jamPoints",j, name); + LogSetVar("Move", id, "jamPoints", j, name); jamPoints = j; } @@ -603,7 +671,6 @@ unsigned PokeGen::PokeMod::Move::GetMoveEffectCount() const void PokeGen::PokeMod::Move::NewMoveEffect(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetMoveEffectCount(); ++i) { if (!GetMoveEffect(i)) @@ -629,3 +696,4 @@ void PokeGen::PokeMod::Move::DeleteMoveEffect(unsigned _id) } LogSubmoduleRemoveFail("Move", id, "effect", _id, name); } + diff --git a/pokemod/Move.h b/pokemod/Move.h index ccc03850..e585eee2 100644 --- a/pokemod/Move.h +++ b/pokemod/Move.h @@ -25,6 +25,7 @@ #define __POKEMOD_MOVE__ #include +#include #include "Object.h" #include "String.h" #include "MoveEffect.h" diff --git a/pokemod/MoveEffect.cpp b/pokemod/MoveEffect.cpp index fc05511d..88926348 100644 --- a/pokemod/MoveEffect.cpp +++ b/pokemod/MoveEffect.cpp @@ -25,13 +25,13 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; -PokeGen::PokeMod::MoveEffect::MoveEffect(const unsigned _id) +PokeGen::PokeMod::MoveEffect::MoveEffect(const unsigned _id) : + chance(1, 1), + effect(UINT_MAX), + val1(INT_MAX), + val2(UINT_MAX) { LogCtor("MoveEffect", _id); - chance.Set(1, 1); - effect = UINT_MAX; - val1 = INT_MAX; - val2 = UINT_MAX; id = _id; } @@ -56,6 +56,7 @@ void PokeGen::PokeMod::MoveEffect::Validate() { LogValidateStart("MoveEffect", id); // TODO (Validation#1#): MoveEffect Validation +# warning "MoveEffect Validation" LogValidateOver("MoveEffect", id, isValid); } @@ -65,7 +66,6 @@ void PokeGen::PokeMod::MoveEffect::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the element? if (id == UINT_MAX) LogIdNotFound("MoveEffect"); } @@ -84,7 +84,6 @@ void PokeGen::PokeMod::MoveEffect::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::MoveEffect::ExportIni(std::ofstream &fout, const String &move) const { LogExportStart("MoveEffect", id); - // Make elements Ini exMoveEffect(move + " moveEffect"); exMoveEffect.AddField("id", id); exMoveEffect.AddField("chance-n", chance.GetNum()); diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index e7ff5c93..c6059ccb 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -24,7 +24,7 @@ #include "Nature.h" PokeGen::PokeMod::Nature::Nature(const unsigned _id) : - name("") + name("") { LogCtor("Nature", _id); id = _id; @@ -51,13 +51,33 @@ void PokeGen::PokeMod::Nature::Validate() LogVarNotSet("Nature", id, "name"); isValid = false; } + std::map idChecker; + std::map effectChecker; if (GetNatureEffectCount()) { - for (unsigned i = 0; i < GetNatureEffectCount(); ++i) + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) { - LogSubmoduleIterate("Nature", id, "effect", i, name); - if (!effects[i].IsValid()) + LogSubmoduleIterate("Nature", id, "effect", i->GetId(), name); + if (!i->IsValid()) isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetStatString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Nature", id, "effect", i->first, name); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateSubmodule("Nature", id, "effect", i->first, name); + isValid = false; + } } } else @@ -75,16 +95,38 @@ void PokeGen::PokeMod::Nature::Validate(const wxListBox &output) if (name == "") { LogVarNotSet("Nature", id, "name"); - output.Append(ConsoleLogVarNotSet("Nature", id, "name"); + output.Append(ConsoleLogVarNotSet("Nature", id, "name")); isValid = false; } + std::map idChecker; + std::map effectChecker; if (GetNatureEffectCount()) { - for (unsigned i = 0; i < GetNatureEffectCount(); ++i) + for (std::vector::iterator i = effects.begin(); i != effects.end(); ++i) + { + LogSubmoduleIterate("Nature", id, "effect", i->GetId(), name); + if (!i->IsValid()) + isValid = false; + ++idChecker[i->GetId()]; + ++effectChecker[i->GetEffectString()]; + } + for (std::map::const_iterator i = idChecker.begin(); i != idChecker.end(); ++i) + { + if (1 < i->second) + { + LogDuplicateId("Nature", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateId("Nature", id, "effect", i->first, name)); + isValid = false; + } + } + for (std::map::const_iterator i = effectChecker.begin(); i != effectChecker.end(); ++i) { - LogSubmoduleIterate("Nature", "effect", id, i, name); - if (!effects[i].IsValid()) + if (1 < i->second) + { + LogDuplicateSubmodule("Nature", id, "effect", i->first, name); + output.Append(ConsoleLogDuplicateSubmodule("Nature", id, "effect", i->first, name)); isValid = false; + } } } else @@ -104,13 +146,12 @@ void PokeGen::PokeMod::Nature::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the section? if (id == UINT_MAX) LogIdNotFound("Nature"); } else id = _id; - ini.GetValue("name", name, ""); + ini.GetValue("name", name); effects.clear(); LogImportOver("Nature"); } @@ -159,7 +200,6 @@ unsigned PokeGen::PokeMod::Nature::GetNatureEffectCount() const void PokeGen::PokeMod::Nature::NewNatureEffect(Ini *const ini) { unsigned i = 0; - // Find the first unused ID in the vector for (; i < GetNatureEffectCount(); ++i) { if (!GetNatureEffect(i)) diff --git a/pokemod/Nature.h b/pokemod/Nature.h index eb544884..57bd4ba0 100644 --- a/pokemod/Nature.h +++ b/pokemod/Nature.h @@ -46,7 +46,7 @@ namespace PokeGen void SetName(const String &n); String GetName() const; - + const NatureEffect *GetNatureEffect(const unsigned _id) const; unsigned GetNatureEffectCount() const; void NewNatureEffect(Ini *const ini = NULL); diff --git a/pokemod/NatureEffect.cpp b/pokemod/NatureEffect.cpp index 6f040b5f..04ab35f5 100644 --- a/pokemod/NatureEffect.cpp +++ b/pokemod/NatureEffect.cpp @@ -26,8 +26,8 @@ extern PokeGen::PokeMod::Pokemod curPokeMod; PokeGen::PokeMod::NatureEffect::NatureEffect(const unsigned _id) : - stat(UINT_MAX), - multiplier(1, 1) + stat(UINT_MAX), + multiplier(1, 1) { LogCtor("NatureEffect", _id); id = _id; @@ -65,7 +65,7 @@ void PokeGen::PokeMod::NatureEffect::Validate(const wxListBox &output) if ((curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY) <= stat) { LogVarNotValid("NatureEffect", id, "stat"); - output.append(ConsoleLogVarNotValid("NatureEffect", id, "stat")); + output.Append(ConsoleLogVarNotValid("NatureEffect", id, "stat")); isValid = false; } multipler.Reduce(); @@ -80,7 +80,6 @@ void PokeGen::PokeMod::NatureEffect::ImportIni(Ini &ini, const unsigned _id) if (_id == UINT_MAX) { ini.GetValue("id", id); - // Was there an id associated with the section? if (id == UINT_MAX) LogIdNotFound("NatureEffect"); } @@ -98,8 +97,7 @@ void PokeGen::PokeMod::NatureEffect::ImportIni(Ini &ini, const unsigned _id) void PokeGen::PokeMod::NatureEffect::ExportIni(std::ofstream &fout, const String &nature) const { LogExportStart("NatureEffect", id); - // Make elements - Ini exNatureEffect(nature + " natureEffect"); + Ini exNatureEffect("natureEffect " + nature); exNatureEffect.AddField("id", id); exNatureEffect.AddField("stat", stat); exNatureEffect.AddField("multiplier-n", multiplier.GetNum()); diff --git a/pokemod/Object.cpp b/pokemod/Object.cpp index cb9f1f8b..d2d9c315 100644 --- a/pokemod/Object.cpp +++ b/pokemod/Object.cpp @@ -40,7 +40,6 @@ bool PokeGen::PokeMod::Object::IsValid() #ifdef PG_DEBUG_WINDOW bool PokeGen::PokeMod::Object::IsValid(const wxListBox &output) { - // Validate with debugging console output isValid = (id != UINT_MAX); if (isValid) Validate(output); diff --git a/pokemod/Path.cpp b/pokemod/Path.cpp index c8945e28..a8fa5ebb 100644 --- a/pokemod/Path.cpp +++ b/pokemod/Path.cpp @@ -50,7 +50,6 @@ bool PokeGen::PokeMod::Path::DoesExist() { if (*this == "") return false; - // Try to open the file std::ifstream test(c_str(), std::ios::in); test.close(); if (test.fail()) @@ -65,7 +64,6 @@ bool PokeGen::PokeMod::Path::HasExtension(const String &ext) String fileExt(substr(pos + 1)); if ((pos == npos) || (pos + 1 == length()) || (fileExt.length() != ext.length())) return false; - // Loop while the two are equal for (unsigned i = 0; ret && (i < ext.length()); ++i) ret = (tolower(ext[i]) == tolower(fileExt[i])); return ret; diff --git a/pokemod/Point.cpp b/pokemod/Point.cpp index c4e32859..40c97050 100644 --- a/pokemod/Point.cpp +++ b/pokemod/Point.cpp @@ -35,7 +35,6 @@ void PokeGen::PokeMod::Point::ImportIni(Ini &ini) void PokeGen::PokeMod::Point::ExportIni(std::ofstream &fout, const String &val) const { Log(String("Point Export: Starting (%u, %u) as %s", x, y, val.c_str()), PM_DEBUG_INFO); - // Declare the elements Ini exPoint(val); exPoint.AddField("x", x); exPoint.AddField("y", y); diff --git a/pokemod/Point.h b/pokemod/Point.h index 6071d205..b05a7428 100644 --- a/pokemod/Point.h +++ b/pokemod/Point.h @@ -35,8 +35,8 @@ namespace PokeGen { public: inline Point(const unsigned _x = 0, const unsigned _y = 0) : - x(_x), - y(_y) + x(_x), + y(_y) { } diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp index 4799fd89..615fb565 100644 --- a/pokemod/Pokemod.cpp +++ b/pokemod/Pokemod.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: pokemod/Pokemod.cpp -// Purpose: +// Purpose: Define a custom PokéMod for PokéGen // Author: Ben Boeckel // Modified by: Ben Boeckel // Created: Sat Feb 24 21:41:19 2007 @@ -23,7 +23,54 @@ #include "Pokemod.h" -PokeGen::PokeMod::Pokemod::Pokemod() +PokeGen::PokeMod::Pokemod::Pokemod() : + title(""), + version(""), + description(""), + genderAllowed(false), + breedingAllowed(false), + eggSpecies(UINT_MAX), + holdItems(false), + criticalDomains(false), + contestAllowed(false), + abilityAllowed(false), + natureAllowed(false), + numDaycares(0), + numPokemonBoxes(0), + numPokemonPerBox(1), + maxParty(1), + maxFight(1), + maxMoves(1), + maxLevel(1), + maxMoney(0), + hardCash(false), + specialSplit(false), + specialDVSplit(false), + maxDVValue(16), + happiness(false), + happyFaintLoss(0), + happyLevelGain(0), + happySteps(0), + effortValuesAllowed(false), + maxTotalEV(0), + maxEVPerStat(0), + pokerusChance(1, 1), + startMap(UINT_MAX), + startMoney(0), + startCoordinate(0, 0), + startDirection(UINT_MAX), + startDialog(UINT_MAX), + walkSkin(""), + bikeSkin(""), + surfSkin(""), + flySkin(""), + fishSkin(""), + surfFishSkin(""), + superPCUname(""), + superPCPasswd(""), + struggleMove(UINT_MAX), + confuseMove(UINT_MAX), + typeChart(1, 1, Frac(1, 1, true)) { LogCtor("Pokemod", 0); } @@ -43,6 +90,7 @@ void PokeGen::PokeMod::Pokemod::Validate() { LogValidateStart("Pokemod", 0); // TODO (Validation#1#): Pokemod Validation +# warning "Pokemod Validation" LogValidateOver("Pokemod", 0, isValid); } @@ -55,10 +103,2565 @@ void PokeGen::PokeMod::Pokemod::Validate(const wxListBox &output) void PokeGen::PokeMod::Pokemod::ImportIni(std::ifstream &fin) { - // TODO (Ini#1#): Import Pokemod + LogImportStart("Pokemod"); + std::vector sections; + Ini meta("unset"); + while (fin.peek() != '\n') + { + Ini curSection(fin); + if (curSection.GetName() == "pokemod") + { + if (meta.GetName() == "unset") + { + Log(String("Pokemod: Multiple meta data sections in PokéMod file"), PM_DEBUG_ERROR); + return; + } + meta = curSection; + unsigned i; + unsigned j; + curSection.GetValue("title", title); + curSection.GetValue("version", version); + curSection.GetValue("description", description); + curSection.GetValue("genderAllowed", genderAllowed, false); + curSection.GetValue("breedingAllowed", breedingAllowed, false); + curSection.GetValue("eggSpecies", eggSpecies); + curSection.GetValue("holdItems", holdItems, false); + curSection.GetValue("criticalDomains", criticalDomains, false); + curSection.GetValue("contestAllowed", contestAllowed, false); + curSection.GetValue("abilityAllowed", abilityAllowed, false); + curSection.GetValue("natureAllowed", natureAllowed, false); + curSection.GetValue("numDaycares", numDaycares, 0); + curSection.GetValue("numPokemonBoxes", numPokemonBoxes, 0); + curSection.GetValue("numPokemonPerBox", numPokemonPerBox, 1); + curSection.GetValue("maxParty", maxParty, 1); + curSection.GetValue("maxFight", maxFight, 1); + curSection.GetValue("maxMoves", maxMoves, 1); + curSection.GetValue("maxLevel", maxLevel, 0); + curSection.GetValue("maxMoney", maxMoney, 0); + curSection.GetValue("hardCash", hardCash, false); + curSection.GetValue("specialSplit", specialSplit, false); + curSection.GetValue("specialDVSplit", specialDVSplit, false); + curSection.GetValue("maxDVValue", maxDVValue, 16); + curSection.GetValue("happiness", happiness, false); + curSection.GetValue("happyFaintLoss", happyFaintLoss, 0); + curSection.GetValue("happyLevelGain", happyLevelGain, 0); + curSection.GetValue("happySteps", happySteps, 0); + curSection.GetValue("effortValuesAllowed", effortValuesAllowed, false); + curSection.GetValue("maxTotalEV", maxTotalEV, 0); + curSection.GetValue("maxEVPerStat", maxEVPerStat, 0); + curSection.GetValue("pokerusChance-n", i, 1); + curSection.GetValue("pokerusChance-d", j, 1); + pokerusChance.Set(i, j); + curSection.GetValue("startMap", startMap); + curSection.GetValue("startMoney", startMoney, 0); + curSection.GetValue("startCoordinate-x", i, 0); + curSection.GetValue("startCoordinate-y", j, 0); + startCoordinate.Set(i, j); + curSection.GetValue("startDirection", startDirection); + curSection.GetValue("startDialog", startDialog); + curSection.GetValue("walkSkin", walkSkin); + curSection.GetValue("bikeSkin", bikeSkin); + curSection.GetValue("surfSkin", surfSkin); + curSection.GetValue("flySkin", flySkin); + curSection.GetValue("fishSkin", fishSkin); + curSection.GetValue("surfFishSkin", surfFishSkin); + curSection.GetValue("superPCUname", superPCUname); + curSection.GetValue("superPCPasswd", superPCPasswd); + curSection.GetValue("struggleMove", struggleMove); + curSection.GetValue("confuseMove", confuseMove); + } + else if (curSection.GetName() == "ability") + NewAbility(&curSection); + else if (curSection.GetName() == "author") + NewAuthor(&curSection); + else if (curSection.GetName() == "badge") + NewBadge(&curSection); + else if (curSection.GetName() == "coinList") + NewCoinList(&curSection); + else if (curSection.GetName() == "dialog") + NewDialog(&curSection); + else if (curSection.GetName() == "eggGroup") + NewEggGroup(&curSection); + else if (curSection.GetName() == "item") + NewItem(&curSection); + else if (curSection.GetName() == "itemStorage") + NewItemStorage(&curSection); + else if (curSection.GetName() == "map") + NewMap(&curSection); + else if (curSection.GetName() == "move") + NewMove(&curSection); + else if (curSection.GetName() == "nature") + NewNature(&curSection); + else if (curSection.GetName() == "pokemon") + NewPokemon(&curSection); + else if (curSection.GetName() == "status") + NewStatus(&curSection); + else if (curSection.GetName() == "store") + NewStore(&curSection); + else if (curSection.GetName() == "tile") + NewTile(&curSection); + else if (curSection.GetName() == "time") + NewTime(&curSection); + else if (curSection.GetName() == "type") + NewType(&curSection); + else + sections.push_back(curSection); + } + if (meta.GetName() == "unset") + { + Log(String("Pokemod: No meta data found in PokéMod file"), PM_DEBUG_ERROR); + return; + } + for (std::vector::iterator i = types.begin(); i != types.end(); ++i) + { + for (std::vector::iterator j = types.begin(); j != types.end(); ++j) + { + unsigned k; + unsigned l; + meta.GetValue(String("typeChart-%u-%u-n", i->GetId(), j->GetId()), k, 1); + meta.GetValue(String("typeChart-%u-%u-d", i->GetId(), j->GetId()), l, 1); + SetTypeChart(i->GetId(), j->GetId(), k, l); + } + } + std::stringstream ss; + std::string s; + std::string s1; + unsigned u; + for (std::vector::iterator i = sections.begin(); i != sections.end(); ++i) + { + ss.write(i->GetName().c_str(), i->GetName().length()); + ss >> s; + ss >> s1; + if (s == "abilityEffect") + { + if (Ability *a = (Ability *)GetAbility(s1)) + a->NewAbilityEffect(&*i); + sections.erase(i); + } + else if (s == "coinItem") + { + if (CoinList *c = (CoinList *)GetCoinList(s1)) + c->NewCoinItem(&*i); + sections.erase(i); + } + else if (s == "itemEffect") + { + if (Item *it = (Item *)GetItem(s1)) + it->NewItemEffect(&*i); + sections.erase(i); + } + else if (s == "mapEffect") + { + if (Map *m = (Map *)GetMap(s1)) + m->NewMapEffect(&*i); + sections.erase(i); + } + else if (s == "mapTrainer") + { + if (Map *m = (Map *)GetMap(s1)) + m->NewMapTrainer(&*i); + sections.erase(i); + } + else if (s == "mapWarp") + { + if (Map *m = (Map *)GetMap(s1)) + m->NewMapWarp(&*i); + sections.erase(i); + } + else if (s == "mapWildList") + { + if (Map *m = (Map *)GetMap(s1)) + m->NewMapWildList(&*i); + sections.erase(i); + } + else if (s == "moveEffect") + { + if (Move *m = (Move *)GetMove(s1)) + m->NewMoveEffect(&*i); + sections.erase(i); + } + else if (s == "natureEffect") + { + if (Nature *n = (Nature *)GetNature(s1)) + n->NewNatureEffect(&*i); + sections.erase(i); + } + else if (s == "pokemonAbility") + { + if (Pokemon *p = (Pokemon *)GetPokemon(s1)) + p->NewPokemonAbility(&*i); + sections.erase(i); + } + else if (s == "pokemonEvolution") + { + if (Pokemon *p = (Pokemon *)GetPokemon(s1)) + p->NewPokemonEvolution(&*i); + sections.erase(i); + } + else if (s == "pokemonItem") + { + if (Pokemon *p = (Pokemon *)GetPokemon(s1)) + p->NewPokemonItem(&*i); + sections.erase(i); + } + else if (s == "pokemonMove") + { + if (Pokemon *p = (Pokemon *)GetPokemon(s1)) + p->NewPokemonMove(&*i); + sections.erase(i); + } + else if (s == "pokemonNature") + { + if (Pokemon *p = (Pokemon *)GetPokemon(s1)) + p->NewPokemonNature(&*i); + sections.erase(i); + } + else if (s == "statusEffect") + { + if (Status *st = (Status *)GetStatus(s1)) + st->NewStatusEffect(&*i); + sections.erase(i); + } + ss.clear(); + } + for (std::vector::iterator i = sections.begin(); i != sections.end(); ++i) + { + if (s == "mapTrainerTeam") + { + ss >> u; + if (const Map *m = GetMap(s1)) + { + if (MapTrainer *t = (MapTrainer *)m->GetMapTrainer(u)) + t->NewMapTrainerTeam(&*i); + } + sections.erase(i); + } + else if (s == "mapWildPokemon") + { + ss >> u; + if (const Map *m = GetMap(s1)) + { + if (MapWildList *t = (MapWildList *)m->GetMapWildList(u)) + t->NewMapWildPokemon(&*i); + } + sections.erase(i); + } + } + for (std::vector::iterator i = sections.begin(); i != sections.end(); ++i) + Log(String("Pokemod: Unused INI section named \"%s\"", i->GetName().c_str()), PM_DEBUG_INFO); + LogImportOver("Pokemod", 0, title); } void PokeGen::PokeMod::Pokemod::ExportIni(std::ofstream &fout) const { - // TODO (Ini#1#): Export Pokemod + LogExportStart("Pokemod", 0, title); + Ini exPokemod("pokemod"); + exPokemod.AddField("title", title); + exPokemod.AddField("version", version); + exPokemod.AddField("description", description); + exPokemod.AddField("genderAllowed", genderAllowed); + exPokemod.AddField("breedingAllowed", breedingAllowed); + exPokemod.AddField("eggSpecies", eggSpecies); + exPokemod.AddField("holdItems", holdItems); + exPokemod.AddField("criticalDomains", criticalDomains); + exPokemod.AddField("contestAllowed", contestAllowed); + exPokemod.AddField("abilityAllowed", abilityAllowed); + exPokemod.AddField("natureAllowed", natureAllowed); + exPokemod.AddField("numDaycares", numDaycares); + exPokemod.AddField("numPokemonBoxes", numPokemonBoxes); + exPokemod.AddField("numPokemonPerBox", numPokemonPerBox); + exPokemod.AddField("maxParty", maxParty); + exPokemod.AddField("maxFight", maxFight); + exPokemod.AddField("maxMoves", maxMoves); + exPokemod.AddField("maxLevel", maxLevel); + exPokemod.AddField("maxMoney", maxMoney); + exPokemod.AddField("hardCash", hardCash); + exPokemod.AddField("specialSplit", specialSplit); + exPokemod.AddField("specialDVSplit", specialDVSplit); + exPokemod.AddField("maxDVValue", maxDVValue); + exPokemod.AddField("happiness", happiness); + exPokemod.AddField("happyFaintLoss", happyFaintLoss); + exPokemod.AddField("happyLevelGain", happyLevelGain); + exPokemod.AddField("happySteps", happySteps); + exPokemod.AddField("effortValuesAllowed", effortValuesAllowed); + exPokemod.AddField("maxTotalEV", maxTotalEV); + exPokemod.AddField("maxEVPerStat", maxEVPerStat); + exPokemod.AddField("pokerusChance-n", pokerusChance.GetNum()); + exPokemod.AddField("pokerusChance-d", pokerusChance.GetDenom()); + exPokemod.AddField("startMap", startMap); + exPokemod.AddField("startMoney", startMoney); + exPokemod.AddField("startCoordinate-x", startCoordinate.GetX()); + exPokemod.AddField("startCoordinate-y", startCoordinate.GetY()); + exPokemod.AddField("startDirection", startDirection); + exPokemod.AddField("startDialog", startDialog); + exPokemod.AddField("walkSkin", walkSkin); + exPokemod.AddField("bikeSkin", bikeSkin); + exPokemod.AddField("surfSkin", surfSkin); + exPokemod.AddField("flySkin", flySkin); + exPokemod.AddField("fishSkin", fishSkin); + exPokemod.AddField("surfFishSkin", surfFishSkin); + exPokemod.AddField("superPCUname", superPCUname); + exPokemod.AddField("superPCPasswd", superPCPasswd); + exPokemod.AddField("struggleMove", struggleMove); + exPokemod.AddField("confuseMove", confuseMove); + for (unsigned i = 1; i < typeChart.GetWidth(); ++i) + { + for (unsigned j = 1; j < typeChart.GetHeight(); ++j) + { + exPokemod.AddField(String("typeChart-%u-%u-n", typeChart[i][0].GetNum(), typeChart[0][j].GetNum()), typeChart[i][j].GetNum()); + exPokemod.AddField(String("typeChart-%u-%u-d", typeChart[i][0].GetNum(), typeChart[0][j].GetNum()), typeChart[i][j].GetDenom()); + } + } + exPokemod.Export(fout); + for (std::vector::const_iterator i = abilities.begin(); i != abilities.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = authors.begin(); i != authors.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = badges.begin(); i != badges.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = coinLists.begin(); i != coinLists.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = dialogs.begin(); i != dialogs.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = eggGroups.begin(); i != eggGroups.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = items.begin(); i != items.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = itemStorages.begin(); i != itemStorages.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = maps.begin(); i != maps.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = moves.begin(); i != moves.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = natures.begin(); i != natures.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = pokemon.begin(); i != pokemon.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = statuses.begin(); i != statuses.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = stores.begin(); i != stores.end(); ++i) + i->ExportIni(fout); + for (std::vector::const_iterator i = tiles.begin(); i != tiles.end(); ++i) + i->ExportIni(fout); + for (std::vector "" "" 0 - "Data" - "" "wxBoxSizer H" "dialog-control-document" @@ -88010,6 +88010,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Meta" + "" 1 1 0 @@ -88056,8 +88058,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Meta" - "" "wxBoxSizer V" "dialog-control-document" @@ -88805,6 +88805,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Rules" + "" 1 1 0 @@ -88851,8 +88853,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Rules" - "" "wxBoxSizer V" "dialog-control-document" @@ -88967,6 +88967,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "General" + "" 1 1 0 @@ -89013,8 +89015,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "General" - "" "wxBoxSizer V" "dialog-control-document" @@ -90156,6 +90156,374 @@ It hands control over to another Dialog depending on the answer." "" + + "wxStaticBoxSizer H" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbStaticBoxSizerProxy" + "wxID_ANY" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "wxStaticBox" + "Horizontal" + "Expand" + "Centre" + 0 + 2 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "<Any platform>" + + "wxStaticText: wxID_STATIC" + "dialog-control-document" + "" + "statictext" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbStaticTextProxy" + "wxID_STATIC" + 5105 + "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" + "" + "Allow Abilities:" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 0 + 0 + 0 + 1 + 0 + "" + "" + + + "Spacer" + "dialog-control-document" + "" + "spacer" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbSpacerProxy" + 5 + 5 + "Centre" + "Centre" + 1 + 5 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "<Any platform>" + + + "wxCheckBox: ID_ALLOW_ABILITIES" + "dialog-control-document" + "" + "checkbox" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbCheckBoxProxy" + "wxEVT_COMMAND_CHECKBOX_CLICKED|OnAllowAbilitiesClick|||" + "ID_ALLOW_ABILITIES" + 10039 + "wxCheckBox" + "wxCheckBox" + 1 + 0 + "" + "" + "m_RulesAbilities" + "" + 0 + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "" + "" + + + + "wxStaticBoxSizer H" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbStaticBoxSizerProxy" + "wxID_ANY" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "wxStaticBox" + "Horizontal" + "Expand" + "Centre" + 0 + 2 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "<Any platform>" + + "wxStaticText: wxID_STATIC" + "dialog-control-document" + "" + "statictext" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbStaticTextProxy" + "wxID_STATIC" + 5105 + "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" + "" + "Allow Natures:" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 0 + 0 + 0 + 1 + 0 + "" + "" + + + "Spacer" + "dialog-control-document" + "" + "spacer" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbSpacerProxy" + 5 + 5 + "Centre" + "Centre" + 1 + 5 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "<Any platform>" + + + "wxCheckBox: ID_ALLOW_NATURES" + "dialog-control-document" + "" + "checkbox" + 0 + 1 + 0 + 0 + "3/6/2007" + "wbCheckBoxProxy" + "wxEVT_COMMAND_CHECKBOX_CLICKED|OnAllowNaturesClick|||" + "ID_ALLOW_NATURES" + 10040 + "wxCheckBox" + "wxCheckBox" + 1 + 0 + "" + "" + "m_RulesNatures" + "" + 0 + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + "" + "" + + "wxStaticBoxSizer H" "dialog-control-document" @@ -90461,6 +90829,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Storage" + "" 1 1 0 @@ -90507,8 +90877,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Storage" - "" "wxBoxSizer V" "dialog-control-document" @@ -92174,6 +92542,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Status" + "" 1 1 0 @@ -92220,8 +92590,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Status" - "" "wxBoxSizer V" "dialog-control-document" @@ -92363,6 +92731,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Orig Status" + "" 1 1 0 @@ -92409,8 +92779,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Orig Status" - "" "wxBoxSizer V" "dialog-control-document" @@ -95165,6 +95533,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Stats" + "" 1 1 0 @@ -95211,8 +95581,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Stats" - "" "wxBoxSizer V" "dialog-control-document" @@ -97540,6 +97908,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Types" + "" 1 1 0 @@ -97586,8 +97956,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Types" - "" "wxBoxSizer V" "dialog-control-document" @@ -97897,6 +98265,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Initial" + "" 1 1 0 @@ -97943,8 +98313,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Initial" - "" "wxBoxSizer V" "dialog-control-document" @@ -99003,6 +99371,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Dialogs" + "" 1 1 0 @@ -99049,8 +99419,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Dialogs" - "" "wxBoxSizer V" "dialog-control-document" @@ -99192,6 +99560,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Coin Lists" + "" 1 1 0 @@ -99238,8 +99608,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Coin Lists" - "" "wxBoxSizer V" "dialog-control-document" @@ -99381,6 +99749,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Badges" + "" 1 1 0 @@ -99427,8 +99797,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Badges" - "" "wxBoxSizer V" "dialog-control-document" @@ -99570,6 +99938,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Abilities" + "" 1 1 0 @@ -99616,8 +99986,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Abilities" - "" "wxBoxSizer V" "dialog-control-document" @@ -99763,6 +100131,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Natures" + "" 1 1 0 @@ -99809,8 +100179,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Natures" - "" "wxBoxSizer V" "dialog-control-document" @@ -99956,6 +100324,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Skins" + "" 1 1 0 @@ -100002,8 +100372,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Skins" - "" "wxBoxSizer V" "dialog-control-document" @@ -100957,6 +101325,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Egg Groups" + "" 1 1 0 @@ -101003,8 +101373,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Egg Groups" - "" "wxBoxSizer V" "dialog-control-document" @@ -101146,6 +101514,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Miscellaneous" + "" 1 1 0 @@ -101192,8 +101562,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Miscellaneous" - "" "wxBoxSizer V" "dialog-control-document" @@ -101857,10 +102225,10 @@ It hands control over to another Dialog depending on the answer." 1 0 0 - "17/2/2007" + "2/6/2007" "wbStaticBoxSizerProxy" "wxID_ANY" - "-1" + -1 "" "" "" @@ -101891,7 +102259,7 @@ It hands control over to another Dialog depending on the answer." 1 0 0 - "17/2/2007" + "2/6/2007" "wbStaticTextProxy" "wxID_STATIC" 5105 @@ -101902,7 +102270,7 @@ It hands control over to another Dialog depending on the answer." "" "" "" - "Encounter Chance:" + "Confusion:" -1 "" "" @@ -101945,6 +102313,10 @@ It hands control over to another Dialog depending on the answer." 0 "" "" + 0 + 0 + 1 + 1 "Spacer" @@ -101955,7 +102327,7 @@ It hands control over to another Dialog depending on the answer." 1 0 0 - "17/2/2007" + "2/6/2007" "wbSpacerProxy" 5 5 @@ -101973,31 +102345,30 @@ It hands control over to another Dialog depending on the answer." "<Any platform>" - "wxSpinCtrl: ID_ENCOUNTER_CHANCE" + "wxComboBox: ID_CONFUSE" "dialog-control-document" "" - "spinctrl" + "combobox" 0 1 0 0 - "17/2/2007" - "wbSpinCtrlProxy" - "wxEVT_COMMAND_SPINCTRL_UPDATED|OnEncounterChanceUpdated" - "ID_ENCOUNTER_CHANCE" - 10613 - "wxSpinCtrl" - "wxSpinCtrl" + "2/6/2007" + "wbComboBoxProxy" + "wxEVT_COMMAND_COMBOBOX_SELECTED|OnConfuseSelected|||" + "ID_CONFUSE" + 10026 + "wxComboBox" + "wxComboBox" 1 0 "" "" - "m_EncounterChance" - 0 - 100 - 0 + "m_MoveConfuse" + "" + "" "" - "The chance of an encounter happening when a Wild Tile is stepped on." + "Which move to use when a Pokémon is confused" "" "" "" @@ -102006,21 +102377,17 @@ It hands control over to another Dialog depending on the answer." "<Any platform>" "" "" - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 + 0 + 0 + 1 + 1 0 0 0 "" -1 -1 - 50 + -1 -1 "Left" "Top" @@ -102035,6 +102402,10 @@ It hands control over to another Dialog depending on the answer." 0 "" "" + 1 + 0 + 1 + 1 @@ -102062,6 +102433,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Items" + "" 1 1 0 @@ -102108,8 +102481,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Items" - "" "wxBoxSizer V" "dialog-control-document" @@ -102251,6 +102622,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Map" + "" 1 1 0 @@ -102297,8 +102670,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Map" - "" "wxBoxSizer V" "dialog-control-document" @@ -102440,6 +102811,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Moves" + "" 1 1 0 @@ -102486,8 +102859,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Moves" - "" "wxBoxSizer V" "dialog-control-document" @@ -102629,6 +103000,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Pokémon" + "" 1 1 0 @@ -102675,8 +103048,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Pokémon" - "" "wxBoxSizer V" "dialog-control-document" @@ -102818,6 +103189,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Stores" + "" 1 1 0 @@ -102864,8 +103237,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Stores" - "" "wxBoxSizer V" "dialog-control-document" @@ -103007,6 +103378,8 @@ It hands control over to another Dialog depending on the answer." "" "" "" + "Tiles" + "" 1 1 0 @@ -103053,8 +103426,6 @@ It hands control over to another Dialog depending on the answer." "" "" 0 - "Tiles" - "" "wxBoxSizer V" "dialog-control-document" diff --git a/pokemodr/gui/mainWindow.cpp b/pokemodr/gui/mainWindow.cpp index cc38dd29..04712228 100644 --- a/pokemodr/gui/mainWindow.cpp +++ b/pokemodr/gui/mainWindow.cpp @@ -92,6 +92,10 @@ BEGIN_EVENT_TABLE( MainFrame, wxFrame ) EVT_CHECKBOX( ID_ALLOW_CONTESTS, MainFrame::OnAllowContestsClick ) + EVT_CHECKBOX( ID_ALLOW_ABILITIES, MainFrame::OnAllowAbilitiesClick ) + + EVT_CHECKBOX( ID_ALLOW_NATURES, MainFrame::OnAllowNaturesClick ) + EVT_SPINCTRL( ID_DAYCARE, MainFrame::OnDaycareUpdated ) EVT_BUTTON( ID_ADD_TIME, MainFrame::OnAddTimeClick ) @@ -208,13 +212,15 @@ BEGIN_EVENT_TABLE( MainFrame, wxFrame ) EVT_BUTTON( ID_FISHSURFING_SKIN_BROWSE, MainFrame::OnFishsurfingSkinBrowseClick ) + EVT_BUTTON( ID_ADD_EGG_GROUP, MainFrame::OnAddEggGroupClick ) + EVT_TEXT( ID_SUPER_PC_USERNAME, MainFrame::OnSuperPcUsernameUpdated ) EVT_TEXT( ID_SUPER_PC_PASSWORD, MainFrame::OnSuperPcPasswordUpdated ) EVT_COMBOBOX( ID_STRUGGLE, MainFrame::OnStruggleSelected ) - EVT_SPINCTRL( ID_ENCOUNTER_CHANCE, MainFrame::OnEncounterChanceUpdated ) + EVT_COMBOBOX( ID_CONFUSE, MainFrame::OnConfuseSelected ) EVT_BUTTON( ID_ADD_ITEM, MainFrame::OnAddItemClick ) @@ -288,6 +294,8 @@ void MainFrame::Init() m_RulesHeldItems = NULL; m_RulesCriticalDomains = NULL; m_RulesContests = NULL; + m_RulesAbilities = NULL; + m_RulesNatures = NULL; m_RulesDaycare = NULL; m_RulesTimeSizer = NULL; m_RulesPokemonBox = NULL; @@ -343,7 +351,7 @@ void MainFrame::Init() m_SuperPCUname = NULL; m_SuperPCPwd = NULL; m_MoveStruggle = NULL; - m_EncounterChance = NULL; + m_MoveConfuse = NULL; m_ItemSizer = NULL; m_MapSizer = NULL; m_MoveSizer = NULL; @@ -569,616 +577,612 @@ void MainFrame::CreateControls() wxStaticBox* itemStaticBoxSizer66Static = new wxStaticBox(itemScrolledWindow39, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer66 = new wxStaticBoxSizer(itemStaticBoxSizer66Static, wxHORIZONTAL); itemBoxSizer40->Add(itemStaticBoxSizer66, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText67 = new wxStaticText( itemScrolledWindow39, wxID_STATIC, _("Daycares:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer66->Add(itemStaticText67, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticText* itemStaticText67 = new wxStaticText( itemScrolledWindow39, wxID_STATIC, _("Allow Abilities:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer66->Add(itemStaticText67, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); itemStaticBoxSizer66->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesDaycare = new wxSpinCtrl( itemScrolledWindow39, ID_DAYCARE, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemStaticBoxSizer66->Add(m_RulesDaycare, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesAbilities = new wxCheckBox( itemScrolledWindow39, ID_ALLOW_ABILITIES, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesAbilities->SetValue(false); + itemStaticBoxSizer66->Add(m_RulesAbilities, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer70Static = new wxStaticBox(itemScrolledWindow39, wxID_ANY, _("Time")); - m_RulesTimeSizer = new wxStaticBoxSizer(itemStaticBoxSizer70Static, wxVERTICAL); - itemBoxSizer40->Add(m_RulesTimeSizer, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxButton* itemButton71 = new wxButton( itemScrolledWindow39, ID_ADD_TIME, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_RulesTimeSizer->Add(itemButton71, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer70Static = new wxStaticBox(itemScrolledWindow39, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer70 = new wxStaticBoxSizer(itemStaticBoxSizer70Static, wxHORIZONTAL); + itemBoxSizer40->Add(itemStaticBoxSizer70, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText71 = new wxStaticText( itemScrolledWindow39, wxID_STATIC, _("Allow Natures:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer70->Add(itemStaticText71, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); - itemScrolledWindow39->FitInside(); - itemNotebook38->AddPage(itemScrolledWindow39, _("General")); + itemStaticBoxSizer70->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxScrolledWindow* itemScrolledWindow72 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STORAGE_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow72->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer73 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow72->SetSizer(itemBoxSizer73); + m_RulesNatures = new wxCheckBox( itemScrolledWindow39, ID_ALLOW_NATURES, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesNatures->SetValue(false); + itemStaticBoxSizer70->Add(m_RulesNatures, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer74Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer74 = new wxStaticBoxSizer(itemStaticBoxSizer74Static, wxVERTICAL); - itemBoxSizer73->Add(itemStaticBoxSizer74, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer75 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer74->Add(itemBoxSizer75, 0, wxGROW, 2); - wxStaticText* itemStaticText76 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Pokémon Boxes:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer75->Add(itemStaticText76, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer74Static = new wxStaticBox(itemScrolledWindow39, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer74 = new wxStaticBoxSizer(itemStaticBoxSizer74Static, wxHORIZONTAL); + itemBoxSizer40->Add(itemStaticBoxSizer74, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText75 = new wxStaticText( itemScrolledWindow39, wxID_STATIC, _("Daycares:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer74->Add(itemStaticText75, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer75->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer74->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPokemonBox = new wxSpinCtrl( itemScrolledWindow72, ID_POKEMON_BOX, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemBoxSizer75->Add(m_RulesPokemonBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesDaycare = new wxSpinCtrl( itemScrolledWindow39, ID_DAYCARE, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemStaticBoxSizer74->Add(m_RulesDaycare, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer79 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer74->Add(itemBoxSizer79, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText80 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Pokémon Per Box:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer79->Add(itemStaticText80, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer78Static = new wxStaticBox(itemScrolledWindow39, wxID_ANY, _("Time")); + m_RulesTimeSizer = new wxStaticBoxSizer(itemStaticBoxSizer78Static, wxVERTICAL); + itemBoxSizer40->Add(m_RulesTimeSizer, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxButton* itemButton79 = new wxButton( itemScrolledWindow39, ID_ADD_TIME, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesTimeSizer->Add(itemButton79, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer79->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemScrolledWindow39->FitInside(); + itemNotebook38->AddPage(itemScrolledWindow39, _("General")); - m_RulesPokemonPerBox = new wxSpinCtrl( itemScrolledWindow72, ID_POKEMON_PER_BOX, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemBoxSizer79->Add(m_RulesPokemonPerBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxScrolledWindow* itemScrolledWindow80 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STORAGE_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow80->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer81 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow80->SetSizer(itemBoxSizer81); - wxStaticBox* itemStaticBoxSizer83Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer83 = new wxStaticBoxSizer(itemStaticBoxSizer83Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer83, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText84 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Max Party:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer83->Add(itemStaticText84, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer82Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer82 = new wxStaticBoxSizer(itemStaticBoxSizer82Static, wxVERTICAL); + itemBoxSizer81->Add(itemStaticBoxSizer82, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer83 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer82->Add(itemBoxSizer83, 0, wxGROW, 2); + wxStaticText* itemStaticText84 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Pokémon Boxes:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer83->Add(itemStaticText84, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer83->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer83->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxParty = new wxSpinCtrl( itemScrolledWindow72, ID_MAX_PARTY, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemStaticBoxSizer83->Add(m_RulesMaxParty, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesPokemonBox = new wxSpinCtrl( itemScrolledWindow80, ID_POKEMON_BOX, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemBoxSizer83->Add(m_RulesPokemonBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer87Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer87 = new wxStaticBoxSizer(itemStaticBoxSizer87Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer87, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText88 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Max Fight:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer87->Add(itemStaticText88, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer87 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer82->Add(itemBoxSizer87, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText88 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Pokémon Per Box:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer87->Add(itemStaticText88, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer87->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer87->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxFight = new wxSpinCtrl( itemScrolledWindow72, ID_MAX_FIGHT, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemStaticBoxSizer87->Add(m_RulesMaxFight, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesPokemonPerBox = new wxSpinCtrl( itemScrolledWindow80, ID_POKEMON_PER_BOX, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemBoxSizer87->Add(m_RulesPokemonPerBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer91Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); + wxStaticBox* itemStaticBoxSizer91Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer91 = new wxStaticBoxSizer(itemStaticBoxSizer91Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer91, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText92 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Max Moves:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer81->Add(itemStaticBoxSizer91, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText92 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Max Party:"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticBoxSizer91->Add(itemStaticText92, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); itemStaticBoxSizer91->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxMoves = new wxSpinCtrl( itemScrolledWindow72, ID_MAX_MOVES, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemStaticBoxSizer91->Add(m_RulesMaxMoves, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesMaxParty = new wxSpinCtrl( itemScrolledWindow80, ID_MAX_PARTY, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemStaticBoxSizer91->Add(m_RulesMaxParty, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer95Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _("Item Storage")); - wxStaticBoxSizer* itemStaticBoxSizer95 = new wxStaticBoxSizer(itemStaticBoxSizer95Static, wxVERTICAL); - itemBoxSizer73->Add(itemStaticBoxSizer95, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxButton* itemButton96 = new wxButton( itemScrolledWindow72, ID_ADD_ITEM_STORAGE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer95->Add(itemButton96, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer95Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer95 = new wxStaticBoxSizer(itemStaticBoxSizer95Static, wxHORIZONTAL); + itemBoxSizer81->Add(itemStaticBoxSizer95, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText96 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Max Fight:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer95->Add(itemStaticText96, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer97Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer97 = new wxStaticBoxSizer(itemStaticBoxSizer97Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer97, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText98 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Max Level:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer97->Add(itemStaticText98, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer95->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer97->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesMaxFight = new wxSpinCtrl( itemScrolledWindow80, ID_MAX_FIGHT, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemStaticBoxSizer95->Add(m_RulesMaxFight, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxLevel = new wxSpinCtrl( itemScrolledWindow72, ID_MAX_LEVEL, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemStaticBoxSizer97->Add(m_RulesMaxLevel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer99Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer99 = new wxStaticBoxSizer(itemStaticBoxSizer99Static, wxHORIZONTAL); + itemBoxSizer81->Add(itemStaticBoxSizer99, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText100 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Max Moves:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer99->Add(itemStaticText100, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer101Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer101 = new wxStaticBoxSizer(itemStaticBoxSizer101Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer101, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText102 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Max Money:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer101->Add(itemStaticText102, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer99->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer101->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesMaxMoves = new wxSpinCtrl( itemScrolledWindow80, ID_MAX_MOVES, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemStaticBoxSizer99->Add(m_RulesMaxMoves, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxMoney = new wxSpinCtrl( itemScrolledWindow72, ID_MAX_MONEY, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemStaticBoxSizer101->Add(m_RulesMaxMoney, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer103Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _("Item Storage")); + wxStaticBoxSizer* itemStaticBoxSizer103 = new wxStaticBoxSizer(itemStaticBoxSizer103Static, wxVERTICAL); + itemBoxSizer81->Add(itemStaticBoxSizer103, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxButton* itemButton104 = new wxButton( itemScrolledWindow80, ID_ADD_ITEM_STORAGE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer103->Add(itemButton104, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer105Static = new wxStaticBox(itemScrolledWindow72, wxID_ANY, _T("")); + wxStaticBox* itemStaticBoxSizer105Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer105 = new wxStaticBoxSizer(itemStaticBoxSizer105Static, wxHORIZONTAL); - itemBoxSizer73->Add(itemStaticBoxSizer105, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText106 = new wxStaticText( itemScrolledWindow72, wxID_STATIC, _("Hard Cash:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer81->Add(itemStaticBoxSizer105, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText106 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Max Level:"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticBoxSizer105->Add(itemStaticText106, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); itemStaticBoxSizer105->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesHardCash = new wxCheckBox( itemScrolledWindow72, ID_HARD_CASH, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesMaxLevel = new wxSpinCtrl( itemScrolledWindow80, ID_MAX_LEVEL, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemStaticBoxSizer105->Add(m_RulesMaxLevel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer109Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer109 = new wxStaticBoxSizer(itemStaticBoxSizer109Static, wxHORIZONTAL); + itemBoxSizer81->Add(itemStaticBoxSizer109, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText110 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Max Money:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer109->Add(itemStaticText110, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + itemStaticBoxSizer109->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + m_RulesMaxMoney = new wxSpinCtrl( itemScrolledWindow80, ID_MAX_MONEY, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemStaticBoxSizer109->Add(m_RulesMaxMoney, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer113Static = new wxStaticBox(itemScrolledWindow80, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer113 = new wxStaticBoxSizer(itemStaticBoxSizer113Static, wxHORIZONTAL); + itemBoxSizer81->Add(itemStaticBoxSizer113, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText114 = new wxStaticText( itemScrolledWindow80, wxID_STATIC, _("Hard Cash:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer113->Add(itemStaticText114, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + itemStaticBoxSizer113->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + m_RulesHardCash = new wxCheckBox( itemScrolledWindow80, ID_HARD_CASH, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_RulesHardCash->SetValue(false); - itemStaticBoxSizer105->Add(m_RulesHardCash, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer113->Add(m_RulesHardCash, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemScrolledWindow72->FitInside(); - itemNotebook38->AddPage(itemScrolledWindow72, _("Storage")); + itemScrolledWindow80->FitInside(); + itemNotebook38->AddPage(itemScrolledWindow80, _("Storage")); - wxScrolledWindow* itemScrolledWindow109 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STATUS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow109->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer110 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow109->SetSizer(itemBoxSizer110); + wxScrolledWindow* itemScrolledWindow117 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STATUS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow117->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer118 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow117->SetSizer(itemBoxSizer118); - wxStaticBox* itemStaticBoxSizer111Static = new wxStaticBox(itemScrolledWindow109, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer111 = new wxStaticBoxSizer(itemStaticBoxSizer111Static, wxVERTICAL); - itemBoxSizer110->Add(itemStaticBoxSizer111, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton112 = new wxButton( itemScrolledWindow109, ID_ADD_STATUS_EFFECT, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer111->Add(itemButton112, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer119Static = new wxStaticBox(itemScrolledWindow117, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer119 = new wxStaticBoxSizer(itemStaticBoxSizer119Static, wxVERTICAL); + itemBoxSizer118->Add(itemStaticBoxSizer119, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxButton* itemButton120 = new wxButton( itemScrolledWindow117, ID_ADD_STATUS_EFFECT, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer119->Add(itemButton120, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - itemScrolledWindow109->FitInside(); - itemNotebook38->AddPage(itemScrolledWindow109, _("Status")); + itemScrolledWindow117->FitInside(); + itemNotebook38->AddPage(itemScrolledWindow117, _("Status")); - wxScrolledWindow* itemScrolledWindow113 = new wxScrolledWindow( itemNotebook38, ID_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow113->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer114 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow113->SetSizer(itemBoxSizer114); + wxScrolledWindow* itemScrolledWindow121 = new wxScrolledWindow( itemNotebook38, ID_SCROLLEDWINDOW, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow121->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer122 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow121->SetSizer(itemBoxSizer122); - wxStaticBox* itemStaticBoxSizer115Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer115 = new wxStaticBoxSizer(itemStaticBoxSizer115Static, wxHORIZONTAL); - itemBoxSizer114->Add(itemStaticBoxSizer115, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText116 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Thaw Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer115->Add(itemStaticText116, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer123Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer123 = new wxStaticBoxSizer(itemStaticBoxSizer123Static, wxHORIZONTAL); + itemBoxSizer122->Add(itemStaticBoxSizer123, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText124 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Thaw Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer123->Add(itemStaticText124, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer115->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer123->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesThawChance = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesThawChance = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesThawChance->SetToolTip(_("The chance of thawing each turn if frozen")); - itemStaticBoxSizer115->Add(m_RulesThawChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer123->Add(m_RulesThawChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer119Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer119 = new wxStaticBoxSizer(itemStaticBoxSizer119Static, wxVERTICAL); - itemBoxSizer114->Add(itemStaticBoxSizer119, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer120 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer119->Add(itemBoxSizer120, 0, wxGROW, 2); - wxStaticText* itemStaticText121 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Sleep Turns:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer120->Add(itemStaticText121, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer127Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer127 = new wxStaticBoxSizer(itemStaticBoxSizer127Static, wxVERTICAL); + itemBoxSizer122->Add(itemStaticBoxSizer127, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer128 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer127->Add(itemBoxSizer128, 0, wxGROW, 2); + wxStaticText* itemStaticText129 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Sleep Turns:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer128->Add(itemStaticText129, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer120->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer128->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesSlpTurns = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL1, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + m_RulesSlpTurns = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL1, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); if (ShowToolTips()) m_RulesSlpTurns->SetToolTip(_("The maximum number of turns a Pokémon may stay asleep")); - itemBoxSizer120->Add(m_RulesSlpTurns, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer128->Add(m_RulesSlpTurns, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer124 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer119->Add(itemBoxSizer124, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText125 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Sleep Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer124->Add(itemStaticText125, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer132 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer127->Add(itemBoxSizer132, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText133 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Sleep Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer132->Add(itemStaticText133, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer124->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer132->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesSlpChance = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL2, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesSlpChance = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL2, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesSlpChance->SetToolTip(_("The chance of waking op each turn")); - itemBoxSizer124->Add(m_RulesSlpChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer132->Add(m_RulesSlpChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer128Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer128 = new wxStaticBoxSizer(itemStaticBoxSizer128Static, wxVERTICAL); - itemBoxSizer114->Add(itemStaticBoxSizer128, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer129 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer128->Add(itemBoxSizer129, 0, wxGROW, 2); - wxStaticText* itemStaticText130 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Paralyze Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer129->Add(itemStaticText130, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer136Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer136 = new wxStaticBoxSizer(itemStaticBoxSizer136Static, wxVERTICAL); + itemBoxSizer122->Add(itemStaticBoxSizer136, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer137 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer136->Add(itemBoxSizer137, 0, wxGROW, 2); + wxStaticText* itemStaticText138 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Paralyze Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer137->Add(itemStaticText138, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer129->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer137->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPrzChance = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL3, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesPrzChance = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL3, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesPrzChance->SetToolTip(_("The chance of being \"fully paralyzed\"")); - itemBoxSizer129->Add(m_RulesPrzChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer137->Add(m_RulesPrzChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer133 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer128->Add(itemBoxSizer133, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText134 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Paralyze Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer133->Add(itemStaticText134, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer141 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer136->Add(itemBoxSizer141, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText142 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Paralyze Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer141->Add(itemStaticText142, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer133->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer141->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPrzSpeed = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL4, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS, 0, 2147483647, 0 ); + m_RulesPrzSpeed = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL4, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS, 0, 2147483647, 0 ); if (ShowToolTips()) m_RulesPrzSpeed->SetToolTip(_("The amount paralyzation affects speed")); - itemBoxSizer133->Add(m_RulesPrzSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer141->Add(m_RulesPrzSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer137Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer137 = new wxStaticBoxSizer(itemStaticBoxSizer137Static, wxVERTICAL); - itemBoxSizer114->Add(itemStaticBoxSizer137, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer138 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer137->Add(itemBoxSizer138, 0, wxGROW, 2); - wxStaticText* itemStaticText139 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Poison HP:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer138->Add(itemStaticText139, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer145Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer145 = new wxStaticBoxSizer(itemStaticBoxSizer145Static, wxVERTICAL); + itemBoxSizer122->Add(itemStaticBoxSizer145, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer146 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer145->Add(itemBoxSizer146, 0, wxGROW, 2); + wxStaticText* itemStaticText147 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Poison HP:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer146->Add(itemStaticText147, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer138->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer146->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPsnHP = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL5, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesPsnHP = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL5, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesPsnHP->SetToolTip(_("The amount of HP taken each turn")); - itemBoxSizer138->Add(m_RulesPsnHP, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer146->Add(m_RulesPsnHP, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer142 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer137->Add(itemBoxSizer142, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText143 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Poison Steps:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer142->Add(itemStaticText143, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer150 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer145->Add(itemBoxSizer150, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText151 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Poison Steps:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer150->Add(itemStaticText151, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer142->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer150->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPsnSteps = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL6, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + m_RulesPsnSteps = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL6, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); if (ShowToolTips()) m_RulesPsnSteps->SetToolTip(_("Poisoned Pokémon lose HP for steps taken when in the overworld")); - itemBoxSizer142->Add(m_RulesPsnSteps, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer150->Add(m_RulesPsnSteps, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer146 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer137->Add(itemBoxSizer146, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText147 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Toxic Increment:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer146->Add(itemStaticText147, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer154 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer145->Add(itemBoxSizer154, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText155 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Toxic Increment:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer154->Add(itemStaticText155, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer146->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer154->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesTxcInc = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL7, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesTxcInc = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL7, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesTxcInc->SetToolTip(_("The amount toxic poisoning increments HP loss each turn")); - itemBoxSizer146->Add(m_RulesTxcInc, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer154->Add(m_RulesTxcInc, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer150 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer137->Add(itemBoxSizer150, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText151 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Toxic Faint:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer150->Add(itemStaticText151, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer158 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer145->Add(itemBoxSizer158, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText159 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Toxic Faint:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer158->Add(itemStaticText159, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer150->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer158->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesTxcFaint = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL8, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + m_RulesTxcFaint = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL8, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); if (ShowToolTips()) m_RulesTxcFaint->SetToolTip(_("The maximum number of turns a Pokémon can be active while toxic poisoned")); - itemBoxSizer150->Add(m_RulesTxcFaint, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer158->Add(m_RulesTxcFaint, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer154Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer154 = new wxStaticBoxSizer(itemStaticBoxSizer154Static, wxVERTICAL); - itemBoxSizer114->Add(itemStaticBoxSizer154, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer155 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer154->Add(itemBoxSizer155, 0, wxGROW, 2); - wxStaticText* itemStaticText156 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Burn HP:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer155->Add(itemStaticText156, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer162Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer162 = new wxStaticBoxSizer(itemStaticBoxSizer162Static, wxVERTICAL); + itemBoxSizer122->Add(itemStaticBoxSizer162, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer163 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer162->Add(itemBoxSizer163, 0, wxGROW, 2); + wxStaticText* itemStaticText164 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Burn HP:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer163->Add(itemStaticText164, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer155->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer163->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesBrnHP = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL9, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesBrnHP = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL9, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesBrnHP->SetToolTip(_("The amount of HP taken each turn while burned")); - itemBoxSizer155->Add(m_RulesBrnHP, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer163->Add(m_RulesBrnHP, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer159 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer154->Add(itemBoxSizer159, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText160 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Burn Attack:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer159->Add(itemStaticText160, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer167 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer162->Add(itemBoxSizer167, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText168 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Burn Attack:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer167->Add(itemStaticText168, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer159->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer167->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesBrnAtt = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL10, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + m_RulesBrnAtt = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL10, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); if (ShowToolTips()) m_RulesBrnAtt->SetToolTip(_("The amount burns affect attack")); - itemBoxSizer159->Add(m_RulesBrnAtt, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer167->Add(m_RulesBrnAtt, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer163Static = new wxStaticBox(itemScrolledWindow113, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer163 = new wxStaticBoxSizer(itemStaticBoxSizer163Static, wxVERTICAL); - itemBoxSizer114->Add(itemStaticBoxSizer163, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer164 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer163->Add(itemBoxSizer164, 0, wxGROW, 2); - wxStaticText* itemStaticText165 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Confusion Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer164->Add(itemStaticText165, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer171Static = new wxStaticBox(itemScrolledWindow121, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer171 = new wxStaticBoxSizer(itemStaticBoxSizer171Static, wxVERTICAL); + itemBoxSizer122->Add(itemStaticBoxSizer171, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer172 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer171->Add(itemBoxSizer172, 0, wxGROW, 2); + wxStaticText* itemStaticText173 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Confusion Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer172->Add(itemStaticText173, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer164->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer172->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesCnfChance = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL11, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); - itemBoxSizer164->Add(m_RulesCnfChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesCnfChance = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL11, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + itemBoxSizer172->Add(m_RulesCnfChance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer168 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer163->Add(itemBoxSizer168, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText169 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Confusion Turns:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer168->Add(itemStaticText169, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer176 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer171->Add(itemBoxSizer176, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText177 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Confusion Turns:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer176->Add(itemStaticText177, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer168->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer176->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesCnfTurns = new wxSpinCtrl( itemScrolledWindow113, ID_SPINCTRL12, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + m_RulesCnfTurns = new wxSpinCtrl( itemScrolledWindow121, ID_SPINCTRL12, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); if (ShowToolTips()) m_RulesCnfTurns->SetToolTip(_("The maximum number of turns a Pokémon can be confused")); - itemBoxSizer168->Add(m_RulesCnfTurns, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer176->Add(m_RulesCnfTurns, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer172 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer163->Add(itemBoxSizer172, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText173 = new wxStaticText( itemScrolledWindow113, wxID_STATIC, _("Move:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer172->Add(itemStaticText173, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer180 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer171->Add(itemBoxSizer180, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText181 = new wxStaticText( itemScrolledWindow121, wxID_STATIC, _("Move:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer180->Add(itemStaticText181, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer172->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer180->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxArrayString m_ConfusionMoveStrings; - m_ConfusionMove = new wxComboBox( itemScrolledWindow113, ID_COMBOBOX, _T(""), wxDefaultPosition, wxDefaultSize, m_ConfusionMoveStrings, wxCB_READONLY|wxCB_SORT ); + m_ConfusionMove = new wxComboBox( itemScrolledWindow121, ID_COMBOBOX, _T(""), wxDefaultPosition, wxDefaultSize, m_ConfusionMoveStrings, wxCB_READONLY|wxCB_SORT ); if (ShowToolTips()) m_ConfusionMove->SetToolTip(_("Which move to use when Confusion occurs")); - itemBoxSizer172->Add(m_ConfusionMove, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemBoxSizer180->Add(m_ConfusionMove, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - itemScrolledWindow113->FitInside(); - itemNotebook38->AddPage(itemScrolledWindow113, _("Orig Status")); + itemScrolledWindow121->FitInside(); + itemNotebook38->AddPage(itemScrolledWindow121, _("Orig Status")); - wxScrolledWindow* itemScrolledWindow176 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STATS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow176->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer177 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow176->SetSizer(itemBoxSizer177); + wxScrolledWindow* itemScrolledWindow184 = new wxScrolledWindow( itemNotebook38, ID_DATA_RULES_STATS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow184->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer185 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow184->SetSizer(itemBoxSizer185); - wxStaticBox* itemStaticBoxSizer178Static = new wxStaticBox(itemScrolledWindow176, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer178 = new wxStaticBoxSizer(itemStaticBoxSizer178Static, wxVERTICAL); - itemBoxSizer177->Add(itemStaticBoxSizer178, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer179 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer178->Add(itemBoxSizer179, 0, wxGROW, 2); - wxStaticText* itemStaticText180 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Split Special:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer179->Add(itemStaticText180, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer186Static = new wxStaticBox(itemScrolledWindow184, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer186 = new wxStaticBoxSizer(itemStaticBoxSizer186Static, wxVERTICAL); + itemBoxSizer185->Add(itemStaticBoxSizer186, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer187 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer186->Add(itemBoxSizer187, 0, wxGROW, 2); + wxStaticText* itemStaticText188 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Split Special:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer187->Add(itemStaticText188, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer179->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer187->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesSplitSpecial = new wxCheckBox( itemScrolledWindow176, ID_SPLIT_SPECIAL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesSplitSpecial = new wxCheckBox( itemScrolledWindow184, ID_SPLIT_SPECIAL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_RulesSplitSpecial->SetValue(false); - itemBoxSizer179->Add(m_RulesSplitSpecial, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer187->Add(m_RulesSplitSpecial, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer183 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer178->Add(itemBoxSizer183, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText184 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Split Special DV:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer183->Add(itemStaticText184, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer191 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer186->Add(itemBoxSizer191, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText192 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Split Special DV:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer191->Add(itemStaticText192, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer183->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer191->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesSplitSpecialDV = new wxCheckBox( itemScrolledWindow176, ID_SPLIT_SPECIAL_DV, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesSplitSpecialDV = new wxCheckBox( itemScrolledWindow184, ID_SPLIT_SPECIAL_DV, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_RulesSplitSpecialDV->SetValue(false); - itemBoxSizer183->Add(m_RulesSplitSpecialDV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer191->Add(m_RulesSplitSpecialDV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer187Static = new wxStaticBox(itemScrolledWindow176, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer187 = new wxStaticBoxSizer(itemStaticBoxSizer187Static, wxHORIZONTAL); - itemBoxSizer177->Add(itemStaticBoxSizer187, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText188 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Max DV:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer187->Add(itemStaticText188, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer195Static = new wxStaticBox(itemScrolledWindow184, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer195 = new wxStaticBoxSizer(itemStaticBoxSizer195Static, wxHORIZONTAL); + itemBoxSizer185->Add(itemStaticBoxSizer195, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText196 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Max DV:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer195->Add(itemStaticText196, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer187->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer195->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxDV16 = new wxRadioButton( itemScrolledWindow176, ID_MAX_DV_16, _("16"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_RulesMaxDV16 = new wxRadioButton( itemScrolledWindow184, ID_MAX_DV_16, _("16"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_RulesMaxDV16->SetValue(true); - itemStaticBoxSizer187->Add(m_RulesMaxDV16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemStaticBoxSizer195->Add(m_RulesMaxDV16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - m_RulesMaxDV32 = new wxRadioButton( itemScrolledWindow176, ID_MAX_DV_32, _("32"), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesMaxDV32 = new wxRadioButton( itemScrolledWindow184, ID_MAX_DV_32, _("32"), wxDefaultPosition, wxDefaultSize, 0 ); m_RulesMaxDV32->SetValue(false); - itemStaticBoxSizer187->Add(m_RulesMaxDV32, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxStaticBox* itemStaticBoxSizer192Static = new wxStaticBox(itemScrolledWindow176, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer192 = new wxStaticBoxSizer(itemStaticBoxSizer192Static, wxVERTICAL); - itemBoxSizer177->Add(itemStaticBoxSizer192, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer193 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer192->Add(itemBoxSizer193, 0, wxGROW, 2); - wxStaticText* itemStaticText194 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Happiness:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer193->Add(itemStaticText194, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - itemBoxSizer193->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - m_RulesHappy = new wxCheckBox( itemScrolledWindow176, ID_HAPPINESS, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); - m_RulesHappy->SetValue(false); - itemBoxSizer193->Add(m_RulesHappy, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxBoxSizer* itemBoxSizer197 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer192->Add(itemBoxSizer197, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText198 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Faint Loss:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer197->Add(itemStaticText198, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - itemBoxSizer197->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - m_RulesHappyFaint = new wxSpinCtrl( itemScrolledWindow176, ID_HAPPY_FAINT, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemBoxSizer197->Add(m_RulesHappyFaint, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer195->Add(m_RulesMaxDV32, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxStaticBox* itemStaticBoxSizer200Static = new wxStaticBox(itemScrolledWindow184, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer200 = new wxStaticBoxSizer(itemStaticBoxSizer200Static, wxVERTICAL); + itemBoxSizer185->Add(itemStaticBoxSizer200, 0, wxGROW|wxLEFT|wxRIGHT, 2); wxBoxSizer* itemBoxSizer201 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer192->Add(itemBoxSizer201, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText202 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Level Gain:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer200->Add(itemBoxSizer201, 0, wxGROW, 2); + wxStaticText* itemStaticText202 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Happiness:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer201->Add(itemStaticText202, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); itemBoxSizer201->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesHappyLevel = new wxSpinCtrl( itemScrolledWindow176, ID_HAPPY_LEVEL_GAIN, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemBoxSizer201->Add(m_RulesHappyLevel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesHappy = new wxCheckBox( itemScrolledWindow184, ID_HAPPINESS, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesHappy->SetValue(false); + itemBoxSizer201->Add(m_RulesHappy, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxBoxSizer* itemBoxSizer205 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer192->Add(itemBoxSizer205, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText206 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Steps:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer200->Add(itemBoxSizer205, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText206 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Faint Loss:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer205->Add(itemStaticText206, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); itemBoxSizer205->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesHappySteps = new wxSpinCtrl( itemScrolledWindow176, ID_HAPPY_STEPS, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); - itemBoxSizer205->Add(m_RulesHappySteps, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesHappyFaint = new wxSpinCtrl( itemScrolledWindow184, ID_HAPPY_FAINT, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemBoxSizer205->Add(m_RulesHappyFaint, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer209Static = new wxStaticBox(itemScrolledWindow176, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer209 = new wxStaticBoxSizer(itemStaticBoxSizer209Static, wxVERTICAL); - itemBoxSizer177->Add(itemStaticBoxSizer209, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer210 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer209->Add(itemBoxSizer210, 0, wxGROW, 2); - wxStaticText* itemStaticText211 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Allow Effort Values:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer210->Add(itemStaticText211, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer209 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer200->Add(itemBoxSizer209, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText210 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Level Gain:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer209->Add(itemStaticText210, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer210->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer209->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesAllowEV = new wxCheckBox( itemScrolledWindow176, ID_ALLOW_EV, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); - m_RulesAllowEV->SetValue(false); - itemBoxSizer210->Add(m_RulesAllowEV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesHappyLevel = new wxSpinCtrl( itemScrolledWindow184, ID_HAPPY_LEVEL_GAIN, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemBoxSizer209->Add(m_RulesHappyLevel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer214 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer209->Add(itemBoxSizer214, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText215 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Max EV:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer214->Add(itemStaticText215, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer213 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer200->Add(itemBoxSizer213, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText214 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Steps:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer213->Add(itemStaticText214, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer214->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer213->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxEV = new wxSpinCtrl( itemScrolledWindow176, ID_MAX_EV, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemBoxSizer214->Add(m_RulesMaxEV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesHappySteps = new wxSpinCtrl( itemScrolledWindow184, ID_HAPPY_STEPS, _T("0"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2147483647, 0 ); + itemBoxSizer213->Add(m_RulesHappySteps, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer217Static = new wxStaticBox(itemScrolledWindow184, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer217 = new wxStaticBoxSizer(itemStaticBoxSizer217Static, wxVERTICAL); + itemBoxSizer185->Add(itemStaticBoxSizer217, 0, wxGROW|wxLEFT|wxRIGHT, 2); wxBoxSizer* itemBoxSizer218 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer209->Add(itemBoxSizer218, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText219 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Max EV Per Stat:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer217->Add(itemBoxSizer218, 0, wxGROW, 2); + wxStaticText* itemStaticText219 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Allow Effort Values:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer218->Add(itemStaticText219, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); itemBoxSizer218->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMaxEVPerStat = new wxSpinCtrl( itemScrolledWindow176, ID_MAX_EV_PER_STAT, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); - itemBoxSizer218->Add(m_RulesMaxEVPerStat, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesAllowEV = new wxCheckBox( itemScrolledWindow184, ID_ALLOW_EV, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_RulesAllowEV->SetValue(false); + itemBoxSizer218->Add(m_RulesAllowEV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxBoxSizer* itemBoxSizer222 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer217->Add(itemBoxSizer222, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText223 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Max EV:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer222->Add(itemStaticText223, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + itemBoxSizer222->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + m_RulesMaxEV = new wxSpinCtrl( itemScrolledWindow184, ID_MAX_EV, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemBoxSizer222->Add(m_RulesMaxEV, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxBoxSizer* itemBoxSizer226 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer217->Add(itemBoxSizer226, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText227 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Max EV Per Stat:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer226->Add(itemStaticText227, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer222Static = new wxStaticBox(itemScrolledWindow176, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer222 = new wxStaticBoxSizer(itemStaticBoxSizer222Static, wxHORIZONTAL); - itemBoxSizer177->Add(itemStaticBoxSizer222, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText223 = new wxStaticText( itemScrolledWindow176, wxID_STATIC, _("Pokérus:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer222->Add(itemStaticText223, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer226->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer222->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + m_RulesMaxEVPerStat = new wxSpinCtrl( itemScrolledWindow184, ID_MAX_EV_PER_STAT, _T("1"), wxDefaultPosition, wxSize(90, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2147483647, 1 ); + itemBoxSizer226->Add(m_RulesMaxEVPerStat, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesPokerusNum = new wxSpinButton( itemScrolledWindow176, ID_POKERUS_NUM, wxDefaultPosition, wxSize(-1, 20), wxSP_VERTICAL|wxSP_ARROW_KEYS|wxSP_WRAP ); - itemStaticBoxSizer222->Add(m_RulesPokerusNum, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5); + wxStaticBox* itemStaticBoxSizer230Static = new wxStaticBox(itemScrolledWindow184, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer230 = new wxStaticBoxSizer(itemStaticBoxSizer230Static, wxHORIZONTAL); + itemBoxSizer185->Add(itemStaticBoxSizer230, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText231 = new wxStaticText( itemScrolledWindow184, wxID_STATIC, _("Pokérus:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer230->Add(itemStaticText231, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_Pokerus = new wxTextCtrl( itemScrolledWindow176, ID_POKERUS, _("1/1"), wxDefaultPosition, wxSize(135, -1), wxTE_READONLY|wxTE_CENTRE ); - itemStaticBoxSizer222->Add(m_Pokerus, 0, wxALIGN_CENTER_VERTICAL, 5); + itemStaticBoxSizer230->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_PokerusDenom = new wxSpinButton( itemScrolledWindow176, ID_POKERUS_DENOM, wxDefaultPosition, wxSize(-1, 20), wxSP_VERTICAL|wxSP_ARROW_KEYS|wxSP_WRAP ); - itemStaticBoxSizer222->Add(m_PokerusDenom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5); + m_RulesPokerusNum = new wxSpinButton( itemScrolledWindow184, ID_POKERUS_NUM, wxDefaultPosition, wxSize(-1, 20), wxSP_VERTICAL|wxSP_ARROW_KEYS|wxSP_WRAP ); + itemStaticBoxSizer230->Add(m_RulesPokerusNum, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5); - itemScrolledWindow176->FitInside(); - itemNotebook38->AddPage(itemScrolledWindow176, _("Stats")); + m_Pokerus = new wxTextCtrl( itemScrolledWindow184, ID_POKERUS, _("1/1"), wxDefaultPosition, wxSize(135, -1), wxTE_READONLY|wxTE_CENTRE ); + itemStaticBoxSizer230->Add(m_Pokerus, 0, wxALIGN_CENTER_VERTICAL, 5); + + m_PokerusDenom = new wxSpinButton( itemScrolledWindow184, ID_POKERUS_DENOM, wxDefaultPosition, wxSize(-1, 20), wxSP_VERTICAL|wxSP_ARROW_KEYS|wxSP_WRAP ); + itemStaticBoxSizer230->Add(m_PokerusDenom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5); + + itemScrolledWindow184->FitInside(); + itemNotebook38->AddPage(itemScrolledWindow184, _("Stats")); itemBoxSizer37->Add(itemNotebook38, 0, wxALIGN_CENTER_HORIZONTAL, 0); itemScrolledWindow36->FitInside(); itemNotebook19->AddPage(itemScrolledWindow36, _("Rules")); - wxScrolledWindow* itemScrolledWindow228 = new wxScrolledWindow( itemNotebook19, ID_DATA_TYPES, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow228->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer229 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow228->SetSizer(itemBoxSizer229); + wxScrolledWindow* itemScrolledWindow236 = new wxScrolledWindow( itemNotebook19, ID_DATA_TYPES, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow236->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer237 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow236->SetSizer(itemBoxSizer237); - m_TypeChart = new wxStaticBox(itemScrolledWindow228, wxID_ANY, _("Type Chart")); - wxStaticBoxSizer* itemStaticBoxSizer230 = new wxStaticBoxSizer(m_TypeChart, wxVERTICAL); - itemBoxSizer229->Add(itemStaticBoxSizer230, 0, wxGROW|wxLEFT|wxRIGHT, 2); - m_Typechart = new wxGrid( itemScrolledWindow228, ID_TYPECHART, wxDefaultPosition, wxSize(200, 200), wxSIMPLE_BORDER|wxHSCROLL|wxVSCROLL ); + m_TypeChart = new wxStaticBox(itemScrolledWindow236, wxID_ANY, _("Type Chart")); + wxStaticBoxSizer* itemStaticBoxSizer238 = new wxStaticBoxSizer(m_TypeChart, wxVERTICAL); + itemBoxSizer237->Add(itemStaticBoxSizer238, 0, wxGROW|wxLEFT|wxRIGHT, 2); + m_Typechart = new wxGrid( itemScrolledWindow236, ID_TYPECHART, wxDefaultPosition, wxSize(200, 200), wxSIMPLE_BORDER|wxHSCROLL|wxVSCROLL ); m_Typechart->SetDefaultColSize(130); m_Typechart->SetDefaultRowSize(20); m_Typechart->SetColLabelSize(20); m_Typechart->SetRowLabelSize(90); - itemStaticBoxSizer230->Add(m_Typechart, 0, wxGROW|wxALL, 5); - wxButton* itemButton232 = new wxButton( m_Typechart, ID_BUTTON, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer238->Add(m_Typechart, 0, wxGROW|wxALL, 5); + wxButton* itemButton240 = new wxButton( m_Typechart, ID_BUTTON, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - wxStaticBox* itemStaticBoxSizer233Static = new wxStaticBox(itemScrolledWindow228, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer233 = new wxStaticBoxSizer(itemStaticBoxSizer233Static, wxVERTICAL); - itemBoxSizer229->Add(itemStaticBoxSizer233, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton234 = new wxButton( itemScrolledWindow228, ID_ADD_TYPE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer233->Add(itemButton234, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer241Static = new wxStaticBox(itemScrolledWindow236, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer241 = new wxStaticBoxSizer(itemStaticBoxSizer241Static, wxVERTICAL); + itemBoxSizer237->Add(itemStaticBoxSizer241, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxButton* itemButton242 = new wxButton( itemScrolledWindow236, ID_ADD_TYPE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer241->Add(itemButton242, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - itemScrolledWindow228->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow228, _("Types")); + itemScrolledWindow236->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow236, _("Types")); - wxScrolledWindow* itemScrolledWindow235 = new wxScrolledWindow( itemNotebook19, ID_DATA_INITIAL_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow235->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer236 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow235->SetSizer(itemBoxSizer236); + wxScrolledWindow* itemScrolledWindow243 = new wxScrolledWindow( itemNotebook19, ID_DATA_INITIAL_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow243->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer244 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow243->SetSizer(itemBoxSizer244); - wxStaticBox* itemStaticBoxSizer237Static = new wxStaticBox(itemScrolledWindow235, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer237 = new wxStaticBoxSizer(itemStaticBoxSizer237Static, wxVERTICAL); - itemBoxSizer236->Add(itemStaticBoxSizer237, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxBoxSizer* itemBoxSizer238 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer237->Add(itemBoxSizer238, 0, wxGROW, 2); - wxStaticText* itemStaticText239 = new wxStaticText( itemScrolledWindow235, wxID_STATIC, _("Start Map:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer238->Add(itemStaticText239, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer245Static = new wxStaticBox(itemScrolledWindow243, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer245 = new wxStaticBoxSizer(itemStaticBoxSizer245Static, wxVERTICAL); + itemBoxSizer244->Add(itemStaticBoxSizer245, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxBoxSizer* itemBoxSizer246 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer245->Add(itemBoxSizer246, 0, wxGROW, 2); + wxStaticText* itemStaticText247 = new wxStaticText( itemScrolledWindow243, wxID_STATIC, _("Start Map:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer246->Add(itemStaticText247, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer238->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer246->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxArrayString m_RulesMapStartStrings; - m_RulesMapStart = new wxComboBox( itemScrolledWindow235, ID_MAP_START, _T(""), wxDefaultPosition, wxDefaultSize, m_RulesMapStartStrings, wxCB_READONLY|wxCB_SORT ); + m_RulesMapStart = new wxComboBox( itemScrolledWindow243, ID_MAP_START, _T(""), wxDefaultPosition, wxDefaultSize, m_RulesMapStartStrings, wxCB_READONLY|wxCB_SORT ); if (ShowToolTips()) m_RulesMapStart->SetToolTip(_("Map that the game starts on")); - itemBoxSizer238->Add(m_RulesMapStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemBoxSizer246->Add(m_RulesMapStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer242 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer237->Add(itemBoxSizer242, 0, wxGROW|wxTOP, 5); - wxStaticText* itemStaticText243 = new wxStaticText( itemScrolledWindow235, wxID_STATIC, _("Coordinates:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer242->Add(itemStaticText243, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer250 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer245->Add(itemBoxSizer250, 0, wxGROW|wxTOP, 5); + wxStaticText* itemStaticText251 = new wxStaticText( itemScrolledWindow243, wxID_STATIC, _("Coordinates:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer250->Add(itemStaticText251, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer242->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer250->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMapStartX = new wxSpinCtrl( itemScrolledWindow235, ID_START_X, _T("0"), wxDefaultPosition, wxSize(79, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); - itemBoxSizer242->Add(m_RulesMapStartX, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + m_RulesMapStartX = new wxSpinCtrl( itemScrolledWindow243, ID_START_X, _T("0"), wxDefaultPosition, wxSize(79, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); + itemBoxSizer250->Add(m_RulesMapStartX, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - m_RulesMapStartY = new wxSpinCtrl( itemScrolledWindow235, ID_START_Y, _T("0"), wxDefaultPosition, wxSize(79, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); - itemBoxSizer242->Add(m_RulesMapStartY, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + m_RulesMapStartY = new wxSpinCtrl( itemScrolledWindow243, ID_START_Y, _T("0"), wxDefaultPosition, wxSize(79, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); + itemBoxSizer250->Add(m_RulesMapStartY, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer247Static = new wxStaticBox(itemScrolledWindow235, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer247 = new wxStaticBoxSizer(itemStaticBoxSizer247Static, wxHORIZONTAL); - itemBoxSizer236->Add(itemStaticBoxSizer247, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText248 = new wxStaticText( itemScrolledWindow235, wxID_STATIC, _("Direction:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer247->Add(itemStaticText248, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer255Static = new wxStaticBox(itemScrolledWindow243, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer255 = new wxStaticBoxSizer(itemStaticBoxSizer255Static, wxHORIZONTAL); + itemBoxSizer244->Add(itemStaticBoxSizer255, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText256 = new wxStaticText( itemScrolledWindow243, wxID_STATIC, _("Direction:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer255->Add(itemStaticText256, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer247->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer255->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxArrayString m_RulesDirStartStrings; m_RulesDirStartStrings.Add(_("Up")); m_RulesDirStartStrings.Add(_("Down")); m_RulesDirStartStrings.Add(_("Left")); m_RulesDirStartStrings.Add(_("Right")); - m_RulesDirStart = new wxComboBox( itemScrolledWindow235, ID_DIRECTION_START, _("Down"), wxDefaultPosition, wxDefaultSize, m_RulesDirStartStrings, wxCB_READONLY ); + m_RulesDirStart = new wxComboBox( itemScrolledWindow243, ID_DIRECTION_START, _("Down"), wxDefaultPosition, wxDefaultSize, m_RulesDirStartStrings, wxCB_READONLY ); m_RulesDirStart->SetStringSelection(_("Down")); - itemStaticBoxSizer247->Add(m_RulesDirStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer255->Add(m_RulesDirStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer251Static = new wxStaticBox(itemScrolledWindow235, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer251 = new wxStaticBoxSizer(itemStaticBoxSizer251Static, wxHORIZONTAL); - itemBoxSizer236->Add(itemStaticBoxSizer251, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText252 = new wxStaticText( itemScrolledWindow235, wxID_STATIC, _("Money:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer251->Add(itemStaticText252, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer259Static = new wxStaticBox(itemScrolledWindow243, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer259 = new wxStaticBoxSizer(itemStaticBoxSizer259Static, wxHORIZONTAL); + itemBoxSizer244->Add(itemStaticBoxSizer259, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText260 = new wxStaticText( itemScrolledWindow243, wxID_STATIC, _("Money:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer259->Add(itemStaticText260, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer251->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer259->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_RulesMoneyStart = new wxSpinCtrl( itemScrolledWindow235, ID_START_MONEY, _T("0"), wxDefaultPosition, wxSize(90, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); + m_RulesMoneyStart = new wxSpinCtrl( itemScrolledWindow243, ID_START_MONEY, _T("0"), wxDefaultPosition, wxSize(90, 19), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 0, 0 ); if (ShowToolTips()) m_RulesMoneyStart->SetToolTip(_("Amount of money the player starts with")); - itemStaticBoxSizer251->Add(m_RulesMoneyStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer259->Add(m_RulesMoneyStart, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer255Static = new wxStaticBox(itemScrolledWindow235, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer255 = new wxStaticBoxSizer(itemStaticBoxSizer255Static, wxHORIZONTAL); - itemBoxSizer236->Add(itemStaticBoxSizer255, 0, wxGROW|wxLEFT|wxRIGHT, 2); - wxStaticText* itemStaticText256 = new wxStaticText( itemScrolledWindow235, wxID_STATIC, _("Initial Dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer255->Add(itemStaticText256, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxStaticBox* itemStaticBoxSizer263Static = new wxStaticBox(itemScrolledWindow243, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer263 = new wxStaticBoxSizer(itemStaticBoxSizer263Static, wxHORIZONTAL); + itemBoxSizer244->Add(itemStaticBoxSizer263, 0, wxGROW|wxLEFT|wxRIGHT, 2); + wxStaticText* itemStaticText264 = new wxStaticText( itemScrolledWindow243, wxID_STATIC, _("Initial Dialog:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer263->Add(itemStaticText264, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemStaticBoxSizer255->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer263->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxArrayString m_RulesInitDlgStrings; - m_RulesInitDlg = new wxComboBox( itemScrolledWindow235, ID_INITIAL_DIALOG, _T(""), wxDefaultPosition, wxDefaultSize, m_RulesInitDlgStrings, wxCB_READONLY|wxCB_SORT ); + m_RulesInitDlg = new wxComboBox( itemScrolledWindow243, ID_INITIAL_DIALOG, _T(""), wxDefaultPosition, wxDefaultSize, m_RulesInitDlgStrings, wxCB_READONLY|wxCB_SORT ); if (ShowToolTips()) m_RulesInitDlg->SetToolTip(_("Dialog that starts the game")); - itemStaticBoxSizer255->Add(m_RulesInitDlg, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - itemScrolledWindow235->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow235, _("Initial")); - - wxScrolledWindow* itemScrolledWindow259 = new wxScrolledWindow( itemNotebook19, ID_DATA_DIALOGS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow259->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer260 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow259->SetSizer(itemBoxSizer260); - - wxStaticBox* itemStaticBoxSizer261Static = new wxStaticBox(itemScrolledWindow259, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer261 = new wxStaticBoxSizer(itemStaticBoxSizer261Static, wxVERTICAL); - itemBoxSizer260->Add(itemStaticBoxSizer261, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton262 = new wxButton( itemScrolledWindow259, ID_ADD_DIALOG, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer261->Add(itemButton262, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer263->Add(m_RulesInitDlg, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - itemScrolledWindow259->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow259, _("Dialogs")); + itemScrolledWindow243->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow243, _("Initial")); - wxScrolledWindow* itemScrolledWindow263 = new wxScrolledWindow( itemNotebook19, ID_DATA_COIN_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow263->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer264 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow263->SetSizer(itemBoxSizer264); - - wxStaticBox* itemStaticBoxSizer265Static = new wxStaticBox(itemScrolledWindow263, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer265 = new wxStaticBoxSizer(itemStaticBoxSizer265Static, wxVERTICAL); - itemBoxSizer264->Add(itemStaticBoxSizer265, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton266 = new wxButton( itemScrolledWindow263, ID_ADD_COIN_LIST, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer265->Add(itemButton266, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - - itemScrolledWindow263->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow263, _("Coin Lists")); - - wxScrolledWindow* itemScrolledWindow267 = new wxScrolledWindow( itemNotebook19, ID_DATA_BADGES_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow267 = new wxScrolledWindow( itemNotebook19, ID_DATA_DIALOGS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow267->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer268 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow267->SetSizer(itemBoxSizer268); @@ -1186,13 +1190,13 @@ void MainFrame::CreateControls() wxStaticBox* itemStaticBoxSizer269Static = new wxStaticBox(itemScrolledWindow267, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer269 = new wxStaticBoxSizer(itemStaticBoxSizer269Static, wxVERTICAL); itemBoxSizer268->Add(itemStaticBoxSizer269, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton270 = new wxButton( itemScrolledWindow267, ID_ADD_BADGE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton270 = new wxButton( itemScrolledWindow267, ID_ADD_DIALOG, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticBoxSizer269->Add(itemButton270, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow267->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow267, _("Badges")); + itemNotebook19->AddPage(itemScrolledWindow267, _("Dialogs")); - wxScrolledWindow* itemScrolledWindow271 = new wxScrolledWindow( itemNotebook19, ID_DATA_ABILITIES_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow271 = new wxScrolledWindow( itemNotebook19, ID_DATA_COIN_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow271->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer272 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow271->SetSizer(itemBoxSizer272); @@ -1200,13 +1204,13 @@ void MainFrame::CreateControls() wxStaticBox* itemStaticBoxSizer273Static = new wxStaticBox(itemScrolledWindow271, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer273 = new wxStaticBoxSizer(itemStaticBoxSizer273Static, wxVERTICAL); itemBoxSizer272->Add(itemStaticBoxSizer273, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton274 = new wxButton( itemScrolledWindow271, ID_ADD_ABILITY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton274 = new wxButton( itemScrolledWindow271, ID_ADD_COIN_LIST, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticBoxSizer273->Add(itemButton274, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow271->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow271, _("Abilities")); + itemNotebook19->AddPage(itemScrolledWindow271, _("Coin Lists")); - wxScrolledWindow* itemScrolledWindow275 = new wxScrolledWindow( itemNotebook19, ID_DATA_NATURES, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow275 = new wxScrolledWindow( itemNotebook19, ID_DATA_BADGES_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow275->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer276 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow275->SetSizer(itemBoxSizer276); @@ -1214,230 +1218,267 @@ void MainFrame::CreateControls() wxStaticBox* itemStaticBoxSizer277Static = new wxStaticBox(itemScrolledWindow275, wxID_ANY, _T("")); wxStaticBoxSizer* itemStaticBoxSizer277 = new wxStaticBoxSizer(itemStaticBoxSizer277Static, wxVERTICAL); itemBoxSizer276->Add(itemStaticBoxSizer277, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton278 = new wxButton( itemScrolledWindow275, ID_ADD_NATURE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton278 = new wxButton( itemScrolledWindow275, ID_ADD_BADGE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); itemStaticBoxSizer277->Add(itemButton278, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow275->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow275, _("Natures")); + itemNotebook19->AddPage(itemScrolledWindow275, _("Badges")); - wxScrolledWindow* itemScrolledWindow279 = new wxScrolledWindow( itemNotebook19, ID_DATA_SKINS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow279 = new wxScrolledWindow( itemNotebook19, ID_DATA_ABILITIES_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow279->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer280 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow279->SetSizer(itemBoxSizer280); - wxStaticBox* itemStaticBoxSizer281Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Walking")); - wxStaticBoxSizer* itemStaticBoxSizer281 = new wxStaticBoxSizer(itemStaticBoxSizer281Static, wxHORIZONTAL); + wxStaticBox* itemStaticBoxSizer281Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer281 = new wxStaticBoxSizer(itemStaticBoxSizer281Static, wxVERTICAL); itemBoxSizer280->Add(itemStaticBoxSizer281, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinWalkBitmap(wxNullBitmap); - m_SkinWalk = new wxStaticBitmap( itemScrolledWindow279, ID_WALKING_SKIN, m_SkinWalkBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer281->Add(m_SkinWalk, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton283 = new wxButton( itemScrolledWindow279, ID_WALKING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer281->Add(itemButton283, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxStaticBox* itemStaticBoxSizer284Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Biking")); - wxStaticBoxSizer* itemStaticBoxSizer284 = new wxStaticBoxSizer(itemStaticBoxSizer284Static, wxHORIZONTAL); - itemBoxSizer280->Add(itemStaticBoxSizer284, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinBikeBitmap(wxNullBitmap); - m_SkinBike = new wxStaticBitmap( itemScrolledWindow279, ID_BIKING_SKIN, m_SkinBikeBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer284->Add(m_SkinBike, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton286 = new wxButton( itemScrolledWindow279, ID_BIKING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer284->Add(itemButton286, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxStaticBox* itemStaticBoxSizer287Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Surfing")); - wxStaticBoxSizer* itemStaticBoxSizer287 = new wxStaticBoxSizer(itemStaticBoxSizer287Static, wxHORIZONTAL); - itemBoxSizer280->Add(itemStaticBoxSizer287, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinSurfBitmap(wxNullBitmap); - m_SkinSurf = new wxStaticBitmap( itemScrolledWindow279, ID_SURFING_SKIN, m_SkinSurfBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer287->Add(m_SkinSurf, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton289 = new wxButton( itemScrolledWindow279, ID_SURFING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer287->Add(itemButton289, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxStaticBox* itemStaticBoxSizer290Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Flying")); - wxStaticBoxSizer* itemStaticBoxSizer290 = new wxStaticBoxSizer(itemStaticBoxSizer290Static, wxHORIZONTAL); - itemBoxSizer280->Add(itemStaticBoxSizer290, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinFlyBitmap(wxNullBitmap); - m_SkinFly = new wxStaticBitmap( itemScrolledWindow279, ID_FLYING_SKIN, m_SkinFlyBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer290->Add(m_SkinFly, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton292 = new wxButton( itemScrolledWindow279, ID_FLYING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer290->Add(itemButton292, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxStaticBox* itemStaticBoxSizer293Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Fishing")); - wxStaticBoxSizer* itemStaticBoxSizer293 = new wxStaticBoxSizer(itemStaticBoxSizer293Static, wxHORIZONTAL); - itemBoxSizer280->Add(itemStaticBoxSizer293, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinFishBitmap(wxNullBitmap); - m_SkinFish = new wxStaticBitmap( itemScrolledWindow279, ID_FISHING_SKIN, m_SkinFishBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer293->Add(m_SkinFish, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton295 = new wxButton( itemScrolledWindow279, ID_FISING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer293->Add(itemButton295, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - wxStaticBox* itemStaticBoxSizer296Static = new wxStaticBox(itemScrolledWindow279, wxID_ANY, _("Fish while Surfing")); - wxStaticBoxSizer* itemStaticBoxSizer296 = new wxStaticBoxSizer(itemStaticBoxSizer296Static, wxHORIZONTAL); - itemBoxSizer280->Add(itemStaticBoxSizer296, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxBitmap m_SkinFishSurfBitmap(wxNullBitmap); - m_SkinFishSurf = new wxStaticBitmap( itemScrolledWindow279, ID_FISHSURFING_SKIN, m_SkinFishSurfBitmap, wxDefaultPosition, wxSize(192, 30), wxSIMPLE_BORDER ); - itemStaticBoxSizer296->Add(m_SkinFishSurf, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - - wxButton* itemButton298 = new wxButton( itemScrolledWindow279, ID_FISHSURFING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer296->Add(itemButton298, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxButton* itemButton282 = new wxButton( itemScrolledWindow279, ID_ADD_ABILITY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer281->Add(itemButton282, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow279->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow279, _("Skins")); - - wxScrolledWindow* itemScrolledWindow299 = new wxScrolledWindow( itemNotebook19, ID_DATA_MISC_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow299->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer300 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow299->SetSizer(itemBoxSizer300); - - wxStaticBox* itemStaticBoxSizer301Static = new wxStaticBox(itemScrolledWindow299, wxID_ANY, _("Super PC")); - wxStaticBoxSizer* itemStaticBoxSizer301 = new wxStaticBoxSizer(itemStaticBoxSizer301Static, wxVERTICAL); - itemBoxSizer300->Add(itemStaticBoxSizer301, 0, wxGROW, 0); - wxBoxSizer* itemBoxSizer302 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer301->Add(itemBoxSizer302, 0, wxGROW, 2); - wxStaticText* itemStaticText303 = new wxStaticText( itemScrolledWindow299, wxID_STATIC, _("Username:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer302->Add(itemStaticText303, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - itemBoxSizer302->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - - m_SuperPCUname = new wxTextCtrl( itemScrolledWindow299, ID_SUPER_PC_USERNAME, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + itemNotebook19->AddPage(itemScrolledWindow279, _("Abilities")); + + wxScrolledWindow* itemScrolledWindow283 = new wxScrolledWindow( itemNotebook19, ID_DATA_NATURES, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow283->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer284 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow283->SetSizer(itemBoxSizer284); + + wxStaticBox* itemStaticBoxSizer285Static = new wxStaticBox(itemScrolledWindow283, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer285 = new wxStaticBoxSizer(itemStaticBoxSizer285Static, wxVERTICAL); + itemBoxSizer284->Add(itemStaticBoxSizer285, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxButton* itemButton286 = new wxButton( itemScrolledWindow283, ID_ADD_NATURE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer285->Add(itemButton286, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow283->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow283, _("Natures")); + + wxScrolledWindow* itemScrolledWindow287 = new wxScrolledWindow( itemNotebook19, ID_DATA_SKINS_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow287->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer288 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow287->SetSizer(itemBoxSizer288); + + wxStaticBox* itemStaticBoxSizer289Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Walking")); + wxStaticBoxSizer* itemStaticBoxSizer289 = new wxStaticBoxSizer(itemStaticBoxSizer289Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer289, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinWalk = new wxStaticBitmap( itemScrolledWindow287, ID_WALKING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer289->Add(m_SkinWalk, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton291 = new wxButton( itemScrolledWindow287, ID_WALKING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer289->Add(itemButton291, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer292Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Biking")); + wxStaticBoxSizer* itemStaticBoxSizer292 = new wxStaticBoxSizer(itemStaticBoxSizer292Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer292, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinBike = new wxStaticBitmap( itemScrolledWindow287, ID_BIKING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer292->Add(m_SkinBike, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton294 = new wxButton( itemScrolledWindow287, ID_BIKING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer292->Add(itemButton294, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer295Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Surfing")); + wxStaticBoxSizer* itemStaticBoxSizer295 = new wxStaticBoxSizer(itemStaticBoxSizer295Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer295, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinSurf = new wxStaticBitmap( itemScrolledWindow287, ID_SURFING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer295->Add(m_SkinSurf, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton297 = new wxButton( itemScrolledWindow287, ID_SURFING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer295->Add(itemButton297, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer298Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Flying")); + wxStaticBoxSizer* itemStaticBoxSizer298 = new wxStaticBoxSizer(itemStaticBoxSizer298Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer298, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinFly = new wxStaticBitmap( itemScrolledWindow287, ID_FLYING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer298->Add(m_SkinFly, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton300 = new wxButton( itemScrolledWindow287, ID_FLYING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer298->Add(itemButton300, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer301Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Fishing")); + wxStaticBoxSizer* itemStaticBoxSizer301 = new wxStaticBoxSizer(itemStaticBoxSizer301Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer301, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinFish = new wxStaticBitmap( itemScrolledWindow287, ID_FISHING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer301->Add(m_SkinFish, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton303 = new wxButton( itemScrolledWindow287, ID_FISING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer301->Add(itemButton303, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + wxStaticBox* itemStaticBoxSizer304Static = new wxStaticBox(itemScrolledWindow287, wxID_ANY, _("Fish while Surfing")); + wxStaticBoxSizer* itemStaticBoxSizer304 = new wxStaticBoxSizer(itemStaticBoxSizer304Static, wxHORIZONTAL); + itemBoxSizer288->Add(itemStaticBoxSizer304, 0, wxGROW|wxLEFT|wxRIGHT, 5); + m_SkinFishSurf = new wxStaticBitmap( itemScrolledWindow287, ID_FISHSURFING_SKIN, wxNullBitmap, wxDefaultPosition, wxSize(192, 128), wxSIMPLE_BORDER ); + itemStaticBoxSizer304->Add(m_SkinFishSurf, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + + wxButton* itemButton306 = new wxButton( itemScrolledWindow287, ID_FISHSURFING_SKIN_BROWSE, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer304->Add(itemButton306, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow287->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow287, _("Skins")); + + wxScrolledWindow* itemScrolledWindow307 = new wxScrolledWindow( itemNotebook19, ID_DATA_EGG_GROUP, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow307->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer308 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow307->SetSizer(itemBoxSizer308); + + wxStaticBox* itemStaticBoxSizer309Static = new wxStaticBox(itemScrolledWindow307, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer309 = new wxStaticBoxSizer(itemStaticBoxSizer309Static, wxVERTICAL); + itemBoxSizer308->Add(itemStaticBoxSizer309, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxButton* itemButton310 = new wxButton( itemScrolledWindow307, ID_ADD_EGG_GROUP, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer309->Add(itemButton310, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow307->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow307, _("Egg Groups")); + + wxScrolledWindow* itemScrolledWindow311 = new wxScrolledWindow( itemNotebook19, ID_DATA_MISC_PAGE, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow311->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer312 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow311->SetSizer(itemBoxSizer312); + + wxStaticBox* itemStaticBoxSizer313Static = new wxStaticBox(itemScrolledWindow311, wxID_ANY, _("Super PC")); + wxStaticBoxSizer* itemStaticBoxSizer313 = new wxStaticBoxSizer(itemStaticBoxSizer313Static, wxVERTICAL); + itemBoxSizer312->Add(itemStaticBoxSizer313, 0, wxGROW, 0); + wxBoxSizer* itemBoxSizer314 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer313->Add(itemBoxSizer314, 0, wxGROW, 2); + wxStaticText* itemStaticText315 = new wxStaticText( itemScrolledWindow311, wxID_STATIC, _("Username:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer314->Add(itemStaticText315, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + itemBoxSizer314->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + + m_SuperPCUname = new wxTextCtrl( itemScrolledWindow311, ID_SUPER_PC_USERNAME, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); if (ShowToolTips()) m_SuperPCUname->SetToolTip(_("Username for the Super PC")); - itemBoxSizer302->Add(m_SuperPCUname, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemBoxSizer314->Add(m_SuperPCUname, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxBoxSizer* itemBoxSizer306 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer301->Add(itemBoxSizer306, 0, wxGROW|wxTOP, 2); - wxStaticText* itemStaticText307 = new wxStaticText( itemScrolledWindow299, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer306->Add(itemStaticText307, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + wxBoxSizer* itemBoxSizer318 = new wxBoxSizer(wxHORIZONTAL); + itemStaticBoxSizer313->Add(itemBoxSizer318, 0, wxGROW|wxTOP, 2); + wxStaticText* itemStaticText319 = new wxStaticText( itemScrolledWindow311, wxID_STATIC, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer318->Add(itemStaticText319, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - itemBoxSizer306->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemBoxSizer318->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_SuperPCPwd = new wxTextCtrl( itemScrolledWindow299, ID_SUPER_PC_PASSWORD, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + m_SuperPCPwd = new wxTextCtrl( itemScrolledWindow311, ID_SUPER_PC_PASSWORD, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); if (ShowToolTips()) m_SuperPCPwd->SetToolTip(_("Password for the Super PC")); - itemBoxSizer306->Add(m_SuperPCPwd, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); + itemBoxSizer318->Add(m_SuperPCPwd, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5); - wxStaticBox* itemStaticBoxSizer310Static = new wxStaticBox(itemScrolledWindow299, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer310 = new wxStaticBoxSizer(itemStaticBoxSizer310Static, wxHORIZONTAL); - itemBoxSizer300->Add(itemStaticBoxSizer310, 0, wxGROW, 2); - wxStaticText* itemStaticText311 = new wxStaticText( itemScrolledWindow299, wxID_STATIC, _("Struggle:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer310->Add(itemStaticText311, 0, wxALIGN_CENTER_VERTICAL, 0); + wxStaticBox* itemStaticBoxSizer322Static = new wxStaticBox(itemScrolledWindow311, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer322 = new wxStaticBoxSizer(itemStaticBoxSizer322Static, wxHORIZONTAL); + itemBoxSizer312->Add(itemStaticBoxSizer322, 0, wxGROW, 2); + wxStaticText* itemStaticText323 = new wxStaticText( itemScrolledWindow311, wxID_STATIC, _("Struggle:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer322->Add(itemStaticText323, 0, wxALIGN_CENTER_VERTICAL, 0); - itemStaticBoxSizer310->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer322->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); wxArrayString m_MoveStruggleStrings; - m_MoveStruggle = new wxComboBox( itemScrolledWindow299, ID_STRUGGLE, _T(""), wxDefaultPosition, wxDefaultSize, m_MoveStruggleStrings, wxCB_READONLY|wxCB_SORT ); + m_MoveStruggle = new wxComboBox( itemScrolledWindow311, ID_STRUGGLE, _T(""), wxDefaultPosition, wxDefaultSize, m_MoveStruggleStrings, wxCB_READONLY|wxCB_SORT ); if (ShowToolTips()) m_MoveStruggle->SetToolTip(_("Which move to use when all PP are exhausted")); - itemStaticBoxSizer310->Add(m_MoveStruggle, 0, wxALIGN_TOP, 0); + itemStaticBoxSizer322->Add(m_MoveStruggle, 0, wxALIGN_TOP, 0); - wxStaticBox* itemStaticBoxSizer314Static = new wxStaticBox(itemScrolledWindow299, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer314 = new wxStaticBoxSizer(itemStaticBoxSizer314Static, wxHORIZONTAL); - itemBoxSizer300->Add(itemStaticBoxSizer314, 0, wxGROW, 2); - wxStaticText* itemStaticText315 = new wxStaticText( itemScrolledWindow299, wxID_STATIC, _("Encounter Chance:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer314->Add(itemStaticText315, 0, wxALIGN_CENTER_VERTICAL, 0); + wxStaticBox* itemStaticBoxSizer326Static = new wxStaticBox(itemScrolledWindow311, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer326 = new wxStaticBoxSizer(itemStaticBoxSizer326Static, wxHORIZONTAL); + itemBoxSizer312->Add(itemStaticBoxSizer326, 0, wxGROW, 2); + wxStaticText* itemStaticText327 = new wxStaticText( itemScrolledWindow311, wxID_STATIC, _("Confusion:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer326->Add(itemStaticText327, 0, wxALIGN_CENTER_VERTICAL, 0); - itemStaticBoxSizer314->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); + itemStaticBoxSizer326->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5); - m_EncounterChance = new wxSpinCtrl( itemScrolledWindow299, ID_ENCOUNTER_CHANCE, _T("0"), wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 ); + wxArrayString m_MoveConfuseStrings; + m_MoveConfuse = new wxComboBox( itemScrolledWindow311, ID_CONFUSE, _T(""), wxDefaultPosition, wxDefaultSize, m_MoveConfuseStrings, wxCB_READONLY|wxCB_SORT ); if (ShowToolTips()) - m_EncounterChance->SetToolTip(_("The chance of an encounter happening when a Wild Tile is stepped on.")); - itemStaticBoxSizer314->Add(m_EncounterChance, 0, wxALIGN_TOP, 0); + m_MoveConfuse->SetToolTip(_("Which move to use when a Pokémon is confused")); + itemStaticBoxSizer326->Add(m_MoveConfuse, 0, wxALIGN_TOP, 0); - itemScrolledWindow299->FitInside(); - itemNotebook19->AddPage(itemScrolledWindow299, _("Miscellaneous")); + itemScrolledWindow311->FitInside(); + itemNotebook19->AddPage(itemScrolledWindow311, _("Miscellaneous")); itemBoxSizer18->Add(itemNotebook19, 0, wxGROW, 0); itemScrolledWindow17->FitInside(); itemNotebook16->AddPage(itemScrolledWindow17, _("Data")); - wxScrolledWindow* itemScrolledWindow318 = new wxScrolledWindow( itemNotebook16, ID_ITEM_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow318->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer319 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow318->SetSizer(itemBoxSizer319); - - wxStaticBox* itemStaticBoxSizer320Static = new wxStaticBox(itemScrolledWindow318, wxID_ANY, _T("")); - m_ItemSizer = new wxStaticBoxSizer(itemStaticBoxSizer320Static, wxVERTICAL); - itemBoxSizer319->Add(m_ItemSizer, 0, wxGROW|wxLEFT|wxRIGHT, 5); - wxButton* itemButton321 = new wxButton( itemScrolledWindow318, ID_ADD_ITEM, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ItemSizer->Add(itemButton321, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - - itemScrolledWindow318->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow318, _("Items")); - - wxScrolledWindow* itemScrolledWindow322 = new wxScrolledWindow( itemNotebook16, ID_MAP_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow322->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer323 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow322->SetSizer(itemBoxSizer323); - - wxStaticBox* itemStaticBoxSizer324Static = new wxStaticBox(itemScrolledWindow322, wxID_ANY, _T("")); - m_MapSizer = new wxStaticBoxSizer(itemStaticBoxSizer324Static, wxVERTICAL); - itemBoxSizer323->Add(m_MapSizer, 0, wxGROW, 0); - wxButton* itemButton325 = new wxButton( itemScrolledWindow322, ID_ADD_MAP, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MapSizer->Add(itemButton325, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - - itemScrolledWindow322->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow322, _("Map")); - - wxScrolledWindow* itemScrolledWindow326 = new wxScrolledWindow( itemNotebook16, ID_MOVE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); - itemScrolledWindow326->SetScrollbars(1, 1, 0, 0); - wxBoxSizer* itemBoxSizer327 = new wxBoxSizer(wxVERTICAL); - itemScrolledWindow326->SetSizer(itemBoxSizer327); - - wxStaticBox* itemStaticBoxSizer328Static = new wxStaticBox(itemScrolledWindow326, wxID_ANY, _T("")); - m_MoveSizer = new wxStaticBoxSizer(itemStaticBoxSizer328Static, wxVERTICAL); - itemBoxSizer327->Add(m_MoveSizer, 0, wxGROW, 0); - wxButton* itemButton329 = new wxButton( itemScrolledWindow326, ID_ADD_MOVE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MoveSizer->Add(itemButton329, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); - - itemScrolledWindow326->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow326, _("Moves")); - - wxScrolledWindow* itemScrolledWindow330 = new wxScrolledWindow( itemNotebook16, ID_POKEMON_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow330 = new wxScrolledWindow( itemNotebook16, ID_ITEM_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow330->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer331 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow330->SetSizer(itemBoxSizer331); wxStaticBox* itemStaticBoxSizer332Static = new wxStaticBox(itemScrolledWindow330, wxID_ANY, _T("")); - wxStaticBoxSizer* itemStaticBoxSizer332 = new wxStaticBoxSizer(itemStaticBoxSizer332Static, wxVERTICAL); - itemBoxSizer331->Add(itemStaticBoxSizer332, 0, wxGROW, 0); - wxButton* itemButton333 = new wxButton( itemScrolledWindow330, ID_ADD_POKEMON, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - itemStaticBoxSizer332->Add(itemButton333, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + m_ItemSizer = new wxStaticBoxSizer(itemStaticBoxSizer332Static, wxVERTICAL); + itemBoxSizer331->Add(m_ItemSizer, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxButton* itemButton333 = new wxButton( itemScrolledWindow330, ID_ADD_ITEM, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ItemSizer->Add(itemButton333, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow330->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow330, _("Pokémon")); + itemNotebook16->AddPage(itemScrolledWindow330, _("Items")); - wxScrolledWindow* itemScrolledWindow334 = new wxScrolledWindow( itemNotebook16, ID_STORE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow334 = new wxScrolledWindow( itemNotebook16, ID_MAP_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow334->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer335 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow334->SetSizer(itemBoxSizer335); wxStaticBox* itemStaticBoxSizer336Static = new wxStaticBox(itemScrolledWindow334, wxID_ANY, _T("")); - m_StoreSizer = new wxStaticBoxSizer(itemStaticBoxSizer336Static, wxVERTICAL); - itemBoxSizer335->Add(m_StoreSizer, 0, wxGROW, 0); - wxButton* itemButton337 = new wxButton( itemScrolledWindow334, ID_ADD_STORE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_StoreSizer->Add(itemButton337, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + m_MapSizer = new wxStaticBoxSizer(itemStaticBoxSizer336Static, wxVERTICAL); + itemBoxSizer335->Add(m_MapSizer, 0, wxGROW, 0); + wxButton* itemButton337 = new wxButton( itemScrolledWindow334, ID_ADD_MAP, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MapSizer->Add(itemButton337, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow334->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow334, _("Stores")); + itemNotebook16->AddPage(itemScrolledWindow334, _("Map")); - wxScrolledWindow* itemScrolledWindow338 = new wxScrolledWindow( itemNotebook16, ID_TILE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + wxScrolledWindow* itemScrolledWindow338 = new wxScrolledWindow( itemNotebook16, ID_MOVE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); itemScrolledWindow338->SetScrollbars(1, 1, 0, 0); wxBoxSizer* itemBoxSizer339 = new wxBoxSizer(wxVERTICAL); itemScrolledWindow338->SetSizer(itemBoxSizer339); wxStaticBox* itemStaticBoxSizer340Static = new wxStaticBox(itemScrolledWindow338, wxID_ANY, _T("")); - m_TileSizer = new wxStaticBoxSizer(itemStaticBoxSizer340Static, wxVERTICAL); - itemBoxSizer339->Add(m_TileSizer, 0, wxGROW, 0); - wxButton* itemButton341 = new wxButton( itemScrolledWindow338, ID_ADD_TILE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - m_TileSizer->Add(itemButton341, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + m_MoveSizer = new wxStaticBoxSizer(itemStaticBoxSizer340Static, wxVERTICAL); + itemBoxSizer339->Add(m_MoveSizer, 0, wxGROW, 0); + wxButton* itemButton341 = new wxButton( itemScrolledWindow338, ID_ADD_MOVE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MoveSizer->Add(itemButton341, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); itemScrolledWindow338->FitInside(); - itemNotebook16->AddPage(itemScrolledWindow338, _("Tiles")); + itemNotebook16->AddPage(itemScrolledWindow338, _("Moves")); + + wxScrolledWindow* itemScrolledWindow342 = new wxScrolledWindow( itemNotebook16, ID_POKEMON_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow342->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer343 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow342->SetSizer(itemBoxSizer343); + + wxStaticBox* itemStaticBoxSizer344Static = new wxStaticBox(itemScrolledWindow342, wxID_ANY, _T("")); + wxStaticBoxSizer* itemStaticBoxSizer344 = new wxStaticBoxSizer(itemStaticBoxSizer344Static, wxVERTICAL); + itemBoxSizer343->Add(itemStaticBoxSizer344, 0, wxGROW, 0); + wxButton* itemButton345 = new wxButton( itemScrolledWindow342, ID_ADD_POKEMON, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStaticBoxSizer344->Add(itemButton345, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow342->FitInside(); + itemNotebook16->AddPage(itemScrolledWindow342, _("Pokémon")); + + wxScrolledWindow* itemScrolledWindow346 = new wxScrolledWindow( itemNotebook16, ID_STORE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow346->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer347 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow346->SetSizer(itemBoxSizer347); + + wxStaticBox* itemStaticBoxSizer348Static = new wxStaticBox(itemScrolledWindow346, wxID_ANY, _T("")); + m_StoreSizer = new wxStaticBoxSizer(itemStaticBoxSizer348Static, wxVERTICAL); + itemBoxSizer347->Add(m_StoreSizer, 0, wxGROW, 0); + wxButton* itemButton349 = new wxButton( itemScrolledWindow346, ID_ADD_STORE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_StoreSizer->Add(itemButton349, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow346->FitInside(); + itemNotebook16->AddPage(itemScrolledWindow346, _("Stores")); + + wxScrolledWindow* itemScrolledWindow350 = new wxScrolledWindow( itemNotebook16, ID_TILE_PANEL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ); + itemScrolledWindow350->SetScrollbars(1, 1, 0, 0); + wxBoxSizer* itemBoxSizer351 = new wxBoxSizer(wxVERTICAL); + itemScrolledWindow350->SetSizer(itemBoxSizer351); + + wxStaticBox* itemStaticBoxSizer352Static = new wxStaticBox(itemScrolledWindow350, wxID_ANY, _T("")); + m_TileSizer = new wxStaticBoxSizer(itemStaticBoxSizer352Static, wxVERTICAL); + itemBoxSizer351->Add(m_TileSizer, 0, wxGROW, 0); + wxButton* itemButton353 = new wxButton( itemScrolledWindow350, ID_ADD_TILE, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TileSizer->Add(itemButton353, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + + itemScrolledWindow350->FitInside(); + itemNotebook16->AddPage(itemScrolledWindow350, _("Tiles")); // Connect events and objects m_Typechart->Connect(ID_TYPECHART, wxEVT_CHAR, wxKeyEventHandler(MainFrame::OnChar), NULL, this); @@ -1667,8 +1708,8 @@ void MainFrame::OnCriticalDomainsClick( wxCommandEvent& event ) void MainFrame::OnAllowNaturesClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_NATURES in MainFrame. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_NATURES in MainFrame. } @@ -1679,8 +1720,8 @@ void MainFrame::OnAllowNaturesClick( wxCommandEvent& event ) void MainFrame::OnAllowAbilitiesClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_ABILITIES in MainFrame. - // Before editing this code, remove the block markers. - event.Skip(); + // Before editing this code, remove the block markers. + event.Skip(); ////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_ABILITIES in MainFrame. } @@ -1688,7 +1729,7 @@ void MainFrame::OnAllowAbilitiesClick( wxCommandEvent& event ) * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS */ -void MainFrame::OnAllowContestsClick( wxCommandEvent& event ) +void MainFrame::OnAllowNaturesClick( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS in MainFrame. // Before editing this code, remove the block markers. @@ -2444,7 +2485,7 @@ void MainFrame::OnSuperPcPasswordUpdated( wxCommandEvent& event ) * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE */ -void MainFrame::OnStruggleSelected( wxCommandEvent& event ) +void MainFrame::OnConfuseSelected( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE in MainFrame. // Before editing this code, remove the block markers. @@ -2723,7 +2764,7 @@ void MainFrame::OnSpinctrl1Updated( wxSpinEvent& event ) * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_COMBOBOX1 */ -void MainFrame::OnCombobox1Selected( wxCommandEvent& event ) +void MainFrame::OnConfuseSelected( wxCommandEvent& event ) { ////@begin wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_COMBOBOX1 in MainFrame. // Before editing this code, remove the block markers. @@ -2911,3 +2952,42 @@ void MainFrame::OnChar( wxKeyEvent& event ) ////@end wxEVT_CHAR event handler for ID_TYPECHART in MainFrame. } + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_EGG_GROUP + */ + +void MainFrame::OnAddEggGroupClick( wxCommandEvent& event ) +{ +////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_EGG_GROUP in MainFrame. + // Before editing this code, remove the block markers. + event.Skip(); +////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_EGG_GROUP in MainFrame. +} + + +/*! + * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE + */ + +void MainFrame::OnStruggleSelected( wxCommandEvent& event ) +{ +////@begin wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE in MainFrame. + // Before editing this code, remove the block markers. + event.Skip(); +////@end wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE in MainFrame. +} + + +/*! + * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS + */ + +void MainFrame::OnAllowContestsClick( wxCommandEvent& event ) +{ +////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS in MainFrame. + // Before editing this code, remove the block markers. + event.Skip(); +////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS in MainFrame. +} + diff --git a/pokemodr/gui/mainWindow.h b/pokemodr/gui/mainWindow.h index ec215d26..cfa2b17d 100644 --- a/pokemodr/gui/mainWindow.h +++ b/pokemodr/gui/mainWindow.h @@ -149,6 +149,12 @@ public: /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_CONTESTS void OnAllowContestsClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_ABILITIES + void OnAllowAbilitiesClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_ALLOW_NATURES + void OnAllowNaturesClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_DAYCARE void OnDaycareUpdated( wxSpinEvent& event ); @@ -326,6 +332,9 @@ public: /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FISHSURFING_SKIN_BROWSE void OnFishsurfingSkinBrowseClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_EGG_GROUP + void OnAddEggGroupClick( wxCommandEvent& event ); + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SUPER_PC_USERNAME void OnSuperPcUsernameUpdated( wxCommandEvent& event ); @@ -335,8 +344,8 @@ public: /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_STRUGGLE void OnStruggleSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_ENCOUNTER_CHANCE - void OnEncounterChanceUpdated( wxSpinEvent& event ); + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_CONFUSE + void OnConfuseSelected( wxCommandEvent& event ); /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_ITEM void OnAddItemClick( wxCommandEvent& event ); @@ -381,6 +390,8 @@ public: wxCheckBox* m_RulesHeldItems; wxCheckBox* m_RulesCriticalDomains; wxCheckBox* m_RulesContests; + wxCheckBox* m_RulesAbilities; + wxCheckBox* m_RulesNatures; wxSpinCtrl* m_RulesDaycare; wxStaticBoxSizer* m_RulesTimeSizer; wxSpinCtrl* m_RulesPokemonBox; @@ -436,7 +447,7 @@ public: wxTextCtrl* m_SuperPCUname; wxTextCtrl* m_SuperPCPwd; wxComboBox* m_MoveStruggle; - wxSpinCtrl* m_EncounterChance; + wxComboBox* m_MoveConfuse; wxStaticBoxSizer* m_ItemSizer; wxStaticBoxSizer* m_MapSizer; wxStaticBoxSizer* m_MoveSizer; @@ -470,6 +481,8 @@ public: ID_HELD_ITEMS = 10379, ID_CRITICAL_DOMAINS = 10006, ID_ALLOW_CONTESTS = 10397, + ID_ALLOW_ABILITIES = 10039, + ID_ALLOW_NATURES = 10040, ID_DAYCARE = 10005, ID_ADD_TIME = 10363, ID_DATA_RULES_STORAGE_PAGE = 10402, @@ -548,11 +561,13 @@ public: ID_FISING_SKIN_BROWSE = 10585, ID_FISHSURFING_SKIN = 10587, ID_FISHSURFING_SKIN_BROWSE = 10588, + ID_DATA_EGG_GROUP = 10014, + ID_ADD_EGG_GROUP = 10024, ID_DATA_MISC_PAGE = 10589, ID_SUPER_PC_USERNAME = 10591, ID_SUPER_PC_PASSWORD = 10593, ID_STRUGGLE = 10000, - ID_ENCOUNTER_CHANCE = 10613, + ID_CONFUSE = 10026, ID_ITEM_PANEL = 10616, ID_ADD_ITEM = 10413, ID_MAP_PANEL = 10644, -- cgit