summaryrefslogtreecommitdiffstats
path: root/sigmod
diff options
context:
space:
mode:
authorAbhishek Mukherjee <linkinpark342@gmail.com>2009-01-21 23:40:17 -0500
committerAbhishek Mukherjee <linkinpark342@gmail.com>2009-01-21 23:40:17 -0500
commitfd8d62cb65e37dcef3d6d13ab4e2857ef6604c50 (patch)
tree342910746670b8f237840ebdc731bb6892e9d2ba /sigmod
parent2240a45c4191454a4d2290db614fcc8b1b32ce7c (diff)
downloadsigen-fd8d62cb65e37dcef3d6d13ab4e2857ef6604c50.tar.gz
sigen-fd8d62cb65e37dcef3d6d13ab4e2857ef6604c50.tar.xz
sigen-fd8d62cb65e37dcef3d6d13ab4e2857ef6604c50.zip
Refactor enumeration Stat to Stat.h
Signed-off-by: Abhishek Mukherjee <linkinpark342@gmail.com>
Diffstat (limited to 'sigmod')
-rw-r--r--sigmod/Badge.h1
-rw-r--r--sigmod/CMakeLists.txt1
-rw-r--r--sigmod/Global.h17
-rw-r--r--sigmod/Nature.h1
-rw-r--r--sigmod/Species.h1
-rw-r--r--sigmod/Stat.h46
6 files changed, 50 insertions, 17 deletions
diff --git a/sigmod/Badge.h b/sigmod/Badge.h
index 30e297d1..54638e04 100644
--- a/sigmod/Badge.h
+++ b/sigmod/Badge.h
@@ -27,6 +27,7 @@
// Sigmod includes
#include "Object.h"
+#include "Stat.h"
namespace Sigmod
{
diff --git a/sigmod/CMakeLists.txt b/sigmod/CMakeLists.txt
index 940b4346..ba6b2b12 100644
--- a/sigmod/CMakeLists.txt
+++ b/sigmod/CMakeLists.txt
@@ -34,6 +34,7 @@ SET(sigmod_HEADERS
Species.h
SpeciesMove.h
Sprite.h
+ Stat.h
Status.h
Store.h
Tile.h
diff --git a/sigmod/Global.h b/sigmod/Global.h
index 12fb18f0..378cfba0 100644
--- a/sigmod/Global.h
+++ b/sigmod/Global.h
@@ -44,22 +44,6 @@
namespace Sigmod
{
-/**
- * \enum Stat
- * \brief Enumeration of stats.
- */
-enum Stat
-{
- ST_HP = 0,
- ST_Attack = 1,
- ST_Defense = 2,
- ST_Speed = 3,
- ST_Special = 4,
- ST_SpecialAttack = 4,
- ST_SpecialDefense = 5,
- ST_Accuracy = 6,
- ST_Evasion = 7
-};
/// Strings for the stats for a combined Special stat.
const QStringList StatRBYStr = QStringList() << "HP" << "Attack" << "Defense" << "Speed" << "Special" << "" << "Accuracy" << "Evasion";
/// Strings for the stats when the Special stat is split.
@@ -81,7 +65,6 @@ enum Direction
const QStringList DirectionStr = QStringList() << "Up" << "Down" << "Left" << "Right" << "None";
}
-Q_DECLARE_METATYPE(Sigmod::Stat)
Q_DECLARE_METATYPE(Sigmod::Direction)
#endif
diff --git a/sigmod/Nature.h b/sigmod/Nature.h
index c143f888..872587bb 100644
--- a/sigmod/Nature.h
+++ b/sigmod/Nature.h
@@ -27,6 +27,7 @@
// Sigmod includes
#include "Object.h"
+#include "Stat.h"
namespace Sigmod
{
diff --git a/sigmod/Species.h b/sigmod/Species.h
index cb1fa47c..d05b6130 100644
--- a/sigmod/Species.h
+++ b/sigmod/Species.h
@@ -24,6 +24,7 @@
// Sigmod includes
#include "Object.h"
+#include "Stat.h"
// Qt includes
#include <QtCore/QList>
diff --git a/sigmod/Stat.h b/sigmod/Stat.h
new file mode 100644
index 00000000..25496deb
--- /dev/null
+++ b/sigmod/Stat.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Abhishek Mukherjee <linkinpark342@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file sigmod/Stat.h
+ */
+
+#ifndef SIGMOD_STAT
+#define SIGMOD_STAT
+
+namespace Sigmod
+{
+/**
+ * \enum Stat
+ * \brief Enumeration of stats.
+ */
+enum Stat
+{
+ ST_HP = 0,
+ ST_Attack = 1,
+ ST_Defense = 2,
+ ST_Speed = 3,
+ ST_Special = 4,
+ ST_SpecialAttack = 4,
+ ST_SpecialDefense = 5,
+ ST_Accuracy = 6,
+ ST_Evasion = 7
+};
+}
+Q_DECLARE_METATYPE(Sigmod::Stat)
+
+#endif