summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
commitf71140fae5218ee9839ffcd4ec83abfded5124f4 (patch)
tree9af8f2174728cedb93580411223bc59fd9a86d0a
parent9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7 (diff)
downloadsigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.gz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.xz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.zip
Added Map and Tile, added Hat class, and fixed up some other minor things
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@17 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog14
-rw-r--r--Hat.h89
-rw-r--r--pokegen.cbp18
-rw-r--r--pokegen.depend54
-rw-r--r--pokegen.layout148
-rw-r--r--pokemod/Ability.cpp8
-rw-r--r--pokemod/Ability.h2
-rw-r--r--pokemod/AbilityEffect.cpp670
-rw-r--r--pokemod/AbilityEffect.h30
-rw-r--r--pokemod/Author.cpp2
-rw-r--r--pokemod/Badge.cpp4
-rw-r--r--pokemod/CoinItem.cpp14
-rw-r--r--pokemod/CoinItem.h6
-rw-r--r--pokemod/CoinList.cpp32
-rw-r--r--pokemod/CoinList.h4
-rw-r--r--pokemod/Debug.h25
-rw-r--r--pokemod/Dialog.cpp47
-rw-r--r--pokemod/EggGroup.cpp2
-rw-r--r--pokemod/Frac.cpp5
-rw-r--r--pokemod/Frac.h4
-rw-r--r--pokemod/Ini.cpp4
-rw-r--r--pokemod/Ini.h2
-rw-r--r--pokemod/Item.cpp6
-rw-r--r--pokemod/Item.h2
-rw-r--r--pokemod/ItemEffect.cpp274
-rw-r--r--pokemod/ItemEffect.h20
-rw-r--r--pokemod/ItemStorage.cpp2
-rw-r--r--pokemod/Map.cpp661
-rw-r--r--pokemod/Map.h118
-rw-r--r--pokemod/MapTrainerTeam.cpp2
-rw-r--r--pokemod/MapWildList.cpp46
-rw-r--r--pokemod/MapWildList.h4
-rw-r--r--pokemod/MapWildPokemon.cpp2
-rw-r--r--pokemod/Matrix.h113
-rw-r--r--pokemod/Move.cpp108
-rw-r--r--pokemod/Move.h32
-rw-r--r--pokemod/MoveEffect.cpp48
-rw-r--r--pokemod/MoveEffect.h12
-rw-r--r--pokemod/Nature.cpp8
-rw-r--r--pokemod/Nature.h2
-rw-r--r--pokemod/NatureEffect.cpp38
-rw-r--r--pokemod/Pokemod.cpp2
-rw-r--r--pokemod/Pokemod.h97
-rw-r--r--pokemod/PokemonAbility.cpp13
-rw-r--r--pokemod/PokemonAbility.h6
-rw-r--r--pokemod/PokemonEvolution.cpp46
-rw-r--r--pokemod/PokemonEvolution.h20
-rw-r--r--pokemod/PokemonItem.cpp16
-rw-r--r--pokemod/PokemonItem.h6
-rw-r--r--pokemod/PokemonMove.cpp27
-rw-r--r--pokemod/PokemonMove.h6
-rw-r--r--pokemod/PokemonNature.cpp13
-rw-r--r--pokemod/PokemonNature.h6
-rw-r--r--pokemod/Ref.h88
-rw-r--r--pokemod/Store.cpp41
-rw-r--r--pokemod/Store.h4
-rw-r--r--pokemod/TODO22
-rw-r--r--pokemod/Tile.cpp189
-rw-r--r--pokemod/Tile.h123
-rw-r--r--pokemod/Time.cpp2
-rw-r--r--pokemod/Type.cpp2
-rw-r--r--pokemod/pokemod_inc.h2
-rw-r--r--pokemodr/gui/PokeModr.pjd498
-rw-r--r--pokemodr/gui/tilepanel.cpp127
-rw-r--r--pokemodr/gui/tilepanel.h5
65 files changed, 3035 insertions, 1008 deletions
diff --git a/Changelog b/Changelog
index fb337028..56ffa014 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,18 @@
-----------------
+Rev: 17
+Date: 30 May 2007
+User: MathStuf
+-----------------
+[ADD] Hat.h as a random container
+[ADD] Delete submodules by name methods
+[FIX] Made every possible value to unsigned as possible
+[ADD] const to GetSubmodule
+[FIX] Removed redundant "isValid = true;" initializer in validation methods
+[ADD] Item Effect validation started
+[ADD] AbilityEffect validation
+[ADD] Dive option to Tiles
+
+-----------------
Rev: 16
Date: 28 May 2007
User: MathStuf
diff --git a/Hat.h b/Hat.h
new file mode 100644
index 00000000..03230480
--- /dev/null
+++ b/Hat.h
@@ -0,0 +1,89 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: Hat.h
+// Purpose: Class for easy random containers
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue May 29 2007 08:23:57
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMOD_HAT__
+#define __POKEMOD_HAT__
+
+#include <cstdlib>
+#include <ctime>
+#include <map>
+
+namespace PokeGen
+{
+ template<class T> class Hat
+ {
+ public:
+ Hat()
+ {
+ std::srand(std::time(NULL));
+ objects.clear();
+ totalWeight = 1;
+ }
+
+ T PickItem()
+ {
+ int choice = std::rand() % totalWeight;
+ for (typename std::map<T, unsigned>::iterator i = objects.begin(); i != objects.end(); ++i)
+ {
+ choice -= i->second;
+ if (choice < 0)
+ return i->first;
+ }
+ }
+ T RemoveItem()
+ {
+ T chosen = PickItem();
+ if (!(--objects[chosen]))
+ objects.erase(chosen);
+ --totalWeight;
+ return chosen;
+ }
+
+ void SetWeight(const T &key, const unsigned wt)
+ {
+ if (objects.find(key) != objects.end())
+ totalWeight -= objects[key];
+ objects[key] = wt;
+ totalWeight += wt;
+ }
+
+ unsigned GetWeight(const T &key)
+ {
+ if (objects.find(key) != objects.end())
+ return objects[key];
+ return 0;
+ }
+
+ unsigned operator[](const T &key)
+ {
+ if (objects.find(key) != objects.end())
+ return objects[key];
+ return 0;
+ }
+ private:
+ std::map<T, unsigned> objects;
+ unsigned totalWeight;
+ };
+}
+
+#endif
diff --git a/pokegen.cbp b/pokegen.cbp
index 520b36a1..93f27fe5 100644
--- a/pokegen.cbp
+++ b/pokegen.cbp
@@ -74,6 +74,9 @@
<Unit filename="Changelog">
<Option target="Info" />
</Unit>
+ <Unit filename="Hat.h">
+ <Option target="pokegen" />
+ </Unit>
<Unit filename="STANDARDS">
<Option target="Info" />
</Unit>
@@ -213,6 +216,16 @@
<Option target="pokegen" />
<Option target="pokemod-DLL" />
</Unit>
+ <Unit filename="pokemod\Map.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\Map.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\MapTrainerTeam.cpp">
<Option target="pokemodr" />
<Option target="pokegen" />
@@ -385,6 +398,11 @@
<Unit filename="pokemod\TODO">
<Option target="Info" />
</Unit>
+ <Unit filename="pokemod\Tile.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\Time.cpp">
<Option target="pokemodr" />
<Option target="pokegen" />
diff --git a/pokegen.depend b/pokegen.depend
index eb002a95..0099e712 100644
--- a/pokegen.depend
+++ b/pokegen.depend
@@ -7,7 +7,7 @@
"Ini.h"
"Ref.h"
-1180397105 h:\ben\programming\pc\pokegen\src\pokemod\debug.h
+1180566328 h:\ben\programming\pc\pokegen\src\pokemod\debug.h
<ctime>
<fstream>
<cstdio>
@@ -23,16 +23,16 @@
"Debug.h"
"Ini.h"
-1180186019 h:\ben\programming\pc\pokegen\src\pokemod\ini.h
+1180561669 h:\ben\programming\pc\pokegen\src\pokemod\ini.h
<map>
<fstream>
"String.h"
-1180185152 h:\ben\programming\pc\pokegen\src\pokemod\ref.h
+1180548550 h:\ben\programming\pc\pokegen\src\pokemod\ref.h
<vector>
"String.h"
-1180186033 source:h:\ben\programming\pc\pokegen\src\pokemod\ini.cpp
+1180408595 source:h:\ben\programming\pc\pokegen\src\pokemod\ini.cpp
"Ini.h"
1180050766 source:h:\ben\programming\pc\pokegen\src\pokemod\object.cpp
@@ -107,7 +107,7 @@
"Frac.h"
"Pokemod.h"
-1180396556 h:\ben\programming\pc\pokegen\src\pokemod\pokemod.h
+1180577992 h:\ben\programming\pc\pokegen\src\pokemod\pokemod.h
<vector>
"pokemod_inc.h"
"Object.h"
@@ -116,24 +116,26 @@
"Author.h"
"Badge.h"
"CoinList.h"
+ "Dialog.h"
+ "EggGroup.h"
"Item.h"
"ItemStorage.h"
- "Nature.h"
"Move.h"
+ "Nature.h"
"Store.h"
"Time.h"
"Type.h"
-1180396584 h:\ben\programming\pc\pokegen\src\pokemod\pokemod_inc.h
+1180564325 h:\ben\programming\pc\pokegen\src\pokemod\pokemod_inc.h
"Pokemod.h"
-1180186383 h:\ben\programming\pc\pokegen\src\pokemod\ability.h
+1180577043 h:\ben\programming\pc\pokegen\src\pokemod\ability.h
<vector>
"Object.h"
"String.h"
"AbilityEffect.h"
-1180186319 h:\ben\programming\pc\pokegen\src\pokemod\abilityeffect.h
+1180561756 h:\ben\programming\pc\pokegen\src\pokemod\abilityeffect.h
"Object.h"
"String.h"
"Pokemod.h"
@@ -142,26 +144,26 @@
"Type.h"
"Ref.h"
-1180393190 h:\ben\programming\pc\pokegen\src\pokemod\coinlist.h
+1180577393 h:\ben\programming\pc\pokegen\src\pokemod\coinlist.h
<vector>
"Object.h"
"String.h"
"Pokemod.h"
"CoinItem.h"
-1180399231 h:\ben\programming\pc\pokegen\src\pokemod\coinitem.h
+1180564687 h:\ben\programming\pc\pokegen\src\pokemod\coinitem.h
"Object.h"
"String.h"
"Pokemod.h"
-1180393549 h:\ben\programming\pc\pokegen\src\pokemod\item.h
+1180577460 h:\ben\programming\pc\pokegen\src\pokemod\item.h
<vector>
"Object.h"
"String.h"
"Pokemod.h"
"ItemEffect.h"
-1180393625 h:\ben\programming\pc\pokegen\src\pokemod\itemeffect.h
+1180562837 h:\ben\programming\pc\pokegen\src\pokemod\itemeffect.h
"Object.h"
"String.h"
"Pokemod.h"
@@ -170,7 +172,7 @@
"Object.h"
"String.h"
-1180185506 h:\ben\programming\pc\pokegen\src\pokemod\nature.h
+1180577549 h:\ben\programming\pc\pokegen\src\pokemod\nature.h
<vector>
"Object.h"
"String.h"
@@ -182,19 +184,19 @@
"Frac.h"
"Pokemod.h"
-1180394612 h:\ben\programming\pc\pokegen\src\pokemod\move.h
+1180577642 h:\ben\programming\pc\pokegen\src\pokemod\move.h
<vector>
"Object.h"
"String.h"
"MoveEffect.h"
-1180396073 h:\ben\programming\pc\pokegen\src\pokemod\moveeffect.h
+1180565220 h:\ben\programming\pc\pokegen\src\pokemod\moveeffect.h
"Object.h"
"String.h"
"Pokemod.h"
"Frac.h"
-1180185102 h:\ben\programming\pc\pokegen\src\pokemod\store.h
+1180566102 h:\ben\programming\pc\pokegen\src\pokemod\store.h
<vector>
"Object.h"
"String.h"
@@ -217,38 +219,38 @@
1180395217 source:h:\ben\programming\pc\pokegen\src\pokemod\natureeffect.cpp
"NatureEffect.h"
-1180395404 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonability.cpp
+1180565414 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonability.cpp
"PokemonAbility.h"
-1180185274 h:\ben\programming\pc\pokegen\src\pokemod\pokemonability.h
+1180565364 h:\ben\programming\pc\pokegen\src\pokemod\pokemonability.h
"Object.h"
"String.h"
"Pokemod.h"
-1180395536 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonitem.cpp
+1180565844 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonitem.cpp
"PokemonItem.h"
-1180185219 h:\ben\programming\pc\pokegen\src\pokemod\pokemonitem.h
+1180565800 h:\ben\programming\pc\pokegen\src\pokemod\pokemonitem.h
"Object.h"
"String.h"
"Pokemod.h"
-1180185210 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonmove.cpp
+1180565960 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonmove.cpp
"PokemonMove.h"
-1180185193 h:\ben\programming\pc\pokegen\src\pokemod\pokemonmove.h
+1180565859 h:\ben\programming\pc\pokegen\src\pokemod\pokemonmove.h
"Object.h"
"String.h"
"Pokemod.h"
-1180185178 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonnature.cpp
+1180566006 source:h:\ben\programming\pc\pokegen\src\pokemod\pokemonnature.cpp
"PokemonNature.h"
-1180185162 h:\ben\programming\pc\pokegen\src\pokemod\pokemonnature.h
+1180565975 h:\ben\programming\pc\pokegen\src\pokemod\pokemonnature.h
"Object.h"
"String.h"
"Pokemod.h"
-1180395605 source:h:\ben\programming\pc\pokegen\src\pokemod\store.cpp
+1180566301 source:h:\ben\programming\pc\pokegen\src\pokemod\store.cpp
"Store.h"
diff --git a/pokegen.layout b/pokegen.layout
index 3d108304..1e5ebe82 100644
--- a/pokegen.layout
+++ b/pokegen.layout
@@ -2,7 +2,10 @@
<CodeBlocks_layout_file>
<ActiveTarget name="pokemod-DLL" />
<File name="Changelog" open="1" top="0" tabpos="1">
- <Cursor position="237" topLine="0" />
+ <Cursor position="418" topLine="0" />
+ </File>
+ <File name="Hat.h" open="0" top="0" tabpos="4">
+ <Cursor position="2478" topLine="0" />
</File>
<File name="STANDARDS" open="0" top="0" tabpos="0">
<Cursor position="2" topLine="0" />
@@ -26,145 +29,151 @@
<Cursor position="1408" topLine="0" />
</File>
<File name="pokemod\Ability.cpp" open="0" top="0" tabpos="2">
- <Cursor position="4541" topLine="127" />
+ <Cursor position="2591" topLine="39" />
</File>
<File name="pokemod\Ability.h" open="0" top="0" tabpos="2">
- <Cursor position="1407" topLine="23" />
+ <Cursor position="0" topLine="0" />
</File>
- <File name="pokemod\AbilityEffect.cpp" open="0" top="0" tabpos="2">
- <Cursor position="5872" topLine="169" />
+ <File name="pokemod\AbilityEffect.cpp" open="0" top="0" tabpos="3">
+ <Cursor position="18229" topLine="39" />
</File>
<File name="pokemod\AbilityEffect.h" open="0" top="0" tabpos="3">
- <Cursor position="2631" topLine="62" />
+ <Cursor position="2931" topLine="52" />
</File>
<File name="pokemod\Author.cpp" open="0" top="0" tabpos="4">
- <Cursor position="3120" topLine="162" />
+ <Cursor position="2233" topLine="0" />
</File>
<File name="pokemod\Author.h" open="0" top="0" tabpos="5">
<Cursor position="1559" topLine="40" />
</File>
<File name="pokemod\Badge.cpp" open="0" top="0" tabpos="6">
- <Cursor position="7478" topLine="230" />
+ <Cursor position="1268" topLine="0" />
</File>
<File name="pokemod\Badge.h" open="0" top="0" tabpos="7">
<Cursor position="2455" topLine="33" />
</File>
<File name="pokemod\CoinItem.cpp" open="0" top="0" tabpos="0">
- <Cursor position="5273" topLine="159" />
+ <Cursor position="1780" topLine="0" />
</File>
<File name="pokemod\CoinItem.h" open="0" top="0" tabpos="0">
- <Cursor position="1310" topLine="13" />
+ <Cursor position="1846" topLine="32" />
</File>
- <File name="pokemod\CoinList.cpp" open="0" top="0" tabpos="0">
- <Cursor position="5774" topLine="176" />
+ <File name="pokemod\CoinList.cpp" open="0" top="0" tabpos="3">
+ <Cursor position="1807" topLine="0" />
</File>
<File name="pokemod\CoinList.h" open="0" top="0" tabpos="0">
- <Cursor position="1807" topLine="21" />
+ <Cursor position="2130" topLine="33" />
</File>
<File name="pokemod\Debug.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1588" topLine="27" />
+ <Cursor position="1588" topLine="0" />
</File>
<File name="pokemod\Debug.h" open="0" top="0" tabpos="4">
- <Cursor position="9863" topLine="205" />
+ <Cursor position="9456" topLine="196" />
</File>
<File name="pokemod\Dialog.cpp" open="0" top="0" tabpos="0">
- <Cursor position="2971" topLine="74" />
+ <Cursor position="1773" topLine="0" />
</File>
<File name="pokemod\Dialog.h" open="0" top="0" tabpos="0">
<Cursor position="1869" topLine="24" />
</File>
<File name="pokemod\EggGroup.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1932" topLine="77" />
+ <Cursor position="1952" topLine="0" />
</File>
<File name="pokemod\EggGroup.h" open="0" top="0" tabpos="0">
<Cursor position="1603" topLine="25" />
</File>
<File name="pokemod\Flag.cpp" open="0" top="0" tabpos="8">
- <Cursor position="2093" topLine="54" />
+ <Cursor position="2194" topLine="0" />
</File>
<File name="pokemod\Flag.h" open="0" top="0" tabpos="9">
<Cursor position="1628" topLine="24" />
</File>
<File name="pokemod\Frac.cpp" open="0" top="0" tabpos="10">
- <Cursor position="3630" topLine="124" />
+ <Cursor position="5005" topLine="0" />
</File>
<File name="pokemod\Frac.h" open="0" top="0" tabpos="11">
- <Cursor position="1774" topLine="32" />
+ <Cursor position="2159" topLine="23" />
</File>
<File name="pokemod\Ini.cpp" open="0" top="0" tabpos="3">
- <Cursor position="3726" topLine="141" />
+ <Cursor position="2402" topLine="0" />
</File>
<File name="pokemod\Ini.h" open="0" top="0" tabpos="12">
- <Cursor position="2392" topLine="42" />
+ <Cursor position="2063" topLine="15" />
</File>
<File name="pokemod\Item.cpp" open="0" top="0" tabpos="2">
- <Cursor position="6393" topLine="213" />
+ <Cursor position="1726" topLine="0" />
</File>
<File name="pokemod\Item.h" open="0" top="0" tabpos="0">
- <Cursor position="1491" topLine="40" />
+ <Cursor position="2300" topLine="31" />
</File>
<File name="pokemod\ItemEffect.cpp" open="0" top="0" tabpos="0">
- <Cursor position="5101" topLine="156" />
+ <Cursor position="1996" topLine="0" />
</File>
<File name="pokemod\ItemEffect.h" open="0" top="0" tabpos="0">
- <Cursor position="2687" topLine="51" />
+ <Cursor position="1910" topLine="29" />
</File>
<File name="pokemod\ItemStorage.cpp" open="0" top="0" tabpos="0">
- <Cursor position="3815" topLine="108" />
+ <Cursor position="1742" topLine="0" />
</File>
<File name="pokemod\ItemStorage.h" open="0" top="0" tabpos="0">
<Cursor position="1851" topLine="21" />
</File>
+ <File name="pokemod\Map.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="1723" topLine="0" />
+ </File>
+ <File name="pokemod\Map.h" open="0" top="0" tabpos="3">
+ <Cursor position="3843" topLine="69" />
+ </File>
<File name="pokemod\MapTrainerTeam.cpp" open="0" top="0" tabpos="3">
- <Cursor position="4766" topLine="124" />
+ <Cursor position="1830" topLine="0" />
</File>
<File name="pokemod\MapTrainerTeam.h" open="0" top="0" tabpos="0">
<Cursor position="1733" topLine="26" />
</File>
<File name="pokemod\MapWildList.cpp" open="0" top="0" tabpos="2">
- <Cursor position="3776" topLine="84" />
+ <Cursor position="1957" topLine="0" />
</File>
<File name="pokemod\MapWildList.h" open="0" top="0" tabpos="0">
- <Cursor position="2641" topLine="47" />
+ <Cursor position="1914" topLine="44" />
</File>
<File name="pokemod\MapWildPokemon.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4766" topLine="124" />
+ <Cursor position="2498" topLine="0" />
</File>
<File name="pokemod\MapWildPokemon.h" open="0" top="0" tabpos="0">
<Cursor position="1977" topLine="31" />
</File>
<File name="pokemod\Matrix.h" open="0" top="0" tabpos="4">
- <Cursor position="5046" topLine="219" />
+ <Cursor position="2354" topLine="254" />
</File>
- <File name="pokemod\Move.cpp" open="0" top="0" tabpos="3">
- <Cursor position="2391" topLine="67" />
+ <File name="pokemod\Move.cpp" open="0" top="0" tabpos="4">
+ <Cursor position="2214" topLine="0" />
</File>
<File name="pokemod\Move.h" open="0" top="0" tabpos="2">
- <Cursor position="5067" topLine="4" />
+ <Cursor position="4151" topLine="29" />
</File>
<File name="pokemod\MoveEffect.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4091" topLine="118" />
+ <Cursor position="1875" topLine="0" />
</File>
<File name="pokemod\MoveEffect.h" open="0" top="0" tabpos="0">
- <Cursor position="1709" topLine="27" />
+ <Cursor position="2752" topLine="19" />
</File>
<File name="pokemod\Nature.cpp" open="0" top="0" tabpos="5">
- <Cursor position="3461" topLine="0" />
+ <Cursor position="1641" topLine="0" />
</File>
<File name="pokemod\Nature.h" open="0" top="0" tabpos="4">
- <Cursor position="1315" topLine="9" />
+ <Cursor position="1883" topLine="29" />
</File>
<File name="pokemod\NatureEffect.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1211" topLine="0" />
+ <Cursor position="2457" topLine="0" />
</File>
<File name="pokemod\NatureEffect.h" open="0" top="0" tabpos="0">
<Cursor position="1331" topLine="0" />
</File>
<File name="pokemod\Object.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1643" topLine="16" />
+ <Cursor position="1410" topLine="0" />
</File>
<File name="pokemod\Object.h" open="0" top="0" tabpos="0">
- <Cursor position="1532" topLine="27" />
+ <Cursor position="1532" topLine="24" />
</File>
<File name="pokemod\Path.cpp" open="0" top="0" tabpos="17">
<Cursor position="1503" topLine="0" />
@@ -173,82 +182,85 @@
<Cursor position="1696" topLine="19" />
</File>
<File name="pokemod\Point.cpp" open="0" top="0" tabpos="19">
- <Cursor position="1631" topLine="11" />
+ <Cursor position="1631" topLine="0" />
</File>
<File name="pokemod\Point.h" open="0" top="0" tabpos="20">
<Cursor position="1891" topLine="21" />
</File>
<File name="pokemod\Pokemod.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1860" topLine="0" />
+ <Cursor position="1600" topLine="0" />
</File>
<File name="pokemod\Pokemod.h" open="0" top="0" tabpos="0">
- <Cursor position="1233" topLine="8" />
+ <Cursor position="2256" topLine="44" />
</File>
<File name="pokemod\PokemonAbility.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4153" topLine="109" />
+ <Cursor position="2309" topLine="0" />
</File>
<File name="pokemod\PokemonAbility.h" open="0" top="0" tabpos="0">
- <Cursor position="1908" topLine="27" />
+ <Cursor position="1961" topLine="26" />
</File>
<File name="pokemod\PokemonEvolution.cpp" open="0" top="0" tabpos="0">
- <Cursor position="2085" topLine="44" />
+ <Cursor position="2628" topLine="0" />
</File>
<File name="pokemod\PokemonEvolution.h" open="0" top="0" tabpos="0">
- <Cursor position="2104" topLine="39" />
+ <Cursor position="1946" topLine="28" />
</File>
<File name="pokemod\PokemonItem.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4650" topLine="126" />
+ <Cursor position="1801" topLine="0" />
</File>
<File name="pokemod\PokemonItem.h" open="0" top="0" tabpos="0">
- <Cursor position="1899" topLine="30" />
+ <Cursor position="1821" topLine="26" />
</File>
<File name="pokemod\PokemonMove.cpp" open="0" top="0" tabpos="0">
- <Cursor position="5086" topLine="146" />
+ <Cursor position="2431" topLine="0" />
</File>
<File name="pokemod\PokemonMove.h" open="0" top="0" tabpos="0">
- <Cursor position="1826" topLine="27" />
+ <Cursor position="1975" topLine="27" />
</File>
<File name="pokemod\PokemonNature.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4156" topLine="121" />
+ <Cursor position="2283" topLine="0" />
</File>
<File name="pokemod\PokemonNature.h" open="0" top="0" tabpos="0">
- <Cursor position="1898" topLine="27" />
+ <Cursor position="1951" topLine="26" />
</File>
<File name="pokemod\Ref.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1208" topLine="3" />
+ <Cursor position="1208" topLine="0" />
</File>
- <File name="pokemod\Ref.h" open="0" top="0" tabpos="0">
- <Cursor position="9944" topLine="283" />
+ <File name="pokemod\Ref.h" open="0" top="0" tabpos="3">
+ <Cursor position="9036" topLine="259" />
</File>
<File name="pokemod\Store.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1309" topLine="90" />
+ <Cursor position="1691" topLine="0" />
</File>
<File name="pokemod\Store.h" open="0" top="0" tabpos="0">
- <Cursor position="2137" topLine="0" />
+ <Cursor position="2096" topLine="30" />
</File>
<File name="pokemod\String.cpp" open="0" top="0" tabpos="0">
- <Cursor position="3983" topLine="45" />
+ <Cursor position="3983" topLine="0" />
</File>
<File name="pokemod\String.h" open="0" top="0" tabpos="0">
<Cursor position="388" topLine="0" />
</File>
- <File name="pokemod\TODO" open="1" top="1" tabpos="2">
- <Cursor position="531" topLine="0" />
+ <File name="pokemod\TODO" open="1" top="0" tabpos="2">
+ <Cursor position="109" topLine="0" />
+ </File>
+ <File name="pokemod\Tile.h" open="1" top="0" tabpos="3">
+ <Cursor position="1984" topLine="0" />
</File>
<File name="pokemod\Time.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4384" topLine="0" />
+ <Cursor position="2176" topLine="0" />
</File>
<File name="pokemod\Time.h" open="0" top="0" tabpos="0">
- <Cursor position="1809" topLine="30" />
+ <Cursor position="1809" topLine="26" />
</File>
<File name="pokemod\Type.cpp" open="0" top="0" tabpos="0">
- <Cursor position="3109" topLine="2" />
+ <Cursor position="1902" topLine="0" />
</File>
<File name="pokemod\Type.h" open="0" top="0" tabpos="0">
- <Cursor position="1404" topLine="27" />
+ <Cursor position="1739" topLine="23" />
</File>
<File name="pokemod\pokemod_inc.h" open="0" top="0" tabpos="0">
- <Cursor position="1441" topLine="30" />
+ <Cursor position="1529" topLine="27" />
</File>
<File name="pokemodr\PokeModr.cpp" open="0" top="0" tabpos="0">
<Cursor position="1524" topLine="23" />
diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp
index eba08c42..990eee0c 100644
--- a/pokemod/Ability.cpp
+++ b/pokemod/Ability.cpp
@@ -47,7 +47,6 @@ PokeGen::PokeMod::Ability::~Ability()
void PokeGen::PokeMod::Ability::Validate()
{
- isValid = true;
LogValidateStart("Ability", id, name);
// Make sure the name is set to something
if (name == "")
@@ -78,7 +77,6 @@ void PokeGen::PokeMod::Ability::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Ability::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Ability", id, name);
// Make sure the name is set to something
if (name == "")
@@ -141,7 +139,7 @@ void PokeGen::PokeMod::Ability::ExportIni(std::ofstream &fout) const
void PokeGen::PokeMod::Ability::SetName(const String &n)
{
- LogSetVar("Ability", id, "name", n, n);
+ LogSetVar("Ability", id, "name", n);
name = n;
}
@@ -151,7 +149,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Ability::GetName() const
return name;
}
-PokeGen::PokeMod::AbilityEffect *PokeGen::PokeMod::Ability::GetAbilityEffect(const unsigned _id)
+const PokeGen::PokeMod::AbilityEffect *PokeGen::PokeMod::Ability::GetAbilityEffect(const unsigned _id) const
{
LogSubmoduleFetch("Ability", id, "effect", _id, name);
for (unsigned i = 0; i < GetAbilityEffectCount(); ++i)
@@ -188,7 +186,7 @@ void PokeGen::PokeMod::Ability::NewAbilityEffect(Ini *const ini)
void PokeGen::PokeMod::Ability::DeleteAbilityEffect(const unsigned _id)
{
LogSubmoduleRemoveStart("Ability", id, "effect", _id, name);
- for (std::vector<AbilityEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<AbilityEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
diff --git a/pokemod/Ability.h b/pokemod/Ability.h
index 0e8f6af1..f5b35c4b 100644
--- a/pokemod/Ability.h
+++ b/pokemod/Ability.h
@@ -48,7 +48,7 @@ namespace PokeGen
String GetName() const;
- AbilityEffect *GetAbilityEffect(const unsigned _id);
+ const AbilityEffect *GetAbilityEffect(const unsigned _id) const;
unsigned GetAbilityEffectCount() const;
void NewAbilityEffect(Ini *const ini = NULL);
void DeleteAbilityEffect(const unsigned _id);
diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp
index 130fafab..bca7d486 100644
--- a/pokemod/AbilityEffect.cpp
+++ b/pokemod/AbilityEffect.cpp
@@ -29,12 +29,12 @@ PokeGen::PokeMod::AbilityEffect::AbilityEffect(const unsigned _id)
{
LogCtor("AbilityEffect", _id);
chance.Set(1, 1);
- effect = -1;
- val1 = -1;
- val2 = -1;
- val3 = -1;
- trigger = -1;
- tval1 = -1;
+ effect = UINT_MAX;
+ val1 = UINT_MAX;
+ val2 = UINT_MAX;
+ val3 = INT_MAX;
+ trigger = UINT_MAX;
+ tval1 = UINT_MAX;
tval2.Set(1, 1);
id = _id;
}
@@ -52,17 +52,359 @@ PokeGen::PokeMod::AbilityEffect::~AbilityEffect()
LogDtor("AbilityEffect", id);
}
-#ifdef POKEMODR
-void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output)
-#else
void PokeGen::PokeMod::AbilityEffect::Validate()
-#endif
{
- isValid = true;
LogValidateStart("AbilityEffect", id);
- // TODO (Validation#1#): AbilityEffect Validation
+ chance.Reduce();
+ if (AE_END <= effect)
+ {
+ LogVarNotValid("AbilityEffect", id, "effect");
+ isValid = false;
+ }
+ else
+ {
+ switch (effect)
+ {
+ case AE_STATS:
+ if ((BST_END <= val1) || ((val1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit()))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_STATUS:
+ if (!curPokeMod.GetStatus(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_ABILITY:
+ if (!curPokeMod.GetAbility(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_ACC_POWER:
+ if (PA_END <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_ITEM_EFFECT:
+ if (ABIT_END <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_TYPE:
+ if (!curPokeMod.GetType(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ break;
+ case AE_WEATHER:
+ if (W_END_ALL <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ isValid = false;
+ }
+ }
+ switch (effect)
+ {
+ case AE_STATS:
+ if (BM_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ isValid = false;
+ }
+ break;
+ case AE_STATUS:
+ case AE_WEATHER:
+ if (CA_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ isValid = false;
+ }
+ break;
+ case AE_ABILITY:
+ if (ABI_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ isValid = false;
+ }
+ break;
+ case AE_TYPE:
+ if (BO_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ isValid = false;
+ }
+ }
+ switch (effect)
+ {
+ case AE_DMG_TO_HP:
+ case AE_PRV_DMG:
+ case AE_AUTO_HEAL:
+ case AE_DEAL_DMG:
+ case AE_WILDS:
+ case AE_ACC_POWER:
+ case AE_TYPE:
+ case AE_FAST_HATCH:
+ if ((val3 < 0) || (100 < val3))
+ {
+ LogVarNotValid("AbilityEffect", id, "val3");
+ isValid = false;
+ }
+ break;
+ case AE_STATS:
+ if ((val3 < -6) || (6 < val3))
+ {
+ LogVarNotValid("AbilityEffect", id, "val3");
+ isValid = false;
+ }
+ }
+ }
+ if (AT_END <= trigger)
+ {
+ LogVarNotValid("AbilityEffect", id, "trigger");
+ isValid = false;
+ }
+ else
+ {
+ switch (trigger)
+ {
+ case AT_WEATHER:
+ if (W_END_ALL <= tval1)
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ isValid = false;
+ }
+ break;
+ case AT_TYPE:
+ if (!curPokeMod.GetType(tval1))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ isValid = false;
+ }
+ break;
+ case AT_HP_BOUND:
+ if (SI_END <= tval1)
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ isValid = false;
+ }
+ break;
+ case AT_STAT_CHANGE:
+ if ((BST_END <= tval1) || ((tval1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit()))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ isValid = false;
+ }
+ break;
+ case AT_STATUS:
+ if (!curPokeMod.GetStatus(tval1))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ isValid = false;
+ }
+ }
+ tval2.Reduce();
+ }
+ LogValidateOver("AbilityEffect", id, isValid);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::AbilityEffect::Validate(const wxListBox &output)
+{
+ LogValidateStart("AbilityEffect", id);
+ chance.Reduce();
+ if (AE_END <= effect)
+ {
+ LogVarNotValid("AbilityEffect", id, "effect");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "effect"));
+ isValid = false;
+ }
+ else
+ {
+ switch (effect)
+ {
+ case AE_STATS:
+ if ((BST_END <= val1) || ((val1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit()))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_STATUS:
+ if (!curPokeMod.GetStatus(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_ABILITY:
+ if (!curPokeMod.GetAbility(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_ACC_POWER:
+ if (PA_END <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_ITEM_EFFECT:
+ if (ABIT_END <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_TYPE:
+ if (!curPokeMod.GetType(val1))
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ break;
+ case AE_WEATHER:
+ if (W_END_ALL <= val1)
+ {
+ LogVarNotValid("AbilityEffect", id, "val1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val1"));
+ isValid = false;
+ }
+ }
+ switch (effect)
+ {
+ case AE_STATS:
+ if (BM_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val2"));
+ isValid = false;
+ }
+ break;
+ case AE_STATUS:
+ case AE_WEATHER:
+ if (CA_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val2"));
+ isValid = false;
+ }
+ break;
+ case AE_ABILITY:
+ if (ABI_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val2"));
+ isValid = false;
+ }
+ break;
+ case AE_TYPE:
+ if (BO_END <= val2)
+ {
+ LogVarNotValid("AbilityEffect", id, "val2");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val2"));
+ isValid = false;
+ }
+ }
+ switch (effect)
+ {
+ case AE_DMG_TO_HP:
+ case AE_PRV_DMG:
+ case AE_AUTO_HEAL:
+ case AE_DEAL_DMG:
+ case AE_WILDS:
+ case AE_ACC_POWER:
+ case AE_TYPE:
+ case AE_FAST_HATCH:
+ if ((val3 < 0) || (100 < val3))
+ {
+ LogVarNotValid("AbilityEffect", id, "val3");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val3"));
+ isValid = false;
+ }
+ break;
+ case AE_STATS:
+ if ((val3 < -6) || (6 < val3))
+ {
+ LogVarNotValid("AbilityEffect", id, "val3");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "val3"));
+ isValid = false;
+ }
+ }
+ }
+ if (AT_END <= trigger)
+ {
+ LogVarNotValid("AbilityEffect", id, "trigger");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "trigger"));
+ isValid = false;
+ }
+ else
+ {
+ switch (trigger)
+ {
+ case AT_WEATHER:
+ if (W_END_ALL <= tval1)
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1"));
+ isValid = false;
+ }
+ break;
+ case AT_TYPE:
+ if (!curPokeMod.GetType(tval1))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1"));
+ isValid = false;
+ }
+ break;
+ case AT_HP_BOUND:
+ if (SI_END <= tval1)
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1"));
+ isValid = false;
+ }
+ break;
+ case AT_STAT_CHANGE:
+ if ((BST_END <= tval1) || ((tval1 == BST_SPECIAL_DEFENSE) && !curPokeMod.IsSpecialSplit()))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1"));
+ isValid = false;
+ }
+ break;
+ case AT_STATUS:
+ if (!curPokeMod.GetStatus(tval1))
+ {
+ LogVarNotValid("AbilityEffect", id, "tVal1");
+ output.append(OutputLogVarNotValid("AbilityEffect", id, "tVal1"));
+ isValid = false;
+ }
+ }
+ tval2.Reduce();
+ }
LogValidateOver("AbilityEffect", id, isValid);
}
+#endif
void PokeGen::PokeMod::AbilityEffect::ImportIni(Ini &ini, const unsigned _id)
{
@@ -81,12 +423,12 @@ void PokeGen::PokeMod::AbilityEffect::ImportIni(Ini &ini, const unsigned _id)
ini.GetValue("chance-n", i, 1);
ini.GetValue("chance-d", j, 1);
chance.Set(i, j);
- ini.GetValue("effect", effect, -1);
- ini.GetValue("val1", val1, -1);
- ini.GetValue("val2", val2, -1);
- ini.GetValue("val3", val3, -1);
- ini.GetValue("trigger", trigger, -1);
- ini.GetValue("tval1", tval1, -1);
+ ini.GetValue("effect", effect);
+ ini.GetValue("val1", val1);
+ ini.GetValue("val2", val2);
+ ini.GetValue("val3", val3);
+ ini.GetValue("trigger", trigger);
+ ini.GetValue("tval1", tval1);
ini.GetValue("tval2-n", i, 1);
ini.GetValue("tval2-d", j, 1);
tval2.Set(i, j);
@@ -137,31 +479,30 @@ void PokeGen::PokeMod::AbilityEffect::SetChanceDenom(const unsigned d)
chance.SetDenom(d);
}
-void PokeGen::PokeMod::AbilityEffect::SetEffect(const int e)
+void PokeGen::PokeMod::AbilityEffect::SetEffect(const unsigned e)
{
- if ((e <= AE_NONE) || (AE_END <= e))
- LogOutOfRange("AbilityEffect", id, "effect", e, "");
- else
+ if (e < AE_END)
{
LogSetVar("AbilityEffect", id, "effect", e);
effect = e;
- val1 = -1;
- val2 = -1;
- val3 = -1;
+ val1 = UINT_MAX;
+ val2 = UINT_MAX;
+ val3 = INT_MAX;
}
+ else
+ LogOutOfRange("AbilityEffect", id, "effect", e, AbilityEffectStr[effect]);
}
void PokeGen::PokeMod::AbilityEffect::SetEffect(const String &e)
{
- LogSetVar("AbilityEffect", id, "effect", e);
SetEffect(FindIn(AE_END, e, AbilityEffectStr));
}
-void PokeGen::PokeMod::AbilityEffect::SetVal1(const int v1)
+void PokeGen::PokeMod::AbilityEffect::SetVal1(const unsigned v1)
{
+ LogSetVar("AbilityEffect", id, "val1", v1);
switch (effect)
{
- case AE_NONE:
case AE_DMG_TO_HP:
case AE_PRV_DMG:
case AE_AUTO_HEAL:
@@ -172,67 +513,46 @@ void PokeGen::PokeMod::AbilityEffect::SetVal1(const int v1)
LogNoUse("AbilityEffect", id, "val1", v1, "effect", AbilityEffectStr[effect]);
break;
case AE_STATS:
- if ((v1 <= BST_NONE) || (BST_END <= v1) || (curPokeMod.IsSpecialSplit() && (v1 == BST_SPECIAL_DEFENSE)))
- LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Stat");
- else
- {
- LogSetVar("AbilityEffect", id, "val1", v1, (curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr)[v1]);
+ if ((v1 < BST_END) && ((v1 != BST_SPECIAL_DEFENSE) || curPokeMod.IsSpecialSplit()))
val1 = v1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Stat");
break;
case AE_STATUS:
if (curPokeMod.GetStatus(v1))
- {
- LogSetVar("AbilityEffect", id, "val1", v1, curPokeMod.GetStatus(v1)->GetName());
val1 = v1;
- }
else
LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Status");
break;
case AE_ABILITY:
if (curPokeMod.GetAbility(v1))
- {
- LogSetVar("AbilityEffect", id, "val1", v1, curPokeMod.GetAbility(v1)->GetName());
val1 = v1;
- }
else
LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Ability");
break;
case AE_ACC_POWER:
- if ((v1 <= PA_NONE) || (PA_END <= v1))
- LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "AccPower");
- else
- {
- LogSetVar("AbilityEffect", id, "val1", v1, PowerAccStr[v1]);
+ if (v1 < PA_END)
val1 = v1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "AccPower");
break;
case AE_ITEM_EFFECT:
- if ((v1 <= ABIT_NONE) || (ABIT_END <= v1))
- LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "ItemEffect");
- else
- {
- LogSetVar("AbilityEffect", id, "val1", v1, AbilityItemStr[v1]);
+ if (v1 < ABIT_END)
val1 = v1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "ItemEffect");
break;
case AE_TYPE:
if (curPokeMod.GetType(v1))
- {
- LogSetVar("AbilityEffect", id, "val1", v1, curPokeMod.GetType(v1)->GetName());
val1 = v1;
- }
else
LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Type");
break;
case AE_WEATHER:
- if ((v1 <= W_NONE) || (W_END_ALL <= v1))
- LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Weather");
- else
- {
- LogSetVar("AbilityEffect", id, "val1", v1, StatusShowStr[v1]);
+ if (v1 < W_END_ALL)
val1 = v1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val1", v1, "effect", "Weather");
break;
default:
LogNotSet("AbilityEffect", id, "val1", v1, "effect");
@@ -241,10 +561,11 @@ void PokeGen::PokeMod::AbilityEffect::SetVal1(const int v1)
void PokeGen::PokeMod::AbilityEffect::SetVal1(const String &v1)
{
- void *temp;
+ Status *s;
+ Ability *a;
+ Type *t;
switch (effect)
{
- case AE_NONE:
case AE_DMG_TO_HP:
case AE_PRV_DMG:
case AE_AUTO_HEAL:
@@ -258,12 +579,12 @@ void PokeGen::PokeMod::AbilityEffect::SetVal1(const String &v1)
SetVal1(FindIn(BST_END, v1, curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr));
break;
case AE_STATUS:
- if (temp = curPokeMod.GetStatus(v1))
- SetVal1((Status *)temp->GetId());
+ if (s = curPokeMod.GetStatus(v1))
+ SetVal1(s->GetId());
break;
case AE_ABILITY:
- if (temp = curPokeMod.GetAbility(v1))
- SetVal1((Ability *)temp->GetId());
+ if (a = curPokeMod.GetAbility(v1))
+ SetVal1(a->GetId());
break;
case AE_ACC_POWER:
SetVal1(FindIn(PA_END, v1, PowerAccStr));
@@ -272,8 +593,8 @@ void PokeGen::PokeMod::AbilityEffect::SetVal1(const String &v1)
SetVal1(FindIn(ABIT_END, v1, AbilityItemStr));
break;
case AE_TYPE:
- if (temp = curPokeMod.GetType(v1))
- SetVal1((Type *)temp->GetId());
+ if (t = curPokeMod.GetType(v1))
+ SetVal1(t->GetId());
break;
case AE_WEATHER:
SetVal1(FindIn(W_END_ALL, v1, WeatherStr));
@@ -283,8 +604,9 @@ void PokeGen::PokeMod::AbilityEffect::SetVal1(const String &v1)
}
}
-void PokeGen::PokeMod::AbilityEffect::SetVal2(const int v2)
+void PokeGen::PokeMod::AbilityEffect::SetVal2(const unsigned v2)
{
+ LogSetVar("AbilityEffect", id, "val2", v2);
switch (effect)
{
case AE_DMG_TO_HP:
@@ -299,41 +621,29 @@ void PokeGen::PokeMod::AbilityEffect::SetVal2(const int v2)
LogNoUse("AbilityEffect", id, "val2", v2, "effect", AbilityEffectStr[effect]);
break;
case AE_STATS:
- if ((v2 <= BM_NONE) || (BM_END <= v2))
- LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Stat");
- else
- {
- LogSetVar("AbilityEffect", id, "val2", v2, BattleMemberStr[v2]);
+ if (v2 < BM_END)
val2 = v2;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Stat");
break;
case AE_STATUS:
case AE_WEATHER:
- if ((v2 <= CA_NONE) || (CA_END <= v2))
- LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", AbilityEffectStr[effect]);
- else
- {
- LogSetVar("AbilityEffect", id, "val2", v2, CauseStr[v2]);
+ if (v2 < CA_END)
val2 = v2;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", AbilityEffectStr[effect]);
break;
case AE_ABILITY:
- if ((v2 <= ABI_NONE) || (ABI_END <= v2))
- LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Ability");
- else
- {
- LogSetVar("AbilityEffect", id, "val2", v2, AbilityInteractStr[v2]);
+ if (v2 < ABI_END)
val2 = v2;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Ability");
break;
case AE_TYPE:
- if ((v2 <= BO_NONE) || (BO_END <= v2))
- LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Type");
- else
- {
- LogSetVar("AbilityEffect", id, "val2", v2, BoostStr[v2]);
+ if (v2 < BO_END)
val2 = v2;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val2", v2, "effect", "Type");
break;
default:
LogNotSet("AbilityEffect", id, "val2", v2, "effect");
@@ -375,6 +685,7 @@ void PokeGen::PokeMod::AbilityEffect::SetVal2(const String &v2)
void PokeGen::PokeMod::AbilityEffect::SetVal3(const int v3)
{
+ LogSetVar("AbilityEffect", id, "val3", v3);
switch (effect)
{
case AE_DMG_TO_HP:
@@ -385,22 +696,16 @@ void PokeGen::PokeMod::AbilityEffect::SetVal3(const int v3)
case AE_ACC_POWER:
case AE_TYPE:
case AE_FAST_HATCH:
- if ((v3 < 0) || (100 < v3))
- LogOutOfRange("AbilityEffect", id, "val3", v3, "effect", AbilityEffectStr[effect]);
- else
- {
- LogSetVar("AbilityEffect", id, "val3", v3);
+ if ((0 <= v3) && (v3 <= 100))
val3 = v3;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val3", v3, "effect", AbilityEffectStr[effect]);
break;
case AE_STATS:
- if ((v3 < -6) || (6 < v3))
- LogOutOfRange("AbilityEffect", id, "val3", v3, "effect", "Stat");
- else
- {
- LogSetVar("AbilityEffect", id, "val3", v3);
+ if ((-6 <= v3) && (v3 <= 6))
val3 = v3;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "val3", v3, "effect", "Stat");
break;
case AE_STATUS:
case AE_ABILITY:
@@ -414,17 +719,17 @@ void PokeGen::PokeMod::AbilityEffect::SetVal3(const int v3)
}
}
-void PokeGen::PokeMod::AbilityEffect::SetTrigger(const int t)
+void PokeGen::PokeMod::AbilityEffect::SetTrigger(const unsigned t)
{
- if ((t <= AT_NONE) || (AT_END <= t))
- LogOutOfRange("AbilityEffect", id, "trigger", t, "");
- else
+ LogSetVar("AbilityEffect", id, "trigger", t);
+ if (t < AT_END)
{
- LogSetVar("AbilityEffect", id, "trigger", t);
trigger = t;
- tval1 = -1;
+ tval1 = UINT_MAX;
tval2.Set(1, 1);
}
+ else
+ LogOutOfRange("AbilityEffect", id, "trigger", t, "");
}
void PokeGen::PokeMod::AbilityEffect::SetTrigger(const String &t)
@@ -432,8 +737,9 @@ void PokeGen::PokeMod::AbilityEffect::SetTrigger(const String &t)
SetTrigger(FindIn(AT_END, t, AbilityTriggerStr));
}
-void PokeGen::PokeMod::AbilityEffect::SetTval1(const int tv1)
+void PokeGen::PokeMod::AbilityEffect::SetTval1(const unsigned tv1)
{
+ LogSetVar("AbilityEffect", id, "tVal1", tv1);
switch (trigger)
{
case AT_ANYTHING:
@@ -442,47 +748,32 @@ void PokeGen::PokeMod::AbilityEffect::SetTval1(const int tv1)
LogNoUse("AbilityEffect", id, "tVal1", tv1, "trigger", AbilityTriggerStr[effect]);
break;
case AT_WEATHER:
- if ((tv1 <= W_NONE) || (W_END_ALL <= tv1))
- LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Weather");
- else
- {
- LogSetVar("AbilityEffect", id, "tVal1", tv1, WeatherStr[tv1]);
+ if (tv1 < W_END_ALL)
tval1 = tv1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Weather");
break;
case AT_TYPE:
if (curPokeMod.GetType(tv1))
- {
- LogSetVar("AbilityEffect", id, "tVal1", tv1, curPokeMod.GetType(tv1)->GetName());
tval1 = tv1;
- }
else
LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Type");
break;
case AT_HP_BOUND:
- if ((tv1 <= SI_NONE) || (SI_END <= tv1))
- LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "HPBound");
- else
- {
- LogSetVar("AbilityEffect", id, "tVal1", tv1, SideStr[tv1]);
+ if (tv1 < SI_END)
tval1 = tv1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "HPBound");
break;
case AT_STAT_CHANGE:
- if ((tv1 <= BST_NONE) || (BST_END <= tv1) || (curPokeMod.IsSpecialSplit() && (tv1 == BST_SPECIAL_DEFENSE)))
- LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Stat");
- else
- {
- LogSetVar("AbilityEffect", id, "tVal1", tv1, (curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr)[tv1]);
+ if ((tv1 < BST_END) && ((tv1 != BST_SPECIAL_DEFENSE) || curPokeMod.IsSpecialSplit()))
tval1 = tv1;
- }
+ else
+ LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Stat");
break;
case AT_STATUS:
if (curPokeMod.GetStatus(tv1))
- {
- LogSetVar("AbilityEffect", id, "tVal1", tv1, curPokeMod.GetStatus(tv1)->GetName());
tval1 = tv1;
- }
else
LogOutOfRange("AbilityEffect", id, "tVal1", tv1, "trigger", "Status");
break;
@@ -493,7 +784,8 @@ void PokeGen::PokeMod::AbilityEffect::SetTval1(const int tv1)
void PokeGen::PokeMod::AbilityEffect::SetTval1(const String &tv1)
{
- void *temp;
+ Type *t;
+ Status *s;
switch (trigger)
{
case AT_ANYTHING:
@@ -505,8 +797,8 @@ void PokeGen::PokeMod::AbilityEffect::SetTval1(const String &tv1)
SetTval1(FindIn(W_END_ALL, tv1, WeatherStr));
break;
case AT_TYPE:
- if (temp = curPokeMod.GetType(tv1))
- SetTval1((Type *)temp->GetId());
+ if (t = curPokeMod.GetType(tv1))
+ SetTval1(t->GetId());
break;
case AT_HP_BOUND:
SetTval1(FindIn(SI_END, tv1, SideStr));
@@ -515,8 +807,8 @@ void PokeGen::PokeMod::AbilityEffect::SetTval1(const String &tv1)
SetTval1(FindIn(BST_END, tv1, curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr));
break;
case AT_STATUS:
- if (temp = curPokeMod.GetStatus(tv1))
- SetTval1((Status *)temp->GetId());
+ if (s = curPokeMod.GetStatus(tv1))
+ SetTval1(s->GetId());
break;
default:
LogNotSet("AbilityEffect", id, "tVal1", tv1, "trigger");
@@ -625,7 +917,7 @@ unsigned PokeGen::PokeMod::AbilityEffect::GetChanceDenom() const
return chance.GetDenom();
}
-int PokeGen::PokeMod::AbilityEffect::GetEffect() const
+unsigned PokeGen::PokeMod::AbilityEffect::GetEffect() const
{
LogFetchVar("AbilityEffect", id, "effect", effect);
return effect;
@@ -634,13 +926,13 @@ int PokeGen::PokeMod::AbilityEffect::GetEffect() const
PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetEffectString() const
{
LogFetchVar("AbilityEffect", id, "effect string", effect);
- if ((effect <= AE_NONE) || (AE_END <= effect))
+ if (effect < AE_END)
return "";
else
return AbilityEffectStr[effect];
}
-int PokeGen::PokeMod::AbilityEffect::GetVal1() const
+unsigned PokeGen::PokeMod::AbilityEffect::GetVal1() const
{
LogFetchVar("AbilityEffect", id, "val1", val1);
return val1;
@@ -653,7 +945,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetVal1String() const
switch (effect)
{
case AE_STATS:
- if ((BST_NONE < val1) && (val1 < BST_END))
+ if (val1 < BST_END)
ret = (curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr)[val1];
break;
case AE_STATUS:
@@ -665,11 +957,11 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetVal1String() const
ret = curPokeMod.GetAbility(val1)->GetName();
break;
case AE_ACC_POWER:
- if ((PA_NONE < val1) || (val1 < PA_END))
+ if (val1 < PA_END)
ret = PowerAccStr[val1];
break;
case AE_ITEM_EFFECT:
- if ((ABIT_NONE < val1) || (val1 < ABIT_END))
+ if (val1 < ABIT_END)
ret = AbilityItemStr[val1];
break;
case AE_TYPE:
@@ -677,13 +969,13 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetVal1String() const
ret = curPokeMod.GetType(val1)->GetName();
break;
case AE_WEATHER:
- if ((W_NONE < val1) || (val1 < W_END_ALL))
+ if (val1 < W_END_ALL)
ret = StatusShowStr[val1];
}
return ret;
}
-int PokeGen::PokeMod::AbilityEffect::GetVal2() const
+unsigned PokeGen::PokeMod::AbilityEffect::GetVal2() const
{
LogFetchVar("AbilityEffect", id, "val2", val2);
return val2;
@@ -696,20 +988,20 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetVal2String() const
switch (effect)
{
case AE_STATS:
- if ((BM_NONE < val2) && (val2 < BM_END))
+ if (val2 < BM_END)
ret = BattleMemberStr[val2];
break;
case AE_STATUS:
case AE_WEATHER:
- if ((CA_NONE < val2) && (val2 < CA_END))
+ if (val2 < CA_END)
ret = CauseStr[val2];
break;
case AE_ABILITY:
- if ((ABI_NONE < val2) && (val2 < ABI_END))
+ if (val2 < ABI_END)
ret = AbilityInteractStr[val2];
break;
case AE_TYPE:
- if ((BO_NONE < val2) && (val2 < BO_END))
+ if (val2 < BO_END)
ret = BoostStr[val2];
}
return ret;
@@ -721,7 +1013,7 @@ int PokeGen::PokeMod::AbilityEffect::GetVal3() const
return val3;
}
-int PokeGen::PokeMod::AbilityEffect::GetTrigger() const
+unsigned PokeGen::PokeMod::AbilityEffect::GetTrigger() const
{
LogFetchVar("AbilityEffect", id, "trigger", trigger);
return trigger;
@@ -730,13 +1022,13 @@ int PokeGen::PokeMod::AbilityEffect::GetTrigger() const
PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetTriggerString() const
{
LogFetchVar("AbilityEffect", id, "trigger string", trigger);
- if ((trigger <= AT_NONE) || (AT_END <= trigger))
+ if (trigger < AT_END)
return "";
else
return AbilityTriggerStr[trigger];
}
-int PokeGen::PokeMod::AbilityEffect::GetTval1() const
+unsigned PokeGen::PokeMod::AbilityEffect::GetTval1() const
{
LogFetchVar("AbilityEffect", id, "tVal1", tval1);
return tval1;
@@ -749,7 +1041,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetTval1String() const
switch (trigger)
{
case AT_WEATHER:
- if ((W_NONE < tval1) && (tval1 < W_END_ALL))
+ if (tval1 < W_END_ALL)
ret = WeatherStr[tval1];
break;
case AT_TYPE:
@@ -757,11 +1049,11 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetTval1String() const
ret = curPokeMod.GetType(tval1)->GetName();
break;
case AT_HP_BOUND:
- if ((SI_NONE < tval1) && (tval1 < SI_END))
+ if (tval1 < SI_END)
ret = SideStr[tval1];
break;
case AT_STAT_CHANGE:
- if ((BST_NONE < tval1) && (tval1 < BST_END))
+ if (tval1 < BST_END)
ret = (curPokeMod.IsSpecialSplit() ? BattleStatRBYStr : BattleStatGSCStr)[tval1];
break;
case AT_STATUS:
@@ -773,66 +1065,18 @@ PokeGen::PokeMod::String PokeGen::PokeMod::AbilityEffect::GetTval1String() const
PokeGen::PokeMod::Frac PokeGen::PokeMod::AbilityEffect::GetTval2() const
{
- switch (trigger)
- {
- case AT_ANYTHING:
- case AT_CONTACT:
- case AT_WEATHER:
- case AT_DMG:
- case AT_TYPE:
- case AT_STAT_CHANGE:
- case AT_STATUS:
- LogNoUse("AbilityEffect", id, "tVal2", 0, "trigger", AbilityTriggerStr[trigger]);
- break;
- case AT_HP_BOUND:
- LogFetchVar("AbilityEffect", id, "tVal2");
- break;
- default:
- LogNotSet("AbilityEffect", id, "tVal2", "trigger", AbilityTriggerStr[trigger]);
- }
+ LogFetchVar("AbilityEffect", id, "tVal2");
return tval2;
}
unsigned PokeGen::PokeMod::AbilityEffect::GetTval2Num() const
{
- switch (trigger)
- {
- case AT_ANYTHING:
- case AT_CONTACT:
- case AT_WEATHER:
- case AT_DMG:
- case AT_TYPE:
- case AT_STAT_CHANGE:
- case AT_STATUS:
- LogNoUse("AbilityEffect", id, "tVal2 numerator", tval2.GetNum(), "trigger", AbilityTriggerStr[trigger]);
- break;
- case AT_HP_BOUND:
- LogFetchVar("AbilityEffect", id, "tVal2", tval2.GetNum());
- return tval2.GetNum();
- default:
- LogNotSet("AbilityEffect", id, "tVal2 numerator", "trigger", AbilityTriggerStr[trigger]);
- }
- return 0;
+ LogFetchVar("AbilityEffect", id, "tVal2 numerator", tval2.GetNum());
+ return tval2.GetNum();
}
unsigned PokeGen::PokeMod::AbilityEffect::GetTval2Denom() const
{
- switch (trigger)
- {
- case AT_ANYTHING:
- case AT_CONTACT:
- case AT_WEATHER:
- case AT_DMG:
- case AT_TYPE:
- case AT_STAT_CHANGE:
- case AT_STATUS:
- LogNoUse("AbilityEffect", id, "tVal2 denominator", tval2.GetDenom(), "trigger", AbilityTriggerStr[trigger]);
- break;
- case AT_HP_BOUND:
- LogFetchVar("AbilityEffect", id, "tVal2", tval2.GetDenom());
- return tval2.GetDenom();
- default:
- LogNotSet("AbilityEffect", id, "tVal2 denominator", "trigger", AbilityTriggerStr[trigger]);
- }
- return 0;
+ LogFetchVar("AbilityEffect", id, "tVal2 denominator", tval2.GetDenom());
+ return tval2.GetDenom();
}
diff --git a/pokemod/AbilityEffect.h b/pokemod/AbilityEffect.h
index 6d93bba3..3b0a658d 100644
--- a/pokemod/AbilityEffect.h
+++ b/pokemod/AbilityEffect.h
@@ -50,16 +50,16 @@ namespace PokeGen
void SetChance(const unsigned n, const unsigned d);
void SetChanceNum(const unsigned n);
void SetChanceDenom(const unsigned d);
- void SetEffect(const int e);
+ void SetEffect(const unsigned e);
void SetEffect(const String &e);
- void SetVal1(const int v1);
+ void SetVal1(const unsigned v1);
void SetVal1(const String &v1);
- void SetVal2(const int v2);
+ void SetVal2(const unsigned v2);
void SetVal2(const String &v2);
void SetVal3(const int v3);
- void SetTrigger(const int t);
+ void SetTrigger(const unsigned t);
void SetTrigger(const String &t);
- void SetTval1(const int tv1);
+ void SetTval1(const unsigned tv1);
void SetTval1(const String &tv1);
void SetTval2(const Frac &tv2);
void SetTval2(const unsigned n, const unsigned d);
@@ -69,16 +69,16 @@ namespace PokeGen
Frac GetChance() const;
unsigned GetChanceNum() const;
unsigned GetChanceDenom() const;
- int GetEffect() const;
+ unsigned GetEffect() const;
String GetEffectString() const;
- int GetVal1() const;
+ unsigned GetVal1() const;
String GetVal1String() const;
- int GetVal2() const;
+ unsigned GetVal2() const;
String GetVal2String() const;
int GetVal3() const;
- int GetTrigger() const;
+ unsigned GetTrigger() const;
String GetTriggerString() const;
- int GetTval1() const;
+ unsigned GetTval1() const;
String GetTval1String() const;
Frac GetTval2() const;
unsigned GetTval2Num() const;
@@ -90,12 +90,12 @@ namespace PokeGen
# endif
Frac chance;
- int effect;
- int val1;
- int val2;
+ unsigned effect;
+ unsigned val1;
+ unsigned val2;
int val3;
- int trigger;
- int tval1;
+ unsigned trigger;
+ unsigned tval1;
Frac tval2;
};
}
diff --git a/pokemod/Author.cpp b/pokemod/Author.cpp
index 3d71a25d..8d19d274 100644
--- a/pokemod/Author.cpp
+++ b/pokemod/Author.cpp
@@ -47,7 +47,6 @@ PokeGen::PokeMod::Author::~Author()
void PokeGen::PokeMod::Author::Validate()
{
- isValid = true;
LogValidateStart("Author", id, name);
if (name == "")
{
@@ -74,7 +73,6 @@ void PokeGen::PokeMod::Author::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Author::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Author", id, name);
if (name == "")
{
diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp
index 6f0598ff..7fe57d71 100644
--- a/pokemod/Badge.cpp
+++ b/pokemod/Badge.cpp
@@ -55,7 +55,6 @@ PokeGen::PokeMod::Badge::~Badge()
void PokeGen::PokeMod::Badge::Validate()
{
- isValid = true;
LogValidateStart("Badge", id, name);
if (name == "")
{
@@ -78,13 +77,14 @@ void PokeGen::PokeMod::Badge::Validate()
LogVarNotValid("Badge", id, "badge sprite", name);
isValid = false;
}
+ for (unsigned i = 0; i < STH_END_GSC; ++i)
+ stats[i].Reduce();
LogValidateOver("Badge", id, isValid, name);
}
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Badge::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Badge", id, name);
if (name == "")
{
diff --git a/pokemod/CoinItem.cpp b/pokemod/CoinItem.cpp
index 2325a2f6..62b3371f 100644
--- a/pokemod/CoinItem.cpp
+++ b/pokemod/CoinItem.cpp
@@ -28,8 +28,8 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::CoinItem::CoinItem(const unsigned _id)
{
LogCtor("CoinItem", _id);
- type = 0;
- object = -1;
+ type = CIT_ITEM;
+ object = UINT_MAX;
amount = 1;
cost = 0;
id = _id;
@@ -50,7 +50,6 @@ PokeGen::PokeMod::CoinItem::~CoinItem()
void PokeGen::PokeMod::CoinItem::Validate()
{
- isValid = true;
LogValidateStart("CoinItem", id);
if (type == CIT_ITEM)
{
@@ -84,7 +83,6 @@ void PokeGen::PokeMod::CoinItem::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::CoinItem::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("CoinItem", id);
if (type == CIT_ITEM)
{
@@ -133,7 +131,7 @@ void PokeGen::PokeMod::CoinItem::ImportIni(Ini &ini, const unsigned _id)
else
id = _id;
ini.GetValue("type", type, CIT_ITEM);
- ini.GetValue("object", object, -1);
+ ini.GetValue("object", object);
ini.GetValue("amount", amount, 1);
ini.GetValue("cost", cost, 0);
LogImportOver("CoinItem", id);
@@ -159,11 +157,11 @@ void PokeGen::PokeMod::CoinItem::SetType(const unsigned t)
if (t < CIT_END)
{
type = t;
- object = -1;
+ object = UINT_MAX;
}
}
-void PokeGen::PokeMod::CoinItem::SetObject(const int o)
+void PokeGen::PokeMod::CoinItem::SetObject(const unsigned o)
{
LogSetVar("CoinItem", id, "object", o);
if (((type == CIT_ITEM) && curPokeMod.GetItem(o)) || ((type == CIT_POKEMON) && curPokeMod.GetPokemon(o)))
@@ -198,7 +196,7 @@ unsigned PokeGen::PokeMod::CoinItem::GetType() const
return type;
}
-int PokeGen::PokeMod::CoinItem::GetObject() const
+unsigned PokeGen::PokeMod::CoinItem::GetObject() const
{
LogFetchVar("CoinItem", id, "object", object);
return object;
diff --git a/pokemod/CoinItem.h b/pokemod/CoinItem.h
index 93108242..5534c1d5 100644
--- a/pokemod/CoinItem.h
+++ b/pokemod/CoinItem.h
@@ -43,13 +43,13 @@ namespace PokeGen
void ExportIni(std::ofstream &fout, const String &coinList) const;
void SetType(const unsigned t);
- void SetObject(const int o);
+ void SetObject(const unsigned o);
void SetObject(const String &o);
void SetAmount(const unsigned a);
void SetCost(const unsigned c);
unsigned GetType() const;
- int GetObject() const;
+ unsigned GetObject() const;
String GetObjectString() const;
unsigned GetAmount() const;
unsigned GetCost() const;
@@ -60,7 +60,7 @@ namespace PokeGen
# endif
unsigned type;
- int object;
+ unsigned object;
unsigned amount;
unsigned cost;
};
diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp
index e2919f8f..becd28f8 100644
--- a/pokemod/CoinList.cpp
+++ b/pokemod/CoinList.cpp
@@ -50,7 +50,6 @@ PokeGen::PokeMod::CoinList::~CoinList()
void PokeGen::PokeMod::CoinList::Validate()
{
- isValid = true;
LogValidateStart("CoinList", id, name);
if (name == "")
{
@@ -77,7 +76,6 @@ void PokeGen::PokeMod::CoinList::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::CoinList::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("CoinList", id, name);
if (name == "")
{
@@ -160,7 +158,7 @@ unsigned PokeGen::PokeMod::CoinList::GetValue() const
return value;
}
-PokeGen::PokeMod::CoinItem *PokeGen::PokeMod::CoinList::GetCoinItem(const unsigned _id)
+const PokeGen::PokeMod::CoinItem *PokeGen::PokeMod::CoinList::GetCoinItem(const unsigned _id) const
{
LogSubmoduleFetch("CoinList", id, "item", _id, name);
for (unsigned i = 0; i < GetCoinItemCount(); ++i)
@@ -172,6 +170,18 @@ PokeGen::PokeMod::CoinItem *PokeGen::PokeMod::CoinList::GetCoinItem(const unsign
return NULL;
}
+const PokeGen::PokeMod::CoinItem *PokeGen::PokeMod::CoinList::GetCoinItem(const String &n) const
+{
+ LogSubmoduleFetch("CoinList", id, "item", n, name);
+ for (unsigned i = 0; i < GetCoinItemCount(); ++i)
+ {
+ if (items[i].GetObjectString() == n)
+ return &items[i];
+ }
+ LogSubmoduleFetchFail("CoinList", id, "item", n, name);
+ return NULL;
+}
+
unsigned PokeGen::PokeMod::CoinList::GetCoinItemCount() const
{
LogSubmoduleCount("CoinList", id, "items", name);
@@ -197,7 +207,7 @@ void PokeGen::PokeMod::CoinList::NewCoinItem(Ini *const ini)
void PokeGen::PokeMod::CoinList::DeleteCoinItem(const unsigned _id)
{
LogSubmoduleRemoveStart("CoinList", id, "item", _id, name);
- for (std::vector<CoinItem>::iterator i = items.begin(); i != items.end(); ++i)
+ for (std::vector<CoinItem>::const_iterator i = items.begin(); i != items.end(); ++i)
{
if (i->GetId() == _id)
{
@@ -207,3 +217,17 @@ void PokeGen::PokeMod::CoinList::DeleteCoinItem(const unsigned _id)
}
LogSubmoduleRemoveFail("CoinList", id, "item", _id, name);
}
+
+void PokeGen::PokeMod::CoinList::DeleteCoinItem(const String &n)
+{
+ LogSubmoduleRemoveStart("CoinList", id, "item", n, name);
+ for (std::vector<CoinItem>::const_iterator i = items.begin(); i != items.end(); ++i)
+ {
+ if (i->GetObjectString() == n)
+ {
+ LogSubmoduleRemoved("CoinList", id, "item", n, name);
+ items.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("CoinList", id, "item", n, name);
+}
diff --git a/pokemod/CoinList.h b/pokemod/CoinList.h
index f4a45e88..b9016cb0 100644
--- a/pokemod/CoinList.h
+++ b/pokemod/CoinList.h
@@ -51,10 +51,12 @@ namespace PokeGen
String GetName() const;
unsigned GetValue() const;
- CoinItem *GetCoinItem(const unsigned _id);
+ const CoinItem *GetCoinItem(const unsigned _id) const;
+ const CoinItem *GetCoinItem(const String &n) const;
unsigned GetCoinItemCount() const;
void NewCoinItem(Ini *const ini);
void DeleteCoinItem(const unsigned _id);
+ void DeleteCoinItem(const String &n);
private:
void Validate();
# ifdef PG_DEBUG_WINDOW
diff --git a/pokemod/Debug.h b/pokemod/Debug.h
index 06869993..e3cb502a 100644
--- a/pokemod/Debug.h
+++ b/pokemod/Debug.h
@@ -340,6 +340,11 @@ namespace PokeGen
Log(String("%s: Fetching %s %u from %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR);
}
+ inline void LogSubmoduleFetchFail(const char *module, const unsigned id, const char *subName, const char *subStr, const char *name = NULL)
+ {
+ Log(String("%s: Fetching %s %s from %u%s", module, subName, subStr, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR);
+ }
+
inline void LogSubmoduleCount(const char *module, const unsigned id, const char *subName, const char *name = NULL)
{
Log(String("%s: Fetching %s count of %u%s", module, subName, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
@@ -350,21 +355,41 @@ namespace PokeGen
Log(String("%s: Creating a new %s (%u) in %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
}
+ inline void LogSubmoduleNew(const char *module, const unsigned id, const char *subName, const char *subStr, const char *name = NULL)
+ {
+ Log(String("%s: Creating a new %s (%s) in %u%s", module, subName, subStr, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
+ }
+
inline void LogSubmoduleRemoveStart(const char *module, const unsigned id, const char *subName, const unsigned subId, const char *name = NULL)
{
Log(String("%s: Attempting to remove %s %u from %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
}
+ inline void LogSubmoduleRemoveStart(const char *module, const unsigned id, const char *subName, const char *subStr, const char *name = NULL)
+ {
+ Log(String("%s: Attempting to remove %s %s from %u%s", module, subName, subStr, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
+ }
+
inline void LogSubmoduleRemoved(const char *module, const unsigned id, const char *subName, const unsigned subId, const char *name = NULL)
{
Log(String("%s: Removed %s %u from %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
}
+ inline void LogSubmoduleRemoved(const char *module, const unsigned id, const char *subName, const char *subStr, const char *name = NULL)
+ {
+ Log(String("%s: Removed %s %s from %u%s", module, subName, subStr, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_DEBUG);
+ }
+
inline void LogSubmoduleRemoveFail(const char *module, const unsigned id, const char *subName, const unsigned subId, const char *name = NULL)
{
Log(String("%s: Failed to remove %s %u from %u%s", module, subName, subId, id, name ? String(" (%s)", name).c_str() : ""), PM_DEBUG_ERROR);
}
+ inline void LogSubmoduleRemoveFail(const char *module, const unsigned id, const char *subName, const char *subStr, const char *name = NULL)
+ {
+ 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 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 9dce1dff..8a01480e 100644
--- a/pokemod/Dialog.cpp
+++ b/pokemod/Dialog.cpp
@@ -51,7 +51,6 @@ void PokeGen::PokeMod::Dialog::Validate(const wxListBox &output)
void PokeGen::PokeMod::Dialog::Validate()
#endif
{
- isValid = true;
LogValidateStart("Dialog", id);
// TODO (Validation#1#): Dialog Validation
LogValidateOver("Dialog", id, isValid);
@@ -98,6 +97,52 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Dialog::GetDialog() const
void PokeGen::PokeMod::Dialog::InsertDialogCommand(const unsigned cmd, const unsigned pos)
{
+ /*Flip Flag
+ Set Flag
+ Unset Flag
+ Randomize Flag
+ Test Flag
+ Dialog
+ Yes/No
+ Item Shop
+ Give Item
+ Take Item
+ Check Item
+ Coin List
+ Teach Move
+ Delete Move
+ Give Pokemon
+ Take Pokemon
+ Show Pokemon
+ View Pokemon
+ Give Money
+ Take Money
+ Move Effect
+ Turn Effect
+ Check Direction
+ Check Roster
+ Check Levels
+ Check Species
+ Check Held Items
+ Check Money
+ Trade
+ Daycare
+ Battle
+ Badge
+ Warp
+ Name
+ Music
+ Timer
+ Map Sign
+ Wild Scope
+ Safari
+ Heal Party
+ Refresh
+ Clear
+ Pause
+ New Line
+ Exit
+ Menu*/
// TODO (Ben#1#): Dialog commands
}
diff --git a/pokemod/EggGroup.cpp b/pokemod/EggGroup.cpp
index 5db02d04..1066c0e8 100644
--- a/pokemod/EggGroup.cpp
+++ b/pokemod/EggGroup.cpp
@@ -45,7 +45,6 @@ PokeGen::PokeMod::EggGroup::~EggGroup()
void PokeGen::PokeMod::EggGroup::Validate()
{
- isValid = true;
LogValidateStart("EggGroup", id, name);
if (name == "")
{
@@ -58,7 +57,6 @@ void PokeGen::PokeMod::EggGroup::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::EggGroup::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("EggGroup", id, name);
if (name == "")
{
diff --git a/pokemod/Frac.cpp b/pokemod/Frac.cpp
index 0553a534..f2efc7be 100644
--- a/pokemod/Frac.cpp
+++ b/pokemod/Frac.cpp
@@ -155,3 +155,8 @@ void PokeGen::PokeMod::Frac::Reduce()
}
Log(String("Frac: Reduced to %u/%u", num, denom), PM_DEBUG_DEBUG);
}
+
+PokeGen::PokeMod::Frac::operator float() const
+{
+ return GetValue();
+}
diff --git a/pokemod/Frac.h b/pokemod/Frac.h
index ace4a4ba..1b877773 100644
--- a/pokemod/Frac.h
+++ b/pokemod/Frac.h
@@ -51,10 +51,10 @@ namespace PokeGen
bool GetImproper() const;
float GetValue() const;
- operator float() const;
- private:
void Reduce();
+ operator float() const;
+ private:
unsigned num;
unsigned denom;
bool improper;
diff --git a/pokemod/Ini.cpp b/pokemod/Ini.cpp
index 3a5d0c88..30a7dbfc 100644
--- a/pokemod/Ini.cpp
+++ b/pokemod/Ini.cpp
@@ -91,7 +91,7 @@ void PokeGen::PokeMod::Ini::GetValue(const String &field, int &val, const int de
}
long temp;
char *end;
- temp = std::strtol(fields[field].c_str(), &end, 10);
+ temp = std::strtol(fields[field], &end, 10);
val = ((temp < INT_MIN) || (INT_MAX < temp) || *end) ? def : temp;
}
@@ -104,7 +104,7 @@ void PokeGen::PokeMod::Ini::GetValue(const String &field, unsigned &val, const u
}
unsigned long temp;
char *end;
- temp = std::strtoul(fields[field].c_str(), &end, 10);
+ temp = std::strtoul(fields[field], &end, 10);
val = ((UINT_MAX < temp) || *end) ? def : temp;
}
diff --git a/pokemod/Ini.h b/pokemod/Ini.h
index bb29c4d6..31f6c677 100644
--- a/pokemod/Ini.h
+++ b/pokemod/Ini.h
@@ -49,7 +49,7 @@ namespace PokeGen
void AddField(const String &n, const double v);
String GetName() const;
- void GetValue(const String &field, int &val, const int def = -1);
+ void GetValue(const String &field, int &val, const int def = INT_MAX);
void GetValue(const String &field, unsigned &val, const unsigned def = UINT_MAX);
void GetValue(const String &field, String &val, const String &def = "");
void GetValue(const String &field, bool &val, const bool def = true);
diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp
index 7e31aa7b..eeaf5fd1 100644
--- a/pokemod/Item.cpp
+++ b/pokemod/Item.cpp
@@ -52,7 +52,6 @@ PokeGen::PokeMod::Item::~Item()
void PokeGen::PokeMod::Item::Validate()
{
- isValid = true;
LogValidateStart("Item", id, name);
if (name == "")
{
@@ -84,7 +83,6 @@ void PokeGen::PokeMod::Item::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Item::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Item", id, name);
if (name == "")
{
@@ -231,7 +229,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Item::GetDescription() const
return description;
}
-PokeGen::PokeMod::ItemEffect *PokeGen::PokeMod::Item::GetItemEffect(const unsigned _id)
+const PokeGen::PokeMod::ItemEffect *PokeGen::PokeMod::Item::GetItemEffect(const unsigned _id) const
{
LogSubmoduleFetch("Item", id, "effect", _id, name);
for (unsigned i = 0; i < GetItemEffectCount(); ++i)
@@ -268,7 +266,7 @@ void PokeGen::PokeMod::Item::NewItemEffect(Ini *const ini)
void PokeGen::PokeMod::Item::DeleteItemEffect(const unsigned _id)
{
LogSubmoduleRemoveStart("Item", id, "effect", _id, name);
- for (std::vector<ItemEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<ItemEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
diff --git a/pokemod/Item.h b/pokemod/Item.h
index 1d366e4b..2c874323 100644
--- a/pokemod/Item.h
+++ b/pokemod/Item.h
@@ -58,7 +58,7 @@ namespace PokeGen
unsigned GetPrice() const;
String GetDescription() const;
- ItemEffect *GetItemEffect(const unsigned _id);
+ const ItemEffect *GetItemEffect(const unsigned _id) const;
unsigned GetItemEffectCount() const;
void NewItemEffect(Ini *const ini = NULL);
void DeleteItemEffect(const unsigned _id);
diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp
index ee0b6432..2dc3b716 100644
--- a/pokemod/ItemEffect.cpp
+++ b/pokemod/ItemEffect.cpp
@@ -31,12 +31,12 @@ PokeGen::PokeMod::ItemEffect::ItemEffect(const unsigned _id)
overworld = false;
battle = false;
held = false;
- effect = -1;
- val1 = -1;
- val2 = -1;
+ effect = UINT_MAX;
+ val1 = INT_MAX;
+ val2 = INT_MAX;
val3.Set(1, 1);
- val4 = -1;
- val5 = -1;
+ val4 = UINT_MAX;
+ val5 = UINT_MAX;
id = _id;
}
@@ -59,7 +59,6 @@ void PokeGen::PokeMod::ItemEffect::Validate(const wxListBox &output)
void PokeGen::PokeMod::ItemEffect::Validate()
#endif
{
- isValid = true;
LogValidateStart("ItemEffect", id);
// TODO (Validation#1#): ItemEffect Validation
LogValidateOver("ItemEffect", id, isValid);
@@ -82,14 +81,14 @@ void PokeGen::PokeMod::ItemEffect::ImportIni(Ini &ini, const unsigned _id)
ini.GetValue("overworld", overworld, false);
ini.GetValue("battle", battle, false);
ini.GetValue("held", held, false);
- ini.GetValue("effect", effect, -1);
- ini.GetValue("val1", val1, -1);
- ini.GetValue("val2", val2, -1);
+ ini.GetValue("effect", effect);
+ ini.GetValue("val1", val1);
+ ini.GetValue("val2", val2);
ini.GetValue("val3-n", i, 1);
ini.GetValue("val3-n", j, 1);
val3.Set(i, j);
- ini.GetValue("val4", val4, -1);
- ini.GetValue("val5", val5, -1);
+ ini.GetValue("val4", val4);
+ ini.GetValue("val5", val5);
LogImportOver("ItemEffect", id);
}
@@ -131,37 +130,30 @@ void PokeGen::PokeMod::ItemEffect::SetHeld(const bool h)
held = h;
}
-void PokeGen::PokeMod::ItemEffect::SetEffect(const int e)
+void PokeGen::PokeMod::ItemEffect::SetEffect(const unsigned e)
{
LogSetVar("ItemEffect", id, "effect", e);
- if ((IE_NONE < e) && (e < IE_END))
+ if (e < IE_END)
{
effect = e;
- val1 = -1;
- val2 = -1;
+ val1 = INT_MAX;
+ val2 = INT_MAX;
val3.Set(1, 1, (e == IE_BALL) || (e == IE_TYPE_BOOST) || (e == IE_PP_BOOST));
- val4 = -1;
- val5 = -1;
+ val4 = UINT_MAX;
+ val5 = UINT_MAX;
}
+ else
+ LogOutOfRange("ItemEffect", id, "effect", e, "");
}
void PokeGen::PokeMod::ItemEffect::SetEffect(const String &e)
{
- LogSetVar("ItemEffect", id, "effect string", e);
- effect = FindIn(IE_END, e, ItemEffectStr);
- if (effect != IE_END)
- {
- val1 = -1;
- val2 = -1;
- val3.Set(1, 1, (e == ItemEffectStr[IE_BALL]) || (e == ItemEffectStr[IE_TYPE_BOOST]) || (e == ItemEffectStr[IE_PP_BOOST]));
- val4 = -1;
- val5 = -1;
- }
+ SetEffect(FindIn(IE_END, e, ItemEffectStr));
}
-// TODO (Ben#1#): Values code
void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
{
+ LogSetVar("ItemEffect", id, "val1", v1);
switch (effect)
{
case IE_HP_CURE:
@@ -169,16 +161,11 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
if (val4 == REL_ABSOLUTE)
{
if (v1)
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v1, ItemEffectStr[effect]), PM_DEBUG_ERROR);
val1 = v1;
- }
else
- PMLog(PMString("ItemEffect: Attempting to set val1 to 0 (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]);
+ break;
}
- else
- PMLog(PMString("ItemEffect: Attempting to set val1 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
- break;
case IE_CURE_STATUS:
case IE_FLINCH:
case IE_FIRST:
@@ -193,7 +180,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
case IE_MAP:
case IE_ITEMFINDER:
case IE_BIKE:
- PMLog(PMString("ItemEffect: Attempting to set val1 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]);
break;
case IE_LEVEL_BOOST:
case IE_SHIELD_BAT:
@@ -202,32 +189,25 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
if (v1)
val1 = v1;
else
- PMLog(PMString("ItemEffect: Attempting to set val1 to 0 (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]);
break;
case IE_STAT_BOOST:
case IE_ACORN:
- if ((v1 <= 0) || (65536 <= v1))
- PMLog(PMString("ItemEffect: Attempting to set val1 out of range (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
- else
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v1, ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ if ((0 <= v1) && (v1 < 65536))
val1 = v1;
- }
+ else
+ LogOutOfRange("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]);
break;
case IE_MODIFY_STAT_BAT:
- if ((v1 <= -7) || (7 <= v1))
- PMLog("ItemEffect: Attempting to set val1 out of range (Modify Stat (Battle))", PM_DEBUG_ERROR);
- else
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (Modify Stat (Battle))", v1), PM_DEBUG_ERROR);
+ if ((-6 <= v1) && (v1 <= 6))
val1 = v1;
- }
+ else
+ LogOutOfRange("ItemEffect", id, "val1", v1, "effect", "Modify Stat (Battle)");
break;
case IE_FISH:
case IE_SCOPE:
case IE_COIN:
case IE_COIN_CASE:
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v1, ItemEffectStr[effect]), PM_DEBUG_ERROR);
val1 = v1;
break;
case IE_BALL:
@@ -239,12 +219,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val1 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val1", v1, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal2(const int v2)
{
+ LogSetVar("ItemEffect", id, "val2", v2);
switch (effect)
{
case IE_HP_CURE:
@@ -272,16 +253,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal2(const int v2)
case IE_SCOPE:
case IE_BERRY:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val2 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val2", v2, "effect", ItemEffectStr[effect]);
break;
case IE_STAT_BOOST:
- if ((v2 <= 0) || (65536 <= v2))
- PMLog("ItemEffect: Attempting to set val2 out of range (Stat Boost)", PM_DEBUG_ERROR);
- else
- {
- PMLog(PMString("ItemEffect: Set val2 to %d (%s)", v2), PM_DEBUG_ERROR);
+ if ((0 < v2) && (v2 < 65536))
val2 = v2;
- }
+ else
+ LogOutOfRange("ItemEffect", id, "val2", v2, "effect", "Stat Boost");
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val2
@@ -289,18 +267,19 @@ void PokeGen::PokeMod::ItemEffect::SetVal2(const int v2)
break;
case IE_COIN:
case IE_COIN_CASE:
- if (v2)
+ if (0 < v2)
val2 = v2;
else
- PMLog(PMString("ItemEffect: Attempting to set val2 to 0 (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val2", v2, "effect", ItemEffectStr[effect]);
break;
default:
- PMLog("ItemEffect: Attempting to set val2 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val2", v2, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal3(const Frac &v3)
{
+ LogSetVar("ItemEffect", id, "val3", v3.GetNum(), v3.GetDenom());
switch (effect)
{
case IE_HP_CURE:
@@ -315,7 +294,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const Frac &v3)
case IE_PP_RESTORE:
case IE_EXP_SHARE:
case IE_REPEL:
- PMLog(PMString("ItemEffect: Setting val3 (%s)", ItemEffectStr[effect]), PM_DEBUG_DEBUG);
val3 = v3;
break;
case IE_CURE_STATUS:
@@ -333,7 +311,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const Frac &v3)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val3 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val3", 0, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val3
@@ -344,12 +322,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const Frac &v3)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val3 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val3", 0, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal3(const unsigned n, const unsigned d)
{
+ LogSetVar("ItemEffect", id, "val3", n, d);
switch (effect)
{
case IE_HP_CURE:
@@ -364,7 +343,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const unsigned n, const unsigned d)
case IE_PP_RESTORE:
case IE_EXP_SHARE:
case IE_REPEL:
- PMLog(PMString("ItemEffect: Setting val3 (%s)", ItemEffectStr[effect]), PM_DEBUG_DEBUG);
val3.Set(n, d);
break;
case IE_CURE_STATUS:
@@ -382,7 +360,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const unsigned n, const unsigned d)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val3 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val3", 0, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val3
@@ -393,12 +371,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal3(const unsigned n, const unsigned d)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val3 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val3", 0, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal3Num(const unsigned n)
{
+ LogSetVar("ItemEffect", id, "val3 numerator", n);
switch (effect)
{
case IE_HP_CURE:
@@ -413,7 +392,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Num(const unsigned n)
case IE_PP_RESTORE:
case IE_EXP_SHARE:
case IE_REPEL:
- PMLog(PMString("ItemEffect: Setting val3 (%s)", ItemEffectStr[effect]), PM_DEBUG_DEBUG);
val3.SetNum(n);
break;
case IE_CURE_STATUS:
@@ -431,7 +409,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Num(const unsigned n)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val3 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val3", n, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val3
@@ -442,12 +420,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Num(const unsigned n)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val3 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val3 numerator", n, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal3Denom(const unsigned d)
{
+ LogSetVar("ItemEffect", id, "val3 denominator", d);
switch (effect)
{
case IE_HP_CURE:
@@ -462,7 +441,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Denom(const unsigned d)
case IE_PP_RESTORE:
case IE_EXP_SHARE:
case IE_REPEL:
- PMLog(PMString("ItemEffect: Setting val3 (%s)", ItemEffectStr[effect]), PM_DEBUG_DEBUG);
val3.SetDenom(d);
break;
case IE_CURE_STATUS:
@@ -480,7 +458,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Denom(const unsigned d)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val3 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val3", d, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val3
@@ -491,32 +469,27 @@ void PokeGen::PokeMod::ItemEffect::SetVal3Denom(const unsigned d)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val3 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val3 denominator", d, "effect");
}
}
-void PokeGen::PokeMod::ItemEffect::SetVal4(const int v4)
+void PokeGen::PokeMod::ItemEffect::SetVal4(const unsigned v4)
{
+ LogSetVar("ItemEffect", id, "val4", v4);
switch (effect)
{
case IE_HP_CURE:
case IE_REVIVE:
- if ((v4 <= REL_NONE) || (REL_END <= v4))
- PMLog(PMString("ItemEffect: Attempting to set val4 out of range (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
- else
- {
- PMLog(PMString("ItemEffect: Set val4 to %d (%s)", v4, ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ if (v4 < REL_END)
val4 = v4;
- }
+ else
+ LogOutOfRange("ItemEffect", id, "val4", v4, "effect", ItemEffectStr[effect]);
break;
case IE_CURE_STATUS:
if (curPokeMod.GetStatus(v4))
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v4, curPokeMod.GetStatus(v4)->GetName().c_str()), PM_DEBUG_DEBUG);
val4 = v4;
- }
else
- PMLog(PMString("ItemEffect: Attempting to set val4 out of range (Cure Status, %s)", v4), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val4", v4, "effect", "Cure Status");
break;
case IE_LEVEL_BOOST:
case IE_FLINCH:
@@ -532,7 +505,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const int v4)
case IE_SCOPE:
case IE_COIN:
case IE_COIN_CASE:
- PMLog(PMString("ItemEffect: Attempting to set val3 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val4", v4, "effect", ItemEffectStr[effect]);
break;
case IE_STAT_BOOST:
case IE_MODIFY_STAT_BAT:
@@ -543,12 +516,9 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const int v4)
break;
case IE_TYPE_BOOST:
if (curPokeMod.GetType(v4))
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v4, curPokeMod.GetType(v4)->GetName().c_str()), PM_DEBUG_DEBUG);
val4 = v4;
- }
else
- PMLog(PMString("ItemEffect: Attempting to set val4 out of range (Type Boost, %s)", v4), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val4", v4, "effect", "Type Boost");
break;
case IE_PP_RESTORE:
// All/One
@@ -562,12 +532,9 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const int v4)
case IE_TM:
case IE_HM:
if (curPokeMod.GetMove(v4))
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v4, curPokeMod.GetMove(v4)->GetName().c_str()), PM_DEBUG_DEBUG);
val4 = v4;
- }
else
- PMLog(PMString("ItemEffect: Attempting to set val4 out of range (TM/HM, %s)", v4), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val4", v4, "effect", "TM/HM");
break;
case IE_BALL:
// BallType
@@ -577,20 +544,18 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const int v4)
break;
case IE_ACORN:
if (curPokeMod.GetItem(v4))
- {
- PMLog(PMString("ItemEffect: Set val1 to %d (%s)", v4, curPokeMod.GetItem(v4)->GetName().c_str()), PM_DEBUG_DEBUG);
val4 = v4;
- }
else
- PMLog(PMString("ItemEffect: Attempting to set val4 out of range (Acorn, %s)", v4), PM_DEBUG_ERROR);
+ LogOutOfRange("ItemEffect", id, "val4", v4, "effect", "Acorn");
break;
default:
- PMLog("ItemEffect: Attempting to set val4 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val4", v4, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal4(const String &v4)
{
+ LogSetVar("ItemEffect", id, "val4 string", v4);
switch (effect)
{
case IE_HP_CURE:
@@ -614,7 +579,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const String &v4)
case IE_SCOPE:
case IE_COIN:
case IE_COIN_CASE:
- PMLog(PMString("ItemEffect: Attempting to set val4 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val4", v4, "effect", ItemEffectStr[effect]);
break;
case IE_STAT_BOOST:
case IE_MODIFY_STAT_BAT:
@@ -649,12 +614,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal4(const String &v4)
// Item
break;
default:
- PMLog("ItemEffect: Attempting to set val4 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val4", v4, "effect");
}
}
-void PokeGen::PokeMod::ItemEffect::SetVal5(const int v5)
+void PokeGen::PokeMod::ItemEffect::SetVal5(const unsigned v5)
{
+ LogSetVar("ItemEffect", id, "val5", v5);
switch (effect)
{
case IE_HP_CURE:
@@ -684,7 +650,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal5(const int v5)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val5 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val5", v5, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val5
@@ -695,12 +661,13 @@ void PokeGen::PokeMod::ItemEffect::SetVal5(const int v5)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val5 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val5", v5, "effect");
}
}
void PokeGen::PokeMod::ItemEffect::SetVal5(const String &v5)
{
+ LogSetVar("ItemEffect", id, "val5", v5);
switch (effect)
{
case IE_HP_CURE:
@@ -730,7 +697,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal5(const String &v5)
case IE_COIN:
case IE_COIN_CASE:
case IE_ACORN:
- PMLog(PMString("ItemEffect: Attempting to set val5 of effect that doesn\'t use it (%s)", ItemEffectStr[effect]), PM_DEBUG_ERROR);
+ LogNoUse("ItemEffect", id, "val5", v5, "effect", ItemEffectStr[effect]);
break;
case IE_BALL:
// TODO (Ben#1#): Ball Effect val5
@@ -741,84 +708,141 @@ void PokeGen::PokeMod::ItemEffect::SetVal5(const String &v5)
// Depends on val4
break;
default:
- PMLog("ItemEffect: Attempting to set val5 of effect that isn\'t set", PM_DEBUG_ERROR);
+ LogNotSet("ItemEffect", id, "val5", v5, "effect");
}
}
bool PokeGen::PokeMod::ItemEffect::GetOverworld() const
{
- PMLog("ItemEffect: Fetching overworld", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "overworld", overworld);
return overworld;
}
bool PokeGen::PokeMod::ItemEffect::GetBattle() const
{
- PMLog("ItemEffect: Fetching battle", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "battle", battle);
return battle;
}
bool PokeGen::PokeMod::ItemEffect::GetHeld() const
{
- PMLog("ItemEffect: Fetching held", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "held", held);
return held;
}
-int PokeGen::PokeMod::ItemEffect::GetEffect() const
+unsigned PokeGen::PokeMod::ItemEffect::GetEffect() const
{
- PMLog("ItemEffect: Fetching effect", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "effect", effect);
return effect;
}
+// TODO (Ben#1#): Values fetching
int PokeGen::PokeMod::ItemEffect::GetVal1() const
{
- PMLog("ItemEffect: Fetching val1", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "val1", val1);
return val1;
}
int PokeGen::PokeMod::ItemEffect::GetVal2() const
{
- PMLog("ItemEffect: Fetching val2", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "val2", val2);
return val2;
}
PokeGen::PokeMod::Frac PokeGen::PokeMod::ItemEffect::GetVal3() const
{
- PMLog("ItemEffect: Fetching val3", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "val3", val3.GetNum(), val3.GetDenom());
return val3;
}
unsigned PokeGen::PokeMod::ItemEffect::GetVal3Num() const
{
- PMLog("ItemEffect: Fetching val3", PM_DEBUG_DEBUG);
- return val3;
+ LogFetchVar("ItemEffect", id, "val3 numerator", val3.GetNum());
+ return val3.GetNum();
}
unsigned PokeGen::PokeMod::ItemEffect::GetVal3Denom() const
{
- PMLog("ItemEffect: Fetching val3", PM_DEBUG_DEBUG);
- return val3;
+ LogFetchVar("ItemEffect", id, "val3 denominator", val3.GetDenom());
+ return val3.GetDenom();
}
-int PokeGen::PokeMod::ItemEffect::GetVal4() const
+unsigned PokeGen::PokeMod::ItemEffect::GetVal4() const
{
- PMLog("ItemEffect: Fetching val4", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "val4", val4);
return val4;
}
PokeGen::PokeMod::String PokeGen::PokeMod::ItemEffect::GetVal4String() const
{
- PMLog("ItemEffect: Fetching val4", PM_DEBUG_DEBUG);
- return "";
+ LogFetchVar("ItemEffect", id, "val4 string", val4);
+ String ret = "";
+ switch (effect)
+ {
+ case IE_HP_CURE:
+ case IE_REVIVE:
+ // Percent/Abs
+ break;
+ case IE_CURE_STATUS:
+ // Status
+ break;
+ case IE_STAT_BOOST:
+ case IE_MODIFY_STAT_BAT:
+ // Stat
+ break;
+ case IE_SHIELD_BAT:
+ // Special/Physical
+ break;
+ case IE_TYPE_BOOST:
+ // Type
+ break;
+ case IE_PP_RESTORE:
+ // All/One
+ break;
+ case IE_REPEL:
+ // First/Max/All
+ break;
+ case IE_ESCAPE:
+ // Anywhere/Dungeon
+ break;
+ case IE_TM:
+ case IE_HM:
+ // Move
+ break;
+ case IE_BALL:
+ // BallType
+ break;
+ case IE_BERRY:
+ // BerryType
+ break;
+ case IE_ACORN:
+ // Item
+ break;
+ }
+ return ret;
}
-int PokeGen::PokeMod::ItemEffect::GetVal5() const
+unsigned PokeGen::PokeMod::ItemEffect::GetVal5() const
{
- PMLog("ItemEffect: Fetching val5", PM_DEBUG_DEBUG);
+ LogFetchVar("ItemEffect", id, "val5", val5);
return val5;
}
PokeGen::PokeMod::String PokeGen::PokeMod::ItemEffect::GetVal5String() const
{
- PMLog("ItemEffect: Fetching val5", PM_DEBUG_DEBUG);
- return "";
+ LogFetchVar("ItemEffect", id, "val5 string", val5);
+ String ret = "";
+ switch (effect)
+ {
+ case IE_BALL:
+ // TODO (Ben#1#): Dependant
+ if ((val4 == 0) && (val5 < 0))
+ ret = BallEffectStr[val5];
+ break;
+ case IE_BERRY:
+ if ((val4 == 0) && (val5 < 0))
+ ret = BallEffectStr[val5];
+ break;
+ }
+ return ret;
}
diff --git a/pokemod/ItemEffect.h b/pokemod/ItemEffect.h
index 13436db7..da7c29b9 100644
--- a/pokemod/ItemEffect.h
+++ b/pokemod/ItemEffect.h
@@ -45,7 +45,7 @@ namespace PokeGen
void SetOverworld(const bool o);
void SetBattle(const bool b);
void SetHeld(const bool h);
- void SetEffect(const int e);
+ void SetEffect(const unsigned e);
void SetEffect(const String &e);
void SetVal1(const int v1);
void SetVal2(const int v2);
@@ -53,24 +53,24 @@ namespace PokeGen
void SetVal3(const unsigned n, const unsigned d);
void SetVal3Num(const unsigned n);
void SetVal3Denom(const unsigned d);
- void SetVal4(const int v4);
+ void SetVal4(const unsigned v4);
void SetVal4(const String &v4);
- void SetVal5(const int v5);
+ void SetVal5(const unsigned v5);
void SetVal5(const String &v5);
bool GetOverworld() const;
bool GetBattle() const;
bool GetHeld() const;
- int GetEffect() const;
- int GetEffectString() const;
+ unsigned GetEffect() const;
+ String GetEffectString() const;
int GetVal1() const;
int GetVal2() const;
Frac GetVal3() const;
unsigned GetVal3Num() const;
unsigned GetVal3Denom() const;
- int GetVal4() const;
+ unsigned GetVal4() const;
String GetVal4String() const;
- int GetVal5() const;
+ unsigned GetVal5() const;
String GetVal5String() const;
private:
void Validate();
@@ -81,12 +81,12 @@ namespace PokeGen
bool overworld;
bool battle;
bool held;
- int effect;
+ unsigned effect;
int val1;
int val2;
Frac val3;
- int val4;
- int val5;
+ unsigned val4;
+ unsigned val5;
};
}
}
diff --git a/pokemod/ItemStorage.cpp b/pokemod/ItemStorage.cpp
index 3c73449a..66822f53 100644
--- a/pokemod/ItemStorage.cpp
+++ b/pokemod/ItemStorage.cpp
@@ -47,7 +47,6 @@ PokeGen::PokeMod::ItemStorage::~ItemStorage()
void PokeGen::PokeMod::ItemStorage::Validate()
{
- isValid = true;
LogValidateStart("ItemStorage", id, name);
if (name == "")
{
@@ -65,7 +64,6 @@ void PokeGen::PokeMod::ItemStorage::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::ItemStorage::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("ItemStorage", id, name);
if (name == "")
{
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp
new file mode 100644
index 00000000..f0349f50
--- /dev/null
+++ b/pokemod/Map.cpp
@@ -0,0 +1,661 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Map.cpp
+// Purpose: Define a map for the game
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Mon May 28 21:45:48 2007
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTMap or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "Map.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::Map::Map(const unsigned _id)
+{
+ LogCtor("Map", id);
+ name = "";
+ flyWarp = 0;
+ type = 0;
+ effects.clear();
+ trainers.clear();
+ warps.clear();
+ wildLists.clear();
+ id = _id;
+}
+
+PokeGen::PokeMod::Map::Map(Ini &ini, const unsigned _id)
+{
+ LogCtorIni("Map", id);
+ ImportIni(ini, _id);
+ if (id == UINT_MAX)
+ LogIdError("Map");
+}
+
+PokeGen::PokeMod::Map::~Map()
+{
+ LogDtor("Map", id, name);
+}
+
+void PokeGen::PokeMod::Map::Validate()
+{
+ LogValidateStart("Map", id, name);
+ // Make sure the name is set to something
+ if (name == "")
+ {
+ LogVarNotSet("Map", id, "name");
+ isValid = false;
+ }
+ if (!GetMapWarp(flyWarp))
+ {
+ LogVarNotValid("Map", id, "flyWarp", name);
+ isValid = false;
+ }
+ if (type < MTY_END)
+ {
+ LogVarNotValid("Map", id, "type", name);
+ isValid = false;
+ }
+ // Check if there are any effects defined
+ if (GetMapEffectCount())
+ {
+ // Validate each effect
+ for (std::vector<MapEffect>::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;
+ }
+ }
+ else
+ LogSubmoduleEmpty("Map", id, "effect", name);
+ // Check if there are any trainers defined
+ if (GetMapTrainerCount())
+ {
+ // Validate each trainer
+ for (std::vector<MapTrainer>::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;
+ }
+ }
+ else
+ LogSubmoduleEmpty("Map", id, "trainer", name);
+ // Check if there are any warps defined
+ if (GetMapWarpCount())
+ {
+ // Validate each warp
+ for (std::vector<MapWarp>::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;
+ }
+ }
+ 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<MapWildList>::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;
+ }
+ }
+ else
+ LogSubmoduleEmpty("Map", id, "effect", name);
+ LogValidateOver("Map", id, isValid, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+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);
+ output.Append(ConsoleLogVarNotSet("Map", id, "name", name));
+ isValid = false;
+ }
+ if (!GetWarp(flyWarp))
+ {
+ LogVarNotValid("Map", id, "flyWarp", name);
+ output.append(ConsoleLogVarNotValid("Map", id, "flyWarp", name));
+ isValid = false;
+ }
+ if ((MTY_NONE < type) && (type < MTY_END))
+ {
+ LogVarNotValid("Map", id, "type", name);
+ output.append(ConsoleLogVarNotValid("Map", id, "type", name));
+ isValid = false;
+ }
+ // Check if there are any effects defined
+ if (GetMapEffectCount())
+ {
+ // Validate each effect
+ for (std::vector<MapEffect>::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;
+ }
+ }
+ 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<MapTrainer>::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;
+ }
+ }
+ 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<MapWarp>::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;
+ }
+ }
+ else
+ {
+ LogSubmoduleEmpty("Map", id, "warp", id, name);
+ 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<MapWildList>::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;
+ }
+ }
+ else
+ {
+ LogSubmoduleEmpty("Map", id, "effect", id, name);
+ output.Append(ConsoleLogSubmoduleEmpty("Map", id, "effect", name));
+ isValid = false;
+ }
+ LogValidateOver("Map", id, isValid, name);
+}
+#endif
+
+void PokeGen::PokeMod::Map::ImportIni(Ini &ini, const unsigned _id)
+{
+ LogImportStart("Map");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("Map");
+ }
+ else
+ id = _id;
+ ini.GetValue("name", name, "");
+ ini.GetValue("flyWarp", flyWarp, 0);
+ ini.GetValue("type", type, 0);
+ effects.clear();
+ trainers.clear();
+ warps.clear();
+ wildLists.clear();
+ LogImportOver("Map", id, name);
+}
+
+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.Export(fout);
+ for (std::vector<MapEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ i->ExportIni(fout, name);
+ for (std::vector<MapTrainer>::const_iterator j = trainers.begin(); j != trainers.end(); ++j)
+ j->ExportIni(fout, name);
+ for (std::vector<MapWarp>::const_iterator k = warps.begin(); k != warps.end(); ++k)
+ k->ExportIni(fout, name);
+ for (std::vector<MapWildList>::const_iterator l = wildLists.begin(); l != wildLists.end(); ++l)
+ l->ExportIni(fout, name);
+ LogExportOver("Map", id, name);
+}
+
+void PokeGen::PokeMod::Map::SetName(const String &n)
+{
+ LogSetVar("Map", id, "name", n);
+ name = n;
+}
+
+void PokeGen::PokeMod::Map::SetFlyWarp(const unsigned f)
+{
+ LogSetVar("Map", id, "flyWarp", f, name);
+ if (GetMapWarp(f))
+ flyWarp = f;
+}
+
+void PokeGen::PokeMod::Map::SetFlyWarp(const String &f)
+{
+ LogSetVar("Map", id, "flyWarp string", f, name);
+ if (const MapWarp *m = GetMapWarp(f))
+ flyWarp = m->GetId();
+}
+
+void PokeGen::PokeMod::Map::SetType(const unsigned t)
+{
+ LogSetVar("Map", id, "type", t, name);
+ if (t < MTY_END)
+ type = t;
+}
+
+void PokeGen::PokeMod::Map::SetType(const String &t)
+{
+ LogSetVar("Map", id, "type string", t, name);
+ type = FindIn(MTY_END, t, MapTypeStr);
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::Map::GetName() const
+{
+ LogFetchVar("Map", id, "name", name);
+ return name;
+}
+
+unsigned PokeGen::PokeMod::Map::GetFlyWarp() const
+{
+ LogFetchVar("Map", id, "flyWarp", flyWarp, name);
+ return flyWarp;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::Map::GetFlyWarpString() const
+{
+ LogFetchVar("Map", id, "flyWarp string", flyWarp, name);
+ if (const MapWarp *m = GetMapWarp(flyWarp))
+ return m->GetName();
+ return "";
+}
+
+unsigned PokeGen::PokeMod::Map::GetType() const
+{
+ LogFetchVar("Map", id, "type", type, name);
+ return type;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::Map::GetTypeString() const
+{
+ LogFetchVar("Map", id, "type string", type, name);
+ if (type < MTY_END)
+ return MapTypeStr[type];
+ return "";
+}
+
+void PokeGen::PokeMod::Map::SetTile(unsigned x, unsigned y, unsigned _id)
+{
+ if (curPokeMod.GetTile(_id))
+ tiles[x][y] = _id;
+}
+
+void PokeGen::PokeMod::Map::InsertColumn(unsigned x)
+{
+ tiles.InsertCol(x, 0);
+}
+
+void PokeGen::PokeMod::Map::InsertRow(unsigned y)
+{
+ tiles.InsertRow(y, 0);
+}
+
+void PokeGen::PokeMod::Map::AddColumn()
+{
+ tiles.AddCol(0);
+}
+
+void PokeGen::PokeMod::Map::AddRow()
+{
+ tiles.AddRow(0);
+}
+
+void PokeGen::PokeMod::Map::DeleteColumn(unsigned x)
+{
+ tiles.DeleteCol(x);
+}
+
+void PokeGen::PokeMod::Map::DeleteRow(unsigned y)
+{
+ tiles.DeleteRow(y);
+}
+
+unsigned PokeGen::PokeMod::Map::GetTile(unsigned x, unsigned y) const
+{
+ return tiles[x][y];
+}
+
+unsigned PokeGen::PokeMod::Map::GetWidth() const
+{
+ return tiles.GetWidth();
+}
+
+unsigned PokeGen::PokeMod::Map::GetHeight() const
+{
+ return tiles.GetHeight();
+}
+
+const PokeGen::PokeMod::MapEffect *PokeGen::PokeMod::Map::GetMapEffect(const unsigned _id) const
+{
+ LogSubmoduleFetch("Map", id, "effect", _id, name);
+ for (unsigned i = 0; i < GetMapEffectCount(); ++i)
+ {
+ if (effects[i].GetId() == _id)
+ return &effects[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "effect", _id, name);
+ return NULL;
+}
+
+const PokeGen::PokeMod::MapEffect *PokeGen::PokeMod::Map::GetMapEffect(const String &n) const
+{
+ LogSubmoduleFetch("Map", id, "effect", n, name);
+ for (unsigned i = 0; i < GetMapEffectCount(); ++i)
+ {
+ if (effects[i].GetName() == n)
+ return &effects[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "effect", n, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::Map::GetMapEffectCount() const
+{
+ LogSubmoduleCount("Map", id, "effects", name);
+ return effects.size();
+}
+
+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))
+ break;
+ }
+ MapEffect newMapEffect(i);
+ if (ini)
+ newMapEffect.ImportIni(*ini);
+ LogSubmoduleNew("Map", id, "effect", i, name);
+ effects.push_back(newMapEffect);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapEffect(const unsigned _id)
+{
+ LogSubmoduleRemoveStart("Map", id, "effect", _id, name);
+ for (std::vector<MapEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("Map", id, "effect", _id, name);
+ effects.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "effect", _id, name);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapEffect(const String &n)
+{
+ LogSubmoduleRemoveStart("Map", id, "effect", n, name);
+ for (std::vector<MapEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ {
+ if (i->GetName() == n)
+ {
+ LogSubmoduleRemoved("Map", id, "effect", n, name);
+ effects.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "effect", n, name);
+}
+
+const PokeGen::PokeMod::MapTrainer *PokeGen::PokeMod::Map::GetMapTrainer(const unsigned _id) const
+{
+ LogSubmoduleFetch("Map", id, "trainer", _id, name);
+ for (unsigned i = 0; i < GetMapTrainerCount(); ++i)
+ {
+ if (trainers[i].GetId() == _id)
+ return &trainers[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "trainer", _id, name);
+ return NULL;
+}
+
+const PokeGen::PokeMod::MapTrainer *PokeGen::PokeMod::Map::GetMapTrainer(const String &n) const
+{
+ LogSubmoduleFetch("Map", id, "trainer", n, name);
+ for (unsigned i = 0; i < GetMapTrainerCount(); ++i)
+ {
+ if (trainers[i].GetName() == n)
+ return &trainers[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "trainer", n, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::Map::GetMapTrainerCount() const
+{
+ LogSubmoduleCount("Map", id, "trainer", name);
+ return trainers.size();
+}
+
+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))
+ break;
+ }
+ MapTrainer newMapTrainer(i);
+ if (ini)
+ newMapTrainer.ImportIni(*ini);
+ LogSubmoduleNew("Map", id, "trainer", i, name);
+ trainers.push_back(newMapTrainer);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapTrainer(const unsigned _id)
+{
+ LogSubmoduleRemoveStart("Map", id, "trainer", _id, name);
+ for (std::vector<MapTrainer>::const_iterator i = trainers.begin(); i != trainers.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("Map", id, "trainer", _id, name);
+ trainers.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "trainer", _id, name);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapTrainer(const String &n)
+{
+ LogSubmoduleRemoveStart("Map", id, "trainer", n, name);
+ for (std::vector<MapTrainer>::const_iterator i = trainers.begin(); i != trainers.end(); ++i)
+ {
+ if (i->GetName() == n)
+ {
+ LogSubmoduleRemoved("Map", id, "trainer", n, name);
+ trainers.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "trainer", n, name);
+}
+
+const PokeGen::PokeMod::MapWarp *PokeGen::PokeMod::Map::GetMapWarp(const unsigned _id) const
+{
+ LogSubmoduleFetch("Map", id, "warp", _id, name);
+ for (unsigned i = 0; i < GetMapWarpCount(); ++i)
+ {
+ if (warps[i].GetId() == _id)
+ return &warps[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "warp", _id, name);
+ return NULL;
+}
+
+const PokeGen::PokeMod::MapWarp *PokeGen::PokeMod::Map::GetMapWarp(const String &n) const
+{
+ LogSubmoduleFetch("Map", id, "warp", n, name);
+ for (unsigned i = 0; i < GetMapWarpCount(); ++i)
+ {
+ if (warps[i].GetName() == n)
+ return &warps[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "warp", n, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::Map::GetMapWarpCount() const
+{
+ LogSubmoduleCount("Map", id, "warp", name);
+ return warps.size();
+}
+
+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))
+ break;
+ }
+ MapWarp newMapWarp(i);
+ if (ini)
+ newMapWarp.ImportIni(*ini);
+ LogSubmoduleNew("Map", id, "warp", i, name);
+ warps.push_back(newMapWarp);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapWarp(const unsigned _id)
+{
+ LogSubmoduleRemoveStart("Map", id, "warp", _id, name);
+ for (std::vector<MapWarp>::const_iterator i = warps.begin(); i != warps.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("Map", id, "warp", _id, name);
+ warps.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "warp", _id, name);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapWarp(const String &n)
+{
+ LogSubmoduleRemoveStart("Map", id, "warp", n, name);
+ for (std::vector<MapWarp>::const_iterator i = warps.begin(); i != warps.end(); ++i)
+ {
+ if (i->GetName() == n)
+ {
+ LogSubmoduleRemoved("Map", id, "warp", n, name);
+ warps.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "warp", n, name);
+}
+
+const PokeGen::PokeMod::MapWildList *PokeGen::PokeMod::Map::GetMapWildList(const unsigned _id) const
+{
+ LogSubmoduleFetch("Map", id, "wild list", _id, name);
+ for (unsigned i = 0; i < GetMapWildListCount(); ++i)
+ {
+ if (wildLists[i].GetId() == _id)
+ return &wildLists[i];
+ }
+ LogSubmoduleFetchFail("Map", id, "wild list", _id, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::Map::GetMapWildListCount() const
+{
+ LogSubmoduleCount("Map", id, "wild list", name);
+ return wildLists.size();
+}
+
+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))
+ break;
+ }
+ MapWildList newMapWildList(i);
+ if (ini)
+ newMapWildList.ImportIni(*ini);
+ LogSubmoduleNew("Map", id, "wild list", i, name);
+ wildLists.push_back(newMapWildList);
+}
+
+void PokeGen::PokeMod::Map::DeleteMapWildList(const unsigned _id)
+{
+ LogSubmoduleRemoveStart("Map", id, "wild list", _id, name);
+ for (std::vector<MapWildList>::const_iterator i = wildLists.begin(); i != wildLists.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("Map", id, "wild list", _id, name);
+ wildLists.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Map", id, "wild list", _id, name);
+}
diff --git a/pokemod/Map.h b/pokemod/Map.h
new file mode 100644
index 00000000..70ecbb28
--- /dev/null
+++ b/pokemod/Map.h
@@ -0,0 +1,118 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Map.h
+// Purpose: Define a map for the game
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Mon May 28 2007 21:41:54
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMOD_MAP__
+#define __POKEMOD_MAP__
+
+#include <vector>
+#include "Object.h"
+#include "String.h"
+#include "Matrix.h"
+#include "MapEffect.h"
+#include "MapTrainer.h"
+#include "MapWarp.h"
+#include "MapWildList.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class Map : public Object
+ {
+ public:
+ Map(const unsigned _id);
+ Map(Ini &ini, const unsigned _id = UINT_MAX);
+ ~Map();
+
+ void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetName(const String &n);
+ void SetFlyWarp(const unsigned f);
+ void SetFlyWarp(const String &f);
+ void SetType(const unsigned t);
+ void SetType(const String &t);
+
+ String GetName() const;
+ unsigned GetFlyWarp() const;
+ String GetFlyWarpString() const;
+ unsigned GetType() const;
+ String GetTypeString() const;
+
+ void SetTile(unsigned x, unsigned y, unsigned _id);
+ void InsertColumn(unsigned x);
+ void InsertRow(unsigned y);
+ void AddColumn();
+ void AddRow();
+ void DeleteColumn(unsigned x);
+ void DeleteRow(unsigned y);
+
+ unsigned GetTile(unsigned x, unsigned y) const;
+ unsigned GetWidth() const;
+ unsigned GetHeight() const;
+
+ const MapEffect *GetMapEffect(const unsigned _id) const;
+ const MapEffect *GetMapEffect(const String &n) const;
+ unsigned GetMapEffectCount() const;
+ void NewMapEffect(Ini *const ini = NULL);
+ void DeleteMapEffect(const unsigned _id);
+ void DeleteMapEffect(const String &n);
+
+ const MapTrainer *GetMapTrainer(const unsigned _id) const;
+ const MapTrainer *GetMapTrainer(const String &n) const;
+ unsigned GetMapTrainerCount() const;
+ void NewMapTrainer(Ini *const ini = NULL);
+ void DeleteMapTrainer(const unsigned _id);
+ void DeleteMapTrainer(const String &n);
+
+ const MapWarp *GetMapWarp(const unsigned _id) const;
+ const MapWarp *GetMapWarp(const String &n) const;
+ unsigned GetMapWarpCount() const;
+ void NewMapWarp(Ini *const ini = NULL);
+ void DeleteMapWarp(const unsigned _id);
+ void DeleteMapWarp(const String &n);
+
+ const MapWildList *GetMapWildList(const unsigned _id) const;
+ unsigned GetMapWildListCount() const;
+ void NewMapWildList(Ini *const ini = NULL);
+ void DeleteMapWildList(const unsigned _id);
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ String name;
+ unsigned flyWarp;
+ unsigned type;
+ Matrix<unsigned> tiles;
+
+ std::vector<MapEffect> effects;
+ std::vector<MapTrainer> trainers;
+ std::vector<MapWarp> warps;
+ std::vector<MapWildList> wildLists;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/MapTrainerTeam.cpp b/pokemod/MapTrainerTeam.cpp
index 239210bb..376e887f 100644
--- a/pokemod/MapTrainerTeam.cpp
+++ b/pokemod/MapTrainerTeam.cpp
@@ -49,7 +49,6 @@ PokeGen::PokeMod::MapTrainerTeam::~MapTrainerTeam()
void PokeGen::PokeMod::MapTrainerTeam::Validate()
{
- isValid = true;
LogValidateStart("MapTrainerTeam", id);
if (!curPokeMod.GetPokemon(species))
{
@@ -72,7 +71,6 @@ void PokeGen::PokeMod::MapTrainerTeam::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::MapTrainerTeam::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("MapTrainerTeam", id);
if (!curPokeMod.GetPokemon(species))
{
diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp
index 90dda382..065aa68a 100644
--- a/pokemod/MapWildList.cpp
+++ b/pokemod/MapWildList.cpp
@@ -28,10 +28,10 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::MapWildList::MapWildList(const unsigned _id)
{
LogCtor("MapWildList", _id);
- control = 0;
- value = 0;
+ control = UINT_MAX;
+ value = INT_MAX;
times.clear();
- scope = -1;
+ scope = INT_MAX;
pokemon.clear();
id = _id;
}
@@ -55,9 +55,25 @@ void PokeGen::PokeMod::MapWildList::Validate(const wxListBox &output)
void PokeGen::PokeMod::MapWildList::Validate()
#endif
{
- isValid = true;
LogValidateStart("MapWildList", id);
- // TODO (Validation#1#): MapWildList Validation
+ if (CTRL_END <= control)
+ {
+ LogVarNotValid("MapWildList", id, "control");
+ isValid = true;
+ }
+ else if (control == CTRL_FISHING)
+ {
+ // TODO (Ben#1#): Value validation
+ }
+ for (std::vector<unsigned>::iterator i = times.begin(); i != times.end(); ++i)
+ {
+ if (!curPokeMod.GetTime(*i))
+ {
+ LogVarNotValid("MapWildList", id, "times");
+ isValid = false;
+ }
+ }
+ // TODO (Ben#1#): Scope validation
LogValidateOver("MapWildList", id, isValid);
}
@@ -76,8 +92,8 @@ void PokeGen::PokeMod::MapWildList::ImportIni(Ini &ini, const unsigned _id)
unsigned i;
unsigned j;
times.clear();
- ini.GetValue("control", control, 0);
- ini.GetValue("value", value, 0);
+ ini.GetValue("control", control);
+ ini.GetValue("value", value);
ini.GetValue("numTimes", i, 0);
for (unsigned k = 0; k < i; ++k)
{
@@ -85,7 +101,7 @@ void PokeGen::PokeMod::MapWildList::ImportIni(Ini &ini, const unsigned _id)
if (k != UINT_MAX)
times.push_back(j);
}
- ini.GetValue("scope", scope, -1);
+ ini.GetValue("scope", scope);
LogImportOver("MapWildList", id);
}
@@ -102,7 +118,7 @@ void PokeGen::PokeMod::MapWildList::ExportIni(std::ofstream &fout, const String
exMapWildList.AddField(String("time-%u", i), times[i]);
exMapWildList.AddField("scope", scope);
exMapWildList.Export(fout);
- for (std::vector<MapWildPokemon>::iterator i = pokemon.begin(); i != pokemon.end(); ++i)
+ for (std::vector<MapWildPokemon>::const_iterator i = pokemon.begin(); i != pokemon.end(); ++i)
i->ExportIni(fout, map, id);
LogExportOver("MapWildList", id);
}
@@ -110,7 +126,7 @@ void PokeGen::PokeMod::MapWildList::ExportIni(std::ofstream &fout, const String
void PokeGen::PokeMod::MapWildList::SetControl(const unsigned c)
{
LogSetVar("MapWildList", id, "control", c);
- if ((CTRL_NONE < c) && (c < CTRL_END))
+ if (c < CTRL_END)
control = c;
}
@@ -211,7 +227,7 @@ unsigned PokeGen::PokeMod::MapWildList::GetValue() const
bool PokeGen::PokeMod::MapWildList::GetTime(const unsigned ts) const
{
LogFetchVar("MapWildList", id, String("time[%u]", ts), "???");
- for (std::vector<unsigned>::iterator i = times.begin(); i != times.end(); ++i)
+ for (std::vector<unsigned>::const_iterator i = times.begin(); i != times.end(); ++i)
{
if (*i == ts)
return true;
@@ -233,7 +249,7 @@ int PokeGen::PokeMod::MapWildList::GetScope() const
return scope;
}
-PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokemon(const unsigned _id)
+const PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokemon(const unsigned _id) const
{
LogSubmoduleFetch("MapWildList", id, "Pokémon", _id);
for (unsigned i = 0; i < GetMapWildPokemonCount(); ++i)
@@ -245,7 +261,7 @@ PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokem
return NULL;
}
-PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokemon(const String &n)
+const PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokemon(const String &n) const
{
LogSubmoduleFetch("MapWildList", id, "Pokémon string", n);
for (unsigned i = 0; i < GetMapWildPokemonCount(); ++i)
@@ -253,7 +269,7 @@ PokeGen::PokeMod::MapWildPokemon *PokeGen::PokeMod::MapWildList::GetMapWildPokem
if (pokemon[i].GetPokemonString() == n)
return &pokemon[i];
}
- LogSubmoduleFetchFail("MapWildList", id, "Pokémon", 0);
+ LogSubmoduleFetchFail("MapWildList", id, "Pokémon", (unsigned)0);
return NULL;
}
@@ -282,7 +298,7 @@ void PokeGen::PokeMod::MapWildList::NewMapWildPokemon(Ini *const ini)
void PokeGen::PokeMod::MapWildList::DeleteMapWildPokemon(const unsigned _id)
{
LogSubmoduleRemoveStart("MapWildList", id, "Pokémon", _id);
- for (std::vector<MapWildPokemon>::iterator i = pokemon.begin(); i != pokemon.end(); ++i)
+ for (std::vector<MapWildPokemon>::const_iterator i = pokemon.begin(); i != pokemon.end(); ++i)
{
if (i->GetId() == _id)
{
diff --git a/pokemod/MapWildList.h b/pokemod/MapWildList.h
index 249d5a07..00457cff 100644
--- a/pokemod/MapWildList.h
+++ b/pokemod/MapWildList.h
@@ -53,7 +53,7 @@ namespace PokeGen
void SetScope(const String &s);
unsigned GetControl() const;
- unsigned GetValue() const;
+ int GetValue() const;
bool GetTime(const unsigned ts) const;
bool GetTime(const String &ts) const;
int GetScope() const;
@@ -70,7 +70,7 @@ namespace PokeGen
# endif
unsigned control;
- unsigned value;
+ int value;
std::vector<unsigned> times;
int scope;
diff --git a/pokemod/MapWildPokemon.cpp b/pokemod/MapWildPokemon.cpp
index 56d456c7..e81bb2ef 100644
--- a/pokemod/MapWildPokemon.cpp
+++ b/pokemod/MapWildPokemon.cpp
@@ -49,7 +49,6 @@ PokeGen::PokeMod::MapWildPokemon::~MapWildPokemon()
void PokeGen::PokeMod::MapWildPokemon::Validate()
{
- isValid = true;
LogValidateStart("MapWildPokemon", id, GetPokemonString());
if (!curPokeMod.GetPokemon(pokemon))
{
@@ -72,7 +71,6 @@ void PokeGen::PokeMod::MapWildPokemon::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::MapWildPokemon::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("MapWildPokemon", id, GetPokemonString());
if (!curPokeMod.GetPokemon(pokemon))
{
diff --git a/pokemod/Matrix.h b/pokemod/Matrix.h
index 9cf89b8e..9a949696 100644
--- a/pokemod/Matrix.h
+++ b/pokemod/Matrix.h
@@ -33,39 +33,25 @@ namespace PokeGen
{
namespace PokeMod
{
- template<class T> class Matrix
+ template<class T> class MatrixBase
{
public:
- Matrix()
+ MatrixBase()
{
width = 0;
height = 0;
matrix.clear();
}
- Matrix(const Ini &ini)
- {
- ImportIni(ini);
- }
- Matrix(const unsigned w, const unsigned h, const T &d = T())
+ MatrixBase(const unsigned w, const unsigned h, const T &d = T())
{
matrix.resize(w, std::vector<T>(h, d));
width = w;
height = h;
}
- void ImportIni(const Ini &ini) const
- {
- height = 0;
- width = 0;
- matrix.clear();
- }
- void ExportIni(std::ofstream &fout, const String &val) const
- {
- }
-
void AddRow(const T &d = T())
{
- for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
+ for (std::vector<T>::iterator *i = matrix.begin(); i != matrix.end(); ++i)
i->push_back(d);
++height;
}
@@ -78,7 +64,7 @@ namespace PokeGen
{
if (height < pos)
return false;
- for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
+ for (std::vector<T>::iterator *i = matrix.begin(); i != matrix.end(); ++i)
i->insert(pos, d);
++height;
return true;
@@ -95,7 +81,7 @@ namespace PokeGen
{
if (height <= pos)
return false;
- for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
+ for (std::vector<T>::iterator *i = matrix.begin(); i != matrix.end(); ++i)
i->erase(i->begin() + pos);
--height;
return true;
@@ -126,7 +112,7 @@ namespace PokeGen
std::vector<T> GetRow(const unsigned row) const
{
std::vector<T> r;
- for (std::vector<T> *i = matrix.begin(); i != matrix.end(); ++i)
+ for (std::vector<T>::iterator *i = matrix.begin(); i != matrix.end(); ++i)
r.push_back(i->at(row));
return r;
}
@@ -142,6 +128,10 @@ namespace PokeGen
{
return width;
}
+ Point GetSize() const
+ {
+ return Point(width, height);
+ }
T operator[](const Point &p) const
{
@@ -151,15 +141,75 @@ namespace PokeGen
{
return matrix[col];
}
- private:
+ protected:
std::vector< std::vector<T> > matrix;
unsigned height;
unsigned width;
};
- template<> class Matrix<Point>
+ template<class T> class Matrix : public MatrixBase<T>
{
public:
+ Matrix()
+ {
+ width = 0;
+ height = 0;
+ matrix.clear();
+ }
+ Matrix(Ini &ini)
+ {
+ ImportIni(ini);
+ }
+
+ void ImportIni(Ini &ini)
+ {
+ LogImportStart("Matrix");
+ ini.GetValue("width", width, 0);
+ ini.GetValue("height", height, 0);
+ if (!(width && height))
+ return;
+ matrix.resize(width, std::vector<T>(height, 0));
+ for (unsigned i = 0; i < width; ++i)
+ {
+ for (unsigned j = 0; j < height; ++j)
+ {
+ int k;
+ ini.GetValue(String("Element-%d-%d", i, j), k, 0);
+ matrix[i][j] = k;
+ }
+ }
+ LogImportOver("Matrix");
+ }
+ void ExportIni(std::ofstream &fout, const String &val) const
+ {
+ Log(String("Matrix Export: Starting %s", val.c_str()), PM_DEBUG_INFO);
+ // Declare the elements
+ Ini exMatrix(val);
+ exMatrix.AddField("height", height);
+ exMatrix.AddField("width", width);
+ for (int i = 0; i < width; ++i)
+ {
+ for (unsigned j = 0; j < height; ++j)
+ exMatrix.AddField(String("Element-%d-%d", i, j), matrix[i][j]);
+ }
+ Log(String("Matrix Export: Finished %s", val.c_str()), PM_DEBUG_INFO);
+ }
+ };
+
+ class MatrixPoint : public MatrixBase<Point>
+ {
+ public:
+ MatrixPoint()
+ {
+ width = 0;
+ height = 0;
+ matrix.clear();
+ }
+ MatrixPoint(Ini &ini)
+ {
+ ImportIni(ini);
+ }
+
void ImportIni(Ini &ini)
{
LogImportStart("Matrix");
@@ -188,7 +238,7 @@ namespace PokeGen
Ini exMatrix(val);
exMatrix.AddField("height", height);
exMatrix.AddField("width", width);
- for (int i = 0; i < width; ++i)
+ for (unsigned i = 0; i < width; ++i)
{
for (unsigned j = 0; j < height; ++j)
{
@@ -200,10 +250,21 @@ namespace PokeGen
}
};
- template<> class Matrix<Frac>
+ class MatrixFrac : public MatrixBase<Frac>
{
public:
- void ImportIni(Ini &ini);
+ MatrixFrac()
+ {
+ width = 0;
+ height = 0;
+ matrix.clear();
+ }
+ MatrixFrac(Ini &ini)
+ {
+ ImportIni(ini);
+ }
+
+ void ImportIni(Ini &ini)
{
LogImportStart("Matrix");
ini.GetValue("width", width, 0);
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp
index 19e18e62..05577f5a 100644
--- a/pokemod/Move.cpp
+++ b/pokemod/Move.cpp
@@ -31,21 +31,21 @@ PokeGen::PokeMod::Move::Move(const unsigned _id)
name = "";
accuracy.Set(1, 1);
power = 0;
- type = -1;
+ type = UINT_MAX;
special = false;
powerPoints = 1;
- target = -1;
+ target = UINT_MAX;
numTargets = 0;
- targetChoice = -1;
+ targetChoice = UINT_MAX;
ignoreAccuracy = false;
ignoreFlinch = false;
sound = false;
description = "";
- contestType = -1;
+ contestType = UINT_MAX;
contestPoints = 0;
jamPoints = 0;
- contestEffect = -1;
- contestTarget = -1;
+ contestEffect = UINT_MAX;
+ contestTarget = UINT_MAX;
effects.clear();
id = _id;
}
@@ -71,6 +71,7 @@ void PokeGen::PokeMod::Move::Validate()
LogVarNotSet("Move", id, "name");
isValid = "";
}
+ accuracy.Reduce();
if (!curPokeMod.GetType(type))
{
LogVarNotValid("Move", id, "type", name);
@@ -81,24 +82,24 @@ void PokeGen::PokeMod::Move::Validate()
LogVarNotValid("Move", id, "powerPoints", name);
isValid = false;
}
- if ((target <= TAR_NONE) || (TAR_END <= target))
+ if (TAR_END <= target)
{
LogVarNotValid("Move", id, "target", name);
isValid = false;
}
- if (!targets || (curPokeMod.GetMaxFight() << 1) < numTargets)
+ if (!target || (curPokeMod.GetMaxFight() << 1) < numTargets)
{
LogVarNotValid("Move", id, "numTargets", name);
isValid = false;
}
- if ((targetChoice <= TAC_NONE) || (TAC_END <= targetChoice))
+ if (TAC_END <= targetChoice)
{
LogVarNotValid("Move", id, "targetChoice", name);
isValid = false;
}
if (curPokeMod.IsContestAllowed())
{
- if ((contestType <= COTY_NONE) || (COTY_END <= contestType))
+ if (COTY_END <= contestType)
{
LogVarNotValid("Move", id, "contestType", name);
isValid = false;
@@ -108,12 +109,12 @@ void PokeGen::PokeMod::Move::Validate()
LogVarNotValid("Move", id, "contestPoints", name);
isValid = false;
}
- if ((contestEffect <= CONE_NONE) || (CONE_END <= contestEffect))
+ if (CONE_END <= contestEffect)
{
LogVarNotValid("Move", id, "contestEffect", name);
isValid = false;
}
- if ((contestTarget <= CONT_NONE) || (CONT_END <= contestTarget))
+ if (CONT_END <= contestTarget)
{
LogVarNotValid("Move", id, "contestTarget", name);
isValid = false;
@@ -144,7 +145,7 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output)
output.append(ConsoleLogVarNotValid("Move", id, "powerPoints", name));
isValid = false;
}
- if ((target <= TAR_NONE) || (TAR_END <= target))
+ if (TAR_END <= target)
{
LogVarNotValid("Move", id, "target", name);
output.append(ConsoleLogVarNotValid("Move", id, "target", name));
@@ -156,7 +157,7 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output)
output.append(ConsoleLogVarNotValid("Move", id, "numTargets", name));
isValid = false;
}
- if ((targetChoice <= TAC_NONE) || (TAC_END <= targetChoice))
+ if (TAC_END <= targetChoice)
{
LogVarNotValid("Move", id, "targetChoice", name);
output.append(ConsoleLogVarNotValid("Move", id, "targetChoice", name));
@@ -164,7 +165,7 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output)
}
if (curPokeMod.IsContestAllowed())
{
- if ((contestType <= COTY_NONE) || (COTY_END <= contestType))
+ if (COTY_END <= contestType)
{
LogVarNotValid("Move", id, "contestType", name);
output.append(ConsoleLogVarNotValid("Move", id, "contestType", name));
@@ -176,13 +177,13 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output)
output.append(ConsoleLogVarNotValid("Move", id, "contestPoints", name));
isValid = false;
}
- if ((contestEffect <= CONE_NONE) || (CONE_END <= contestEffect))
+ if (CONE_END <= contestEffect)
{
LogVarNotValid("Move", id, "contestEffect", name);
output.append(ConsoleLogVarNotValid("Move", id, "contestEffect", name));
isValid = false;
}
- if ((contestTarget <= CONT_NONE) || (CONT_END <= contestTarget))
+ if (CONT_END <= contestTarget)
{
LogVarNotValid("Move", id, "contestTarget", name);
output.append(ConsoleLogVarNotValid("Move", id, "contestTarget", name));
@@ -211,21 +212,21 @@ void PokeGen::PokeMod::Move::ImportIni(Ini &ini, const unsigned _id)
ini.GetValue("accuracy-d", j, 1);
accuracy.Set(i, j);
ini.GetValue("power", power, 0);
- ini.GetValue("type", type, -1);
+ ini.GetValue("type", type);
ini.GetValue("special", special, false);
ini.GetValue("powerPoints", powerPoints, 1);
- ini.GetValue("target", target, -1);
+ ini.GetValue("target", target);
ini.GetValue("numTargets", numTargets, 0);
- ini.GetValue("targetChoice", targetChoice, -1);
+ ini.GetValue("targetChoice", targetChoice);
ini.GetValue("ignoreAccuracy", ignoreAccuracy, false);
ini.GetValue("ignoreFlinch", ignoreFlinch, false);
ini.GetValue("sound", sound, false);
ini.GetValue("description", description, "");
- ini.GetValue("contestType", contestType, -1);
+ ini.GetValue("contestType", contestType);
ini.GetValue("contestPoints", contestPoints, 0);
ini.GetValue("jamPoints", jamPoints, 0);
- ini.GetValue("contestEffect", contestEffect, -1);
- ini.GetValue("contestTarget", contestTarget, -1);
+ ini.GetValue("contestEffect", contestEffect);
+ ini.GetValue("contestTarget", contestTarget);
LogImportOver("Move", id, name);
}
@@ -253,6 +254,8 @@ void PokeGen::PokeMod::Move::ExportIni(std::ofstream &fout) const
exMove.AddField("jamPoints", jamPoints);
exMove.AddField("contestEffect", contestEffect);
exMove.AddField("contestTarget", contestTarget);
+ for (std::vector<MoveEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ i->ExportIni(fout, name);
LogExportOver("Move", id, name);
}
@@ -313,17 +316,16 @@ void PokeGen::PokeMod::Move::SetPowerPoints(const unsigned p)
powerPoints = p;
}
-void PokeGen::PokeMod::Move::SetTarget(const int t)
+void PokeGen::PokeMod::Move::SetTarget(const unsigned t)
{
LogSetVar("Move", id, "target", t, name);
- if ((TAR_NONE < t) && (t < TAR_END))
+ if (t < TAR_END)
target = t;
}
void PokeGen::PokeMod::Move::SetTarget(const String &t)
{
- LogSetVar("Move", id, "target string", t, name);
- target = FindIn(TAR_END, t, TargetStr);
+ SetTarget(FindIn(TAR_END, t, TargetStr));
}
void PokeGen::PokeMod::Move::SetNumTargets(const unsigned n)
@@ -333,17 +335,16 @@ void PokeGen::PokeMod::Move::SetNumTargets(const unsigned n)
numTargets = n;
}
-void PokeGen::PokeMod::Move::SetTargetChoice(const int t)
+void PokeGen::PokeMod::Move::SetTargetChoice(const unsigned t)
{
LogSetVar("Move", id, "targetChoice", t, name);
- if ((TAC_NONE < t) && (t < TAC_END))
+ if (t < TAC_END)
targetChoice = t;
}
void PokeGen::PokeMod::Move::SetTargetChoice(const String &t)
{
- LogSetVar("Move", id, "targetChoice string", t, name);
- targetChoice = FindIn(TAC_END, t, TargetChoiceStr);
+ SetTargetChoice(FindIn(TAC_END, t, TargetChoiceStr));
}
void PokeGen::PokeMod::Move::SetIgnoreAccuracy(const bool i)
@@ -370,17 +371,16 @@ void PokeGen::PokeMod::Move::SetDescription(const String &d)
description = d;
}
-void PokeGen::PokeMod::Move::SetContestType(const int c)
+void PokeGen::PokeMod::Move::SetContestType(const unsigned c)
{
LogSetVar("Move", id, "contestType", c, name);
- if ((COTY_NONE < c) && (c < COTY_END))
+ if (c < COTY_END)
contestType = c;
}
void PokeGen::PokeMod::Move::SetContestType(const String &c)
{
- LogSetVar("Move", id, "contestType string", c, name);
- contestType = FindIn(COTY_END, c, ContestTypeStr);
+ SetContestType(FindIn(COTY_END, c, ContestTypeStr));
}
void PokeGen::PokeMod::Move::SetContestPoints(const int c)
@@ -396,30 +396,28 @@ void PokeGen::PokeMod::Move::SetJamPoints(const int j)
jamPoints = j;
}
-void PokeGen::PokeMod::Move::SetContestEffect(const int c)
+void PokeGen::PokeMod::Move::SetContestEffect(const unsigned c)
{
LogSetVar("Move", id, "contestEffect", c, name);
- if ((CONE_NONE < c) && (c < CONE_END))
+ if (c < CONE_END)
contestEffect = c;
}
void PokeGen::PokeMod::Move::SetContestEffect(const String &c)
{
- LogSetVar("Move", id, "contestEffect string", c, name);
- contestEffect = FindIn(CONE_END, c, ContestEffectStr);
+ SetContestEffect(FindIn(CONE_END, c, ContestEffectStr));
}
-void PokeGen::PokeMod::Move::SetContestTarget(const int c)
+void PokeGen::PokeMod::Move::SetContestTarget(const unsigned c)
{
LogSetVar("Move", id, "contestTarget", c, name);
- if ((CONT_NONE < c) && (c < CONT_END))
+ if (c < CONT_END)
contestTarget = c;
}
void PokeGen::PokeMod::Move::SetContestTarget(const String &c)
{
- LogSetVar("Move", id, "contestTarget string", c, name);
- contestTarget = FindIn(CONT_END, c, ContestTargetStr);
+ SetContestTarget(FindIn(CONT_END, c, ContestTargetStr));
}
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetName() const
@@ -472,7 +470,7 @@ unsigned PokeGen::PokeMod::Move::GetPowerPoints() const
return powerPoints;
}
-int PokeGen::PokeMod::Move::GetTarget() const
+unsigned PokeGen::PokeMod::Move::GetTarget() const
{
LogFetchVar("Move", id, "target", target, name);
return target;
@@ -481,7 +479,7 @@ int PokeGen::PokeMod::Move::GetTarget() const
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetTargetString() const
{
LogFetchVar("Move", id, "target string", target, name);
- if ((TAR_NONE < target) && (target < TAR_END))
+ if (target < TAR_END)
return TargetStr[target];
return "";
}
@@ -492,7 +490,7 @@ unsigned PokeGen::PokeMod::Move::GetNumTargets() const
return numTargets;
}
-int PokeGen::PokeMod::Move::GetTargetChoice() const
+unsigned PokeGen::PokeMod::Move::GetTargetChoice() const
{
LogFetchVar("Move", id, "targetChoice", targetChoice, name);
return targetChoice;
@@ -501,7 +499,7 @@ int PokeGen::PokeMod::Move::GetTargetChoice() const
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetTargetChoiceString() const
{
LogFetchVar("Move", id, "targetChoice string", targetChoice, name);
- if ((TARC_NONE < targetChoice) && (targetChoice < TARC_END))
+ if (targetChoice < TARC_END)
return TargetChoiceStr[targetChoice];
return "";
}
@@ -530,7 +528,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetDescription() const
return description;
}
-int PokeGen::PokeMod::Move::GetContestType() const
+unsigned PokeGen::PokeMod::Move::GetContestType() const
{
LogFetchVar("Move", id, "contestType", contestType, name);
return contestType;
@@ -539,7 +537,7 @@ int PokeGen::PokeMod::Move::GetContestType() const
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetContestTypeString() const
{
LogFetchVar("Move", id, "contestType string", contestType, name);
- if ((COTY_NONE < contestType) && (contestType < COTY_END))
+ if (contestType < COTY_END)
return ContestTypeStr[contestType];
return "";
}
@@ -556,7 +554,7 @@ int PokeGen::PokeMod::Move::GetJamPoints() const
return jamPoints;
}
-int PokeGen::PokeMod::Move::GetContestEffect() const
+unsigned PokeGen::PokeMod::Move::GetContestEffect() const
{
LogFetchVar("Move", id, "contestEffect", contestEffect, name);
return contestEffect;
@@ -565,12 +563,12 @@ int PokeGen::PokeMod::Move::GetContestEffect() const
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetContestEffectString() const
{
LogFetchVar("Move", id, "contestEffect string", contestEffect, name);
- if ((CONE_NONE < contestEffect) && (contestEffect < CONE_END))
+ if (contestEffect < CONE_END)
return ContestEffectStr[contestEffect];
return "";
}
-int PokeGen::PokeMod::Move::GetContestTarget() const
+unsigned PokeGen::PokeMod::Move::GetContestTarget() const
{
LogFetchVar("Move", id, "contestTarget", contestTarget, name);
return contestTarget;
@@ -579,12 +577,12 @@ int PokeGen::PokeMod::Move::GetContestTarget() const
PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetContestTargetString() const
{
LogFetchVar("Move", id, "contestTarget string", contestTarget, name);
- if ((CONT_NONE < contestTarget) && (contestTarget < CONT_END))
+ if (contestTarget < CONT_END)
return ContestTargetStr[contestTarget];
return "";
}
-PokeGen::PokeMod::MoveEffect *PokeGen::PokeMod::Move::GetMoveEffect(unsigned _id)
+const PokeGen::PokeMod::MoveEffect *PokeGen::PokeMod::Move::GetMoveEffect(unsigned _id) const
{
LogSubmoduleFetch("Move", id, "effect", _id, name);
for (unsigned i = 0; i < GetMoveEffectCount(); ++i)
@@ -621,7 +619,7 @@ void PokeGen::PokeMod::Move::NewMoveEffect(Ini *const ini)
void PokeGen::PokeMod::Move::DeleteMoveEffect(unsigned _id)
{
LogSubmoduleRemoveStart("Move", id, "effect", _id, name);
- for (std::vector<MoveEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<MoveEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
diff --git a/pokemod/Move.h b/pokemod/Move.h
index caaaf737..ccc03850 100644
--- a/pokemod/Move.h
+++ b/pokemod/Move.h
@@ -52,22 +52,22 @@ namespace PokeGen
void SetType(const String &t);
void SetSpecial(const bool s);
void SetPowerPoints(const unsigned p);
- void SetTarget(const int t);
+ void SetTarget(const unsigned t);
void SetTarget(const String &t);
void SetNumTargets(const unsigned n);
- void SetTargetChoice(const int t);
+ void SetTargetChoice(const unsigned t);
void SetTargetChoice(const String &t);
void SetIgnoreAccuracy(const bool i);
void SetIgnoreFlinch(const bool i);
void SetSound(const bool s);
void SetDescription(const String &d);
- void SetContestType(const int c);
+ void SetContestType(const unsigned c);
void SetContestType(const String &c);
void SetContestPoints(const int c);
void SetJamPoints(const int j);
- void SetContestEffect(const int c);
+ void SetContestEffect(const unsigned c);
void SetContestEffect(const String &c);
- void SetContestTarget(const int c);
+ void SetContestTarget(const unsigned c);
void SetContestTarget(const String &c);
String GetName() const;
@@ -78,25 +78,25 @@ namespace PokeGen
String GetTypeString() const;
bool GetSpecial() const;
unsigned GetPowerPoints() const;
- int GetTarget() const;
+ unsigned GetTarget() const;
String GetTargetString() const;
unsigned GetNumTargets() const;
- int GetTargetChoice() const;
+ unsigned GetTargetChoice() const;
String GetTargetChoiceString() const;
bool GetIgnoreAccuracy() const;
bool GetIgnoreFlinch() const;
bool GetSound() const;
String GetDescription() const;
- int GetContestType() const;
+ unsigned GetContestType() const;
String GetContestTypeString() const;
int GetContestPoints() const;
int GetJamPoints() const;
- int GetContestEffect() const;
+ unsigned GetContestEffect() const;
String GetContestEffectString() const;
- int GetContestTarget() const;
+ unsigned GetContestTarget() const;
String GetContestTargetString() const;
- MoveEffect *GetMoveEffect(unsigned _id);
+ const MoveEffect *GetMoveEffect(unsigned _id) const;
unsigned GetMoveEffectCount() const;
void NewMoveEffect(Ini *const ini = NULL);
void DeleteMoveEffect(unsigned _id);
@@ -109,21 +109,21 @@ namespace PokeGen
String name;
Frac accuracy;
unsigned power;
- int type;
+ unsigned type;
bool special;
unsigned powerPoints;
- int target;
+ unsigned target;
unsigned numTargets;
int targetChoice;
bool ignoreAccuracy;
bool ignoreFlinch;
bool sound;
String description;
- int contestType;
+ unsigned contestType;
int contestPoints;
int jamPoints;
- int contestEffect;
- int contestTarget;
+ unsigned contestEffect;
+ unsigned contestTarget;
std::vector<MoveEffect> effects;
};
diff --git a/pokemod/MoveEffect.cpp b/pokemod/MoveEffect.cpp
index 1a778405..ef459680 100644
--- a/pokemod/MoveEffect.cpp
+++ b/pokemod/MoveEffect.cpp
@@ -29,9 +29,9 @@ PokeGen::PokeMod::MoveEffect::MoveEffect(const unsigned _id)
{
LogCtor("MoveEffect", _id);
chance.Set(1, 1);
- effect = -1;
- val1 = -1;
- val2 = -1;
+ effect = UINT_MAX;
+ val1 = INT_MAX;
+ val2 = UINT_MAX;
id = _id;
}
@@ -54,7 +54,6 @@ void PokeGen::PokeMod::MoveEffect::Validate(const wxListBox &output)
void PokeGen::PokeMod::MoveEffect::Validate()
#endif
{
- isValid = true;
LogValidateStart("MoveEffect", id);
// TODO (Validation#1#): MoveEffect Validation
LogValidateOver("MoveEffect", id, isValid);
@@ -77,9 +76,9 @@ void PokeGen::PokeMod::MoveEffect::ImportIni(Ini &ini, const unsigned _id)
ini.GetValue("chance-n", i, 1);
ini.GetValue("chance-d", j, 1);
chance.Set(i, j);
- ini.GetValue("effect", effect, -1);
- ini.GetValue("val1", val1, -1);
- ini.GetValue("val2", val2, -1);
+ ini.GetValue("effect", effect);
+ ini.GetValue("val1", val1);
+ ini.GetValue("val2", val2);
}
void PokeGen::PokeMod::MoveEffect::ExportIni(std::ofstream &fout, const String &move) const
@@ -121,44 +120,44 @@ void PokeGen::PokeMod::MoveEffect::SetChanceDenom(const unsigned d)
chance.SetDenom(d);
}
-void PokeGen::PokeMod::MoveEffect::SetEffect(const int e)
+void PokeGen::PokeMod::MoveEffect::SetEffect(const unsigned e)
{
LogSetVar("MoveEffect", id, "effect", e);
- effect = e;
- val1 = -1;
- val2 = -1;
+ if (e < ME_END)
+ {
+ effect = e;
+ val1 = INT_MAX;
+ val2 = UINT_MAX;
+ }
}
void PokeGen::PokeMod::MoveEffect::SetEffect(const String &e)
{
- LogSetVar("MoveEffect", id, "effect string", e);
- effect = FindIn(ME_END, e, MoveEffectStr);
- val1 = -1;
- val2 = -1;
+ SetEffect(FindIn(ME_END, e, MoveEffectStr));
}
// TODO (Ben#1#): Effect code
void PokeGen::PokeMod::MoveEffect::SetVal1(const int v1)
{
- PMLog("MoveEffect: Setting val1", PM_DEBUG_DEBUG);
+ LogSetVar("MoveEffect", id, "val1", v1);
val1 = v1;
}
-void PokeGen::PokeMod::MoveEffect::SetVal2(const int v2)
+void PokeGen::PokeMod::MoveEffect::SetVal2(const unsigned v2)
{
- PMLog("MoveEffect: Setting val2", PM_DEBUG_DEBUG);
+ LogSetVar("MoveEffect", id, "val2", v2);
val2 = v2;
}
void PokeGen::PokeMod::MoveEffect::SetVal2(const String &v2)
{
- PMLog("MoveEffect: Setting val2", PM_DEBUG_DEBUG);
+ LogSetVar("MoveEffect", id, "val2 string", v2);
val2 = 0;
}
PokeGen::PokeMod::Frac PokeGen::PokeMod::MoveEffect::GetChance() const
{
- LogFetchVar("MoveEffect", id, "chance", chance.GetNum());
+ LogFetchVar("MoveEffect", id, "chance", chance.GetNum(), chance.GetDenom());
return chance;
}
@@ -174,7 +173,7 @@ unsigned PokeGen::PokeMod::MoveEffect::GetChanceDenom() const
return chance.GetDenom();
}
-int PokeGen::PokeMod::MoveEffect::GetEffect() const
+unsigned PokeGen::PokeMod::MoveEffect::GetEffect() const
{
LogFetchVar("MoveEffect", id, "effect", effect);
return effect;
@@ -183,7 +182,9 @@ int PokeGen::PokeMod::MoveEffect::GetEffect() const
PokeGen::PokeMod::String PokeGen::PokeMod::MoveEffect::GetEffectString() const
{
LogFetchVar("MoveEffect", id, "effect string", MoveEffectStr[effect]);
- return MoveEffectStr[effect];
+ if (effect < ME_END)
+ return MoveEffectStr[effect];
+ return "";
}
int PokeGen::PokeMod::MoveEffect::GetVal1() const
@@ -192,7 +193,7 @@ int PokeGen::PokeMod::MoveEffect::GetVal1() const
return val1;
}
-int PokeGen::PokeMod::MoveEffect::GetVal2() const
+unsigned PokeGen::PokeMod::MoveEffect::GetVal2() const
{
LogFetchVar("MoveEffect", id, "val2", val2);
return val2;
@@ -201,5 +202,6 @@ int PokeGen::PokeMod::MoveEffect::GetVal2() const
PokeGen::PokeMod::String PokeGen::PokeMod::MoveEffect::GetVal2String() const
{
LogFetchVar("MoveEffect", id, "val2 string", val2);
+ // TODO (Ben#1#): Val2 string
return "";
}
diff --git a/pokemod/MoveEffect.h b/pokemod/MoveEffect.h
index 9c66adf3..3f64a6ce 100644
--- a/pokemod/MoveEffect.h
+++ b/pokemod/MoveEffect.h
@@ -47,19 +47,19 @@ namespace PokeGen
void SetChance(const unsigned n, const unsigned d);
void SetChanceNum(const unsigned n);
void SetChanceDenom(const unsigned d);
- void SetEffect(const int e);
+ void SetEffect(const unsigned e);
void SetEffect(const String &e);
void SetVal1(const int v1);
- void SetVal2(const int v2);
+ void SetVal2(const unsigned v2);
void SetVal2(const String &v2);
Frac GetChance() const;
unsigned GetChanceNum() const;
unsigned GetChanceDenom() const;
- int GetEffect() const;
+ unsigned GetEffect() const;
String GetEffectString() const;
int GetVal1() const;
- int GetVal2() const;
+ unsigned GetVal2() const;
String GetVal2String() const;
private:
void Validate();
@@ -68,9 +68,9 @@ namespace PokeGen
# endif
Frac chance;
- int effect;
+ unsigned effect;
int val1;
- int val2;
+ unsigned val2;
};
}
}
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp
index 261ad56f..aa7df1e4 100644
--- a/pokemod/Nature.cpp
+++ b/pokemod/Nature.cpp
@@ -46,7 +46,6 @@ PokeGen::PokeMod::Nature::~Nature()
void PokeGen::PokeMod::Nature::Validate()
{
- isValid = true;
LogValidateStart("Nature", id, name);
if (name == "")
{
@@ -73,7 +72,6 @@ void PokeGen::PokeMod::Nature::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Nature::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Nature", id, name);
if (name == "")
{
@@ -124,7 +122,7 @@ void PokeGen::PokeMod::Nature::ExportIni(std::ofstream &fout) const
Ini exNature("nature");
exNature.AddField("name", name);
exNature.Export(fout);
- for (std::vector<NatureEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<NatureEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
i->ExportIni(fout, name);
LogExportOver("Nature", id, name);
}
@@ -141,7 +139,7 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Nature::GetName() const
return name;
}
-PokeGen::PokeMod::NatureEffect *PokeGen::PokeMod::Nature::GetNatureEffect(const unsigned _id)
+const PokeGen::PokeMod::NatureEffect *PokeGen::PokeMod::Nature::GetNatureEffect(const unsigned _id) const
{
LogSubmoduleFetch("Nature", id, "effect", _id, name);
for (unsigned i = 0; i < GetNatureEffectCount(); ++i)
@@ -178,7 +176,7 @@ void PokeGen::PokeMod::Nature::NewNatureEffect(Ini *const ini)
void PokeGen::PokeMod::Nature::DeleteNatureEffect(const unsigned _id)
{
LogSubmoduleRemoveStart("Nature", id, "effect", _id, name);
- for (std::vector<NatureEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<NatureEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
diff --git a/pokemod/Nature.h b/pokemod/Nature.h
index b066726c..eb544884 100644
--- a/pokemod/Nature.h
+++ b/pokemod/Nature.h
@@ -47,7 +47,7 @@ namespace PokeGen
String GetName() const;
- NatureEffect *GetNatureEffect(const unsigned _id);
+ const NatureEffect *GetNatureEffect(const unsigned _id) const;
unsigned GetNatureEffectCount() const;
void NewNatureEffect(Ini *const ini = NULL);
void DeleteNatureEffect(const unsigned _id);
diff --git a/pokemod/NatureEffect.cpp b/pokemod/NatureEffect.cpp
index 93e442f9..05b7a6cb 100644
--- a/pokemod/NatureEffect.cpp
+++ b/pokemod/NatureEffect.cpp
@@ -28,7 +28,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::NatureEffect::NatureEffect(const unsigned _id)
{
LogCtor("NatureEffect", _id);
- stat = 0;
+ stat = UINT_MAX;
multiplier.Set(1, 1);
id = _id;
}
@@ -46,16 +46,32 @@ PokeGen::PokeMod::NatureEffect::~NatureEffect()
LogDtor("NatureEffect", id);
}
+void PokeGen::PokeMod::NatureEffect::Validate()
+{
+ LogValidateStart("NatureEffect", id);
+ if ((curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY) <= stat)
+ {
+ LogVarNotValid("NatureEffect", id, "stat");
+ isValid = false;
+ }
+ multiplier.Reduce();
+ LogValidateOver("NatureEffect", id, isValid);
+}
+
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::NatureEffect::Validate(const wxListBox &output)
-#else
-void PokeGen::PokeMod::NatureEffect::Validate()
-#endif
{
LogValidateStart("NatureEffect", id);
- // TODO (Validation#1#): NatureEffect Validation
+ if ((curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY) <= stat)
+ {
+ LogVarNotValid("NatureEffect", id, "stat");
+ output.append(ConsoleLogVarNotValid("NatureEffect", id, "stat"));
+ isValid = false;
+ }
+ multipler.Reduce();
LogValidateOver("NatureEffect", id, isValid);
}
+#endif
void PokeGen::PokeMod::NatureEffect::ImportIni(Ini &ini, const unsigned _id)
{
@@ -72,7 +88,7 @@ void PokeGen::PokeMod::NatureEffect::ImportIni(Ini &ini, const unsigned _id)
id = _id;
unsigned i;
unsigned j;
- ini.GetValue("stat", stat, 0);
+ ini.GetValue("stat", stat);
ini.GetValue("multiplier-n", i, 1);
ini.GetValue("multiplier-d", j, 1);
multiplier.Set(i, j);
@@ -95,13 +111,13 @@ void PokeGen::PokeMod::NatureEffect::ExportIni(std::ofstream &fout, const String
void PokeGen::PokeMod::NatureEffect::SetStat(const unsigned s)
{
LogSetVar("NatureEffect", id, "stat", s);
- stat = s;
+ if (s < (curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY))
+ stat = s;
}
void PokeGen::PokeMod::NatureEffect::SetStat(const String &s)
{
- LogSetVar("NatureEffect", id, "stat string", s);
- stat = FindIn(curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY, s, curPokeMod.IsSpecialSplit() ? StatHPGSCStr : StatHPRBYStr);
+ SetStat(FindIn(curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY, s, curPokeMod.IsSpecialSplit() ? StatHPGSCStr : StatHPRBYStr));
}
void PokeGen::PokeMod::NatureEffect::SetMultiplier(const Frac &m)
@@ -137,7 +153,9 @@ unsigned PokeGen::PokeMod::NatureEffect::GetStat() const
PokeGen::PokeMod::String PokeGen::PokeMod::NatureEffect::GetStatString() const
{
LogFetchVar("NatureEffect", id, "stat string", stat);
- return (curPokeMod.IsSpecialSplit() ? StatHPGSCStr : StatHPRBYStr)[stat];
+ if (stat < (curPokeMod.IsSpecialSplit() ? STH_END_GSC : STH_END_RBY))
+ return (curPokeMod.IsSpecialSplit() ? StatHPGSCStr : StatHPRBYStr)[stat];
+ return "";
}
PokeGen::PokeMod::Frac PokeGen::PokeMod::NatureEffect::GetMultiplier() const
diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp
index 878aa52a..4799fd89 100644
--- a/pokemod/Pokemod.cpp
+++ b/pokemod/Pokemod.cpp
@@ -41,7 +41,9 @@ PokeGen::PokeMod::Pokemod::~Pokemod()
void PokeGen::PokeMod::Pokemod::Validate()
{
+ LogValidateStart("Pokemod", 0);
// TODO (Validation#1#): Pokemod Validation
+ LogValidateOver("Pokemod", 0, isValid);
}
#ifdef PG_DEBUG_WINDOW
diff --git a/pokemod/Pokemod.h b/pokemod/Pokemod.h
index 34870c4b..9ac9334b 100644
--- a/pokemod/Pokemod.h
+++ b/pokemod/Pokemod.h
@@ -32,11 +32,17 @@
#include "Author.h"
#include "Badge.h"
#include "CoinList.h"
+#include "Dialog.h"
+#include "EggGroup.h"
#include "Item.h"
#include "ItemStorage.h"
-#include "Nature.h"
+//#include "Map.h"
#include "Move.h"
+#include "Nature.h"
+//#include "Pokemon.h"
+//#include "Status.h"
#include "Store.h"
+//#include "Tile.h"
#include "Time.h"
#include "Type.h"
@@ -58,95 +64,122 @@ namespace PokeGen
bool IsSpecialDVSplit() const;
unsigned GetMaxLevel() const;
- Ability *GetAbility(const unsigned _id);
- Ability *GetAbility(const String &n);
+ const Ability *GetAbility(const unsigned _id) const;
+ const Ability *GetAbility(const String &n) const;
unsigned GetAbilityCount() const;
void NewAbility(Ini *const ini = NULL);
void DeleteAbility(const unsigned _id);
+ void DeleteAbility(const String &n);
- Author *GetAuthor(const unsigned _id);
- Author *GetAuthor(const String &n);
+ const Author *GetAuthor(const unsigned _id) const;
+ const Author *GetAuthor(const String &n) const;
unsigned GetAuthorCount() const;
void NewAuthor(Ini *const ini = NULL);
void DeleteAuthor(const unsigned _id);
+ void DeleteAuthor(const String &n);
- Badge *GetBadge(const unsigned _id);
- Badge *GetBadge(const String &n);
+ const Badge *GetBadge(const unsigned _id) const;
+ const Badge *GetBadge(const String &n) const;
unsigned GetBadgeCount() const;
void NewBadge(Ini *const ini = NULL);
void DeleteBadge(const unsigned _id);
+ void DeleteBadge(const String &n);
- CoinList *GetCoinList(const unsigned _id);
- CoinList *GetCoinList(const String &n);
+ const CoinList *GetCoinList(const unsigned _id) const;
+ const CoinList *GetCoinList(const String &n) const;
unsigned GetCoinListCount() const;
void NewCoinList(Ini *const ini = NULL);
void DeleteCoinList(const unsigned _id);
+ void DeleteCoinList(const String &n);
- EggGroup *GetEggGroup(const unsigned _id);
- EggGroup *GetEggGroup(const String &n);
+ const Dialog *GetDialog(const unsigned _id) const;
+ unsigned GetDialogCount() const;
+ void NewDialog(Ini *const ini = NULL);
+ void DeleteDialog(const unsigned _id);
+
+ const EggGroup *GetEggGroup(const unsigned _id) const;
+ const EggGroup *GetEggGroup(const String &n) const;
unsigned GetEggGroupCount() const;
void NewEggGroup(Ini *const ini = NULL);
void DeleteEggGroup(const unsigned _id);
+ void DeleteEggGroup(const String &n);
- Item *GetItem(const unsigned _id);
- Item *GetItem(const String &n);
+ const Item *GetItem(const unsigned _id) const;
+ const Item *GetItem(const String &n) const;
unsigned GetItemCount() const;
void NewItem(Ini *const ini = NULL);
void DeleteItem(const unsigned _id);
+ void DeleteItem(const String &n);
- ItemStorage *GetItemStorage(const unsigned _id);
- ItemStorage *GetItemStorage(const String &n);
+ const ItemStorage *GetItemStorage(const unsigned _id) const;
+ const ItemStorage *GetItemStorage(const String &n) const;
unsigned GetItemStorageCount() const;
void NewItemStorage(Ini *const ini = NULL);
void DeleteItemStorage(const unsigned _id);
+ void DeleteItemStorage(const String &n);
- Map *GetMap(const unsigned _id);
- Map *GetMap(const String &n);
+ const Map *GetMap(const unsigned _id) const;
+ const Map *GetMap(const String &n) const;
unsigned GetMapCount() const;
void NewMap(Ini *const ini = NULL);
void DeleteMap(const unsigned _id);
+ void DeleteMap(const String &n);
- Move *GetMove(const unsigned _id);
- Move *GetMove(const String &n);
+ const Move *GetMove(const unsigned _id) const;
+ const Move *GetMove(const String &n) const;
unsigned GetMoveCount() const;
void NewMove(Ini *const ini = NULL);
void DeleteMove(const unsigned _id);
+ void DeleteMove(const String &n);
- Nature *GetNature(const unsigned _id);
- Nature *GetNature(const String &n);
+ const Nature *GetNature(const unsigned _id) const;
+ const Nature *GetNature(const String &n) const;
unsigned GetNatureCount() const;
void NewNature(Ini *const ini = NULL);
void DeleteNature(const unsigned _id);
+ void DeleteNature(const String &n);
- Pokemon *GetPokemon(const unsigned _id);
- Pokemon *GetPokemon(const String &n);
+ const Pokemon *GetPokemon(const unsigned _id) const;
+ const Pokemon *GetPokemon(const String &n) const;
unsigned GetPokemonCount() const;
void NewPokemon(Ini *const ini = NULL);
void DeletePokemon(const unsigned _id);
+ void DeletePokemon(const String &n);
- Status *GetStatus(const unsigned _id);
- Status *GetStatus(const String &n);
+ const Status *GetStatus(const unsigned _id) const;
+ const Status *GetStatus(const String &n) const;
unsigned GetStatusCount() const;
void NewStatus(Ini *const ini = NULL);
void DeleteStatus(const unsigned _id);
+ void DeleteStatus(const String &n);
- Store *GetStore(const unsigned _id);
- Store *GetStore(const String &n);
+ const Store *GetStore(const unsigned _id) const;
+ const Store *GetStore(const String &n) const;
unsigned GetStoreCount() const;
void NewStore(Ini *const ini = NULL);
void DeleteStore(const unsigned _id);
+ void DeleteStore(const String &n);
+
+ const Tile *GetTile(const unsigned _id) const;
+ const Tile *GetTile(const String &n) const;
+ unsigned GetTileCount() const;
+ void NewTile(Ini *const ini = NULL);
+ void DeleteTile(const unsigned _id);
+ void DeleteTile(const String &n);
- Time *GetTime(const unsigned _id);
- Time *GetTime(const String &n);
+ const Time *GetTime(const unsigned _id) const;
+ const Time *GetTime(const String &n) const;
unsigned GetTimeCount() const;
void NewTime(Ini *const ini = NULL);
void DeleteTime(const unsigned _id);
+ void DeleteTime(const String &n);
- Type *GetType(const unsigned _id);
- Type *GetType(const String &n);
+ const Type *GetType(const unsigned _id) const;
+ const Type *GetType(const String &n) const;
unsigned GetTypeCount() const;
void NewType(Ini *const ini = NULL);
void DeleteType(const unsigned _id);
+ void DeleteType(const String &n);
private:
void Validate();
# ifdef POKEMODR
@@ -161,6 +194,7 @@ namespace PokeGen
std::vector<Author> authors;
std::vector<Badge> badges;
std::vector<CoinList> coinLists;
+ std::vector<Dialog> dialogs;
std::vector<EggGroup> eggGroups;
std::vector<Item> items;
std::vector<ItemStorage> itemStorage;
@@ -170,6 +204,7 @@ namespace PokeGen
std::vector<Pokemon> pokemon;
std::vector<Status> statuses;
std::vector<Store> stores;
+ std::vector<Tile> tiles;
std::vector<Time> times;
std::vector<Type> types;
};
diff --git a/pokemod/PokemonAbility.cpp b/pokemod/PokemonAbility.cpp
index 1fbd75c9..0189da63 100644
--- a/pokemod/PokemonAbility.cpp
+++ b/pokemod/PokemonAbility.cpp
@@ -28,7 +28,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::PokemonAbility::PokemonAbility(const unsigned _id)
{
LogCtor("PokemonAbility", _id);
- ability = -1;
+ ability = UINT_MAX;
weight = 1;
id = _id;
}
@@ -48,7 +48,6 @@ PokeGen::PokeMod::PokemonAbility::~PokemonAbility()
void PokeGen::PokeMod::PokemonAbility::Validate()
{
- isValid = true;
LogValidateStart("PokemonAbility", id);
if (!curPokeMod.GetAbility(ability))
{
@@ -66,7 +65,6 @@ void PokeGen::PokeMod::PokemonAbility::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::PokemonAbility::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("PokemonAbility", id);
if (!curPokeMod.GetAbility(ability))
{
@@ -96,7 +94,7 @@ void PokeGen::PokeMod::PokemonAbility::ImportIni(Ini &ini, const unsigned _id)
}
else
id = _id;
- ini.GetValue("ability", ability, -1);
+ ini.GetValue("ability", ability);
ini.GetValue("weight", weight, 1);
LogImportOver("PokemonAbility", id);
}
@@ -113,10 +111,11 @@ void PokeGen::PokeMod::PokemonAbility::ExportIni(std::ofstream &fout, const Stri
LogExportOver("PokemonAbility", id);
}
-void PokeGen::PokeMod::PokemonAbility::SetAbility(const int a)
+void PokeGen::PokeMod::PokemonAbility::SetAbility(const unsigned a)
{
LogSetVar("PokemonAbility", id, "ability", a);
- ability = a;
+ if (curPokeMod.GetAbility(a))
+ ability = a;
}
void PokeGen::PokeMod::PokemonAbility::SetAbility(const String &a)
@@ -133,7 +132,7 @@ void PokeGen::PokeMod::PokemonAbility::SetWeight(const unsigned w)
weight = w;
}
-int PokeGen::PokeMod::PokemonAbility::GetAbility() const
+unsigned PokeGen::PokeMod::PokemonAbility::GetAbility() const
{
LogFetchVar("PokemonAbility", id, "ability", ability);
return ability;
diff --git a/pokemod/PokemonAbility.h b/pokemod/PokemonAbility.h
index 4ae864cf..9d213ce8 100644
--- a/pokemod/PokemonAbility.h
+++ b/pokemod/PokemonAbility.h
@@ -42,11 +42,11 @@ namespace PokeGen
void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
void ExportIni(std::ofstream &fout, const String &pokemon) const;
- void SetAbility(const int a);
+ void SetAbility(const unsigned a);
void SetAbility(const String &a);
void SetWeight(const unsigned w);
- int GetAbility() const;
+ unsigned GetAbility() const;
String GetAbilityString() const;
unsigned GetWeight() const;
private:
@@ -55,7 +55,7 @@ namespace PokeGen
void Validate(const wxListBox &output);
# endif
- int ability;
+ unsigned ability;
unsigned weight;
};
}
diff --git a/pokemod/PokemonEvolution.cpp b/pokemod/PokemonEvolution.cpp
index b79984e1..26a40fdc 100644
--- a/pokemod/PokemonEvolution.cpp
+++ b/pokemod/PokemonEvolution.cpp
@@ -28,10 +28,10 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::PokemonEvolution::PokemonEvolution(const unsigned _id)
{
LogCtor("PokemonEvolution", _id);
- species = -1;
- style = 0;
+ species = UINT_MAX;
+ style = UINT_MAX;
level = 0;
- item = -1;
+ item = UINT_MAX;
happiness = 0;
id = _id;
}
@@ -51,7 +51,6 @@ PokeGen::PokeMod::PokemonEvolution::~PokemonEvolution()
void PokeGen::PokeMod::PokemonEvolution::Validate()
{
- isValid = true;
LogValidateStart("PokemonEvolution", id);
if (!curPokeMod.GetPokemon(species))
{
@@ -79,7 +78,6 @@ void PokeGen::PokeMod::PokemonEvolution::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::PokemonEvolution::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("PokemonEvolution", id);
if (!curPokeMod.GetPokemon(species))
{
@@ -121,10 +119,10 @@ void PokeGen::PokeMod::PokemonEvolution::ImportIni(Ini &ini, const unsigned _id)
}
else
id = _id;
- ini.GetValue("species", species, -1);
- ini.GetValue("style", style, 0);
+ ini.GetValue("species", species);
+ ini.GetValue("style", style);
ini.GetValue("level", level, 0);
- ini.GetValue("item", item, -1);
+ ini.GetValue("item", item);
ini.GetValue("happiness", happiness, 0);
LogImportOver("PokemonEvolution", id);
}
@@ -144,10 +142,11 @@ void PokeGen::PokeMod::PokemonEvolution::ExportIni(std::ofstream &fout, const St
LogExportOver("PokemonEvolution", id);
}
-void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const int s)
+void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const unsigned s)
{
LogSetVar("PokemonEvolution", id, "species", s);
- species = s;
+ if (curPokeMod.GetPokemon(s))
+ species = s;
}
void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const String &s)
@@ -157,22 +156,25 @@ void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const String &s)
species = temp->GetId();
}
-void PokeGen::PokeMod::PokemonEvolution::SetStyle(const int s)
+void PokeGen::PokeMod::PokemonEvolution::SetStyle(const unsigned s)
{
LogSetVar("PokemonEvolution", id, "style", s);
- style = s;
+ if (s < STY_END)
+ style = s;
}
void PokeGen::PokeMod::PokemonEvolution::SetLevel(const unsigned l)
{
LogSetVar("PokemonEvolution", id, "level", l);
- level = l;
+ if (l <= curPokeMod.GetMaxLevel())
+ level = l;
}
-void PokeGen::PokeMod::PokemonEvolution::SetItem(const int i)
+void PokeGen::PokeMod::PokemonEvolution::SetItem(const unsigned i)
{
LogSetVar("PokemonEvolution", id, "item", i);
- item = i;
+ if (curPokeMod.GetItem(i))
+ item = i;
}
void PokeGen::PokeMod::PokemonEvolution::SetItem(const String &i)
@@ -188,7 +190,7 @@ void PokeGen::PokeMod::PokemonEvolution::SetHappiness(const unsigned h)
happiness = h;
}
-int PokeGen::PokeMod::PokemonEvolution::GetSpecies() const
+unsigned PokeGen::PokeMod::PokemonEvolution::GetSpecies() const
{
LogFetchVar("PokemonEvolution", id, "species", species);
return species;
@@ -202,19 +204,27 @@ PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetSpeciesString()
return "";
}
-int PokeGen::PokeMod::PokemonEvolution::GetStyle() const
+unsigned PokeGen::PokeMod::PokemonEvolution::GetStyle() const
{
LogFetchVar("PokemonEvolution", id, "style", style);
return style;
}
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetStyleString() const
+{
+ LogFetchVar("PokemonEvolution", id, "style string", style);
+ if (style < STY_END)
+ return StyleStr[style];
+ return "";
+}
+
unsigned PokeGen::PokeMod::PokemonEvolution::GetLevel() const
{
LogFetchVar("PokemonEvolution", id, "level", level);
return level;
}
-int PokeGen::PokeMod::PokemonEvolution::GetItem() const
+unsigned PokeGen::PokeMod::PokemonEvolution::GetItem() const
{
LogFetchVar("PokemonEvolution", id, "item", item);
return item;
diff --git a/pokemod/PokemonEvolution.h b/pokemod/PokemonEvolution.h
index a249f3cc..00fe51b9 100644
--- a/pokemod/PokemonEvolution.h
+++ b/pokemod/PokemonEvolution.h
@@ -42,19 +42,21 @@ namespace PokeGen
void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
void ExportIni(std::ofstream &fout, const String &pokemon) const;
- void SetSpecies(const int s);
+ void SetSpecies(const unsigned s);
void SetSpecies(const String &s);
- void SetStyle(const int s);
+ void SetStyle(const unsigned s);
+ void SetStyle(const String &s);
void SetLevel(const unsigned l);
- void SetItem(const int i);
+ void SetItem(const unsigned i);
void SetItem(const String &i);
void SetHappiness(const unsigned h);
- int GetSpecies() const;
+ unsigned GetSpecies() const;
String GetSpeciesString() const;
- int GetStyle() const;
+ unsigned GetStyle() const;
+ String GetStyleString() const;
unsigned GetLevel() const;
- int GetItem() const;
+ unsigned GetItem() const;
String GetItemString() const;
unsigned GetHappiness() const;
private:
@@ -63,10 +65,10 @@ namespace PokeGen
void Validate(const wxListBox &output);
# endif
- int species;
- int style;
+ unsigned species;
+ unsigned style;
unsigned level;
- int item;
+ unsigned item;
unsigned happiness;
};
}
diff --git a/pokemod/PokemonItem.cpp b/pokemod/PokemonItem.cpp
index 1e18b6ca..f84a3b52 100644
--- a/pokemod/PokemonItem.cpp
+++ b/pokemod/PokemonItem.cpp
@@ -28,7 +28,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::PokemonItem::PokemonItem(const unsigned _id)
{
LogCtor("PokemonItem", _id);
- item = -1;
+ item = UINT_MAX;
weight = 1;
id = _id;
}
@@ -48,7 +48,6 @@ PokeGen::PokeMod::PokemonItem::~PokemonItem()
void PokeGen::PokeMod::PokemonItem::Validate()
{
- isValid = true;
LogValidateStart("PokemonItem Validation: Starting", PM_DEBUG_INFO);
if (!curPokeMod.GetItem(item))
{
@@ -66,7 +65,6 @@ void PokeGen::PokeMod::PokemonItem::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::PokemonItem::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("PokemonItem Validation: Starting", PM_DEBUG_INFO);
if (!curPokeMod.GetItem(item))
{
@@ -96,7 +94,7 @@ void PokeGen::PokeMod::PokemonItem::ImportIni(Ini &ini, const unsigned _id)
}
else
id = _id;
- ini.GetValue("item", item, -1);
+ ini.GetValue("item", item);
ini.GetValue("weight", weight, 1);
LogImportOver("PokemonItem", id);
}
@@ -113,15 +111,11 @@ void PokeGen::PokeMod::PokemonItem::ExportIni(std::ofstream &fout, const String
LogExportOver("PokemonItem", id);
}
-void PokeGen::PokeMod::PokemonItem::SetItem(const int i)
+void PokeGen::PokeMod::PokemonItem::SetItem(const unsigned i)
{
+ LogSetVar("PokemonItem", id, "item", curPokeMod.GetItem(i)->GetName());
if (curPokeMod.GetItem(i))
- {
- LogSetVar("PokemonItem", id, "item", curPokeMod.GetItem(i)->GetName());
item = i;
- }
- else
- LogOutOfRange("PokemonItem", id, "item", i, "");
}
void PokeGen::PokeMod::PokemonItem::SetItem(const String &i)
@@ -138,7 +132,7 @@ void PokeGen::PokeMod::PokemonItem::SetWeight(const unsigned w)
weight = w;
}
-int PokeGen::PokeMod::PokemonItem::GetItem() const
+unsigned PokeGen::PokeMod::PokemonItem::GetItem() const
{
LogFetchVar("PokemonItem", id, "item", item);
return item;
diff --git a/pokemod/PokemonItem.h b/pokemod/PokemonItem.h
index 2c884aec..d68daaa8 100644
--- a/pokemod/PokemonItem.h
+++ b/pokemod/PokemonItem.h
@@ -42,11 +42,11 @@ namespace PokeGen
void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
void ExportIni(std::ofstream &fout, const String &pokemon) const;
- void SetItem(const int i);
+ void SetItem(const unsigned i);
void SetItem(const String &i);
void SetWeight(const unsigned w);
- int GetItem() const;
+ unsigned GetItem() const;
String GetItemString() const;
unsigned GetWeight() const;
private:
@@ -55,7 +55,7 @@ namespace PokeGen
void Validate(const wxListBox &output);
# endif
- int item;
+ unsigned item;
unsigned weight;
};
}
diff --git a/pokemod/PokemonMove.cpp b/pokemod/PokemonMove.cpp
index 848fc116..a211139c 100644
--- a/pokemod/PokemonMove.cpp
+++ b/pokemod/PokemonMove.cpp
@@ -28,7 +28,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::PokemonMove::PokemonMove(const unsigned _id)
{
LogCtor("PokemonMove", _id);
- move = -1;
+ move = UINT_MAX;
level = 0;
wild = 0;
id = _id;
@@ -49,19 +49,18 @@ PokeGen::PokeMod::PokemonMove::~PokemonMove()
void PokeGen::PokeMod::PokemonMove::Validate()
{
- isValid = true;
LogValidateStart("PokemonMove", id, GetMoveString());
if (!curPokeMod.GetMove(move))
{
LogVarNotValid("PokemonMove", id, "move");
isValid = false;
}
- if (curPokeMod.GetMaxLevel() <= level)
+ if (level < curPokeMod.GetMaxLevel())
{
LogVarNotValid("PokemonMove", id, "level", GetMoveString());
isValid = false;
}
- if (curPokeMod.GetMaxLevel() <= wild)
+ if (wild < curPokeMod.GetMaxLevel())
{
LogVarNotValid("PokemonMove", id, "wild", GetMoveString());
isValid = false;
@@ -72,7 +71,6 @@ void PokeGen::PokeMod::PokemonMove::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::PokemonMove::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("PokemonMove", id, GetMoveString());
if (!curPokeMod.GetMove(move))
{
@@ -80,13 +78,13 @@ void PokeGen::PokeMod::PokemonMove::Validate(const wxListBox &output)
output.Append(ConsoleLogVarNotValid("PokemonMove", id, "move"));
isValid = false;
}
- if (curPokeMod.GetMaxLevel() <= level)
+ if (level < curPokeMod.GetMaxLevel())
{
LogVarNotValid("PokemonMove", id, "level", GetMoveString());
output.Append(ConsoleLogVarNotValid("PokemonMove", id, "level", GetMoveString()));
isValid = false;
}
- if (curPokeMod.GetMaxLevel() <= wild)
+ if (wild < curPokeMod.GetMaxLevel())
{
LogVarNotValid("PokemonMove", id, "wild", GetMoveString());
output.Append(ConsoleLogVarNotValid("PokemonMove", id, "wild", GetMoveString()));
@@ -108,7 +106,7 @@ void PokeGen::PokeMod::PokemonMove::ImportIni(Ini &ini, const unsigned _id)
}
else
id = _id;
- ini.GetValue("move", move, -1);
+ ini.GetValue("move", move);
ini.GetValue("level", level, 0);
ini.GetValue("wild", wild, 0);
LogImportOver("PokemonMove", id);
@@ -127,10 +125,11 @@ void PokeGen::PokeMod::PokemonMove::ExportIni(std::ofstream &fout, const String
LogExportOver("PokemonMove", id);
}
-void PokeGen::PokeMod::PokemonMove::SetMove(const int m)
+void PokeGen::PokeMod::PokemonMove::SetMove(const unsigned m)
{
LogSetVar("PokemonMove", id, "move", m);
- move = m;
+ if (curPokeMod.GetMove(m))
+ move = m;
}
void PokeGen::PokeMod::PokemonMove::SetMove(const String &m)
@@ -143,16 +142,18 @@ void PokeGen::PokeMod::PokemonMove::SetMove(const String &m)
void PokeGen::PokeMod::PokemonMove::SetLevel(const unsigned l)
{
LogSetVar("PokemonMove", id, "level", l, GetMoveString());
- level = l;
+ if (l < curPokeMod.GetMaxLevel())
+ level = l;
}
void PokeGen::PokeMod::PokemonMove::SetWild(const unsigned w)
{
LogSetVar("PokemonMove", id, "wild", w, GetMoveString());
- wild = w;
+ if (w < curPokeMod.GetMaxLevel())
+ wild = w;
}
-int PokeGen::PokeMod::PokemonMove::GetMove() const
+unsigned PokeGen::PokeMod::PokemonMove::GetMove() const
{
LogFetchVar("PokemonMove", id, "move", move);
return move;
diff --git a/pokemod/PokemonMove.h b/pokemod/PokemonMove.h
index 3c7cda9a..d5501213 100644
--- a/pokemod/PokemonMove.h
+++ b/pokemod/PokemonMove.h
@@ -42,12 +42,12 @@ namespace PokeGen
void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
void ExportIni(std::ofstream &fout, const String &pokemon) const;
- void SetMove(const int m);
+ void SetMove(const unsigned m);
void SetMove(const String &m);
void SetLevel(const unsigned l);
void SetWild(const unsigned w);
- int GetMove() const;
+ unsigned GetMove() const;
String GetMoveString() const;
unsigned GetLevel() const;
unsigned GetWild() const;
@@ -57,7 +57,7 @@ namespace PokeGen
void Validate(const wxListBox &output);
# endif
- int move;
+ unsigned move;
unsigned level;
unsigned wild;
};
diff --git a/pokemod/PokemonNature.cpp b/pokemod/PokemonNature.cpp
index 2e5c6543..4987ee01 100644
--- a/pokemod/PokemonNature.cpp
+++ b/pokemod/PokemonNature.cpp
@@ -28,7 +28,7 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::PokemonNature::PokemonNature(const unsigned _id)
{
LogCtor("PokemonNature", _id);
- nature = -1;
+ nature = UINT_MAX;
weight = 1;
id = _id;
}
@@ -48,7 +48,6 @@ PokeGen::PokeMod::PokemonNature::~PokemonNature()
void PokeGen::PokeMod::PokemonNature::Validate()
{
- isValid = true;
LogValidateStart("PokemonNature", id);
if (!curPokeMod.GetNature(nature))
{
@@ -66,7 +65,6 @@ void PokeGen::PokeMod::PokemonNature::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::PokemonNature::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("PokemonNature", id);
if (!curPokeMod.GetNature(nature))
{
@@ -96,7 +94,7 @@ void PokeGen::PokeMod::PokemonNature::ImportIni(Ini &ini, const unsigned _id)
}
else
id = _id;
- ini.GetValue("nature", nature, -1);
+ ini.GetValue("nature", nature);
ini.GetValue("weight", weight, 1);
LogImportOver("PokemonNature", id);
}
@@ -113,10 +111,11 @@ void PokeGen::PokeMod::PokemonNature::ExportIni(std::ofstream &fout, const Strin
LogExportOver("PokemonNature", id);
}
-void PokeGen::PokeMod::PokemonNature::SetNature(const int n)
+void PokeGen::PokeMod::PokemonNature::SetNature(const unsigned n)
{
LogSetVar("PokemonNature", id, "nature", n);
- nature = n;
+ if (curPokeMod.GetNature(n))
+ nature = n;
}
void PokeGen::PokeMod::PokemonNature::SetNature(const String &n)
@@ -133,7 +132,7 @@ void PokeGen::PokeMod::PokemonNature::SetWeight(const unsigned w)
weight = w;
}
-int PokeGen::PokeMod::PokemonNature::GetNature() const
+unsigned PokeGen::PokeMod::PokemonNature::GetNature() const
{
LogFetchVar("PokemonNature", id, "nature", nature);
return nature;
diff --git a/pokemod/PokemonNature.h b/pokemod/PokemonNature.h
index d7724be6..36c7ec2a 100644
--- a/pokemod/PokemonNature.h
+++ b/pokemod/PokemonNature.h
@@ -42,11 +42,11 @@ namespace PokeGen
void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
void ExportIni(std::ofstream &fout, const String &pokemon) const;
- void SetNature(const int n);
+ void SetNature(const unsigned n);
void SetNature(const String &n);
void SetWeight(const unsigned w);
- int GetNature() const;
+ unsigned GetNature() const;
String GetNatureString() const;
unsigned GetWeight() const;
private:
@@ -55,7 +55,7 @@ namespace PokeGen
void Validate(const wxListBox &output);
# endif
- int nature;
+ unsigned nature;
unsigned weight;
};
}
diff --git a/pokemod/Ref.h b/pokemod/Ref.h
index 3efe5aad..6deffe36 100644
--- a/pokemod/Ref.h
+++ b/pokemod/Ref.h
@@ -37,7 +37,6 @@ namespace PokeGen
enum EnumAbilityEffect
{
- AE_NONE = -1,
AE_DMG_TO_HP = 0,
AE_PRV_DMG = 1,
AE_AUTO_HEAL = 2,
@@ -58,7 +57,6 @@ namespace PokeGen
enum EnumAbilityTrigger
{
- AT_NONE = -1,
AT_ANYTHING = 0,
AT_CONTACT = 1,
AT_WEATHER = 2,
@@ -73,7 +71,6 @@ namespace PokeGen
enum EnumStat
{
- ST_NONE = -1,
ST_ATTACK = 0,
ST_DEFENSE = 1,
ST_SPEED = 2,
@@ -88,7 +85,6 @@ namespace PokeGen
enum EnumStatHP
{
- STH_NONE = -1,
STH_HP = 0,
STH_ATTACK = 1,
STH_DEFENSE = 2,
@@ -104,7 +100,6 @@ namespace PokeGen
enum EnumBattleStat
{
- BST_NONE = -1,
BST_ATTACK = 0,
BST_DEFENSE = 1,
BST_SPEED = 2,
@@ -120,7 +115,6 @@ namespace PokeGen
enum EnumBattleStatHP
{
- BSTH_NONE = -1,
BSTH_HP = 0,
BSTH_ATTACK = 1,
BSTH_DEFENSE = 2,
@@ -137,7 +131,6 @@ namespace PokeGen
enum EnumBattleMember
{
- BM_NONE = -1,
BM_PLAYER = 0,
BM_ENEMY = 1,
BM_END = 2
@@ -146,7 +139,6 @@ namespace PokeGen
enum EnumStatus
{
- STS_NONE = -1,
STS_FREEZE = 0,
STS_PARALYZE = 1,
STS_SLEEP = 2,
@@ -167,7 +159,6 @@ namespace PokeGen
enum EnumCause
{
- CA_NONE = -1,
CA_PREVENT = 0,
CA_INFLICT = 1,
CA_END = 2
@@ -176,7 +167,6 @@ namespace PokeGen
enum EnumAbilityInteract
{
- ABI_NONE = -1,
ABI_TRADE = 0,
ABI_SHADOW = 1,
ABI_BLOCK = 2,
@@ -186,7 +176,6 @@ namespace PokeGen
enum EnumPowerAcc
{
- PA_NONE = -1,
PA_POWER = 0,
PA_ACC = 1,
PA_END = 2
@@ -195,7 +184,6 @@ namespace PokeGen
enum EnumAbilityItem
{
- ABIT_NONE = -1,
ABIT_STAT = 0,
ABIT_TYPE_BOOST = 1,
ABIT_FLINCH = 2,
@@ -206,7 +194,6 @@ namespace PokeGen
enum EnumWeather
{
- W_NONE = -1,
W_ICE = 0,
W_RAIN = 1,
W_SUN = 2,
@@ -219,7 +206,6 @@ namespace PokeGen
enum EnumBoost
{
- BO_NONE = -1,
BO_BOOST = 0,
BO_HINDER = 1,
BO_END = 2
@@ -228,7 +214,6 @@ namespace PokeGen
enum EnumSide
{
- SI_NONE = -1,
SI_ABOVE = 0,
SI_BELOW = 1,
SI_END = 2
@@ -237,7 +222,6 @@ namespace PokeGen
enum EnumHMMove
{
- HM_NONE = -1,
HM_CUT = 0,
HM_FLY = 1,
HM_SURF = 2,
@@ -254,7 +238,6 @@ namespace PokeGen
enum EnumStatVersion
{
- STV_NONE = -1,
STV_RBY = 0,
STV_GSC = 1,
STV_END = 2
@@ -262,7 +245,6 @@ namespace PokeGen
enum EnumFlagValue
{
- FV_NONE = -1,
FV_SET = 0,
FV_UNSET = 1,
FV_IGNORE = 2,
@@ -273,7 +255,6 @@ namespace PokeGen
enum EnumCoinItemType
{
- CIT_NONE = -1,
CIT_ITEM = 0,
CIT_POKEMON = 1,
CIT_END = 2
@@ -282,7 +263,6 @@ namespace PokeGen
enum EnumItemEffect
{
- IE_NONE = -1,
IE_HP_CURE = 0,
IE_REVIVE = 1,
IE_CURE_STATUS = 2,
@@ -318,7 +298,6 @@ namespace PokeGen
enum EnumRelative
{
- REL_NONE = -1,
REL_ABSOLUTE = 0,
REL_RELATIVE = 1,
REL_END = 2
@@ -327,7 +306,6 @@ namespace PokeGen
enum EnumEscape
{
- ESC_NONE = -1,
ESC_ANYWHERE = 0,
ESC_DUNGEON = 1,
ESC_END = 2
@@ -336,7 +314,6 @@ namespace PokeGen
enum EnumRepel
{
- REP_NONE = -1,
REP_FIRST = 0,
REP_MAX = 1,
REP_ALL = 2,
@@ -346,7 +323,6 @@ namespace PokeGen
enum EnumAmount
{
- AMT_NONE = -1,
AMT_ALL = 0,
AMT_ONE = 1,
AMT_END = 2
@@ -356,7 +332,6 @@ namespace PokeGen
// TODO (Ben#1#): More BallType(?)
enum EnumBallType
{
- BLT_NONE = -1,
BLT_REGULAR = 0,
BLT_MASTER = 1,
BLT_LEVEL = 2,
@@ -373,14 +348,73 @@ namespace PokeGen
// TODO (Ben#1#): More BerryType(?)
enum EnumBerryType
{
- BRT_NONE = -1,
BRT_HP_CURE = 0,
BRT_STATUS_CURE = 1,
BRT_END = 2
};
const char *BerryTypeStr[BRT_END] = {"HP Cure", "Status Cure"};
- // PMenum
+ enum EnumStyle
+ {
+ STY_FLUCTUATING = 0,
+ STY_FADING = 1,
+ STY_SLOW = 2,
+ STY_NORMAL = 3,
+ STY_FAST = 5,
+ STY_ERRATIC = 6,
+ STY_END = 7
+ };
+ const char *StyleStr[STY_END]={"Fluctuating","Fading","Slow","Normal","Fast","Erratic"};
+
+ enum EnumContestType
+ {
+ COTY_COOLNESS = 0,
+ COTY_BEAUTY = 1,
+ COTY_CUTENESS= 2,
+ COTY_SMARTNESS = 3,
+ COTY_TOUGHNESS = 4,
+ COTY_END = 5
+ };
+ const char *ContestTypeStr[COTY_END]={"Coolness","Beauty","Cuteness","Smartness","Toughness"};
+
+ enum EnumTarget
+ {
+ TAR_PLAYER = 0,
+ TAR_ENENMY = 1,
+ TAR_BOTH = 2,
+ TAR_RANDOM = 3,
+ TAR_END = 4
+ };
+ const char *TargetStr[TAR_END]={"Player","Enemy","Both","Random"};
+
+ enum EnumMapType
+ {
+ MTY_OUTDOOR = 0,
+ MTY_DUNGEON = 1,
+ MTY_BUILDING = 2,
+ MTY_END = 3
+ };
+ const char *MapTypeStr[MTY_END]={"Outdoor","Dungeon","Building"};
+
+ enum EnumControl
+ {
+ CTRL_GRASS = 0,
+ CTRL_SURFING = 1,
+ CTRL_FISHING = 2,
+ CTRL_DIVE = 3,
+ CTRL_HEADBUTT = 4,
+ CTRL_ROCK_SMASH = 5,
+ CTRL_END = 6
+ };
+ const char *ControlStr[CTRL_END]={"Grass","Surfing","Fishing","Dive","Headbutt","Rock Smash"};
+
+ enum EnumChoice
+ {
+ CHC_PLAYER = 0,
+ CHC_RANDOM = 1,
+ CHC_END = 2
+ };
+ const char *ChoiceStr[CHC_END]={"Player","Random"};
}
}
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp
index 514e6459..7f5936c2 100644
--- a/pokemod/Store.cpp
+++ b/pokemod/Store.cpp
@@ -48,7 +48,6 @@ PokeGen::PokeMod::Store::~Store()
void PokeGen::PokeMod::Store::Validate()
{
- isValid = true;
LogValidateStart("Store", id, name);
if (name == "")
{
@@ -69,7 +68,6 @@ void PokeGen::PokeMod::Store::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Store::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Store", id, name);
if (name == "")
{
@@ -142,21 +140,19 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Store::GetName()
return name;
}
-int PokeGen::PokeMod::Store::GetItem(const unsigned i) const
+unsigned PokeGen::PokeMod::Store::GetItem(const unsigned i) const
{
LogSubmoduleFetch("Store", id, "item", i, name);
- if (GetItemCount() <= i)
- {
- LogSubmoduleFetchFail("Store", id, "item", i, name);
- return -1;
- }
- return items[i];
+ if (i < GetItemCount() <= i)
+ return items[i];
+ LogSubmoduleFetchFail("Store", id, "item", i, name);
+ return UINT_MAX;
}
bool PokeGen::PokeMod::Store::HasItem(const unsigned _id) const
{
LogSubmoduleFetch("Store", id, "item", _id, name);
- return (GetItem(_id) != -1);
+ return (GetItem(_id) != UINT_MAX);
}
bool PokeGen::PokeMod::Store::HasItem(const String &n) const
@@ -179,17 +175,34 @@ unsigned PokeGen::PokeMod::Store::GetItemCount() const
void PokeGen::PokeMod::Store::NewItem(const unsigned i)
{
- LogSubmoduleNew("Store", id, "item", items.size());
- items.push_back(i);
+ LogSubmoduleNew("Store", id, "item", i);
+ if (curPokeMod.GetItem(i))
+ items.push_back(i);
+}
+
+void PokeGen::PokeMod::Store::NewItem(const String &i)
+{
+ LogSubmoduleNew("Store", id, "item", i);
+ if (Item *temp = curPokeMod.GetItem(i))
+ items.push_back(temp->GetId());
}
void PokeGen::PokeMod::Store::DeleteItem(const unsigned i)
{
LogSubmoduleRemoveStart("Store", id, "item", i, name);
- if (GetItemCount() <= i)
+ if (i < GetItemCount())
+ DeleteItemByID(items[i]);
+ else
LogSubmoduleRemoveFail("Store", id, "item", i, name);
+}
+
+void PokeGen::PokeMod::Store::DeleteItem(const String &n)
+{
+ LogSubmoduleRemoveStart("Store", id, "item", n, name);
+ if (Item *i = curPokeMod.GetItem(n))
+ DeleteItemByID(i->GetId());
else
- DeleteItemByID(items[i]);
+ LogSubmoduleRemoveFail("Store", id, "item", n, name);
}
void PokeGen::PokeMod::Store::DeleteItemByID(const unsigned _id)
diff --git a/pokemod/Store.h b/pokemod/Store.h
index 6c909efe..f9b3cd35 100644
--- a/pokemod/Store.h
+++ b/pokemod/Store.h
@@ -47,12 +47,14 @@ namespace PokeGen
String GetName();
- int GetItem(const unsigned i) const;
+ unsigned GetItem(const unsigned i) const;
bool HasItem(const unsigned _id) const;
bool HasItem(const String &n) const;
unsigned GetItemCount() const;
void NewItem(const unsigned i);
+ void NewItem(const String &n);
void DeleteItem(const unsigned i);
+ void DeleteItem(const String &n);
void DeleteItemByID(const unsigned i);
private:
void Validate();
diff --git a/pokemod/TODO b/pokemod/TODO
index 58650c79..42e9f15c 100644
--- a/pokemod/TODO
+++ b/pokemod/TODO
@@ -2,27 +2,27 @@
Urgent
=================
+------
+Matrix
+------
+height/width not found ???
+
-------
Classes
-------
-Map
MapEffect
MapTrainer
Pokemon
Status
StatusEffect
+Tile
----------
References
----------
-Target TAR Move
Contests CON Move
-ContestTypes COTY Move
ContestEffects CONE Move
-ContestTargets CONT Move
MoveEffects ME MoveEffect
-Controls CTRL MapWildList
-Styles STY PokemonEvolution
---------
Debugging
@@ -30,12 +30,6 @@ Debugging
CoinItem (Item/Pokemon classes not found (?))
const X*const -> X* conversion (???)
------------------
-New Logging Style
------------------
-ItemEffect
-MoveEffect
-
---------------
Effect Switches
---------------
@@ -49,12 +43,10 @@ Showstopper
----------
Validation
----------
-AbilityEffect
Dialog
ItemEffect
-MapWildList
+MapWildList (Value/Scope)
MoveEffect
-NatureEffect
Pokemod
---------------
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp
new file mode 100644
index 00000000..ddacaae5
--- /dev/null
+++ b/pokemod/Tile.cpp
@@ -0,0 +1,189 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Tile.cpp
+// Purpose: Define a tile for the map
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Thu May 31 2007 13:52:39
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTTile or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "Tile.h"
+
+PokeGen::PokeMod::Tile::Tile(const unsigned _id)
+{
+ LogCtor("Tile", id);
+ name = "";
+ pic = "";
+ fromUp = false;
+ fromDown = false;
+ fromLeft = false;
+ fromRight = false;
+ isWild = false;
+ wildChance.Set(1, 1);
+ isWater = false;
+ waterType = UINT_MAX;
+ underWater = UINT_MAX;
+ canDive = false;
+ isCuttable = false;
+ underCut = UINT_MAX;
+ canHeadbutt = false;
+ forceType = UINT_MAX;
+ forceDirection = UINT_MAX;
+ id = _id;
+}
+
+PokeGen::PokeMod::Tile::Tile(Ini &ini, const unsigned _id)
+{
+ LogCtorIni("Tile", id);
+ ImportIni(ini, _id);
+ if (id == UINT_MAX)
+ LogIdError("Tile");
+}
+
+PokeGen::PokeMod::Tile::~Tile()
+{
+ LogDtor("Tile", id, name);
+}
+
+void PokeGen::PokeMod::Tile::Validate()
+{
+ LogValidateStart("Tile", id, name);
+ // Make sure the name is set to something
+ if (name == "")
+ {
+ LogVarNotSet("Tile", id, "Name", name);
+ isValid = false;
+ }
+ LogValidateOver("Tile", id, isValid, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::Tile::Validate(const wxListBox &output)
+{
+ LogValidateStart("Tile", id, name);
+ LogValidateOver("Tile", id, isValid, name);
+}
+#endif
+
+void PokeGen::PokeMod::Tile::ImportIni(Ini &ini, const unsigned _id)
+{
+ LogImportStart("Tile");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("Tile");
+ }
+ else
+ id = _id;
+ unsigned i;
+ unsigned j;
+ ini.GetValue("name", name);
+ ini.GetValue("pic", pic);
+ ini.GetValue("fromUp", fromUp, false);
+ ini.GetValue("fromDown", fromDown, false);
+ ini.GetValue("fromLeft", fromLeft, false);
+ ini.GetValue("fromRight", fromRight, false);
+ ini.GetValue("isWild", isWild, false);
+ ini.GetValue("wildChance-n", i, 1);
+ ini.GetValue("wildChance-d", j, 1);
+ wildChance.Set(i, j);
+ ini.GetValue("isWater", isWater, false);
+ ini.GetValue("waterType", waterType);
+ ini.GetValue("underWater", underWater);
+ ini.GetValue("canDive", canDive, false);
+ ini.GetValue("isCuttable", isCuttable, false);
+ ini.GetValue("underCut", underCut);
+ ini.GetValue("canHeadbutt", canHeadbutt, false);
+ ini.GetValue("forceType", forceType);
+ ini.GetValue("forceDirection", forceDirection);
+ LogImportOver("Tile", id, name);
+}
+
+void PokeGen::PokeMod::Tile::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("Tile", id, name);
+ // Make elements
+ Ini exTile("Tile");
+ exTile.AddField("id", id);
+ exTile.AddField("name", name);
+ exTile.Export(fout);
+ for (std::vector<TileEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
+ i->ExportIni(fout, name);
+ LogExportOver("Tile", id, name);
+}
+
+void PokeGen::PokeMod::Tile::SetName(const String &n)
+{
+ LogSetVar("Tile", id, "name", n);
+ name = n;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::Tile::GetName() const
+{
+ LogFetchVar("Tile", id, "name", name);
+ return name;
+}
+
+const PokeGen::PokeMod::TileEffect *PokeGen::PokeMod::Tile::GetTileEffect(const unsigned _id) const
+{
+ LogSubmoduleFetch("Tile", id, "effect", _id, name);
+ for (unsigned i = 0; i < GetTileEffectCount(); ++i)
+ {
+ if (effects[i].GetId() == _id)
+ return &effects[i];
+ }
+ LogSubmoduleFetchFail("Tile", id, "effect", _id, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::Tile::GetTileEffectCount() const
+{
+ LogSubmoduleCount("Tile", id, "effects", name);
+ return effects.size();
+}
+
+void PokeGen::PokeMod::Tile::NewTileEffect(Ini *const ini)
+{
+ unsigned i = 0;
+ // Find the first unused ID in the vector
+ for (; i < GetTileEffectCount(); ++i)
+ {
+ if (!GetTileEffect(i))
+ break;
+ }
+ TileEffect newTileEffect(i);
+ if (ini)
+ newTileEffect.ImportIni(*ini);
+ LogSubmoduleNew("Tile", id, "effect", i, name);
+ effects.push_back(newTileEffect);
+}
+
+void PokeGen::PokeMod::Tile::DeleteTileEffect(const unsigned _id)
+{
+ LogSubmoduleRemoveStart("Tile", id, "effect", _id, name);
+ for (std::vector<TileEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("Tile", id, "effect", _id, name);
+ effects.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("Tile", id, "effect", _id, name);
+}
diff --git a/pokemod/Tile.h b/pokemod/Tile.h
new file mode 100644
index 00000000..6294f210
--- /dev/null
+++ b/pokemod/Tile.h
@@ -0,0 +1,123 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Tile.h
+// Purpose: Define a tile for the map
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Thu May 31 2007 13:28:49
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMOD_TILE__
+#define __POKEMOD_TILE__
+
+#include <vector>
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class Tile : public Object
+ {
+ public:
+ Tile(const unsigned _id);
+ Tile(Ini &ini, const unsigned _id = UINT_MAX);
+ ~Tile();
+
+ void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetName(const String &n);
+ void SetPic(const Path &p);
+ void SetFromUp(const bool f);
+ void SetFromDown(const bool f);
+ void SetFroomLeft(const bool f);
+ void SetFromRight(const bool f);
+ void SetIsWild(const bool i);
+ void SetWildChance(const Frac &w);
+ void SetWildChance(const unsigned n, const unsigned d);
+ void SetWildChanceNumerator(const unsigned n);
+ void SetWildChanceNumerator(const unsigned d);
+ void SetIsWater(const bool i);
+ void SetWaterType(const unsigned w);
+ void SetWaterType(const String &w);
+ void SetUnderWater(const unsigned u);
+ void SetUnderWater(const String &u);
+ void SetCanDive(const bool c);
+ void SetIsCuttable(const bool i);
+ void SetUnderCut(const unsigned u);
+ void SetUnderCut(const String &u);
+ void SetCanHeadbutt(const bool c);
+ void SetForceType(const unsigned f);
+ void SetForceType(const String &f);
+ void SetForceDirection(const unsigned d);
+ void SetForceDirection(const String &d);
+
+ String GetName() const;
+ Path SetPic() const;
+ bool SetFromUp() const;
+ bool SetFromDown() const;
+ bool SetFroomLeft() const;
+ bool SetFromRight() const;
+ bool SetIsWild() const;
+ Frac SetWildChance() const;
+ unsigned SetWildChanceNumerator() const;
+ unsigned SetWildChanceNumerator() const;
+ bool SetIsWater() const;
+ unsigned SetWaterType() const;
+ String SetWaterType() const;
+ unsigned SetUnderWater() const;
+ String SetUnderWater() const;
+ bool SetCanDive() const;
+ bool SetIsCuttable() const;
+ unsigned SetUnderCut() const;
+ String SetUnderCut() const;
+ bool SetCanHeadbutt() const;
+ unsigned SetForceType() const;
+ String SetForceType() const;
+ unsigned SetForceDirection() const;
+ String SetForceDirection() const;
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ String name;
+ Path pic;
+ bool fromUp;
+ bool fromDown;
+ bool fromLeft;
+ bool fromRight;
+ bool isWild;
+ Frac wildChance;
+ bool isWater;
+ unsigned waterType;
+ unsigned underWater;
+ bool canDive;
+ bool isCuttable;
+ unsigned underCut;
+ bool canHeadbutt;
+ unsigned forceType;
+ unsigned forceDirection;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/Time.cpp b/pokemod/Time.cpp
index 514d8d3c..b506390c 100644
--- a/pokemod/Time.cpp
+++ b/pokemod/Time.cpp
@@ -47,7 +47,6 @@ PokeGen::PokeMod::Time::~Time()
void PokeGen::PokeMod::Time::Validate()
{
- isValid = true;
LogValidateStart("Time", id, name);
if (name == "")
{
@@ -70,7 +69,6 @@ void PokeGen::PokeMod::Time::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Time::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Time", id, name);
if (name == "")
{
diff --git a/pokemod/Type.cpp b/pokemod/Type.cpp
index 41f0ff57..eb68b537 100644
--- a/pokemod/Type.cpp
+++ b/pokemod/Type.cpp
@@ -46,7 +46,6 @@ PokeGen::PokeMod::Type::~Type()
void PokeGen::PokeMod::Type::Validate()
{
- isValid = true;
LogValidateStart("Type", id, name);
if (name == "")
{
@@ -59,7 +58,6 @@ void PokeGen::PokeMod::Type::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::Type::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("Type", id, name);
if (name == "")
{
diff --git a/pokemod/pokemod_inc.h b/pokemod/pokemod_inc.h
index e979ba4b..ebcd4348 100644
--- a/pokemod/pokemod_inc.h
+++ b/pokemod/pokemod_inc.h
@@ -41,6 +41,7 @@ namespace PokeGen
class ItemStorage;
class Map;
class MapEffect;
+ class MapTrainer;
class MapTrainerTeam;
class MapWarp;
class MapWildList;
@@ -59,6 +60,7 @@ namespace PokeGen
class Status;
class StatusEffect;
class Store;
+ class Tile;
class Time;
class Type;
}
diff --git a/pokemodr/gui/PokeModr.pjd b/pokemodr/gui/PokeModr.pjd
index d358e629..b226f6f1 100644
--- a/pokemodr/gui/PokeModr.pjd
+++ b/pokemodr/gui/PokeModr.pjd
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="windows-1252"?>
+<?xml version="1.0" encoding="UTF-8"?>
<anthemion-project version="1.0.0.0" xmlns="http://www.anthemion.co.uk">
<header>
<long name="name_counter">0</long>
@@ -14,7 +14,7 @@
<bool name="translate_strings">1</bool>
<bool name="extract_strings">0</bool>
<string name="user_name">"Ben Boeckel"</string>
- <string name="copyright_string">"©2006-2007 Ben Boeckel and Nerdy Productions"</string>
+ <string name="copyright_string">"©2006-2007 Ben Boeckel and Nerdy Productions"</string>
<string name="resource_prefix">""</string>
<bool name="use_two_step_construction">0</bool>
<bool name="use_enums">1</bool>
@@ -69,12 +69,6 @@
/////////////////////////////////////////////////////////////////////////////
"</string>
- <string name="cpp_function_comment">"
-/*!
- * %BODY%
- */
-
-"</string>
<string name="cpp_symbols_file_comment">"/////////////////////////////////////////////////////////////////////////////
// Name: %SYMBOLS-FILENAME%
// Purpose: Symbols file
@@ -121,6 +115,14 @@
#endif
"</string>
+ <string name="cpp_function_declaration_comment">" /// %BODY%
+"</string>
+ <string name="cpp_function_implementation_comment">"
+/*!
+ * %BODY%
+ */
+
+"</string>
<string name="resource_file_header">"app_resources.h"</string>
<string name="resource_file_implementation">"app_resources.cpp"</string>
<string name="resource_class_name">"AppResources"</string>
@@ -12048,7 +12050,7 @@ Dialog depending on whether it could or not"</string>
<long name="proxy-Maximum value">0</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -12560,7 +12562,7 @@ Dialog depending on whether it could or not"</string>
<long name="proxy-Maximum value">0</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -13456,7 +13458,7 @@ Dialog depending on whether it could or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Deletes a Pokémon's Move and hands
+ <string name="proxy-Label">"Deletes a Pokémon's Move and hands
control over to another Dialog depending on
whether the Move can be taught and is taught"</string>
<long name="proxy-Wrapping width">-1</long>
@@ -14739,7 +14741,7 @@ the Move can be taught and is taught"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Move is taught to a Pokémon"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Move is taught to a Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -15121,7 +15123,7 @@ the Move can be taught and is taught"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Pokémon chosen can't learn the Move"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Pokémon chosen can't learn the Move"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -15505,7 +15507,7 @@ the Move can be taught and is taught"</string>
</document>
</document>
<document>
- <string name="title">"Pokémon"</string>
+ <string name="title">"Pokémon"</string>
<string name="type">"html-folder-document"</string>
<string name="filename">""</string>
<string name="icon-name">"folder"</string>
@@ -15515,7 +15517,7 @@ the Move can be taught and is taught"</string>
<long name="locked">0</long>
<string name="created">"17/2/2007"</string>
<document>
- <string name="title">"Give Pokémon"</string>
+ <string name="title">"Give Pokémon"</string>
<string name="type">"dialog-document"</string>
<string name="filename">""</string>
<string name="icon-name">"dialog"</string>
@@ -15540,7 +15542,7 @@ the Move can be taught and is taught"</string>
<string name="proxy-Implementation filename">"dlgGivePokemon.cpp"</string>
<string name="proxy-Header filename">"dlgGivePokemon.h"</string>
<string name="proxy-XRC filename">""</string>
- <string name="proxy-Title">"Give Pokémon"</string>
+ <string name="proxy-Title">"Give Pokémon"</string>
<bool name="proxy-Centre">1</bool>
<string name="proxy-Icon">""</string>
<bool name="proxy-Dialog units">0</bool>
@@ -15631,7 +15633,7 @@ the Move can be taught and is taught"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Gives the Player a Pokémon and hands
+ <string name="proxy-Label">"Gives the Player a Pokémon and hands
control to another Dialog depending on
whether the Player gets it or not"</string>
<long name="proxy-Wrapping width">-1</long>
@@ -15735,7 +15737,7 @@ whether the Player gets it or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon:"</string>
+ <string name="proxy-Label">"Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -15832,7 +15834,7 @@ whether the Player gets it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -16024,7 +16026,7 @@ whether the Player gets it or not"</string>
<long name="proxy-Maximum value">0</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The level the Pokémon is at"</string>
+ <string name="proxy-Tooltip text">"The level the Pokémon is at"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -16220,7 +16222,7 @@ whether the Player gets it or not"</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The ID of the Pokémon\n\n-1 gives the Player's ID to the Pokémon"</string>
+ <string name="proxy-Tooltip text">"The ID of the Pokémon\n\n-1 gives the Player's ID to the Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -16415,7 +16417,7 @@ whether the Player gets it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player receives the Pokémon"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player receives the Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -16606,7 +16608,7 @@ whether the Player gets it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player doesn't get the Pokémon"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player doesn't get the Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -16989,7 +16991,7 @@ whether the Player gets it or not"</string>
</document>
</document>
<document>
- <string name="title">"Show Pokémon"</string>
+ <string name="title">"Show Pokémon"</string>
<string name="type">"dialog-document"</string>
<string name="filename">""</string>
<string name="icon-name">"dialog"</string>
@@ -17014,7 +17016,7 @@ whether the Player gets it or not"</string>
<string name="proxy-Implementation filename">"dlgShowPokemon.cpp"</string>
<string name="proxy-Header filename">"dlgShowPokemon.h"</string>
<string name="proxy-XRC filename">""</string>
- <string name="proxy-Title">"Show Pokémon"</string>
+ <string name="proxy-Title">"Show Pokémon"</string>
<bool name="proxy-Centre">1</bool>
<string name="proxy-Icon">""</string>
<bool name="proxy-Dialog units">0</bool>
@@ -17105,8 +17107,8 @@ whether the Player gets it or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"This shows a Pokémon to the Player,
-adding a Seen entry to the Player's PokéDex"</string>
+ <string name="proxy-Label">"This shows a Pokémon to the Player,
+adding a Seen entry to the Player's PokéDex"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -17208,7 +17210,7 @@ adding a Seen entry to the Player's PokéDex"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon:"</string>
+ <string name="proxy-Label">"Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -17305,7 +17307,7 @@ adding a Seen entry to the Player's PokéDex"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to show the Player"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to show the Player"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -17497,7 +17499,7 @@ adding a Seen entry to the Player's PokéDex"</string>
</document>
</document>
<document>
- <string name="title">"Take Pokémon"</string>
+ <string name="title">"Take Pokémon"</string>
<string name="type">"dialog-document"</string>
<string name="filename">""</string>
<string name="icon-name">"dialog"</string>
@@ -17522,7 +17524,7 @@ adding a Seen entry to the Player's PokéDex"</string>
<string name="proxy-Implementation filename">"dlgTakePokemon.cpp"</string>
<string name="proxy-Header filename">"dlgTakePokemon.h"</string>
<string name="proxy-XRC filename">""</string>
- <string name="proxy-Title">"Take Pokémon"</string>
+ <string name="proxy-Title">"Take Pokémon"</string>
<bool name="proxy-Centre">1</bool>
<string name="proxy-Icon">""</string>
<bool name="proxy-Dialog units">0</bool>
@@ -17613,7 +17615,7 @@ adding a Seen entry to the Player's PokéDex"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Takes a Pokémon from the Player and hands
+ <string name="proxy-Label">"Takes a Pokémon from the Player and hands
control to another Dialog depending on
whether the Player has it or not"</string>
<long name="proxy-Wrapping width">-1</long>
@@ -17717,7 +17719,7 @@ whether the Player has it or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon:"</string>
+ <string name="proxy-Label">"Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -17814,7 +17816,7 @@ whether the Player has it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -18005,7 +18007,7 @@ whether the Player has it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player had the Pokémon"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player had the Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -18196,7 +18198,7 @@ whether the Player has it or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player doesn't have the Pokémon"</string>
+ <string name="proxy-Tooltip text">"The Dialog to hand control over to if the Player doesn't have the Pokémon"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -18579,7 +18581,7 @@ whether the Player has it or not"</string>
</document>
</document>
<document>
- <string name="title">"View Pokémon"</string>
+ <string name="title">"View Pokémon"</string>
<string name="type">"dialog-document"</string>
<string name="filename">""</string>
<string name="icon-name">"dialog"</string>
@@ -18604,7 +18606,7 @@ whether the Player has it or not"</string>
<string name="proxy-Implementation filename">"dlgViewPokemon.cpp"</string>
<string name="proxy-Header filename">"dlgViewPokemon.h"</string>
<string name="proxy-XRC filename">""</string>
- <string name="proxy-Title">"View Pokémon"</string>
+ <string name="proxy-Title">"View Pokémon"</string>
<bool name="proxy-Centre">1</bool>
<string name="proxy-Icon">""</string>
<bool name="proxy-Dialog units">0</bool>
@@ -18695,7 +18697,7 @@ whether the Player has it or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"This asks the Player to show a Pokémon
+ <string name="proxy-Label">"This asks the Player to show a Pokémon
to the speaker, handling control over to another
Dialog depending on whether the Player does or not"</string>
<long name="proxy-Wrapping width">-1</long>
@@ -18799,7 +18801,7 @@ Dialog depending on whether the Player does or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon:"</string>
+ <string name="proxy-Label">"Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -18896,7 +18898,7 @@ Dialog depending on whether the Player does or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to ask to see"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -19087,7 +19089,7 @@ Dialog depending on whether the Player does or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to handle control over to if the Pokémon is shown"</string>
+ <string name="proxy-Tooltip text">"The Dialog to handle control over to if the Pokémon is shown"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -19278,7 +19280,7 @@ Dialog depending on whether the Player does or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Dialog to handle the control over to if the Pokémon is not shown"</string>
+ <string name="proxy-Tooltip text">"The Dialog to handle the control over to if the Pokémon is not shown"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -26255,7 +26257,7 @@ a name for the slot. Future calls will print the name."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -26284,6 +26286,7 @@ a name for the slot. Future calls will print the name."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">1</long>
<long name="proxy-Span x">1</long>
@@ -27815,7 +27818,7 @@ a name for the slot. Future calls will print the name."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -27844,6 +27847,7 @@ a name for the slot. Future calls will print the name."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">2</long>
@@ -28511,7 +28515,7 @@ either stopped or another starts"</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -28540,6 +28544,7 @@ either stopped or another starts"</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">0</long>
<long name="proxy-Grid y">1</long>
<long name="proxy-Span x">1</long>
@@ -29065,7 +29070,7 @@ either stopped or another starts"</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -29094,6 +29099,7 @@ either stopped or another starts"</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">0</long>
<long name="proxy-Grid y">1</long>
<long name="proxy-Span x">1</long>
@@ -30894,7 +30900,7 @@ either stopped or another starts"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Trades a Pokémon for another, handing
+ <string name="proxy-Label">"Trades a Pokémon for another, handing
control over to another dialog depending
if the trade went through or not"</string>
<long name="proxy-Wrapping width">-1</long>
@@ -31095,7 +31101,7 @@ if the trade went through or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon that is to be traded for"</string>
+ <string name="proxy-Tooltip text">"The Pokémon that is to be traded for"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -31189,7 +31195,7 @@ if the trade went through or not"</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Give Pokémon:"</string>
+ <string name="proxy-Label">"Give Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -31286,7 +31292,7 @@ if the trade went through or not"</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
+ <string name="proxy-Tooltip text">"The Pokémon to give to the Player"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -31478,7 +31484,7 @@ if the trade went through or not"</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The ID of the Pokémon the Player is getting"</string>
+ <string name="proxy-Tooltip text">"The ID of the Pokémon the Player is getting"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -34311,7 +34317,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -34340,6 +34346,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -34516,7 +34523,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -34545,6 +34552,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">1</long>
<long name="proxy-Span x">1</long>
@@ -34721,7 +34729,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -34750,6 +34758,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">2</long>
<long name="proxy-Span x">1</long>
@@ -35207,7 +35216,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -35236,6 +35245,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -35735,7 +35745,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -35764,6 +35774,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -36281,7 +36292,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -36310,6 +36321,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -36551,7 +36563,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -36580,6 +36592,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_MIN_SPIN"</string>
@@ -37099,7 +37112,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -37128,6 +37141,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -37959,7 +37973,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -37988,6 +38002,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -38164,7 +38179,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -38193,6 +38208,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -38369,7 +38385,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -38398,6 +38414,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -39760,7 +39777,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -39789,6 +39806,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -40873,7 +40891,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -40902,6 +40920,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -41449,7 +41468,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -41478,6 +41497,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -42250,7 +42270,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">"m_TypePokemon"</string>
- <string name="proxy-Label">"Pokémon"</string>
+ <string name="proxy-Label">"Pokémon"</string>
<bool name="proxy-Initial value">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -43300,7 +43320,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -43329,6 +43349,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -44277,7 +44298,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -44306,6 +44327,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_HP_DENOM"</string>
@@ -44609,7 +44631,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -44638,6 +44660,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_ATTACK_DENOM"</string>
@@ -44941,7 +44964,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -44970,6 +44993,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DEFENSE_DENOM"</string>
@@ -45273,7 +45297,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -45302,6 +45326,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_SPEED_DENOM"</string>
@@ -45605,7 +45630,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -45634,6 +45659,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_SPECIAL_DENOM"</string>
@@ -45937,7 +45963,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -45966,6 +45992,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_SPECIAL_ATTACK_DENOM"</string>
@@ -46269,7 +46296,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -46298,6 +46325,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_SPECIAL_DEFENSE_DENOM"</string>
@@ -47010,7 +47038,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -47039,6 +47067,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -47655,7 +47684,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -47684,6 +47713,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -49536,7 +49566,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -49565,6 +49595,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -50361,7 +50392,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -50390,6 +50421,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -50884,7 +50916,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -50913,6 +50945,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
</document>
@@ -51365,7 +51398,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -51394,6 +51427,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -52127,7 +52161,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -52156,6 +52190,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -53660,7 +53695,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -53689,6 +53724,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -54384,7 +54420,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -54413,6 +54449,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -56130,7 +56167,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -56159,6 +56196,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -58382,7 +58420,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -58411,6 +58449,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -59361,7 +59400,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -59390,6 +59429,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -61759,7 +61799,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -61788,6 +61828,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -65041,7 +65082,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-type">"wbStaticBoxSizerProxy"</string>
<string name="proxy-Id name">"wxID_ANY"</string>
<long name="proxy-Id value">-1</long>
- <string name="proxy-Label">"Pokémon"</string>
+ <string name="proxy-Label">"Pokémon"</string>
<string name="proxy-Member variable name">""</string>
<string name="proxy-Sizer member variable name">"m_PokemonSizer"</string>
<string name="proxy-Foreground colour">""</string>
@@ -65457,7 +65498,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon:"</string>
+ <string name="proxy-Label">"Pokémon:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -66414,7 +66455,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -66443,6 +66484,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -66680,7 +66722,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -66709,6 +66751,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -68857,7 +68900,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -68886,6 +68929,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -70412,7 +70456,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -70441,6 +70485,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -71525,7 +71570,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -71554,6 +71599,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -75135,7 +75181,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -75164,6 +75210,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_RUN_DENOM_SPIN"</string>
@@ -75467,7 +75514,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -75496,6 +75543,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_ITEM_DENOM_SPIN"</string>
@@ -75577,7 +75625,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-type">"wbStaticBoxSizerProxy"</string>
<string name="proxy-Id name">"wxID_ANY"</string>
<long name="proxy-Id value">-1</long>
- <string name="proxy-Label">"Pokédex Information"</string>
+ <string name="proxy-Label">"Pokédex Information"</string>
<string name="proxy-Member variable name">""</string>
<string name="proxy-Sizer member variable name">""</string>
<string name="proxy-Foreground colour">""</string>
@@ -75643,7 +75691,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokédex Number:"</string>
+ <string name="proxy-Label">"Pokédex Number:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -76184,7 +76232,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -76213,6 +76261,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_INCH_SPIN"</string>
@@ -76326,7 +76375,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokédex Entry:"</string>
+ <string name="proxy-Label">"Pokédex Entry:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -76442,7 +76491,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -76471,6 +76520,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
</document>
@@ -83347,7 +83397,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -83376,6 +83426,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -84330,7 +84381,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -84359,6 +84410,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -85466,7 +85518,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -85495,6 +85547,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_DENOM_SPIN"</string>
@@ -86235,6 +86288,181 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Custom ctor arguments">""</string>
</document>
</document>
+ <document>
+ <string name="title">"wxBoxSizer H"</string>
+ <string name="type">"dialog-control-document"</string>
+ <string name="filename">""</string>
+ <string name="icon-name">"sizer"</string>
+ <long name="is-transient">0</long>
+ <long name="owns-file">1</long>
+ <long name="title-mode">0</long>
+ <long name="locked">0</long>
+ <string name="created">"31/5/2007"</string>
+ <string name="proxy-type">"wbBoxSizerProxy"</string>
+ <string name="proxy-Orientation">"Horizontal"</string>
+ <string name="proxy-Member variable name">""</string>
+ <string name="proxy-AlignH">"Expand"</string>
+ <string name="proxy-AlignV">"Centre"</string>
+ <long name="proxy-Stretch factor">0</long>
+ <long name="proxy-Border">2</long>
+ <bool name="proxy-wxLEFT">0</bool>
+ <bool name="proxy-wxRIGHT">0</bool>
+ <bool name="proxy-wxTOP">1</bool>
+ <bool name="proxy-wxBOTTOM">0</bool>
+ <bool name="proxy-wxSHAPED">0</bool>
+ <bool name="proxy-wxADJUST_MINSIZE">0</bool>
+ <bool name="proxy-wxFIXED_MINSIZE">0</bool>
+ <string name="proxy-Platform">"&lt;Any platform&gt;"</string>
+ <document>
+ <string name="title">"wxStaticText: wxID_STATIC"</string>
+ <string name="type">"dialog-control-document"</string>
+ <string name="filename">""</string>
+ <string name="icon-name">"statictext"</string>
+ <long name="is-transient">0</long>
+ <long name="owns-file">1</long>
+ <long name="title-mode">0</long>
+ <long name="locked">0</long>
+ <string name="created">"31/5/2007"</string>
+ <string name="proxy-type">"wbStaticTextProxy"</string>
+ <string name="proxy-Id name">"wxID_STATIC"</string>
+ <long name="proxy-Id value">5105</long>
+ <string name="proxy-Class">"wxStaticText"</string>
+ <string name="proxy-Base class">"wxStaticText"</string>
+ <bool name="proxy-External implementation">1</bool>
+ <bool name="proxy-Separate files">0</bool>
+ <string name="proxy-Implementation filename">""</string>
+ <string name="proxy-Header filename">""</string>
+ <string name="proxy-Member variable name">""</string>
+ <string name="proxy-Label">"Dive:"</string>
+ <long name="proxy-Wrapping width">-1</long>
+ <string name="proxy-Help text">""</string>
+ <string name="proxy-Tooltip text">""</string>
+ <string name="proxy-Background colour">""</string>
+ <string name="proxy-Foreground colour">""</string>
+ <string name="proxy-Font">""</string>
+ <bool name="proxy-Hidden">0</bool>
+ <bool name="proxy-Enabled">1</bool>
+ <string name="proxy-Platform">"&lt;Any platform&gt;"</string>
+ <string name="proxy-Data variable">""</string>
+ <string name="proxy-Data validator">""</string>
+ <bool name="proxy-wxALIGN_LEFT">0</bool>
+ <bool name="proxy-wxALIGN_RIGHT">0</bool>
+ <bool name="proxy-wxALIGN_CENTRE">0</bool>
+ <bool name="proxy-wxST_NO_AUTORESIZE">0</bool>
+ <bool name="proxy-wxNO_BORDER">0</bool>
+ <bool name="proxy-wxSIMPLE_BORDER">0</bool>
+ <bool name="proxy-wxDOUBLE_BORDER">0</bool>
+ <bool name="proxy-wxSUNKEN_BORDER">0</bool>
+ <bool name="proxy-wxRAISED_BORDER">0</bool>
+ <bool name="proxy-wxSTATIC_BORDER">0</bool>
+ <bool name="proxy-wxWANTS_CHARS">0</bool>
+ <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
+ <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
+ <string name="proxy-Custom styles">""</string>
+ <long name="proxy-X">-1</long>
+ <long name="proxy-Y">-1</long>
+ <long name="proxy-Width">-1</long>
+ <long name="proxy-Height">-1</long>
+ <string name="proxy-AlignH">"Centre"</string>
+ <string name="proxy-AlignV">"Centre"</string>
+ <long name="proxy-Stretch factor">0</long>
+ <long name="proxy-Border">5</long>
+ <bool name="proxy-wxLEFT">1</bool>
+ <bool name="proxy-wxRIGHT">1</bool>
+ <bool name="proxy-wxTOP">0</bool>
+ <bool name="proxy-wxBOTTOM">0</bool>
+ <bool name="proxy-wxSHAPED">0</bool>
+ <bool name="proxy-wxADJUST_MINSIZE">1</bool>
+ <bool name="proxy-wxFIXED_MINSIZE">0</bool>
+ <string name="proxy-Custom arguments">""</string>
+ <string name="proxy-Custom ctor arguments">""</string>
+ </document>
+ <document>
+ <string name="title">"Spacer"</string>
+ <string name="type">"dialog-control-document"</string>
+ <string name="filename">""</string>
+ <string name="icon-name">"spacer"</string>
+ <long name="is-transient">0</long>
+ <long name="owns-file">1</long>
+ <long name="title-mode">0</long>
+ <long name="locked">0</long>
+ <string name="created">"31/5/2007"</string>
+ <string name="proxy-type">"wbSpacerProxy"</string>
+ <long name="proxy-Width">5</long>
+ <long name="proxy-Height">5</long>
+ <string name="proxy-AlignH">"Centre"</string>
+ <string name="proxy-AlignV">"Centre"</string>
+ <long name="proxy-Stretch factor">1</long>
+ <long name="proxy-Border">5</long>
+ <bool name="proxy-wxLEFT">1</bool>
+ <bool name="proxy-wxRIGHT">1</bool>
+ <bool name="proxy-wxTOP">0</bool>
+ <bool name="proxy-wxBOTTOM">0</bool>
+ <bool name="proxy-wxSHAPED">0</bool>
+ <bool name="proxy-wxADJUST_MINSIZE">0</bool>
+ <bool name="proxy-wxFIXED_MINSIZE">0</bool>
+ <string name="proxy-Platform">"&lt;Any platform&gt;"</string>
+ </document>
+ <document>
+ <string name="title">"wxCheckBox: ID_DIVE"</string>
+ <string name="type">"dialog-control-document"</string>
+ <string name="filename">""</string>
+ <string name="icon-name">"checkbox"</string>
+ <long name="is-transient">0</long>
+ <long name="owns-file">1</long>
+ <long name="title-mode">0</long>
+ <long name="locked">0</long>
+ <string name="created">"31/5/2007"</string>
+ <string name="proxy-type">"wbCheckBoxProxy"</string>
+ <string name="event-handler-0">"wxEVT_COMMAND_CHECKBOX_CLICKED|OnDiveClick|||"</string>
+ <string name="proxy-Id name">"ID_DIVE"</string>
+ <long name="proxy-Id value">10009</long>
+ <string name="proxy-Class">"wxCheckBox"</string>
+ <string name="proxy-Base class">"wxCheckBox"</string>
+ <bool name="proxy-External implementation">1</bool>
+ <bool name="proxy-Separate files">0</bool>
+ <string name="proxy-Implementation filename">""</string>
+ <string name="proxy-Header filename">""</string>
+ <string name="proxy-Member variable name">"m_Dive"</string>
+ <string name="proxy-Label">""</string>
+ <bool name="proxy-Initial value">0</bool>
+ <string name="proxy-Help text">""</string>
+ <string name="proxy-Tooltip text">""</string>
+ <string name="proxy-Data variable">""</string>
+ <string name="proxy-Data validator">""</string>
+ <string name="proxy-Background colour">""</string>
+ <string name="proxy-Foreground colour">""</string>
+ <string name="proxy-Font">""</string>
+ <bool name="proxy-Hidden">0</bool>
+ <bool name="proxy-Enabled">1</bool>
+ <string name="proxy-Platform">"&lt;Any platform&gt;"</string>
+ <bool name="proxy-wxALIGN_RIGHT">0</bool>
+ <bool name="proxy-wxCHK_2STATE">0</bool>
+ <bool name="proxy-wxCHK_3STATE">0</bool>
+ <bool name="proxy-wxCHK_ALLOW_3RD_STATE_FOR_USER">0</bool>
+ <bool name="proxy-wxWANTS_CHARS">0</bool>
+ <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
+ <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
+ <string name="proxy-Custom styles">""</string>
+ <long name="proxy-X">-1</long>
+ <long name="proxy-Y">-1</long>
+ <long name="proxy-Width">-1</long>
+ <long name="proxy-Height">-1</long>
+ <string name="proxy-AlignH">"Centre"</string>
+ <string name="proxy-AlignV">"Centre"</string>
+ <long name="proxy-Stretch factor">0</long>
+ <long name="proxy-Border">5</long>
+ <bool name="proxy-wxLEFT">1</bool>
+ <bool name="proxy-wxRIGHT">1</bool>
+ <bool name="proxy-wxTOP">0</bool>
+ <bool name="proxy-wxBOTTOM">0</bool>
+ <bool name="proxy-wxSHAPED">0</bool>
+ <bool name="proxy-wxADJUST_MINSIZE">0</bool>
+ <bool name="proxy-wxFIXED_MINSIZE">0</bool>
+ <string name="proxy-Custom arguments">""</string>
+ <string name="proxy-Custom ctor arguments">""</string>
+ </document>
+ </document>
</document>
<document>
<string name="title">"wxStaticBoxSizer V"</string>
@@ -88357,7 +88585,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"PokéMod Title:"</string>
+ <string name="proxy-Label">"PokéMod Title:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -88451,7 +88679,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Initial value">""</string>
<long name="proxy-Max length">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The title of the PokéMod"</string>
+ <string name="proxy-Tooltip text">"The title of the PokéMod"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -88473,7 +88701,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -88502,6 +88730,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -88558,7 +88787,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"PokéMod Version:"</string>
+ <string name="proxy-Label">"PokéMod Version:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -88652,7 +88881,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Initial value">""</string>
<long name="proxy-Max length">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The current version of the PokéMod"</string>
+ <string name="proxy-Tooltip text">"The current version of the PokéMod"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -88674,7 +88903,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -88703,6 +88932,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
<document>
@@ -88969,7 +89199,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -88998,6 +89228,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
</document>
</document>
@@ -89780,7 +90011,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Strings">""</string>
<string name="proxy-Initial value">""</string>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"Pokémon that acts as an Egg"</string>
+ <string name="proxy-Tooltip text">"Pokémon that acts as an Egg"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -90830,7 +91061,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon Boxes:"</string>
+ <string name="proxy-Label">"Pokémon Boxes:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -91010,7 +91241,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokémon Per Box:"</string>
+ <string name="proxy-Label">"Pokémon Per Box:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -93016,7 +93247,7 @@ It hands control over to another Dialog depending on the answer."</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon may stay asleep"</string>
+ <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon may stay asleep"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -93986,7 +94217,7 @@ It hands control over to another Dialog depending on the answer."</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"Poisoned Pokémon lose HP for steps taken when in the overworld"</string>
+ <string name="proxy-Tooltip text">"Poisoned Pokémon lose HP for steps taken when in the overworld"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -94346,7 +94577,7 @@ It hands control over to another Dialog depending on the answer."</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon can be active while toxic poisoned"</string>
+ <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon can be active while toxic poisoned"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -95136,7 +95367,7 @@ It hands control over to another Dialog depending on the answer."</string>
<long name="proxy-Maximum value">2147483647</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon can be confused"</string>
+ <string name="proxy-Tooltip text">"The maximum number of turns a Pokémon can be confused"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -97453,7 +97684,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string>
- <string name="proxy-Label">"Pokérus:"</string>
+ <string name="proxy-Label">"Pokérus:"</string>
<long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
@@ -97634,7 +97865,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">1</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -97663,6 +97894,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
</document>
<document>
<string name="title">"wxSpinButton: ID_POKERUS_DENOM"</string>
@@ -101634,7 +101866,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -101663,6 +101895,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">0</long>
<long name="proxy-Span x">1</long>
@@ -101834,7 +102067,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
- <bool name="proxy-wxTE_LINEWRAP">0</bool>
+ <bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
@@ -101863,6 +102096,7 @@ It hands control over to another Dialog depending on the answer."</string>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
+ <bool name="proxy-wxTE_LINEWRAP">0</bool>
<long name="proxy-Grid x">1</long>
<long name="proxy-Grid y">1</long>
<long name="proxy-Span x">1</long>
@@ -102889,7 +103123,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
<bool name="proxy-AUI manager">0</bool>
- <string name="proxy-Tab label">"Pokémon"</string>
+ <string name="proxy-Tab label">"Pokémon"</string>
<string name="proxy-Tab icon">""</string>
<document>
<string name="title">"wxBoxSizer V"</string>
@@ -105660,7 +105894,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Label">""</string>
<bool name="proxy-Initial value">0</bool>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"Whether to reopen the last used file or not when PokéModrPC starts up"</string>
+ <string name="proxy-Tooltip text">"Whether to reopen the last used file or not when PokéModrPC starts up"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Background colour">""</string>
@@ -105950,7 +106184,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Label">"Validate"</string>
<bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
- <string name="proxy-Tooltip text">"Validate the PokéMod"</string>
+ <string name="proxy-Tooltip text">"Validate the PokéMod"</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
@@ -107088,6 +107322,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-tool-pencil-22.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-tool-pencil-22.png"</string>
<string name="proxy-Bitmap (hover)">"stock-tool-pencil-22.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107176,6 +107411,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-tool-bucket-fill-22.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-tool-bucket-fill-22.png"</string>
<string name="proxy-Bitmap (hover)">"stock-tool-bucket-fill-22.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107264,6 +107500,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-tool-eraser-22.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-tool-eraser-22.png"</string>
<string name="proxy-Bitmap (hover)">"stock-tool-eraser-22.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107404,6 +107641,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-tool-color-picker-22.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-tool-color-picker-22.png"</string>
<string name="proxy-Bitmap (hover)">"stock-tool-color-picker-22.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107492,6 +107730,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-tool-zoom-22.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-tool-zoom-22.png"</string>
<string name="proxy-Bitmap (hover)">"stock-tool-zoom-22.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107581,6 +107820,7 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="proxy-Bitmap (focused)">"stock-transparency-24.png"</string>
<string name="proxy-Bitmap (disabled)">"stock-transparency-24.png"</string>
<string name="proxy-Bitmap (hover)">"stock-transparency-24.png"</string>
+ <bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
@@ -107797,7 +108037,7 @@ It hands control over to another Dialog depending on the answer."</string>
</document>
</document>
<document>
- <string name="title">"PokéModrApp"</string>
+ <string name="title">"PokéModrApp"</string>
<string name="type">"dialog-document"</string>
<string name="filename">""</string>
<string name="icon-name">"app"</string>
@@ -107843,9 +108083,9 @@ It hands control over to another Dialog depending on the answer."</string>
<string name="language">""</string>
</document>
<document>
- <string name="title">"PokéModr.rc"</string>
+ <string name="title">"PokéModr.rc"</string>
<string name="type">"source-editor-document"</string>
- <string name="filename">"PokéModr.rc"</string>
+ <string name="filename">"PokéModr.rc"</string>
<string name="icon-name">"source-editor"</string>
<long name="is-transient">0</long>
<long name="owns-file">0</long>
diff --git a/pokemodr/gui/tilepanel.cpp b/pokemodr/gui/tilepanel.cpp
index 615d8b82..41b45604 100644
--- a/pokemodr/gui/tilepanel.cpp
+++ b/pokemodr/gui/tilepanel.cpp
@@ -90,6 +90,8 @@ BEGIN_EVENT_TABLE( TilePanel, wxPanel )
EVT_COMBOBOX( ID_UNDER_WHIRLPOOL, TilePanel::OnUnderWhirlpoolSelected )
+ EVT_CHECKBOX( ID_DIVE, TilePanel::OnDiveClick )
+
EVT_CHECKBOX( ID_CUTTABLE, TilePanel::OnCuttableClick )
EVT_COMBOBOX( ID_UNDER_CUT, TilePanel::OnUnderCutSelected )
@@ -184,6 +186,7 @@ void TilePanel::Init()
m_SpcWaterfall = NULL;
m_SpcWhirlpool = NULL;
m_UnderWhirlpool = NULL;
+ m_Dive = NULL;
m_Cuttable = NULL;
m_UnderCut = NULL;
m_Headbutt = NULL;
@@ -205,6 +208,8 @@ void TilePanel::Init()
void TilePanel::CreateControls()
{
////@begin TilePanel content construction
+ // Generated by DialogBlocks, 31/05/2007 13:44:59 (unregistered)
+
TilePanel* itemPanel1 = this;
wxStaticBox* itemStaticBoxSizer2Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
@@ -244,8 +249,7 @@ void TilePanel::CreateControls()
itemStaticBoxSizer11->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxBitmap m_TileBitmapBitmap(wxNullBitmap);
- m_TileBitmap = new wxStaticBitmap( itemPanel1, ID_TILE, m_TileBitmapBitmap, wxDefaultPosition, wxSize(64, 64), wxSIMPLE_BORDER );
+ m_TileBitmap = new wxStaticBitmap( itemPanel1, ID_TILE, wxNullBitmap, wxDefaultPosition, wxSize(64, 64), wxSIMPLE_BORDER );
if (ShowToolTips())
m_TileBitmap->SetToolTip(_("Sprite that represents this tile"));
itemStaticBoxSizer11->Add(m_TileBitmap, 0, wxALIGN_CENTER_VERTICAL, 0);
@@ -366,108 +370,120 @@ void TilePanel::CreateControls()
m_UnderWhirlpool = new wxComboBox( itemPanel1, ID_UNDER_WHIRLPOOL, _T(""), wxDefaultPosition, wxDefaultSize, m_UnderWhirlpoolStrings, wxCB_READONLY );
itemBoxSizer47->Add(m_UnderWhirlpool, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxStaticBox* itemStaticBoxSizer51Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
- wxStaticBoxSizer* itemStaticBoxSizer51 = new wxStaticBoxSizer(itemStaticBoxSizer51Static, wxVERTICAL);
- itemBoxSizer6->Add(itemStaticBoxSizer51, 0, wxGROW, 5);
+ wxBoxSizer* itemBoxSizer51 = new wxBoxSizer(wxHORIZONTAL);
+ itemStaticBoxSizer36->Add(itemBoxSizer51, 0, wxGROW|wxTOP, 2);
- wxBoxSizer* itemBoxSizer52 = new wxBoxSizer(wxHORIZONTAL);
- itemStaticBoxSizer51->Add(itemBoxSizer52, 0, wxGROW, 2);
+ wxStaticText* itemStaticText52 = new wxStaticText( itemPanel1, wxID_STATIC, _("Dive:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer51->Add(itemStaticText52, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5);
- wxStaticText* itemStaticText53 = new wxStaticText( itemPanel1, wxID_STATIC, _("Cuttable:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer52->Add(itemStaticText53, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemBoxSizer51->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- itemBoxSizer52->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ m_Dive = new wxCheckBox( itemPanel1, ID_DIVE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Dive->SetValue(false);
+ itemBoxSizer51->Add(m_Dive, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- m_Cuttable = new wxCheckBox( itemPanel1, ID_CUTTABLE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
- m_Cuttable->SetValue(false);
- itemBoxSizer52->Add(m_Cuttable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ wxStaticBox* itemStaticBoxSizer55Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
+ wxStaticBoxSizer* itemStaticBoxSizer55 = new wxStaticBoxSizer(itemStaticBoxSizer55Static, wxVERTICAL);
+ itemBoxSizer6->Add(itemStaticBoxSizer55, 0, wxGROW, 5);
wxBoxSizer* itemBoxSizer56 = new wxBoxSizer(wxHORIZONTAL);
- itemStaticBoxSizer51->Add(itemBoxSizer56, 0, wxGROW|wxTOP, 2);
+ itemStaticBoxSizer55->Add(itemBoxSizer56, 0, wxGROW, 2);
- wxStaticText* itemStaticText57 = new wxStaticText( itemPanel1, wxID_STATIC, _("Under:"), wxDefaultPosition, wxDefaultSize, 0 );
+ wxStaticText* itemStaticText57 = new wxStaticText( itemPanel1, wxID_STATIC, _("Cuttable:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer56->Add(itemStaticText57, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
itemBoxSizer56->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ m_Cuttable = new wxCheckBox( itemPanel1, ID_CUTTABLE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Cuttable->SetValue(false);
+ itemBoxSizer56->Add(m_Cuttable, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+
+ wxBoxSizer* itemBoxSizer60 = new wxBoxSizer(wxHORIZONTAL);
+ itemStaticBoxSizer55->Add(itemBoxSizer60, 0, wxGROW|wxTOP, 2);
+
+ wxStaticText* itemStaticText61 = new wxStaticText( itemPanel1, wxID_STATIC, _("Under:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer60->Add(itemStaticText61, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+
+ itemBoxSizer60->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+
wxArrayString m_UnderCutStrings;
m_UnderCut = new wxComboBox( itemPanel1, ID_UNDER_CUT, _T(""), wxDefaultPosition, wxDefaultSize, m_UnderCutStrings, wxCB_READONLY );
- itemBoxSizer56->Add(m_UnderCut, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemBoxSizer60->Add(m_UnderCut, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxStaticBox* itemStaticBoxSizer60Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
- wxStaticBoxSizer* itemStaticBoxSizer60 = new wxStaticBoxSizer(itemStaticBoxSizer60Static, wxHORIZONTAL);
- itemBoxSizer6->Add(itemStaticBoxSizer60, 0, wxGROW, 2);
+ wxStaticBox* itemStaticBoxSizer64Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
+ wxStaticBoxSizer* itemStaticBoxSizer64 = new wxStaticBoxSizer(itemStaticBoxSizer64Static, wxHORIZONTAL);
+ itemBoxSizer6->Add(itemStaticBoxSizer64, 0, wxGROW, 2);
- wxStaticText* itemStaticText61 = new wxStaticText( itemPanel1, wxID_STATIC, _("Headbutt:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer60->Add(itemStaticText61, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ wxStaticText* itemStaticText65 = new wxStaticText( itemPanel1, wxID_STATIC, _("Headbutt:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer64->Add(itemStaticText65, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- itemStaticBoxSizer60->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemStaticBoxSizer64->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
m_Headbutt = new wxCheckBox( itemPanel1, ID_HEADBUTT, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_Headbutt->SetValue(false);
- itemStaticBoxSizer60->Add(m_Headbutt, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemStaticBoxSizer64->Add(m_Headbutt, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxStaticBox* itemStaticBoxSizer64Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
- wxStaticBoxSizer* itemStaticBoxSizer64 = new wxStaticBoxSizer(itemStaticBoxSizer64Static, wxVERTICAL);
- itemBoxSizer6->Add(itemStaticBoxSizer64, 0, wxGROW, 2);
+ wxStaticBox* itemStaticBoxSizer68Static = new wxStaticBox(itemPanel1, wxID_ANY, _T(""));
+ wxStaticBoxSizer* itemStaticBoxSizer68 = new wxStaticBoxSizer(itemStaticBoxSizer68Static, wxVERTICAL);
+ itemBoxSizer6->Add(itemStaticBoxSizer68, 0, wxGROW, 2);
- wxBoxSizer* itemBoxSizer65 = new wxBoxSizer(wxHORIZONTAL);
- itemStaticBoxSizer64->Add(itemBoxSizer65, 0, wxGROW, 2);
+ wxBoxSizer* itemBoxSizer69 = new wxBoxSizer(wxHORIZONTAL);
+ itemStaticBoxSizer68->Add(itemBoxSizer69, 0, wxGROW, 2);
- wxStaticText* itemStaticText66 = new wxStaticText( itemPanel1, wxID_STATIC, _("Force Type:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer65->Add(itemStaticText66, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ wxStaticText* itemStaticText70 = new wxStaticText( itemPanel1, wxID_STATIC, _("Force Type:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer69->Add(itemStaticText70, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- itemBoxSizer65->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemBoxSizer69->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxGridSizer* itemGridSizer68 = new wxGridSizer(3, 2, 0, 0);
- itemBoxSizer65->Add(itemGridSizer68, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ wxGridSizer* itemGridSizer72 = new wxGridSizer(3, 2, 0, 0);
+ itemBoxSizer69->Add(itemGridSizer72, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_ForceNone = new wxRadioButton( itemPanel1, ID_FORCE_NONE, _("None"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_ForceNone->SetValue(true);
- itemGridSizer68->Add(m_ForceNone, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer72->Add(m_ForceNone, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_ForceSlip = new wxRadioButton( itemPanel1, ID_FORCE_SLIP, _("Slip"), wxDefaultPosition, wxDefaultSize, 0 );
m_ForceSlip->SetValue(false);
- itemGridSizer68->Add(m_ForceSlip, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer72->Add(m_ForceSlip, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_ForceStop = new wxRadioButton( itemPanel1, ID_FORCE_STOP, _("Stop"), wxDefaultPosition, wxDefaultSize, 0 );
m_ForceStop->SetValue(false);
- itemGridSizer68->Add(m_ForceStop, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer72->Add(m_ForceStop, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_ForceForce = new wxRadioButton( itemPanel1, ID_FORCE_FORCE, _("Force"), wxDefaultPosition, wxDefaultSize, 0 );
m_ForceForce->SetValue(false);
- itemGridSizer68->Add(m_ForceForce, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer72->Add(m_ForceForce, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_ForcePush = new wxRadioButton( itemPanel1, ID_FORCE_PUSH, _("Push"), wxDefaultPosition, wxDefaultSize, 0 );
m_ForcePush->SetValue(false);
- itemGridSizer68->Add(m_ForcePush, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer72->Add(m_ForcePush, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
- wxBoxSizer* itemBoxSizer74 = new wxBoxSizer(wxHORIZONTAL);
- itemStaticBoxSizer64->Add(itemBoxSizer74, 0, wxGROW|wxTOP, 2);
+ wxBoxSizer* itemBoxSizer78 = new wxBoxSizer(wxHORIZONTAL);
+ itemStaticBoxSizer68->Add(itemBoxSizer78, 0, wxGROW|wxTOP, 2);
- wxStaticText* itemStaticText75 = new wxStaticText( itemPanel1, wxID_STATIC, _("Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer74->Add(itemStaticText75, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ wxStaticText* itemStaticText79 = new wxStaticText( itemPanel1, wxID_STATIC, _("Direction:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer78->Add(itemStaticText79, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- itemBoxSizer74->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ itemBoxSizer78->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
- wxGridSizer* itemGridSizer77 = new wxGridSizer(2, 2, 0, 0);
- itemBoxSizer74->Add(itemGridSizer77, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
+ wxGridSizer* itemGridSizer81 = new wxGridSizer(2, 2, 0, 0);
+ itemBoxSizer78->Add(itemGridSizer81, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
m_FDirUp = new wxRadioButton( itemPanel1, ID_FDIR_UP, _("Up"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_FDirUp->SetValue(true);
- itemGridSizer77->Add(m_FDirUp, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer81->Add(m_FDirUp, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_FDirDown = new wxRadioButton( itemPanel1, ID_FDIR_DOWN, _("Down"), wxDefaultPosition, wxDefaultSize, 0 );
m_FDirDown->SetValue(false);
- itemGridSizer77->Add(m_FDirDown, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer81->Add(m_FDirDown, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_FDirLeft = new wxRadioButton( itemPanel1, ID_FDIR_LEFT, _("Left"), wxDefaultPosition, wxDefaultSize, 0 );
m_FDirLeft->SetValue(false);
- itemGridSizer77->Add(m_FDirLeft, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer81->Add(m_FDirLeft, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
m_FDirRight = new wxRadioButton( itemPanel1, ID_FDIR_RIGHT, _("Right"), wxDefaultPosition, wxDefaultSize, 0 );
m_FDirRight->SetValue(false);
- itemGridSizer77->Add(m_FDirRight, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
+ itemGridSizer81->Add(m_FDirRight, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2);
// Connect events and objects
m_TileBitmap->Connect(ID_TILE, wxEVT_LEFT_DCLICK, wxMouseEventHandler(TilePanel::OnLeftDClick), NULL, this);
@@ -857,3 +873,16 @@ void TilePanel::OnLeftDClick( wxMouseEvent& event )
////@end wxEVT_LEFT_DCLICK event handler for ID_TILE in TilePanel.
}
+
+/*!
+ * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX
+ */
+
+void TilePanel::OnDiveClick( wxCommandEvent& event )
+{
+////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX in TilePanel.
+ // Before editing this code, remove the block markers.
+ event.Skip();
+////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX in TilePanel.
+}
+
diff --git a/pokemodr/gui/tilepanel.h b/pokemodr/gui/tilepanel.h
index 51a3078f..b2c1d9f3 100644
--- a/pokemodr/gui/tilepanel.h
+++ b/pokemodr/gui/tilepanel.h
@@ -144,6 +144,9 @@ public:
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_UNDER_WHIRLPOOL
void OnUnderWhirlpoolSelected( wxCommandEvent& event );
+ /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_DIVE
+ void OnDiveClick( wxCommandEvent& event );
+
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CUTTABLE
void OnCuttableClick( wxCommandEvent& event );
@@ -210,6 +213,7 @@ public:
wxRadioButton* m_SpcWaterfall;
wxRadioButton* m_SpcWhirlpool;
wxComboBox* m_UnderWhirlpool;
+ wxCheckBox* m_Dive;
wxCheckBox* m_Cuttable;
wxComboBox* m_UnderCut;
wxCheckBox* m_Headbutt;
@@ -243,6 +247,7 @@ public:
ID_SPC_WTRFALL = 10441,
ID_SPC_WHIRLPOOL = 10442,
ID_UNDER_WHIRLPOOL = 10437,
+ ID_DIVE = 10009,
ID_CUTTABLE = 10011,
ID_UNDER_CUT = 10438,
ID_HEADBUTT = 10004,