From 3595239f08f2bc1df32ef22ed6de9bde10ca3384 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 4 Jun 2007 01:35:20 +0000 Subject: Style cleanup, minor Matrix fixes, duplication validations, Pokemod methods git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@19 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/ItemEffect.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'pokemod/ItemEffect.cpp') 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; -- cgit