summaryrefslogtreecommitdiffstats
path: root/pokemod/ItemEffect.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-04 01:35:20 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-04 01:35:20 +0000
commit3595239f08f2bc1df32ef22ed6de9bde10ca3384 (patch)
treed9962c84e3a1f19e2da422f9bb49f65c21ada9f6 /pokemod/ItemEffect.cpp
parentc9afda3ab74614fb36986f96b7972c082f275eca (diff)
downloadsigen-3595239f08f2bc1df32ef22ed6de9bde10ca3384.tar.gz
sigen-3595239f08f2bc1df32ef22ed6de9bde10ca3384.tar.xz
sigen-3595239f08f2bc1df32ef22ed6de9bde10ca3384.zip
Style cleanup, minor Matrix fixes, duplication validations, Pokemod methods
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@19 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/ItemEffect.cpp')
-rw-r--r--pokemod/ItemEffect.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp
index ecc3566a..61b5c674 100644
--- a/pokemod/ItemEffect.cpp
+++ b/pokemod/ItemEffect.cpp
@@ -25,18 +25,18 @@
extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::ItemEffect::ItemEffect(const unsigned _id)
+PokeGen::PokeMod::ItemEffect::ItemEffect(const unsigned _id) :
+ overworld(false),
+ battle(false),
+ held(false),
+ effect(UINT_MAX),
+ val1(UINT_MAX),
+ val2(UINT_MAX),
+ val3(1, 1),
+ val4(UINT_MAX),
+ val5(UINT_MAX)
{
LogCtor("ItemEffect", _id);
- overworld = false;
- battle = false;
- held = false;
- effect = UINT_MAX;
- val1 = INT_MAX;
- val2 = INT_MAX;
- val3.Set(1, 1);
- val4 = UINT_MAX;
- val5 = UINT_MAX;
id = _id;
}
@@ -61,6 +61,7 @@ void PokeGen::PokeMod::ItemEffect::Validate()
{
LogValidateStart("ItemEffect", id);
// TODO (Validation#1#): ItemEffect Validation
+# warning "ItemEffect Validation"
LogValidateOver("ItemEffect", id, isValid);
}
@@ -70,7 +71,6 @@ void PokeGen::PokeMod::ItemEffect::ImportIni(Ini &ini, const unsigned _id)
if (_id == UINT_MAX)
{
ini.GetValue("id", id);
- // Was there an id associated with the element?
if (id == UINT_MAX)
LogIdNotFound("ItemEffect");
}
@@ -95,7 +95,6 @@ void PokeGen::PokeMod::ItemEffect::ImportIni(Ini &ini, const unsigned _id)
void PokeGen::PokeMod::ItemEffect::ExportIni(std::ofstream &fout, const String &item) const
{
LogExportStart("ItemEffect", id);
- // Make elements
Ini exItemEffect(item + " itemEffect");
exItemEffect.AddField("id", id);
exItemEffect.AddField("overworld", overworld);
@@ -178,6 +177,7 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
case IE_MAP:
case IE_ITEMFINDER:
case IE_BIKE:
+ case IE_SCOPE:
LogNoUse("ItemEffect", id, "val1", v1, "effect", ItemEffectStr[effect]);
break;
case IE_LEVEL_BOOST:
@@ -203,7 +203,6 @@ void PokeGen::PokeMod::ItemEffect::SetVal1(const int v1)
LogOutOfRange("ItemEffect", id, "val1", v1, "effect", "Modify Stat (Battle)");
break;
case IE_FISH:
- case IE_SCOPE:
case IE_COIN:
case IE_COIN_CASE:
val1 = v1;