summaryrefslogtreecommitdiffstats
path: root/pokemod/Trainer.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-07-28 02:44:49 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-07-28 02:44:49 +0000
commit9fea55f75252462c1efbc90372ace45092fe6aca (patch)
treef0ab366249fe5778c1373d6bb7c85c174da5301e /pokemod/Trainer.cpp
parent227d31690824c44d4e92dc4fed07a8c43ea8cfb9 (diff)
downloadsigen-9fea55f75252462c1efbc90372ace45092fe6aca.tar.gz
sigen-9fea55f75252462c1efbc90372ace45092fe6aca.tar.xz
sigen-9fea55f75252462c1efbc90372ace45092fe6aca.zip
[FIX] Added a depth variable to Trainer
[FIX] Fixed the Apply/Discard buttons [FIX] Added code to Config in Pokescripting [FIX] Memory leak with MapModel [FIX] FractionWidget was using uninitialized variables (behavior) [FIX] Connection in FileDialog fixed [FIX] Caption is now used for FileDialog [FIX] Main window now uses the KDE standard captioning [FIX] Script connection fixed git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@231 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Trainer.cpp')
-rw-r--r--pokemod/Trainer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/pokemod/Trainer.cpp b/pokemod/Trainer.cpp
index ec918410..c24315a0 100644
--- a/pokemod/Trainer.cpp
+++ b/pokemod/Trainer.cpp
@@ -35,6 +35,7 @@ Pokemod::Trainer::Trainer(const Pokemod* parent, const int id) :
m_name(""),
m_moneyFactor(0),
m_skin(192, 128),
+ m_depth(0),
m_teamIntel(Remember),
m_moveIntel(Remember),
m_itemIntel(Remember),
@@ -77,6 +78,7 @@ void Pokemod::Trainer::load(const QDomElement& xml)
LOAD(QString, name);
LOAD(int, moneyFactor);
LOAD(QPixmap, skin);
+ LOAD(int, depth);
LOAD(int, teamIntel);
LOAD(int, moveIntel);
LOAD(int, itemIntel);
@@ -90,6 +92,7 @@ QDomElement Pokemod::Trainer::save() const
SAVE(QString, name);
SAVE(int, moneyFactor);
SAVE(QPixmap, skin);
+ SAVE(int, depth);
SAVE(int, teamIntel);
SAVE(int, moveIntel);
SAVE(int, itemIntel);
@@ -124,6 +127,11 @@ void Pokemod::Trainer::setSkin(const QPixmap& skin)
emit(changed());
}
+void Pokemod::Trainer::setDepth(const int depth)
+{
+ CHECK(depth);
+}
+
void Pokemod::Trainer::setTeamIntel(const int teamIntel)
{
if (End <= teamIntel)
@@ -189,6 +197,11 @@ QPixmap Pokemod::Trainer::skin() const
return m_skin;
}
+int Pokemod::Trainer::depth() const
+{
+ return m_depth;
+}
+
int Pokemod::Trainer::teamIntel() const
{
return m_teamIntel;
@@ -221,6 +234,7 @@ Pokemod::Trainer& Pokemod::Trainer::operator=(const Trainer& rhs)
COPY(name);
COPY(moneyFactor);
COPY(skin);
+ COPY(depth);
COPY(teamIntel);
COPY(moveIntel);
COPY(itemIntel);