summaryrefslogtreecommitdiffstats
path: root/pokemod/Dialog.cpp
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 /pokemod/Dialog.cpp
parentb2e515e6badeb033bbdb53b28424d3b8e7289067 (diff)
downloadsigen-342fa6879e9fd8a757ebabe0a30370137b8d83a7.tar.gz
sigen-342fa6879e9fd8a757ebabe0a30370137b8d83a7.tar.xz
sigen-342fa6879e9fd8a757ebabe0a30370137b8d83a7.zip
[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 'pokemod/Dialog.cpp')
-rw-r--r--pokemod/Dialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/pokemod/Dialog.cpp b/pokemod/Dialog.cpp
index d8353018..5ea0e44d 100644
--- a/pokemod/Dialog.cpp
+++ b/pokemod/Dialog.cpp
@@ -31,9 +31,9 @@
#include "Species.h"
#include "Dialog.h"
-const char* PokeMod::Dialog::CommandStr[PokeMod::Dialog::End] = {"Flip Flag", "Set Flag", "Unset Flag", "Randomize Flag", "Test Flag", "Dialog", "Yes/No", "Item Shop", "Give Item", "Take Item", "Check Item", "Coin List", "Teach Move", "Delete Move", "Give Pokemon", "Take Pokemon", "Show Pokemon", "View Pokemon", "Give Money", "Take Money", "Move Effect", "Turn Effect", "Check Direction", "Check Roster", "Check Levels", "Check Species", "Check Held Items", "Check Money", "Trade", "Daycare", "Battle", "Badge", "Warp", "Name", "Music", "Sound Effect", "Timer", "Map Sign", "Wild Scope", "Safari", "Heal Party", "Refresh", "Clear", "Pause", "New Line", "Exit", "Menu"};
-const char* PokeMod::Dialog::CommandAbbrStr[PokeMod::Dialog::End] = {"FF", "SF", "UF", "RF", "TF", "D", "YN", "ItS", "GIt", "TIt", "CIt", "CL", "TMv", "DMv", "GPk", "TPk", "SPk", "VPk", "G$", "T$", "MvEf", "TEf", "CD", "CR", "CLv", "CS", "CHIt", "C$", "T", "Dc", "Bat", "Bdg", "W", "N", "Ms", "SFX", "Tmr", "MS", "WS", "S", "HP", "R", "C", "P", "NL", "X", "M"};
-const unsigned PokeMod::Dialog::CommandNumArgs[PokeMod::Dialog::Menu] = {1, 1, 1, 1, 3, 2, 2, 1, 4, 4, 4, 1, 5, 3, 7, 4, 1, 4, 1, 4, 6, 3, 6, 5, 5, 4, 4, 5, 6, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 3, 0, 0, 0, 0, 0, 0};
+const QStringList PokeMod::Dialog::CommandStr = QStringList() << "Flip Flag" << "Set Flag" << "Unset Flag" << "Randomize Flag" << "Test Flag" << "Dialog" << "Yes/No" << "Item Shop" << "Give Item" << "Take Item" << "Check Item" << "Coin List" << "Teach Move" << "Delete Move" << "Give Pokemon" << "Take Pokemon" << "Show Pokemon" << "View Pokemon" << "Give Money" << "Take Money" << "Move Effect" << "Turn Effect" << "Check Direction" << "Check Roster" << "Check Levels" << "Check Species" << "Check Held Items" << "Check Money" << "Trade" << "Daycare" << "Battle" << "Badge" << "Warp" << "Name" << "Music" << "Sound Effect" << "Timer" << "Map Sign" << "Wild Scope" << "Safari" << "Heal Party" << "Refresh" << "Clear" << "Pause" << "New Line" << "Exit" << "Menu";
+const QStringList PokeMod::Dialog::CommandAbbrStr = QStringList() << "FF" << "SF" << "UF" << "RF" << "TF" << "D" << "YN" << "ItS" << "GIt" << "TIt" << "CIt" << "CL" << "TMv" << "DMv" << "GPk" << "TPk" << "SPk" << "VPk" << "G$" << "T$" << "MvEf" << "TEf" << "CD" << "CR" << "CLv" << "CS" << "CHIt" << "C$" << "T" << "Dc" << "Bat" << "Bdg" << "W" << "N" << "Ms" << "SFX" << "Tmr" << "MS" << "WS" << "S" << "HP" << "R" << "C" << "P" << "NL" << "X" << "M";
+const QList<unsigned> PokeMod::Dialog::CommandNumArgs = QList<unsigned>() << 1 << 1 << 1 << 1 << 3 << 2 << 2 << 1 << 4 << 4 << 4 << 1 << 5 << 3 << 7 << 4 << 1 << 4 << 1 << 4 << 6 << 3 << 6 << 5 << 5 << 4 << 4 << 5 << 6 << 1 << 2 << 1 << 2 << 1 << 2 << 1 << 3 << 1 << 1 << 3 << 0 << 0 << 0 << 0 << 0 << 0;
PokeMod::Dialog::Dialog(const Pokemod& par, const unsigned _id) :
Object(par, _id),
@@ -96,7 +96,7 @@ bool PokeMod::Dialog::validate() const
QString curCmdStr;
for (; (dialog.at(i) != '%') && (dialog.at(i) != '#'); ++i)
curCmdStr += dialog.at(i);
- if (((curCmd = findIn(End, curCmdStr, CommandAbbrStr)) == End))
+ if (((curCmd = CommandAbbrStr.indexOf(curCmdStr))) == UINT_MAX)
{
if (curCmdStr != "")
{