summaryrefslogtreecommitdiffstats
path: root/pokemod/PokemonMove.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-02 18:12:48 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-02 18:12:48 +0000
commitc9afda3ab74614fb36986f96b7972c082f275eca (patch)
tree1b7c0b31950597d6ed562d94158dd3f8701496da /pokemod/PokemonMove.cpp
parentf71140fae5218ee9839ffcd4ec83abfded5124f4 (diff)
downloadsigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.gz
sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.xz
sigen-c9afda3ab74614fb36986f96b7972c082f275eca.zip
Finished off all PokeMod classes, added move validations, fixed up some GUI, various other fixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@18 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/PokemonMove.cpp')
-rw-r--r--pokemod/PokemonMove.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/pokemod/PokemonMove.cpp b/pokemod/PokemonMove.cpp
index a211139c..7aa75024 100644
--- a/pokemod/PokemonMove.cpp
+++ b/pokemod/PokemonMove.cpp
@@ -25,12 +25,12 @@
extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::PokemonMove::PokemonMove(const unsigned _id)
+PokeGen::PokeMod::PokemonMove::PokemonMove(const unsigned _id) :
+ move(UINT_MAX),
+ level(0),
+ wild(0)
{
LogCtor("PokemonMove", _id);
- move = UINT_MAX;
- level = 0;
- wild = 0;
id = _id;
}
@@ -99,7 +99,7 @@ void PokeGen::PokeMod::PokemonMove::ImportIni(Ini &ini, const unsigned _id)
LogImportStart("PokemonMove");
if (_id == UINT_MAX)
{
- ini.GetValue("id", id, UINT_MAX);
+ ini.GetValue("id", id);
// Was there an id associated with the element?
if (id == UINT_MAX)
LogIdNotFound("PokemonMove");
@@ -135,7 +135,7 @@ void PokeGen::PokeMod::PokemonMove::SetMove(const unsigned m)
void PokeGen::PokeMod::PokemonMove::SetMove(const String &m)
{
LogSetVar("PokemonMove", id, "move", m);
- if (Move *temp = curPokeMod.GetMove(m))
+ if (const Move *temp = curPokeMod.GetMove(m))
move = temp->GetId();
}
@@ -162,7 +162,7 @@ unsigned PokeGen::PokeMod::PokemonMove::GetMove() const
PokeGen::PokeMod::String PokeGen::PokeMod::PokemonMove::GetMoveString() const
{
LogFetchVar("PokemonMove", id, "move string", move);
- if (Move *m = curPokeMod.GetMove(move))
+ if (const Move *m = curPokeMod.GetMove(move))
m->GetName();
return "";
}