summaryrefslogtreecommitdiffstats
path: root/general
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-21 06:38:00 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-21 06:38:00 +0000
commit342fa6879e9fd8a757ebabe0a30370137b8d83a7 (patch)
tree647fb184567a481dc86373116203740c2607f366 /general
parentb2e515e6badeb033bbdb53b28424d3b8e7289067 (diff)
[FIX] const char*[] -> QStringList for easier laoding into KComboBox
[DEL] pokemod/pokemod_inc.h no longer needed git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@37 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'general')
-rw-r--r--general/Ref.cpp25
-rw-r--r--general/Ref.h37
2 files changed, 35 insertions, 27 deletions
diff --git a/general/Ref.cpp b/general/Ref.cpp
index cad1b624..9424cf93 100644
--- a/general/Ref.cpp
+++ b/general/Ref.cpp
@@ -22,26 +22,17 @@
#include "Ref.h"
-unsigned findIn(const unsigned end, const QString& str, const char* array[])
-{
- unsigned i = 0;
- for (; i < end; ++i)
- {
- if (str == array[i])
- break;
- }
- return i;
-}
+const QStringList StatRBYStr = QStringList() << "HP", "Attack", "Defense", "Speed", "Special", "Special", "Accuracy", "Evasion";
+const QStringList StatGSCStr = QStringList() << "HP", "Attack", "Defense", "Speed", "Special Attack", "Special Defense", "Accuracy", "Evasion";
-const char* StatRBYStr[ST_End_Battle] = {"HP", "Attack", "Defense", "Speed", "Special", "Special", "Accuracy", "Evasion"};
-const char* StatGSCStr[ST_End_Battle] = {"HP", "Attack", "Defense", "Speed", "Special Attack", "Special Defense", "Accuracy", "Evasion"};
+const QStringList BattleMemberStr = QStringList() << "Player", "Enemy";
-const char* BattleMemberStr[BM_End] = {"Player", "Enemy"};
+const QStringList WeatherStr = QStringList() << "Ice", "Rain", "Sun", "Sand", "All";
-const char* WeatherStr[W_End_All] = {"Ice", "Rain", "Sun", "Sand", "All"};
+const QStringList DirectionStr = QStringList() << "Up", "Down", "Left", "Right", "None";
-const char* DirectionStr[D_End_None] = {"Up", "Down", "Left", "Right", "None"};
+const QStringList RelativeStr = QStringList() << "Less", "Less or Equal", "Equal", "Greater or Equal", "Greater", "Not Equal";
-const char* RelativeStr[REL_End] = {"Less", "Less or Equal", "Equal", "Greater or Equal", "Greater", "Not Equal"};
+const QStringList StatusStr = QStringList() << "Freeze", "Paralyze", "Sleep", "Poison", "Toxic Poison", "Burn", "Any";
-const char* StatusStr[STS_End] = {"Freeze", "Paralyze", "Sleep", "Poison", "Toxic Poison", "Burn", "Any"};
+const QStringList HMStr = QStringList() << "Cut" << "Fly" << "Surf" << "Strength" << "Flash" << "Whirlpool" << "Waterfall" << "Dive" << "Headbutt" << "Rock Smash" << "Defog" << "Rock Climb";
diff --git a/general/Ref.h b/general/Ref.h
index 89875f4f..6f17a86e 100644
--- a/general/Ref.h
+++ b/general/Ref.h
@@ -23,9 +23,7 @@
#ifndef __REF__
#define __REF__
-#include <QString>
-
-unsigned findIn(const unsigned end, const QString& str, const char* array[]);
+#include <QStringList>
enum EnumStat
{
@@ -42,8 +40,8 @@ enum EnumStat
ST_Evasion = 7,
ST_End_Battle = 8,
};
-extern const char* StatRBYStr[ST_End_Battle];
-extern const char* StatGSCStr[ST_End_Battle];
+extern const QStringList StatRBYStr;
+extern const QStringList StatGSCStr;
enum EnumBattleMember
{
@@ -51,7 +49,7 @@ enum EnumBattleMember
BM_Enemy = 1,
BM_End = 2
};
-extern const char* BattleMemberStr[BM_End];
+extern const QStringList BattleMemberStr;
enum EnumWeather
{
@@ -63,7 +61,7 @@ enum EnumWeather
W_All = 4,
W_End_All = 5
};
-extern const char* WeatherStr[W_End_All];
+extern const QStringList WeatherStr;
enum EnumDirection
{
@@ -75,7 +73,7 @@ enum EnumDirection
D_None = 4,
D_End_None = 5
};
-extern const char* DirectionStr[D_End_None];
+extern const QStringList DirectionStr;
enum EnumRelative
{
@@ -87,7 +85,7 @@ enum EnumRelative
REL_NotEqual = 5,
REL_End = 6
};
-extern const char* RelativeStr[REL_End];
+extern const QStringList RelativeStr;
enum EnumStatus
{
@@ -100,6 +98,25 @@ enum EnumStatus
STS_Any = 6,
STS_End = 7
};
-extern const char* StatusStr[STS_End];
+extern const QStringList StatusStr;
+
+enum HMMove
+{
+ HM_Cut = 0,
+ HM_Fly = 1,
+ HM_Surf = 2,
+ HM_Strength = 3,
+ HM_Whirlpool = 4,
+ HM_Waterfall = 5,
+ HM_Dive = 6,
+ HM_Headbutt = 7,
+ HM_RockSmash = 8,
+ HM_RockClimb = 9,
+ HM_End = 10,
+ HM_Defog = 10,
+ HM_Flash = 11,
+ HM_End_All = 12
+};
+extern const QStringList HMStr;
#endif