summaryrefslogtreecommitdiffstats
path: root/pokemod/Badge.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-24 15:30:48 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-24 15:30:48 +0000
commitdec252e25fc63fe1bb321dd87772181fc76e998f (patch)
treeb2df56af5a1d5181bc9c65399b536946467bc4bc /pokemod/Badge.cpp
parent11a880fe22a7602dbaec5716e25b32b09d291e65 (diff)
downloadsigen-dec252e25fc63fe1bb321dd87772181fc76e998f.tar.gz
sigen-dec252e25fc63fe1bb321dd87772181fc76e998f.tar.xz
sigen-dec252e25fc63fe1bb321dd87772181fc76e998f.zip
[ADD] More documentation
[ADD] Abilities now hav a description field [FIX] Fixed up a few minor things in pokemodr git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@172 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Badge.cpp')
-rw-r--r--pokemod/Badge.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp
index fe77cfc3..0b747e84 100644
--- a/pokemod/Badge.cpp
+++ b/pokemod/Badge.cpp
@@ -37,8 +37,6 @@ Badge::Badge(const Pokemod* parent, const int id) :
{
for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
m_stat[i].set(1, 1);
- for (int i = 0; i < Pokemod::HM_End_All; ++i)
- m_hm[i] = false;
}
Badge::Badge(const Badge& badge, const Pokemod* parent, const int id) :
@@ -61,7 +59,6 @@ void Badge::validate()
TEST(setBadge, badge);
TEST(setObey, obey);
TEST_ARRAY(setStat, stat, (static_cast<const Pokemod*>(pokemod())->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY));
- TEST_ARRAY(setHm, hm, Pokemod::HM_End_All);
}
void Badge::load(const QDomElement& xml, int id)
@@ -72,7 +69,6 @@ void Badge::load(const QDomElement& xml, int id)
LOAD(QPixmap, badge);
LOAD(int, obey);
LOAD_ARRAY(Fraction, stat, (static_cast<const Pokemod*>(pokemod())->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY));
- LOAD_ARRAY(bool, hm, Pokemod::HM_End_All);
}
QDomElement Badge::save() const
@@ -83,7 +79,6 @@ QDomElement Badge::save() const
SAVE(QPixmap, badge);
SAVE(int, obey);
SAVE_ARRAY(Fraction, stat, (static_cast<const Pokemod*>(pokemod())->rules()->specialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY));
- SAVE_ARRAY(bool, hm, Pokemod::HM_End_All);
return xml;
}
@@ -139,16 +134,6 @@ void Badge::setStat(const int stat, const Fraction& multiplier)
CHECK_ARRAY(stat[stat], multiplier);
}
-void Badge::setHm(const int hm, const bool hmAllowed)
-{
- if (Pokemod::HM_End_All <= hm)
- {
- emit(error(bounds("hm")));
- return;
- }
- CHECK_ARRAY(hm[hm], hmAllowed);
-}
-
QString Badge::name() const
{
return m_name;
@@ -179,16 +164,6 @@ Fraction Badge::stat(const int stat) const
return m_stat[stat];
}
-bool Badge::hm(const int hm) const
-{
- if (Pokemod::HM_End_All <= hm)
- {
- emit(warning(bounds("hm")));
- return false;
- }
- return m_hm[hm];
-}
-
Badge& Badge::operator=(const Badge& rhs)
{
if (this == &rhs)
@@ -198,6 +173,5 @@ Badge& Badge::operator=(const Badge& rhs)
COPY(badge);
COPY(obey);
COPY_ARRAY(stat, Pokemod::ST_End_GSC);
- COPY_ARRAY(hm, Pokemod::HM_End_All);
return *this;
}