diff options
Diffstat (limited to 'pokemod/Pokemon.cpp')
| -rw-r--r-- | pokemod/Pokemon.cpp | 184 |
1 files changed, 93 insertions, 91 deletions
diff --git a/pokemod/Pokemon.cpp b/pokemod/Pokemon.cpp index 31b7ccd3..b699e540 100644 --- a/pokemod/Pokemon.cpp +++ b/pokemod/Pokemon.cpp @@ -102,25 +102,25 @@ void PokeGen::PokeMod::Pokemon::Validate() LogVarNotValid("Pokemon", id, "frontMaleSprite", name);
isValid = false;
}
- if (!Path(pokemod->GetPath() + "images/pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist()) + if (!Path(pokemod->GetPath() + "images/pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist())
{
LogVarNotSet("Pokemon", id, "backMaleSprite", name);
isValid = false;
- } - if (pokemod->IsGenderAllowed()) - {
- if (!Path(pokemod->GetPath() + "images/pokemon/front/female/" + name + ".png").DoesExist()) - { - LogVarNotValid("Pokemon", id, "frontFemaleSprite", name); - isValid = false; - } - if (!Path(pokemod->GetPath() + "images/pokemon/back/female/" + name + ".png").DoesExist()) - { - LogVarNotSet("Pokemon", id, "backFemaleSprite", name); - isValid = false; - } - } - if (!Path(pokemod->GetPath() + "images/pokemon/list/" + name + ".png").DoesExist()) + }
+ if (pokemod->IsGenderAllowed())
+ {
+ if (!Path(pokemod->GetPath() + "images/pokemon/front/female/" + name + ".png").DoesExist())
+ {
+ LogVarNotValid("Pokemon", id, "frontFemaleSprite", name);
+ isValid = false;
+ }
+ if (!Path(pokemod->GetPath() + "images/pokemon/back/female/" + name + ".png").DoesExist())
+ {
+ LogVarNotSet("Pokemon", id, "backFemaleSprite", name);
+ isValid = false;
+ }
+ }
+ if (!Path(pokemod->GetPath() + "images/pokemon/list/" + name + ".png").DoesExist())
{
LogVarNotValid("Pokemon", id, "listSprite", name);
isValid = false;
@@ -361,36 +361,36 @@ void PokeGen::PokeMod::Pokemon::Validate(const wxListBox &output) output.Append(ConsoleLogVarNotValid("Pokemon", id, "heightInches", name));
isValid = false;
}
- if (!Path(pokemod->GetPath() + "images/pokemon/front/male/" + name + ".png").DoesExist()) + if (!Path(pokemod->GetPath() + "images/pokemon/front/male/" + name + ".png").DoesExist())
{
LogVarNotValid("Pokemon", id, "frontMaleSprite", name);
output.Append(ConsoleLogVarNotValid("Pokemon", id, "frontMaleSprite", name));
isValid = false;
}
- if (!Path(pokemod->GetPath() + "images/pokemon/back/male/" + name + ".png").DoesExist()) - { - LogVarNotValid("Pokemon", id, "backMaleSprite", name); - output.Append(ConsoleLogVarNotValid("Pokemon", id, "backMaleSprite", name)); - isValid = false; - } - if (!Path(pokemod->GetPath() + "images/pokemon/front/female/" + name + ".png").DoesExist()) - { - LogVarNotValid("Pokemon", id, "frontFemaleSprite", name); - output.Append(ConsoleLogVarNotValid("Pokemon", id, "frontFemaleSprite", name)); - isValid = false; - } - if (!Path(pokemod->GetPath() + "images/pokemon/back/female/" + name + ".png").DoesExist()) - { - LogVarNotValid("Pokemon", id, "backFemaleSprite", name); - output.Append(ConsoleLogVarNotValid("Pokemon", id, "backFemrontMaleSprite", name)); - isValid = false; - } - if (!Path(pokemod->GetPath() + "images/pokemon/list/" + name + ".png").DoesExist()) - { - LogVarNotValid("Pokemon", id, "listSprite", name); - output.Append(ConsoleLogVarNotValid("Pokemon", id, "listSprite", name)); - isValid = false; - } + if (!Path(pokemod->GetPath() + "images/pokemon/back/male/" + name + ".png").DoesExist())
+ {
+ LogVarNotValid("Pokemon", id, "backMaleSprite", name);
+ output.Append(ConsoleLogVarNotValid("Pokemon", id, "backMaleSprite", name));
+ isValid = false;
+ }
+ if (!Path(pokemod->GetPath() + "images/pokemon/front/female/" + name + ".png").DoesExist())
+ {
+ LogVarNotValid("Pokemon", id, "frontFemaleSprite", name);
+ output.Append(ConsoleLogVarNotValid("Pokemon", id, "frontFemaleSprite", name));
+ isValid = false;
+ }
+ if (!Path(pokemod->GetPath() + "images/pokemon/back/female/" + name + ".png").DoesExist())
+ {
+ LogVarNotValid("Pokemon", id, "backFemaleSprite", name);
+ output.Append(ConsoleLogVarNotValid("Pokemon", id, "backFemrontMaleSprite", name));
+ isValid = false;
+ }
+ if (!Path(pokemod->GetPath() + "images/pokemon/list/" + name + ".png").DoesExist())
+ {
+ LogVarNotValid("Pokemon", id, "listSprite", name);
+ output.Append(ConsoleLogVarNotValid("Pokemon", id, "listSprite", name));
+ isValid = false;
+ }
if (!pokemod->GetPokemon(eggSpecies))
{
LogVarNotValid("Pokemon", id, "eggSpecies", name);
@@ -835,40 +835,40 @@ void PokeGen::PokeMod::Pokemon::SetPokedexEntry(const String &p) pokedexEntry = p;
}
-void PokeGen::PokeMod::Pokemon::SetFrontMaleSprite(const Path &f)
+void PokeGen::PokeMod::Pokemon::SetFrontMaleSprite(Path &f)
{
LogSetVar("Pokemon", id, "frontMaleSprite", f, name);
f.CopyTo(pokemod->GetPath() + "pokemon/front/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png");
}
-void PokeGen::PokeMod::Pokemon::SetBackMaleSprite(const Path &b)
+void PokeGen::PokeMod::Pokemon::SetBackMaleSprite(Path &b)
{
LogSetVar("Pokemon", id, "backMaleSprite", b, name);
- b.CopyTo(pokemod->GetPath() + "pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png"); -}
-
-void PokeGen::PokeMod::Pokemon::SetFrontFemaleSprite(const Path &f) -{ - if (pokemod->IsGenderAllowed()) - { - LogSetVar("Pokemon", id, "frontFemaleSprite", f, name); - f.CopyTo(pokemod->GetPath() + "pokemon/front/female/" + name + ".png"); - } -} - -void PokeGen::PokeMod::Pokemon::SetBackFemaleSprite(const Path &b) -{ - if (pokemod->IsGenderAllowed()) - { - LogSetVar("Pokemon", id, "backFemaleSprite", b, name); - b.CopyTo(pokemod->GetPath() + "pokemon/back/female/" + name + ".png"); - } -} - -void PokeGen::PokeMod::Pokemon::SetListSprite(const Path &l)
+ b.CopyTo(pokemod->GetPath() + "pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png");
+}
+
+void PokeGen::PokeMod::Pokemon::SetFrontFemaleSprite(Path &f)
+{
+ if (pokemod->IsGenderAllowed())
+ {
+ LogSetVar("Pokemon", id, "frontFemaleSprite", f, name);
+ f.CopyTo(pokemod->GetPath() + "pokemon/front/female/" + name + ".png");
+ }
+}
+
+void PokeGen::PokeMod::Pokemon::SetBackFemaleSprite(Path &b)
+{
+ if (pokemod->IsGenderAllowed())
+ {
+ LogSetVar("Pokemon", id, "backFemaleSprite", b, name);
+ b.CopyTo(pokemod->GetPath() + "pokemon/back/female/" + name + ".png");
+ }
+}
+
+void PokeGen::PokeMod::Pokemon::SetListSprite(Path &l)
{
LogSetVar("Pokemon", id, "listSprite", l, name);
- l.CopyTo(pokemod->GetPath() + "pokemon/list/" + name + ".png"); + l.CopyTo(pokemod->GetPath() + "pokemon/list/" + name + ".png");
}
void PokeGen::PokeMod::Pokemon::SetGenderFactor(const Frac &g)
@@ -1044,37 +1044,39 @@ PokeGen::PokeMod::String PokeGen::PokeMod::Pokemon::GetPokedexEntry() const bool PokeGen::PokeMod::Pokemon::GetFrontMaleSprite() const
{
LogFetchVar("Pokemon", id, "frontMaleSprite", -1, name);
- return Path(pokemod->GetPath() + "pokemon/front/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist(); + return Path(pokemod->GetPath() + "pokemon/front/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist();
}
bool PokeGen::PokeMod::Pokemon::GetBackMaleSprite() const
{
- LogFetchVar("Pokemon", id, "backMaleSprite", -1, name); - return Path(pokemod->GetPath() + "pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist(); -}
-
-bool PokeGen::PokeMod::Pokemon::GetFrontFemaleSprite() const -{ - if (pokemod->IsGenderAllowed()) - { - LogFetchVar("Pokemon", id, "frontFemaleSprite", -1, name); - return Path(pokemod->GetPath() + "pokemon/front/female/" + name + ".png").DoesExist(); - } -} - -bool PokeGen::PokeMod::Pokemon::GetBackFemaleSprite() const -{ - if (pokemod->IsGenderAllowed()) - { - LogFetchVar("Pokemon", id, "backFemaleSprite", -1, name); - return Path(pokemod->GetPath() + "pokemon/back/female/" + name + ".png").DoesExist(); - } -} - + LogFetchVar("Pokemon", id, "backMaleSprite", -1, name);
+ return Path(pokemod->GetPath() + "pokemon/back/" + (pokemod->IsGenderAllowed() ? "male/" : "") + name + ".png").DoesExist();
+}
+
+bool PokeGen::PokeMod::Pokemon::GetFrontFemaleSprite() const
+{
+ if (pokemod->IsGenderAllowed())
+ {
+ LogFetchVar("Pokemon", id, "frontFemaleSprite", -1, name);
+ return Path(pokemod->GetPath() + "pokemon/front/female/" + name + ".png").DoesExist();
+ }
+ return false;
+}
+
+bool PokeGen::PokeMod::Pokemon::GetBackFemaleSprite() const
+{
+ if (pokemod->IsGenderAllowed())
+ {
+ LogFetchVar("Pokemon", id, "backFemaleSprite", -1, name);
+ return Path(pokemod->GetPath() + "pokemon/back/female/" + name + ".png").DoesExist();
+ }
+ return false;
+}
+
bool PokeGen::PokeMod::Pokemon::GetListSprite() const
{
- LogFetchVar("Pokemon", id, "listSprite", -1, name); - return Path(pokemod->GetPath() + "pokemon/list/" + name + ".png").DoesExist(); + LogFetchVar("Pokemon", id, "listSprite", -1, name);
+ return Path(pokemod->GetPath() + "pokemon/list/" + name + ".png").DoesExist();
}
PokeGen::PokeMod::Frac PokeGen::PokeMod::Pokemon::GetGenderFactor() const
|
