summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-05-22 03:51:45 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-05-22 03:51:45 +0000
commite858d98977a09b3c8faf4df87ada4abc1399e8e5 (patch)
treefbe406e42296b784cf03ae65cb9cbccb97aa7fa8
parent0fec318eac634e5465c30eb73d47ec82aaed9db8 (diff)
downloadsigen-e858d98977a09b3c8faf4df87ada4abc1399e8e5.tar.gz
sigen-e858d98977a09b3c8faf4df87ada4abc1399e8e5.tar.xz
sigen-e858d98977a09b3c8faf4df87ada4abc1399e8e5.zip
Added a lot of minor PokéMod modules
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@12 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog14
-rw-r--r--pokegen.cbp70
-rw-r--r--pokegen.depend70
-rw-r--r--pokegen.layout122
-rw-r--r--pokemod/AbilityEffect.cpp2
-rw-r--r--pokemod/AbilityEffect.h2
-rw-r--r--pokemod/CoinList.cpp208
-rw-r--r--pokemod/CoinList.h72
-rw-r--r--pokemod/ItemStorage.cpp152
-rw-r--r--pokemod/ItemStorage.h64
-rw-r--r--pokemod/Pokemod.cpp61
-rw-r--r--pokemod/Pokemod.h141
-rw-r--r--pokemod/PokemonAbility.cpp154
-rw-r--r--pokemod/PokemonAbility.h64
-rw-r--r--pokemod/PokemonEvolution.cpp235
-rw-r--r--pokemod/PokemonEvolution.h75
-rw-r--r--pokemod/PokemonItem.cpp26
-rw-r--r--pokemod/PokemonItem.h2
-rw-r--r--pokemod/PokemonMove.cpp179
-rw-r--r--pokemod/PokemonMove.h67
-rw-r--r--pokemod/PokemonNature.cpp154
-rw-r--r--pokemod/PokemonNature.h64
-rw-r--r--pokemod/Store.cpp2
-rw-r--r--pokemod/Store.h2
-rw-r--r--pokemod/Time.cpp2
-rw-r--r--pokemod/Time.h2
-rw-r--r--pokemod/Type.cpp2
-rw-r--r--pokemod/Type.h2
28 files changed, 1945 insertions, 65 deletions
diff --git a/Changelog b/Changelog
index 94610b44..7f6bffe8 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,18 @@
-----------------
+Rev: 12
+Date: 21 May 2007
+User: MathStuf
+-----------------
+[ADD] /pokemod/PokemonNature.{h, cpp}
+[ADD] /pokemod/PokemonAbility.{h, cpp}
+[ADD] /pokemod/ItemStorage.{h, cpp}
+[ADD] /pokemod/PokemonMove.{h, cpp}
+[ADD] /pokemod/PokemonEvolution.{h, cpp}
+[ADD] /pokemod/Pokemod.{h, cpp}
+[FIX] Header info directory paths
+[ADD] /pokemod/CoinList.{h, cpp}
+
+-----------------
Rev: 11
Date: 21 May 2007
User: MathStuf
diff --git a/pokegen.cbp b/pokegen.cbp
index 2d99b4a1..df988269 100644
--- a/pokegen.cbp
+++ b/pokegen.cbp
@@ -117,6 +117,16 @@
<Unit filename="pokemod\Badge.h">
<Option target="pokemod-DLL" />
</Unit>
+ <Unit filename="pokemod\CoinList.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\CoinList.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\Debug.cpp">
<Option target="pokemod-DLL" />
</Unit>
@@ -141,6 +151,16 @@
<Unit filename="pokemod\Ini.h">
<Option target="pokemod-DLL" />
</Unit>
+ <Unit filename="pokemod\ItemStorage.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\ItemStorage.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\Matrix.h">
<Option target="pokemod-DLL" />
</Unit>
@@ -168,6 +188,36 @@
<Unit filename="pokemod\Point.h">
<Option target="pokemod-DLL" />
</Unit>
+ <Unit filename="pokemod\Pokemod.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\Pokemod.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonAbility.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonAbility.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonEvolution.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonEvolution.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\PokemonItem.cpp">
<Option target="pokemodr" />
<Option target="pokegen" />
@@ -178,6 +228,26 @@
<Option target="pokegen" />
<Option target="pokemod-DLL" />
</Unit>
+ <Unit filename="pokemod\PokemonMove.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonMove.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonNature.cpp">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
+ <Unit filename="pokemod\PokemonNature.h">
+ <Option target="pokemodr" />
+ <Option target="pokegen" />
+ <Option target="pokemod-DLL" />
+ </Unit>
<Unit filename="pokemod\Ref.cpp">
<Option target="pokemod-DLL" />
</Unit>
diff --git a/pokegen.depend b/pokegen.depend
new file mode 100644
index 00000000..6be4bba4
--- /dev/null
+++ b/pokegen.depend
@@ -0,0 +1,70 @@
+# depslib dependency file v1.0
+1178468221 source:h:\ben\programming\pc\pokegen\src\pokemod\flag.cpp
+ "Flag.h"
+
+1178468213 h:\ben\programming\pc\pokegen\src\pokemod\flag.h
+ "Debug.h"
+ "Ini.h"
+ "Ref.h"
+
+1179710452 h:\ben\programming\pc\pokegen\src\pokemod\debug.h
+ <ctime>
+ <fstream>
+ <cstdio>
+ "String.h"
+
+1179711255 h:\ben\programming\pc\pokegen\src\pokemod\string.h
+ <cstdarg>
+ <string>
+ <sstream>
+ <iostream>
+
+1178918864 h:\ben\programming\pc\pokegen\src\pokemod\frac.h
+ "Debug.h"
+ "Ini.h"
+
+1178918733 h:\ben\programming\pc\pokegen\src\pokemod\ini.h
+ <map>
+ <fstream>
+ "String.h"
+
+1178916700 h:\ben\programming\pc\pokegen\src\pokemod\ref.h
+ <vector>
+ "String.h"
+
+1178467550 source:h:\ben\programming\pc\pokegen\src\pokemod\ini.cpp
+ "Ini.h"
+
+1178323177 source:h:\ben\programming\pc\pokegen\src\pokemod\object.cpp
+ "Object.h"
+
+1178915399 h:\ben\programming\pc\pokegen\src\pokemod\object.h
+ <wx/listbox.h>
+ <fstream>
+ "Debug.h"
+ "Ini.h"
+
+1178468484 source:h:\ben\programming\pc\pokegen\src\pokemod\path.cpp
+ "Path.h"
+
+1178468481 h:\ben\programming\pc\pokegen\src\pokemod\path.h
+ <string>
+ <fstream>
+ "String.h"
+
+1178918794 source:h:\ben\programming\pc\pokegen\src\pokemod\point.cpp
+ "Point.h"
+
+1178918798 h:\ben\programming\pc\pokegen\src\pokemod\point.h
+ "Debug.h"
+ "Ini.h"
+
+1179711261 source:h:\ben\programming\pc\pokegen\src\pokemod\string.cpp
+ "String.h"
+
+1178918899 source:h:\ben\programming\pc\pokegen\src\pokemod\debug.cpp
+ "Debug.h"
+
+1178323168 source:h:\ben\programming\pc\pokegen\src\pokemod\ref.cpp
+ "Ref.h"
+
diff --git a/pokegen.layout b/pokegen.layout
index 74587e8c..b3691d29 100644
--- a/pokegen.layout
+++ b/pokegen.layout
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
- <ActiveTarget name="pokemodr" />
+ <ActiveTarget name="pokemod-DLL" />
<File name="Changelog" open="1" top="1" tabpos="1">
- <Cursor position="993" topLine="21" />
+ <Cursor position="378" topLine="0" />
</File>
<File name="STANDARDS" open="0" top="0" tabpos="0">
<Cursor position="2" topLine="0" />
@@ -26,118 +26,160 @@
<Cursor position="1408" topLine="0" />
</File>
<File name="pokemod\Ability.cpp" open="0" top="0" tabpos="5">
- <Cursor position="4232" topLine="166" />
+ <Cursor position="6082" topLine="166" />
</File>
<File name="pokemod\Ability.h" open="0" top="0" tabpos="2">
- <Cursor position="2198" topLine="36" />
+ <Cursor position="2198" topLine="0" />
</File>
<File name="pokemod\AbilityEffect.cpp" open="0" top="0" tabpos="2">
- <Cursor position="6719" topLine="198" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\AbilityEffect.h" open="0" top="0" tabpos="3">
- <Cursor position="1289" topLine="12" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Author.cpp" open="0" top="0" tabpos="4">
- <Cursor position="4756" topLine="158" />
+ <Cursor position="4756" topLine="0" />
</File>
<File name="pokemod\Author.h" open="0" top="0" tabpos="5">
- <Cursor position="2263" topLine="39" />
+ <Cursor position="2263" topLine="0" />
</File>
<File name="pokemod\Badge.cpp" open="0" top="0" tabpos="6">
- <Cursor position="7320" topLine="232" />
+ <Cursor position="7320" topLine="0" />
</File>
<File name="pokemod\Badge.h" open="0" top="0" tabpos="7">
- <Cursor position="1402" topLine="43" />
+ <Cursor position="1402" topLine="0" />
+ </File>
+ <File name="pokemod\CoinList.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="6001" topLine="175" />
+ </File>
+ <File name="pokemod\CoinList.h" open="0" top="0" tabpos="0">
+ <Cursor position="2118" topLine="39" />
</File>
<File name="pokemod\Debug.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1310" topLine="16" />
+ <Cursor position="1310" topLine="0" />
</File>
<File name="pokemod\Debug.h" open="0" top="0" tabpos="4">
- <Cursor position="9129" topLine="195" />
+ <Cursor position="9129" topLine="0" />
</File>
<File name="pokemod\Flag.cpp" open="0" top="0" tabpos="8">
- <Cursor position="2832" topLine="54" />
+ <Cursor position="2832" topLine="0" />
</File>
<File name="pokemod\Flag.h" open="0" top="0" tabpos="9">
- <Cursor position="1790" topLine="24" />
+ <Cursor position="1790" topLine="0" />
</File>
<File name="pokemod\Frac.cpp" open="0" top="0" tabpos="10">
- <Cursor position="1853" topLine="43" />
+ <Cursor position="1853" topLine="0" />
</File>
<File name="pokemod\Frac.h" open="0" top="0" tabpos="11">
- <Cursor position="1571" topLine="31" />
+ <Cursor position="1571" topLine="0" />
</File>
<File name="pokemod\Ini.cpp" open="0" top="0" tabpos="3">
- <Cursor position="3247" topLine="85" />
+ <Cursor position="3247" topLine="0" />
</File>
<File name="pokemod\Ini.h" open="0" top="0" tabpos="12">
- <Cursor position="2687" topLine="41" />
+ <Cursor position="2687" topLine="0" />
+ </File>
+ <File name="pokemod\ItemStorage.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="3786" topLine="108" />
+ </File>
+ <File name="pokemod\ItemStorage.h" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Matrix.h" open="0" top="0" tabpos="4">
- <Cursor position="3839" topLine="117" />
+ <Cursor position="3839" topLine="0" />
</File>
<File name="pokemod\Nature.cpp" open="0" top="0" tabpos="5">
- <Cursor position="2289" topLine="58" />
+ <Cursor position="2289" topLine="0" />
</File>
<File name="pokemod\Nature.h" open="0" top="0" tabpos="4">
- <Cursor position="1307" topLine="14" />
+ <Cursor position="1307" topLine="0" />
</File>
<File name="pokemod\Object.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1358" topLine="12" />
+ <Cursor position="1358" topLine="0" />
</File>
<File name="pokemod\Object.h" open="0" top="0" tabpos="0">
- <Cursor position="1644" topLine="25" />
+ <Cursor position="1644" topLine="0" />
</File>
<File name="pokemod\Path.cpp" open="0" top="0" tabpos="17">
- <Cursor position="1503" topLine="58" />
+ <Cursor position="1503" topLine="0" />
</File>
<File name="pokemod\Path.h" open="0" top="0" tabpos="18">
- <Cursor position="1744" topLine="19" />
+ <Cursor position="1744" topLine="0" />
</File>
<File name="pokemod\Point.cpp" open="0" top="0" tabpos="19">
- <Cursor position="1508" topLine="11" />
+ <Cursor position="1508" topLine="0" />
</File>
<File name="pokemod\Point.h" open="0" top="0" tabpos="20">
- <Cursor position="1594" topLine="32" />
+ <Cursor position="1594" topLine="0" />
+ </File>
+ <File name="pokemod\Pokemod.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\Pokemod.h" open="0" top="0" tabpos="0">
+ <Cursor position="1346" topLine="17" />
+ </File>
+ <File name="pokemod\PokemonAbility.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonAbility.h" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonEvolution.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonEvolution.h" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\PokemonItem.cpp" open="0" top="0" tabpos="0">
- <Cursor position="4617" topLine="132" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\PokemonItem.h" open="0" top="0" tabpos="0">
- <Cursor position="1313" topLine="12" />
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonMove.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonMove.h" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonNature.cpp" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
+ </File>
+ <File name="pokemod\PokemonNature.h" open="0" top="0" tabpos="0">
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Ref.cpp" open="0" top="0" tabpos="0">
- <Cursor position="103" topLine="3" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Ref.h" open="0" top="0" tabpos="0">
- <Cursor position="103" topLine="3" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Store.cpp" open="0" top="0" tabpos="0">
- <Cursor position="5705" topLine="174" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Store.h" open="0" top="0" tabpos="0">
- <Cursor position="1316" topLine="37" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\String.cpp" open="0" top="0" tabpos="0">
- <Cursor position="3983" topLine="100" />
+ <Cursor position="3983" topLine="0" />
</File>
<File name="pokemod\String.h" open="0" top="0" tabpos="0">
- <Cursor position="1715" topLine="26" />
+ <Cursor position="1715" topLine="0" />
</File>
<File name="pokemod\Time.cpp" open="0" top="0" tabpos="0">
- <Cursor position="3900" topLine="119" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Time.h" open="0" top="0" tabpos="0">
- <Cursor position="1634" topLine="18" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Type.cpp" open="0" top="0" tabpos="0">
- <Cursor position="1897" topLine="50" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\Type.h" open="0" top="0" tabpos="0">
- <Cursor position="1431" topLine="26" />
+ <Cursor position="103" topLine="0" />
</File>
<File name="pokemod\pokemod_inc.h" open="0" top="0" tabpos="0">
- <Cursor position="1828" topLine="25" />
+ <Cursor position="1828" topLine="0" />
</File>
<File name="pokemodr\PokeModr.cpp" open="0" top="0" tabpos="0">
<Cursor position="1524" topLine="23" />
diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp
index c19b2f8a..45f45d3a 100644
--- a/pokemod/AbilityEffect.cpp
+++ b/pokemod/AbilityEffect.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: AbilityEffect.cpp
+// Name: pokemod/AbilityEffect.cpp
// Purpose: Define an effect of an ability
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/AbilityEffect.h b/pokemod/AbilityEffect.h
index 27d26f57..2306b35e 100644
--- a/pokemod/AbilityEffect.h
+++ b/pokemod/AbilityEffect.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: AbilityEffect.h
+// Name: pokemod/AbilityEffect.h
// Purpose: Define an effect of an ability
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp
new file mode 100644
index 00000000..83748355
--- /dev/null
+++ b/pokemod/CoinList.cpp
@@ -0,0 +1,208 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/CoinList.cpp
+// Purpose: A specialty store where Pokémon and items can be gotten for
+// coins won through gambling
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Wed Feb 28 21:16:29 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "CoinList.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::CoinList::CoinList(unsigned _id)
+{
+ LogCtor("CoinList", _id);
+ name = "";
+ value = 0;
+ items.clear();
+ id = _id;
+}
+
+PokeGen::PokeMod::CoinList::CoinList(Ini &ini, unsigned _id)
+{
+ LogCtorIni("CoinList", _id);
+ ImportIni(ini);
+ if(_id == UINT_MAX)
+ LogIdError("CoinList");
+}
+
+PokeGen::PokeMod::CoinList::~CoinList()
+{
+ LogDtor("CoinList", id, name);
+}
+
+void PokeGen::PokeMod::CoinList::Validate()
+{
+ isValid = true;
+ LogValidateStart("CoinList", id, name);
+ if (name == "")
+ {
+ LogVarEmpty("CoinList", id, "name", name);
+ isValid = false;
+ }
+ if (GetCoinItemCount())
+ {
+ for (unsigned i = 0; i < GetCoinItemCount(); ++i)
+ {
+ LogSubmoduleIterate("CoinList", id, "item", i, name);
+ if (!items[i].IsValid())
+ isValid = false;
+ }
+ }
+ else
+ {
+ LogSubmoduleEmpty("CoinList", id, "items", name);
+ isValid = false;
+ }
+ LogValidateOver("CoinList", id, isValid, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::CoinList::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("CoinList", id, name);
+ if (name == "")
+ {
+ LogVarEmpty("CoinList", id, "name", name);
+ output.Append(ConsoleLogVarEmpty("CoinList", id, "name", name));
+ isValid = false;
+ }
+ if (GetCoinItemCount())
+ {
+ for (unsigned i = 0; i < GetCoinItemCount(); ++i)
+ {
+ LogSubmoduleIterate("CoinList", id, "item", i, name);
+ if (!items[i].IsValid())
+ isValid = false;
+ }
+ }
+ else
+ {
+ LogSubmoduleEmpty("CoinList", id, "items", name);
+ output.Append(ConsoleLogSubmoduleEmpty("CoinList", id, "items", name));
+ isValid = false;
+ }
+ LogValidateOver("CoinList", id, isValid, name);
+}
+#endif
+
+void PokeGen::PokeMod::CoinList::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("CoinList");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("CoinList");
+ }
+ else
+ id = _id;
+ ini.GetValue("name", name, "");
+ ini.GetValue("value", value, 0);
+ LogImportOver("CoinList", id, name);
+}
+
+void PokeGen::PokeMod::CoinList::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("CoinList", id, name);
+ // Make elements
+ Ini exCoinList("coinList");
+ exCoinList.AddField("id", id);
+ exCoinList.AddField("name", name);
+ exCoinList.AddField("value", value);
+ exCoinList.Export(fout);
+ for (std::vector<CoinItem>::iterator i = effects.begin(); i != effects.end(); ++i)
+ i->ExportIni(fout, name);
+ LogExportOver("CoinList", id, name);
+}
+
+void PokeGen::PokeMod::CoinList::SetName(const String &n)
+{
+ LogSetVar("CoinList", id, "name", n, name);
+ name = n;
+}
+
+void PokeGen::PokeMod::CoinList::SetValue(unsigned v)
+{
+ LogSetVar("CoinList", id, "value", value, name);
+ value = v;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::CoinList::GetName() const
+{
+ LogFetchVar("CoinList", id, "name", name, name);
+ return name;
+}
+
+unsigned PokeGen::PokeMod::CoinList::GetValue() const
+{
+ LogFetchVar("CoinList", id, "value", value, name);
+ return value;
+}
+
+PokeGen::PokeMod::CoinItem *PokeGen::PokeMod::CoinList::GetCoinItem(unsigned _id)
+{
+ LogSubmoduleFetch("CoinList", id, "item", _id, name);
+ for (unsigned i = 0; i < GetAbilityEffectCount(); ++i)
+ {
+ if (items[i].GetId() == _id)
+ return &items[i];
+ }
+ LogSubmoduleFetch("CoinList", id, "item", _id, name);
+ return NULL;
+}
+
+unsigned PokeGen::PokeMod::CoinList::GetCoinItemCount() const
+{
+ LogSubmoduleCount("CoinList", id, "items", name);
+ return items.size();
+}
+
+void PokeGen::PokeMod::CoinList::NewCoinItem(Ini *const ini)
+{
+ unsigned i = 0;
+ // Find the first unused ID in the vector
+ for (; i < GetCoinItemCount(); ++i)
+ {
+ if (!GetCoinItem(i))
+ break;
+ }
+ CoinItem newCoinItem(i);
+ if (ini)
+ newCoinItem.ImportIni(*ini);
+ LogSubmoduleNew("CoinList", id, "item", i, name);
+ items.push_back(newCoinItem);
+}
+
+void PokeGen::PokeMod::CoinList::DeleteCoinItem(unsigned _id)
+{
+ LogSubmoduleRemoveStart("CoinList", id, "item", _id, name);
+ for (std::vector<AbilityEffect>::iterator i = items.begin(); i != items.end(); ++i)
+ {
+ if (i->GetId() == _id)
+ {
+ LogSubmoduleRemoved("CoinList", id, "item", _id, name);
+ effects.erase(i);
+ }
+ }
+ LogSubmoduleRemoveFail("CoinList", id, "item", _id, name);
+}
diff --git a/pokemod/CoinList.h b/pokemod/CoinList.h
new file mode 100644
index 00000000..0b5f3aef
--- /dev/null
+++ b/pokemod/CoinList.h
@@ -0,0 +1,72 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/CoinList.h
+// Purpose: A specialty store where Pokémon and items can be gotten for
+// coins won through gambling
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Wed Feb 28 21:16:29 2007
+// Copyright: ©2007 Ben Boeckel and 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_COINLIST__
+#define __POKEMOD_COINLIST__
+
+#include <vector>
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+#include "CoinItem.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class CoinList : public Object
+ {
+ public:
+ CoinList(unsigned _id);
+ CoinList(Ini &ini, unsigned _id = UINT_MAX);
+ ~CoinList();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout);
+
+ void SetName(const String &n);
+ void SetValue(unsigned v);
+
+ String GetName() const;
+ unsigned GetValue() const;
+
+ CoinItem *GetCoinItem(unsigned _id);
+ unsigned GetCoinItemCount() const;
+ void NewCoinItem(Ini *const ini);
+ void DeleteCoinItem(unsigned _id);
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ String name;
+ unsigned value;
+
+ std::vector<CoinItem> items;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/ItemStorage.cpp b/pokemod/ItemStorage.cpp
new file mode 100644
index 00000000..b7466f3e
--- /dev/null
+++ b/pokemod/ItemStorage.cpp
@@ -0,0 +1,152 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/ItemStorage.cpp
+// Purpose: Define a type of item and how much can be stored
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:06:40 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "ItemStorage.h"
+
+PokeGen::PokeMod::ItemStorage::ItemStorage(unsigned _id)
+{
+ LogCtor("ItemStorage", _id);
+ name = "";
+ computer = 0;
+ player = 1;
+ id = _id;
+}
+
+PokeGen::PokeMod::ItemStorage::ItemStorage(Ini &ini, unsigned _id)
+{
+ LogCtorIni("ItemStorage", _id);
+ ImportIni(ini);
+ if(_id == UINT_MAX)
+ LogIdError("ItemStorage");
+}
+
+PokeGen::PokeMod::ItemStorage::~ItemStorage()
+{
+ LogDtor("ItemStorage", id, name);
+}
+
+void PokeGen::PokeMod::ItemStorage::Validate()
+{
+ isValid = true;
+ LogValidateStart("ItemStorage", id, name);
+ if (name == "")
+ {
+ LogVarNotSet("ItemStorage", id, "name");
+ isValid = false;
+ }
+ if (!player)
+ {
+ LogVarNotValid("ItemStorage", id, "player");
+ isValid = false;
+ }
+ LogValidateOver("ItemStorage", id, isValid, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::ItemStorage::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("ItemStorage", id, name);
+ if (name == "")
+ {
+ LogVarNotSet("ItemStorage", id, "name");
+ output.Append(ConsoleLogVarNotSet("ItemStorage", id, "name"));
+ isValid = false;
+ }
+ if (!player)
+ {
+ LogVarNotValid("ItemStorage", id, "player");
+ output.Append(ConsoleLogVarNotValid("ItemStorage", id, "player"));
+ isValid = false;
+ }
+ LogValidateOver("ItemStorage", id, isValid, name);
+}
+#endif
+
+void PokeGen::PokeMod::ItemStorage::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("ItemStorage");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("ItemStorage");
+ }
+ else
+ id = _id;
+ ini.GetValue("name", name, "");
+ ini.GetValue("computer", computer, 0);
+ ini.GetValue("player", player, 1);
+ LogImportOver("ItemStorage", id, name);
+}
+
+void PokeGen::PokeMod::ItemStorage::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("ItemStorage", id, name);
+ // Make elements
+ Ini exItemStorage("ItemStorage");
+ exItemStorage.AddField("id", id);
+ exItemStorage.AddField("name", name);
+ exItemStorage.AddField("computer", computer);
+ exItemStorage.AddField("player", player);
+ exItemStorage.Export(fout);
+ LogExportOver("ItemStorage", id, name);
+}
+
+void PokeGen::PokeMod::ItemStorage::SetName(const String &n)
+{
+ LogSetVar("ItemStorage", id, "name", n, name);
+ name = n;
+}
+
+void PokeGen::PokeMod::ItemStorage::SetComputer(unsigned c)
+{
+ LogSetVar("ItemStorage", id, "computer", c, name);
+ computer = c;
+}
+
+void PokeGen::PokeMod::ItemStorage::SetPlayer(unsigned p)
+{
+ LogSetVar("ItemStorage", id, "player", p, name);
+ if (p)
+ player = p;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::ItemStorage::GetName() const
+{
+ LogFetchVar("ItemStorage", id, "name", name);
+ return name;
+}
+
+unsigned PokeGen::PokeMod::ItemStorage::GetComputer() const
+{
+ LogFetchVar("ItemStorage", id, "computer", computer, name);
+ return computer;
+}
+
+unsigned PokeGen::PokeMod::ItemStorage::GetPlayer() const
+{
+ LogFetchVar("ItemStorage", id, "player", player, name);
+ return player;
+}
diff --git a/pokemod/ItemStorage.h b/pokemod/ItemStorage.h
new file mode 100644
index 00000000..808cb602
--- /dev/null
+++ b/pokemod/ItemStorage.h
@@ -0,0 +1,64 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/ItemStorage.h
+// Purpose: Define a type of item and how much can be stored
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:06:40 2007
+// Copyright: ©2007 Ben Boeckel and 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_ITEMSTORAGE__
+#define __POKEMOD_ITEMSTORAGE__
+
+#include "Object.h"
+#include "String.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class ItemStorage : public Object
+ {
+ public:
+ ItemStorage(unsigned _id);
+ ItemStorage(Ini &ini, unsigned _id = UINT_MAX);
+ ~ItemStorage();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetName(const String &n);
+ void SetComputer(unsigned c);
+ void SetPlayer(unsigned p);
+
+ String GetName() const;
+ unsigned GetComputer() const;
+ unsigned GetPlayer() const;
+ private:
+ void Validate();
+# ifdef POKEMODR
+ void Validate(const wxListBox &output);
+# endif
+
+ String name;
+ unsigned computer;
+ unsigned player;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp
new file mode 100644
index 00000000..b62b3da7
--- /dev/null
+++ b/pokemod/Pokemod.cpp
@@ -0,0 +1,61 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Pokemod.cpp
+// Purpose:
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Sat Feb 24 21:41:19 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "Pokemod.h"
+
+PokeGen::PokeMod::PokeMod::Pokemod()
+{
+}
+
+PokeGen::PokeMod::PokeMod::Pokemod(std::ifstream &fin)
+{
+ Log("Pokemod: Constructing by XML", PM_DEBUG_DEBUG);
+ ImportIni(fin);
+}
+
+PokeGen::PokeMod::PokeMod::~Pokemod()
+{
+ LogDtor("Pokemod", 0);
+}
+
+void Validate()
+{
+ // TODO (Validation#1#): Pokemod Validation
+}
+
+#ifdef PG_DEBUG_WINDOW
+void Validate(const wxListBox &output)
+{
+ // TODO (Validation#1#): Pokemod Validation
+}
+#endif
+
+void PokeGen::PokeMod::PokeMod::ImportIni(std::ifstream &fin)
+{
+ // TODO (Xml#1#): Import Pokemod from XML
+}
+
+void PokeGen::PokeMod::PokeMod::ExportXml(std::ofstream &fout)
+{
+ // TODO (Xml#1#): Export Pokemod to XML
+}
diff --git a/pokemod/Pokemod.h b/pokemod/Pokemod.h
new file mode 100644
index 00000000..d94bf794
--- /dev/null
+++ b/pokemod/Pokemod.h
@@ -0,0 +1,141 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/Pokemod.h
+// Purpose:
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Sat Feb 24 21:41:19 2007
+// Copyright: ©2007 Ben Boeckel and 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_POKEMOD__
+#define __POKEMOD_POKEMOD__
+
+#include <vector>
+#include "Object.h"
+#include "Ref.h"
+#include "Ability.h"
+#include "Author.h"
+#include "Badge.h"
+#include "CoinList.h"
+#include "Item.h"
+#include "ItemStorage.h"
+#include "Nature.h"
+#include "Store.h"
+#include "Time.h"
+#include "Type.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class Pokemod : public Object
+ {
+ public:
+ Pokemod();
+ Pokemod(std::ifstream &fin);
+ ~Pokemod();
+
+ void ImportIni(std::ifstream &fin);
+ void ExportIni(std::ofstream &fout);
+
+ bool IsSpecialSplit();
+ bool IsSpecialDVSplit();
+
+ Ability *GetAbility(unsigned _id);
+ Ability *GetAbility(const String &name);
+ unsigned GetAbilityCount();
+ void NewAbility();
+ void DeleteAbility(unsigned _id);
+
+ Author *GetAuthor(unsigned _id);
+ Author *GetAuthor(const String &name);
+ unsigned GetAuthorCount();
+ void NewAuthor();
+ void DeleteAuthor(unsigned _id);
+
+ Badge *GetBadge(unsigned _id);
+ Badge *GetBadge(const String &name);
+ unsigned GetBadgeCount();
+ void NewBadge();
+ void DeleteBadge(unsigned _id);
+
+ CoinList *GetCoinList(unsigned _id);
+ CoinList *GetCoinList(const String &name);
+ unsigned GetCoinListCount();
+ void NewCoinList();
+ void DeleteCoinList(unsigned _id);
+
+ Item *GetItem(unsigned _id);
+ Item *GetItem(const String &name);
+ unsigned GetItemCount();
+ void NewItem();
+ void DeleteItem(unsigned _id);
+
+ ItemStorage *GetItemStorage(unsigned _id);
+ ItemStorage *GetItemStorage(const String &name);
+ unsigned GetItemStorageCount();
+ void NewItemStorage();
+ void DeleteItemStorage(unsigned _id);
+
+ Nature *GetNature(unsigned _id);
+ Nature *GetNature(const String &name);
+ unsigned GetNatureCount();
+ void NewNature();
+ void DeleteNature(unsigned _id);
+
+ Store *GetStore(unsigned _id);
+ Store *GetStore(const String &name);
+ unsigned GetStoreCount();
+ void NewStore();
+ void DeleteStore(unsigned _id);
+
+ Time *GetTime(unsigned _id);
+ Time *GetTime(const String &name);
+ unsigned GetTimeCount();
+ void NewTime();
+ void DeleteTime(unsigned _id);
+
+ Type *GetType(unsigned _id);
+ Type *GetType(const String &name);
+ unsigned GetTypeCount();
+ void NewType();
+ void DeleteType(unsigned _id);
+ private:
+ void Validate();
+# ifdef POKEMODR
+ void Validate(const wxListBox &output);
+# endif
+
+ bool splitSpecial;
+ bool splitSpecialDV;
+
+ std::vector<Ability> abilities;
+ std::vector<Author> authors;
+ std::vector<Badge> badges;
+ std::vector<CoinList> coinLists;
+ std::vector<Item> items;
+ std::vector<ItemStorage> itemStorage;
+ std::vector<Nature> natures;
+ std::vector<Pokemon> pokemon;
+ std::vector<Store> stores;
+ std::vector<Time> times;
+ std::vector<Type> types;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/PokemonAbility.cpp b/pokemod/PokemonAbility.cpp
new file mode 100644
index 00000000..33035db1
--- /dev/null
+++ b/pokemod/PokemonAbility.cpp
@@ -0,0 +1,154 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonAbility.cpp
+// Purpose: Define an ability that a Pokémon can have
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:39:17 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "PokemonAbility.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::PokemonAbility::PokemonAbility(unsigned _id)
+{
+ LogCtor("PokemonAbility", _id);
+ ability = -1;
+ weight = 1;
+ id = _id;
+}
+
+PokeGen::PokeMod::PokemonAbility::PokemonAbility(Ini &ini, unsigned _id)
+{
+ LogCtorIni("PokemonAbility", _id);
+ ImportIni(ini, _id);
+ if(_id == UINT_MAX)
+ LogIdError("PokemonAbility");
+}
+
+PokeGen::PokeMod::PokemonAbility::~PokemonAbility()
+{
+ LogDtor("PokemonAbility", id, GetAbilityString());
+}
+
+void PokeGen::PokeMod::PokemonAbility::Validate()
+{
+ isValid = true;
+ LogValidateStart("PokemonAbility", id);
+ if (!curPokeMod.GetAbility(ability))
+ {
+ LogVarNotValid("PokemonAbility", id, "ability");
+ isValid = false;
+ }
+ if (!weight)
+ {
+ LogVarNotSet("PokemonAbility", id, "weight", GetAbilityString());
+ isValid = false;
+ }
+ LogValidateOver("PokemonAbility", id, isValid, GetAbilityString());
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::PokemonAbility::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("PokemonAbility", id);
+ if (!curPokeMod.GetAbility(ability))
+ {
+ LogVarNotValid("PokemonAbility", id, "ability");
+ output.Append(ConsoleLogVarNotValid("PokemonAbility", id, "ability"));
+ isValid = false;
+ }
+ if (!weight)
+ {
+ LogVarNotSet("PokemonAbility", id, "weight", GetAbilityString());
+ output.Append(ConsoleLogVarNotSet("PokemonAbility", id, weight, GetAbilityString());
+ isValid = false;
+ }
+ LogValidateOver("PokemonAbility", id, isValid, GetAbilityString());
+}
+#endif
+
+void PokeGen::PokeMod::PokemonAbility::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("PokemonAbility");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("PokemonAbility");
+ }
+ else
+ id = _id;
+ ini.GetValue("ability", ability, -1);
+ ini.GetValue("weight", weight, 1);
+ LogImportOver("PokemonAbility", id);
+}
+
+void PokeGen::PokeMod::PokemonAbility::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("PokemonAbility", id);
+ // Make elements
+ Ini exPokemonAbility("pokemonAbility");
+ exPokemonAbility.AddField("id", id);
+ exPokemonAbility.AddField("ability", ability);
+ exPokemonAbility.AddField("weight", weight);
+ exPokemonAbility.Export(fout);
+ LogExportOver("PokemonAbility", id);
+}
+
+void PokeGen::PokeMod::PokemonAbility::SetAbility(int a)
+{
+ LogSetVar("PokemonAbility", id, "ability", a);
+ ability = a;
+}
+
+void PokeGen::PokeMod::PokemonAbility::SetAbility(const String &a)
+{
+ LogSetVar("PokemonAbility", id, "ability", a);
+ if (Ability *temp = curPokeMod.GetAbility(a))
+ ability = a->GetId();
+}
+
+void PokeGen::PokeMod::PokemonAbility::SetWeight(unsigned w)
+{
+ LogSetVar("PokemonAbility", id, "weight", w, GetAbilityString());
+ if (w)
+ weight = w;
+}
+
+int PokeGen::PokeMod::PokemonAbility::GetAbility() const
+{
+ LogFetchVar("PokemonAbility", id, "ability", ability);
+ return ability;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonAbility::GetAbilityString() const
+{
+ LogFetchVar("PokemonAbility", id, "ability string", ability);
+ if (Ability *a = curPokeMod.GetAbility(ability))
+ return a->GetName();
+ return "";
+}
+
+unsigned PokeGen::PokeMod::PokemonAbility::GetWeight() const
+{
+ LogFetchVar("PokemonAbility", id, "weight", weight, GetAbilityString());
+ return weight;
+}
diff --git a/pokemod/PokemonAbility.h b/pokemod/PokemonAbility.h
new file mode 100644
index 00000000..eee13a26
--- /dev/null
+++ b/pokemod/PokemonAbility.h
@@ -0,0 +1,64 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonAbility.h
+// Purpose: Define an ability that a Pokémon can have
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:39:17 2007
+// Copyright: ©2007 Ben Boeckel and 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_POKEMONABILITY__
+#define __POKEMOD_POKEMONABILITY__
+
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class PokemonAbility : public Object
+ {
+ public:
+ PokemonAbility(unsigned _id);
+ PokemonAbility(Ini &ini, unsigned _id = UINT_MAX);
+ ~PokemonAbility();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetAbility(int a);
+ void SetAbility(const String &a);
+ void SetWeight(unsigned w);
+
+ int GetAbility() const;
+ String GetAbilityString() const;
+ unsigned GetWeight() const;
+ private:
+ void Validate();
+# ifdef POKEMODR
+ void Validate(const wxListBox &output);
+# endif
+
+ int ability;
+ unsigned weight;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/PokemonEvolution.cpp b/pokemod/PokemonEvolution.cpp
new file mode 100644
index 00000000..c355a89c
--- /dev/null
+++ b/pokemod/PokemonEvolution.cpp
@@ -0,0 +1,235 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonEvolution.cpp
+// Purpose: Define an evolution that a Pokémon can go through
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:45:29 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "PokemonEvolution.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::PokemonEvolution::PokemonEvolution(unsigned _id)
+{
+ LogCtor("PokemonEvolution", _id);
+ species = -1;
+ style = 0;
+ level = 0;
+ item = -1;
+ happiness = 0;
+ id = _id;
+}
+
+PokeGen::PokeMod::PokemonEvolution::PokemonEvolution(Ini &ini, unsigned _id)
+{
+ LogCtorIni("PokemonEvolution", _id);
+ ImportIni(ini);
+ if(_id == UINT_MAX)
+ LogIdError("PokemonEvolution");
+}
+
+PokeGen::PokeMod::PokemonEvolution::~PokemonEvolution()
+{
+ LogDtor("PokemonEvolution", id);
+}
+
+void PokeGen::PokeMod::PokemonEvolution::Validate()
+{
+ isValid = true;
+ LogValidateStart("PokemonEvolution", id);
+ if (!curPokeMod.GetPokemon(species))
+ {
+ LogVarNotValid("PokemonEvolution", id, "species");
+ isValid = false;
+ }
+ if (STY_END <= style)
+ {
+ LogVarNotValid("PokemonEvolution", id, "style");
+ isValid = false;
+ }
+ if (curPokeMod.GetMaxLevel() <= level)
+ {
+ LogVarNotValid("PokemonEvolution", id, "level");
+ isValid = false;
+ }
+ if (!curPokeMod.GetItem(item))
+ {
+ LogVarNotValid("PokemonEvolution", id, "species");
+ isValid = false;
+ }
+ LogValidateOver("PokemonEvolution", id, isValid);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::PokemonEvolution::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("PokemonEvolution", id);
+ if (!curPokeMod.GetPokemon(species))
+ {
+ LogVarNotValid("PokemonEvolution", id, "species");
+ output.Append(ConsoleLogVarNotValid("PokemonEvolution", id, "move"));
+ isValid = false;
+ }
+ if (STY_END <= style)
+ {
+ LogVarNotValid("PokemonEvolution", id, "style");
+ output.Append("Error (PokemonEvolution): Style out of range");
+ isValid = false;
+ }
+ if (curPokeMod.GetMaxLevel() <= level)
+ {
+ LogVarNotValid("PokemonEvolution", id, "level");
+ output.Append("Error (PokemonEvolution): Level out of range");
+ isValid = false;
+ }
+ if (!curPokeMod.GetItem(item))
+ {
+ LogVarNotValid("PokemonEvolution", id, "species");
+ output.Append(ConsoleLogVarNotValid("PokemonEvolution", id, "species"));
+ isValid = false;
+ }
+ LogValidateOver("PokemonEvolution", id, isValid);
+}
+#endif
+
+void PokeGen::PokeMod::PokemonEvolution::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("PokemonEvolution");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("PokemonEvolution");
+ }
+ else
+ id = _id;
+ ini.GetValue("species", species, -1);
+ ini.GetValue("style", style, 0);
+ ini.GetValue("level", level, 0);
+ ini.GetValue("item", item, -1);
+ ini.GetValue("happiness", happiness, 0);
+ LogImportOver("PokemonEvolution", id);
+}
+
+void PokeGen::PokeMod::PokemonEvolution::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("PokemonEvolution", id);
+ // Make elements
+ Ini exPokemonEvolution("PokemonEvolution");
+ exPokemonEvolution.AddField("id", id);
+ exPokemonEvolution.AddField("species", species);
+ exPokemonEvolution.AddField("style", style);
+ exPokemonEvolution.AddField("level", level);
+ exPokemonEvolution.AddField("item", item);
+ exPokemonEvolution.AddField("happiness", happiness);
+ exPokemonEvolution.Export(fout);
+ LogExportOver("PokemonEvolution", id);
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetSpecies(int s)
+{
+ LogSetVar("PokemonEvolution", id, "species", s);
+ species = s;
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const String &s)
+{
+ LogSetVar("PokemonEvolution", id, "species", s);
+ if (Pokemon *temp = curPokeMod.GetPokemon(s))
+ species = temp->GetId();
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetStyle(int s)
+{
+ LogSetVar("PokemonEvolution", id, "style", s);
+ style = s;
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetLevel(unsigned l)
+{
+ LogSetVar("PokemonEvolution", id, "level", l);
+ level = l;
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetItem(int i)
+{
+ LogSetVar("PokemonEvolution", id, "item", i);
+ item = i;
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetItem(const String &i)
+{
+ LogSetVar("PokemonEvolution", id, "item", i);
+ if (Item *temp = curPokeMod.GetItem(i))
+ item = temp->GetId();
+}
+
+void PokeGen::PokeMod::PokemonEvolution::SetHappiness(unsigned h)
+{
+ LogSetVar("PokemonEvolution", id, "happiness", h);
+ happiness = h;
+}
+
+int PokeGen::PokeMod::PokemonEvolution::GetSpecies()
+{
+ LogFetchVar("PokemonEvolution", id, "species", species);
+ return species;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetSpeciesString()
+{
+ LogFetchVar("PokemonEvolution", id, "species string", species);
+ if (Pokemon *s = curPokeMod.GetPokemon(species))
+ return s->GetName();
+ return "";
+}
+
+int PokeGen::PokeMod::PokemonEvolution::GetStyle()
+{
+ LogFetchVar("PokemonEvolution", id, "style", style);
+ return style;
+}
+
+unsigned PokeGen::PokeMod::PokemonEvolution::GetLevel()
+{
+ LogFetchVar("PokemonEvolution", id, "level", level);
+ return level;
+}
+
+int PokeGen::PokeMod::PokemonEvolution::GetItem()
+{
+ LogFetchVar("PokemonEvolution", id, "item", item);
+ return item;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetItemString()
+{
+ LogFetchVar("PokemonEvolution", id, "item string", item);
+ if (Item *i = curPokeMod.GetItem(item))
+ return i->GetName();
+ return "";
+}
+
+unsigned PokeGen::PokeMod::PokemonEvolution::GetHappiness()
+{
+ LogFetchVar("PokemonEvolution", id, "happiness", happiness);
+ return happiness;
+}
diff --git a/pokemod/PokemonEvolution.h b/pokemod/PokemonEvolution.h
new file mode 100644
index 00000000..537b5283
--- /dev/null
+++ b/pokemod/PokemonEvolution.h
@@ -0,0 +1,75 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonEvolution.h
+// Purpose: Define an evolution that a Pokémon can go through
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:45:29 2007
+// Copyright: ©2007 Ben Boeckel and 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_POKEMONEVOLUTION__
+#define __POKEMOD_POKEMONEVOLUTION__
+
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class PokemonEvolution : public Object
+ {
+ public:
+ PokemonEvolution(unsigned _id);
+ PokemonEvolution(Ini &ini, unsigned _id = UINT_MAX);
+ ~PokemonEvolution();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetSpecies(int s);
+ void SetSpecies(const String &s);
+ void SetStyle(int s);
+ void SetLevel(unsigned l);
+ void SetItem(int i);
+ void SetItem(const String &i);
+ void SetHappiness(unsigned h);
+
+ int GetSpecies() const;
+ String GetSpeciesString() const;
+ int GetStyle() const;
+ unsigned GetLevel() const;
+ int GetItem() const;
+ String GetItemString() const;
+ unsigned GetHappiness() const;
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ int species;
+ int style;
+ unsigned level;
+ int item;
+ unsigned happiness;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/PokemonItem.cpp b/pokemod/PokemonItem.cpp
index 3ff1e273..7c47ee4d 100644
--- a/pokemod/PokemonItem.cpp
+++ b/pokemod/PokemonItem.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: PokemonItem.cpp
+// Name: pokemod/PokemonItem.cpp
// Purpose: Define an item that a Pokémon can be found with in the wild
// Author: Ben Boeckel
// Modified by: Ben Boeckel
@@ -126,36 +126,30 @@ void PokeGen::PokeMod::PokemonItem::SetItem(int i)
void PokeGen::PokeMod::PokemonItem::SetItem(const String &i)
{
- if (Item *itemId = curPokeMod.GetItem(i))
- {
- LogSetVar("PokemonItem", id, "item", itemId->GetName());
- item = itemId->GetId();
- }
- else
- LogOutOfRange("PokemonItem", id, "item", UINT_MAX, "");
+ LogSetVar("PokemonItem", id, "item", i);
+ if (Item *temp = curPokeMod.GetItem(i))
+ item = temp->GetId();
}
void PokeGen::PokeMod::PokemonItem::SetWeight(unsigned w)
{
+ LogSetVar("PokemonItem", id, "weight", w);
if (w)
- {
- LogSetVar("PokemonItem", id, "weight", w);
weight = w;
- }
- else
- LogOutOfRange("PokemonItem", id, "weight", w, "");
}
int PokeGen::PokeMod::PokemonItem::GetItem() const
{
- LogFetchVar("PokemonItem", id, "item", item, GetItemString());
+ LogFetchVar("PokemonItem", id, "item", item);
return item;
}
PokeGen::PokeMod::String PokeGen::PokeMod::PokemonItem::GetItemString() const
{
- LogFetchVar("PokemonItem", id, "item", GetItemString());
- return curPokeMod.GetItem(item)->GetName();
+ LogFetchVar("PokemonItem", id, "item string", item);
+ if (Item *i = curPokeMod.GetItem(i))
+ return i->GetName();
+ return "";
}
unsigned PokeGen::PokeMod::PokemonItem::GetWeight() const
diff --git a/pokemod/PokemonItem.h b/pokemod/PokemonItem.h
index 784f754b..72e3747f 100644
--- a/pokemod/PokemonItem.h
+++ b/pokemod/PokemonItem.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: PokemonItem.h
+// Name: pokemod/PokemonItem.h
// Purpose: Define an item that a Pokémon can be found with in the wild
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/PokemonMove.cpp b/pokemod/PokemonMove.cpp
new file mode 100644
index 00000000..6af754d7
--- /dev/null
+++ b/pokemod/PokemonMove.cpp
@@ -0,0 +1,179 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonMove.cpp
+// Purpose: Define a move that a Pokémon can learn
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:45:29 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "PokemonMove.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::PokemonMove::PokemonMove(unsigned _id)
+{
+ LogCtor("PokemonMove", _id);
+ move = -1;
+ level = 0;
+ wild = 0;
+ id = _id;
+}
+
+PokeGen::PokeMod::PokemonMove::PokemonMove(Ini &ini, unsigned _id)
+{
+ LogCtorIni("PokemonMove", _id);
+ ImportIni(ini);
+ if(_id == UINT_MAX)
+ LogIdError("PokemonMove");
+}
+
+PokeGen::PokeMod::PokemonMove::~PokemonMove()
+{
+ LogDtor("PokemonMove", id, GetMoveString());
+}
+
+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)
+ {
+ LogVarNotValid("PokemonMove", id, "level", GetMoveString());
+ isValid = false;
+ }
+ if (curPokeMod.GetMaxLevel() <= wild)
+ {
+ LogVarNotValid("PokemonMove", id, "wild", GetMoveString());
+ isValid = false;
+ }
+ LogValidateOver("PokemonMove", id, isValid, GetMoveString());
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::PokemonMove::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("PokemonMove", id, GetMoveString());
+ if (!curPokeMod.GetMove(move))
+ {
+ LogVarNotValid("PokemonMove", id, "move");
+ output.Append(ConsoleLogVarNotValid("PokemonMove", id, "move"));
+ isValid = false;
+ }
+ if (curPokeMod.GetMaxLevel() <= level)
+ {
+ LogVarNotValid("PokemonMove", id, "level", GetMoveString());
+ output.Append(ConsoleLogVarNotValid("PokemonMove", id, "level", GetMoveString()));
+ isValid = false;
+ }
+ if (curPokeMod.GetMaxLevel() <= wild)
+ {
+ LogVarNotValid("PokemonMove", id, "wild", GetMoveString());
+ output.Append(ConsoleLogVarNotValid("PokemonMove", id, "wild", GetMoveString()));
+ isValid = false;
+ }
+ LogValidateOver("PokemonMove", id, isValid, GetMoveString());
+}
+#endif
+
+void PokeGen::PokeMod::PokemonMove::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("PokemonMove");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("PokemonMove");
+ }
+ else
+ id = _id;
+ ini.GetValue("move", move, -1);
+ ini.GetValue("level", level, 0);
+ ini.GetValue("wild", wild, 0);
+ LogImportOver("PokemonMove", id);
+}
+
+void PokeGen::PokeMod::PokemonMove::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("PokemonMove", id);
+ // Make elements
+ Ini exPokemonMove("pokemonMove");
+ exPokemonMove.AddField("id", id);
+ exPokemonMove.AddField("move", move);
+ exPokemonMove.AddField("level", level);
+ exPokemonMove.AddField("wild", wild);
+ exPokemonMove.Export(fout);
+ LogExportOver("PokemonMove", id);
+}
+
+void PokeGen::PokeMod::PokemonMove::SetMove(int m)
+{
+ LogSetVar("PokemonMove", id, "move", m);
+ move = m;
+}
+
+void PokeGen::PokeMod::PokemonMove::SetMove(const String &m)
+{
+ LogSetVar("PokemonMove", id, "move", m);
+ if (Move *temp = curPokeMod.GetMove(m))
+ move = temp->GetId();
+}
+
+void PokeGen::PokeMod::PokemonMove::SetLevel(unsigned l)
+{
+ LogSetVar("PokemonMove", id, "level", l, GetMoveString());
+ level = l;
+}
+
+void PokeGen::PokeMod::PokemonMove::SetWild(unsigned w)
+{
+ LogSetVar("PokemonMove", id, "wild", w, GetMoveString());
+ wild = w;
+}
+
+int PokeGen::PokeMod::PokemonMove::GetMove() const
+{
+ LogFetchVar("PokemonMove", id, "move", move);
+ return move;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonMove::GetMoveString() const
+{
+ LogFetchVar("PokemonMove", id, "move string", move);
+ if (Move *m = curPokeMod.GetMove(move))
+ m->GetName();
+ return "";
+}
+
+unsigned PokeGen::PokeMod::PokemonMove::GetLevel() const
+{
+ LogFetchVar("PokemonMove", id, "level", level, GetMoveString());
+ return level;
+}
+
+unsigned PokeGen::PokeMod::PokemonMove::GetWild() const
+{
+ LogFetchVar("PokemonMove", id, "wild", wild, GetMoveString());
+ return wild;
+}
diff --git a/pokemod/PokemonMove.h b/pokemod/PokemonMove.h
new file mode 100644
index 00000000..e97092c4
--- /dev/null
+++ b/pokemod/PokemonMove.h
@@ -0,0 +1,67 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonMove.h
+// Purpose: Define a move that a Pokémon can learn
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:45:29 2007
+// Copyright: ©2007 Ben Boeckel and 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_POKEMONMOVE__
+#define __POKEMOD_POKEMONMOVE__
+
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class PokemonMove : public Object
+ {
+ public:
+ PokemonMove(unsigned _id);
+ PokemonMove(Ini &ini, unsigned _id = UINT_MAX);
+ ~PokemonMove();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetMove(int m);
+ void SetMove(const String &m);
+ void SetLevel(unsigned l);
+ void SetWild(unsigned w);
+
+ int GetMove() const;
+ String GetMoveString() const;
+ unsigned GetLevel() const;
+ unsigned GetWild() const;
+ private:
+ void Validate();
+# ifdef PG_DEBUG_WINDOW
+ void Validate(const wxListBox &output);
+# endif
+
+ int move;
+ unsigned level;
+ unsigned wild;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/PokemonNature.cpp b/pokemod/PokemonNature.cpp
new file mode 100644
index 00000000..7bc972bc
--- /dev/null
+++ b/pokemod/PokemonNature.cpp
@@ -0,0 +1,154 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonNature.cpp
+// Purpose: Define an nature that a Pokémon can have
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:39:17 2007
+// Copyright: ©2007 Ben Boeckel and 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.
+/////////////////////////////////////////////////////////////////////////////
+
+#include "PokemonNature.h"
+
+extern PokeGen::PokeMod::Pokemod curPokeMod;
+
+PokeGen::PokeMod::PokemonNature::PokemonNature(unsigned _id)
+{
+ LogCtor("PokemonNature", _id);
+ nature = -1;
+ weight = 1;
+ id = _id;
+}
+
+PokeGen::PokeMod::PokemonNature::PokemonNature(Ini &ini, unsigned _id)
+{
+ LogCtorIni("PokemonNature", _id);
+ ImportIni(ini, _id);
+ if(_id == UINT_MAX)
+ LogIdError("PokemonNature");
+}
+
+PokeGen::PokeMod::PokemonNature::~PokemonNature()
+{
+ LogDtor("PokemonNature", id, GetNatureString());
+}
+
+void PokeGen::PokeMod::PokemonNature::Validate()
+{
+ isValid = true;
+ LogValidateStart("PokemonNature", id);
+ if (!curPokeMod.GetNature(nature))
+ {
+ LogVarNotValid("PokemonNature", id, "nature");
+ isValid = false;
+ }
+ if (!weight)
+ {
+ LogVarNotSet("PokemonNature", id, "weight", GetNatureString());
+ isValid = false;
+ }
+ LogValidateOver("PokemonNature", id, isValid, GetNatureString());
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::PokemonNature::Validate(const wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("PokemonNature", id);
+ if (!curPokeMod.GetNature(nature))
+ {
+ LogVarNotValid("PokemonNature", id, "nature");
+ output.Append(ConsoleLogVarNotValid("PokemonNature", id, "nature"));
+ isValid = false;
+ }
+ if (!weight)
+ {
+ LogVarNotSet("PokemonNature", id, "weight", GetNatureString());
+ output.Append(ConsoleLogVarNotSet("PokemonNature", id, weight, GetNatureString());
+ isValid = false;
+ }
+ LogValidateOver("PokemonNature", id, isValid, GetNatureString());
+}
+#endif
+
+void PokeGen::PokeMod::PokemonNature::ImportIni(Ini &ini, unsigned _id)
+{
+ LogImportStart("PokemonNature");
+ if (_id == UINT_MAX)
+ {
+ ini.GetValue("id", id, UINT_MAX);
+ // Was there an id associated with the element?
+ if (id == UINT_MAX)
+ LogIdNotFound("PokemonNature");
+ }
+ else
+ id = _id;
+ ini.GetValue("nature", nature, -1);
+ ini.GetValue("weight", weight, 1);
+ LogImportOver("PokemonNature", id);
+}
+
+void PokeGen::PokeMod::PokemonNature::ExportIni(std::ofstream &fout) const
+{
+ LogExportStart("PokemonNature", id);
+ // Make elements
+ Ini exPokemonNature("PokemonNature");
+ exPokemonNature.AddField("id", id);
+ exPokemonNature.AddField("nature", nature);
+ exPokemonNature.AddField("weight", weight);
+ exPokemonNature.Export(fout);
+ LogExportOver("PokemonNature", id);
+}
+
+void PokeGen::PokeMod::PokemonNature::SetNature(int n)
+{
+ LogSetVar("PokemonNature", id, "nature", n);
+ nature = n;
+}
+
+void PokeGen::PokeMod::PokemonNature::SetNature(const String &n)
+{
+ LogSetVar("PokemonNature", id, "nature", n);
+ if (Nature *temp = curPokeMod.GetNature(n))
+ nature = temp->GetId();
+}
+
+void PokeGen::PokeMod::PokemonNature::SetWeight(unsigned w)
+{
+ LogSetVar("PokemonNature", id, "weight", w, GetNatureString());
+ if (w)
+ weight = w;
+}
+
+int PokeGen::PokeMod::PokemonNature::GetNature() const
+{
+ LogFetchVar("PokemonNature", id, "nature", nature);
+ return nature;
+}
+
+PokeGen::PokeMod::String PokeGen::PokeMod::PokemonNature::GetNatureString() const
+{
+ LogFetchVar("PokemonNature", id, "nature string", nature);
+ if (Nature *n = curPokeMod.GetNature(nature))
+ return n->GetName();
+ return "";
+}
+
+unsigned PokeGen::PokeMod::PokemonNature::GetWeight() const
+{
+ LogFetchVar("PokemonNature", id, "weight", weight, GetNatureString());
+ return weight;
+}
diff --git a/pokemod/PokemonNature.h b/pokemod/PokemonNature.h
new file mode 100644
index 00000000..09cd7e7d
--- /dev/null
+++ b/pokemod/PokemonNature.h
@@ -0,0 +1,64 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: pokemod/PokemonNature.h
+// Purpose: Define an nature that a Pokémon can have
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Tue Mar 20 18:39:17 2007
+// Copyright: ©2007 Ben Boeckel and 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_POKEMONNATURE__
+#define __POKEMOD_POKEMONNATURE__
+
+#include "Object.h"
+#include "String.h"
+#include "Pokemod.h"
+
+namespace PokeGen
+{
+ namespace PokeMod
+ {
+ class PokemonNature : public Object
+ {
+ public:
+ PokemonNature(unsigned _id);
+ PokemonNature(Ini &ini, unsigned _id = UINT_MAX);
+ ~PokemonNature();
+
+ void ImportIni(Ini &ini, unsigned _id = UINT_MAX);
+ void ExportIni(std::ofstream &fout) const;
+
+ void SetNature(int n);
+ void SetNature(const String &n);
+ void SetWeight(unsigned w);
+
+ int GetNature() const;
+ String GetNatureString() const;
+ unsigned GetWeight() const;
+ private:
+ void Validate();
+# ifdef POKEMODR
+ void Validate(const wxListBox &output);
+# endif
+
+ int nature;
+ unsigned weight;
+ };
+ }
+}
+
+#endif
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp
index acb40d0d..555d6d68 100644
--- a/pokemod/Store.cpp
+++ b/pokemod/Store.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Store.cpp
+// Name: pokemod/Store.cpp
// Purpose: Define a store that the player can shop at
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/Store.h b/pokemod/Store.h
index 7fee17db..82676f6e 100644
--- a/pokemod/Store.h
+++ b/pokemod/Store.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Store.h
+// Name: pokemod/Store.h
// Purpose: Define a store that the player can shop at
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/Time.cpp b/pokemod/Time.cpp
index d18d826f..4e61f48c 100644
--- a/pokemod/Time.cpp
+++ b/pokemod/Time.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Time.cpp
+// Name: pokemod/Time.cpp
// Purpose: Define the start of a time of day in the PokéMod
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/Time.h b/pokemod/Time.h
index 3bbd2394..b577283d 100644
--- a/pokemod/Time.h
+++ b/pokemod/Time.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Time.h
+// Name: pokemod/Time.h
// Purpose: Define the start of a time of day in the PokéMod
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/Type.cpp b/pokemod/Type.cpp
index 3d5d5c60..0e8f55a8 100644
--- a/pokemod/Type.cpp
+++ b/pokemod/Type.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Type.cpp
+// Name: pokemod/Type.cpp
// Purpose: Define a type for a Pokémon
// Author: Ben Boeckel
// Modified by: Ben Boeckel
diff --git a/pokemod/Type.h b/pokemod/Type.h
index 06564cd8..75dda741 100644
--- a/pokemod/Type.h
+++ b/pokemod/Type.h
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: Type.h
+// Name: pokemod/Type.h
// Purpose: Define a type for a Pokémon
// Author: Ben Boeckel
// Modified by: Ben Boeckel