diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 06:38:00 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-01-21 06:38:00 +0000 |
| commit | 342fa6879e9fd8a757ebabe0a30370137b8d83a7 (patch) | |
| tree | 647fb184567a481dc86373116203740c2607f366 | |
| parent | b2e515e6badeb033bbdb53b28424d3b8e7289067 (diff) | |
| download | sigen-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
33 files changed, 152 insertions, 241 deletions
@@ -1,4 +1,12 @@ ----------------- +Rev: 37 +Date: 21 January 2008 +User: MathStuf +----------------- +[FIX] const char*[] -> QStringList for easier laoding into KComboBox +[DEL] pokemod/pokemod_inc.h no longer needed + +----------------- Rev: 36 Date: 20 January 2008 User: MathStuf 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 diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp index fadb51f1..edd84312 100644 --- a/pokemod/AbilityEffect.cpp +++ b/pokemod/AbilityEffect.cpp @@ -26,14 +26,14 @@ #include "Type.h" #include "AbilityEffect.h" -const char* PokeMod::AbilityEffect::EffectStr[PokeMod::AbilityEffect::E_End] = {"Damage to HP", "Prevent Damage", "Auto Heal", "Deal Damage", "Wilds", "Stat", "Status", "Ability", "Accuracy/Power Trade", "Bullseye", "Item Effect", "Type", "Fast Hatch", "Weather"}; -const char* PokeMod::AbilityEffect::TriggerStr[PokeMod::AbilityEffect::T_End] = {"Anything", "Contact", "Weather", "Damage", "Type", "HP Boundary", "Stat Change", "Status"}; -const char* PokeMod::AbilityEffect::InteractStr[PokeMod::AbilityEffect::I_End] = {"Trade", "Shadow", "Block"}; -const char* PokeMod::AbilityEffect::PowerAccStr[PokeMod::AbilityEffect::PA_End] = {"Boost Power", "Boost Accuracy"}; -const char* PokeMod::AbilityEffect::ItemStr[PokeMod::AbilityEffect::IT_End] = {"Stat Modifier", "Type Booster", "Flinch", "Go First"}; -const char* PokeMod::AbilityEffect::CauseStr[PokeMod::AbilityEffect::C_End] = {"Prevent", "Inflict"}; -const char* PokeMod::AbilityEffect::BoostStr[PokeMod::AbilityEffect::B_End] = {"Boost", "Hinder"}; -const char* PokeMod::AbilityEffect::SideStr[PokeMod::AbilityEffect::S_End] = {"Above", "Below"}; +const QStringList PokeMod::AbilityEffect::EffectStr = QStringList() << "Damage to HP" << "Prevent Damage" << "Auto Heal" << "Deal Damage" << "Wilds" << "Stat" << "Status" << "Ability" << "Accuracy/Power Trade" << "Bullseye" << "Item Effect" << "Type" << "Fast Hatch" << "Weather"; +const QStringList PokeMod::AbilityEffect::TriggerStr = QStringList() << "Anything" << "Contact" << "Weather" << "Damage" << "Type" << "HP Boundary" << "Stat Change" << "Status"; +const QStringList PokeMod::AbilityEffect::InteractStr = QStringList() << "Trade" << "Shadow" << "Block"; +const QStringList PokeMod::AbilityEffect::PowerAccStr = QStringList() << "Boost Power" << "Boost Accuracy"; +const QStringList PokeMod::AbilityEffect::ItemStr = QStringList() << "Stat Modifier" << "Type Booster" << "Flinch" << "Go First"; +const QStringList PokeMod::AbilityEffect::CauseStr = QStringList() << "Prevent" << "Inflict"; +const QStringList PokeMod::AbilityEffect::BoostStr = QStringList() << "Boost" << "Hinder"; +const QStringList PokeMod::AbilityEffect::SideStr = QStringList() << "Above" << "Below"; PokeMod::AbilityEffect::AbilityEffect(const Pokemod& par, const unsigned _id) : diff --git a/pokemod/AbilityEffect.h b/pokemod/AbilityEffect.h index 82080a83..7ab155b9 100644 --- a/pokemod/AbilityEffect.h +++ b/pokemod/AbilityEffect.h @@ -24,6 +24,7 @@ #define __POKEMOD_ABILITYEFFECT__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Frac.h" #include "Object.h" @@ -53,7 +54,7 @@ namespace PokeMod E_Weather = 13, E_End = 14 }; - static const char* EffectStr[E_End]; + static const QStringList EffectStr; enum Trigger { @@ -67,7 +68,7 @@ namespace PokeMod T_Status = 7, T_End = 8 }; - static const char* TriggerStr[T_End]; + static const QStringList TriggerStr; enum Interact { @@ -76,7 +77,7 @@ namespace PokeMod I_Block = 2, I_End = 3 }; - static const char* InteractStr[I_End]; + static const QStringList InteractStr; enum PowerAccuracy { @@ -84,7 +85,7 @@ namespace PokeMod PA_Accuracy = 1, PA_End = 2 }; - static const char* PowerAccStr[PA_End]; + static const QStringList PowerAccStr; enum Item { @@ -94,7 +95,7 @@ namespace PokeMod IT_Quick = 3, IT_End = 4 }; - static const char* ItemStr[IT_End]; + static const QStringList ItemStr; enum Cause { @@ -102,7 +103,7 @@ namespace PokeMod C_Inflict = 1, C_End = 2 }; - static const char* CauseStr[C_End]; + static const QStringList CauseStr; enum Boost { @@ -110,7 +111,7 @@ namespace PokeMod B_Hinder = 1, B_End = 2 }; - static const char* BoostStr[B_End]; + static const QStringList BoostStr; enum Side { @@ -118,7 +119,7 @@ namespace PokeMod S_Below = 1, S_End = 2 }; - static const char* SideStr[S_End]; + static const QStringList SideStr; AbilityEffect(const Pokemod& par, const unsigned _id); AbilityEffect(const Pokemod& par, const AbilityEffect& e, const unsigned _id); diff --git a/pokemod/Badge.cpp b/pokemod/Badge.cpp index 1cdad1e4..0f780de5 100644 --- a/pokemod/Badge.cpp +++ b/pokemod/Badge.cpp @@ -21,12 +21,9 @@ // with this program. If not, see <http://www.gnu.org/licenses/>. ///////////////////////////////////////////////////////////////////////////// -#include "../general/Ref.h" #include "Pokemod.h" #include "Badge.h" -const char* PokeMod::Badge::HMStr[PokeMod::Badge::End] = {"Cut", "Fly", "Surf", "Strength", "Flash", "Whirlpool", "Waterfall", "Dive", "Headbutt", "Rock Smash", "Defog", "Rock Climb"}; - PokeMod::Badge::Badge(const Pokemod& par, const unsigned _id) : Object(par, _id), name(""), @@ -34,7 +31,7 @@ PokeMod::Badge::Badge(const Pokemod& par, const unsigned _id) : { for (unsigned i = 0; i < ST_End_GSC; ++i) stats[i].set(1, 1); - for (unsigned i = 0; i < End; ++i) + for (unsigned i = 0; i < HM_End_All; ++i) hm[i] = false; } @@ -94,7 +91,7 @@ void PokeMod::Badge::load(const QString& fname, const unsigned _id) throw(Except ini.getValue(QString("stats-%1-d").arg(i), k, 1); stats[i].set(j, k); } - for (int i = 0; i < End; ++i) + for (int i = 0; i < HM_End_All; ++i) ini.getValue(QString("hm-%1").arg(i), hm[i], false); } @@ -109,7 +106,7 @@ void PokeMod::Badge::save() const throw(Exception) ini.addField(QString("stats-%1-n").arg(i), stats[i].getNum()); ini.addField(QString("stats-%1-d").arg(i), stats[i].getDenom()); } - for (int i = 0; i < End; ++i) + for (int i = 0; i < HM_End_All; ++i) ini.addField(QString("hm-%1").arg(i), hm[i]); ini.save(QString("%1/badge/%2.pini").arg(pokemod.getPath()).arg(name)); } @@ -167,7 +164,7 @@ void PokeMod::Badge::setStatDenom(const unsigned s, const unsigned d) throw(Exce void PokeMod::Badge::setHm(const unsigned h, const bool hb) throw(BoundsException) { - if (End <= h) + if (HM_End_All <= h) throw(BoundsException("Badge", "hm")); hm[h] = hb; } @@ -191,7 +188,7 @@ Frac PokeMod::Badge::getStat(const unsigned s) const throw(BoundsException) bool PokeMod::Badge::getHm(const unsigned h) const throw(BoundsException) { - if (End <= h) + if (HM_End_All <= h) throw(BoundsException("Badge", "hm")); return hm[h]; } @@ -204,7 +201,7 @@ PokeMod::Badge& PokeMod::Badge::operator=(const Badge& rhs) obey = rhs.obey; for (unsigned i = 0; i < ST_End_GSC; ++i) stats[i] = rhs.stats[i]; - for (unsigned i = 0; i < End; ++i) + for (unsigned i = 0; i < HM_End_All; ++i) hm[i] = rhs.hm[i]; return *this; } diff --git a/pokemod/Badge.h b/pokemod/Badge.h index 9709dc89..36827749 100644 --- a/pokemod/Badge.h +++ b/pokemod/Badge.h @@ -25,6 +25,7 @@ #define __POKEMOD_BADGE__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Frac.h" #include "../general/Ref.h" @@ -37,24 +38,6 @@ namespace PokeMod class Badge : public Object { public: - enum HMMove - { - Cut = 0, - Fly = 1, - Surf = 2, - Strength = 3, - Flash = 4, - Whirlpool = 5, - Waterfall = 6, - Dive = 7, - Headbutt = 8, - RockSmash = 9, - Defog = 10, - RockClimb = 11, - End = 12 - }; - static const char* HMStr[End]; - Badge(const Pokemod& par, const unsigned _id); Badge(const Pokemod& par, const Badge& b, const unsigned _id); Badge(const Pokemod& par, const QString& fname, const unsigned _id = UINT_MAX); @@ -83,7 +66,7 @@ namespace PokeMod QString name; unsigned obey; Frac stats[ST_End_GSC]; - bool hm[End]; + bool hm[HM_End_All]; }; } diff --git a/pokemod/CoinListObject.cpp b/pokemod/CoinListObject.cpp index 7b214932..b6dae50f 100644 --- a/pokemod/CoinListObject.cpp +++ b/pokemod/CoinListObject.cpp @@ -23,7 +23,7 @@ #include "Pokemod.h" #include "CoinListObject.h" -const char* PokeMod::CoinListObject::TypeStr[PokeMod::CoinListObject::End] = {"Item", "Pokémon"}; +const QStringList PokeMod::CoinListObject::TypeStr = QStringList() << "Item" << "Pokémon"; PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/CoinListObject.h b/pokemod/CoinListObject.h index 36b865a5..3cb69609 100644 --- a/pokemod/CoinListObject.h +++ b/pokemod/CoinListObject.h @@ -24,6 +24,7 @@ #define __POKEMOD_COINLISTOBJECT__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" @@ -40,7 +41,7 @@ namespace PokeMod Pokemon = 1, End = 2 }; - static const char* TypeStr[End]; + static const QStringList TypeStr; CoinListObject(const Pokemod& par, const unsigned _id); CoinListObject(const Pokemod& par, const CoinListObject& o, const unsigned _id = UINT_MAX); 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 != "") { diff --git a/pokemod/Dialog.h b/pokemod/Dialog.h index 9f7d4fe2..a2cfb0a6 100644 --- a/pokemod/Dialog.h +++ b/pokemod/Dialog.h @@ -23,7 +23,9 @@ #ifndef __POKEMOD_DIALOG__ #define __POKEMOD_DIALOG__ +#include <QList> #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" @@ -86,9 +88,9 @@ namespace PokeMod Menu = 47, End = 48 }; - static const char* CommandStr[End]; - static const char* CommandAbbrStr[End]; - static const unsigned CommandNumArgs[Menu]; + static const QStringList CommandStr; + static const QStringList CommandAbbrStr; + static const QList<unsigned> CommandNumArgs; Dialog(const Pokemod& par, const unsigned _id); Dialog(const Pokemod& par, const Dialog& d, const unsigned _id); diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp index 5e949c6a..8c8a04f5 100644 --- a/pokemod/ItemEffect.cpp +++ b/pokemod/ItemEffect.cpp @@ -20,20 +20,19 @@ // with this program. If not, see <http://www.gnu.org/licenses/>. ///////////////////////////////////////////////////////////////////////////// -#include <QFile> #include "../general/Ref.h" #include "Pokemod.h" #include "MapWildList.h" #include "ItemEffect.h" -const char* PokeMod::ItemEffect::EffectStr[PokeMod::ItemEffect::E_End] = {"HP Cure", "Revive", "Cure Status", "Level Boost", "Stat Boost", "Flinch", "Go First", "Keep Alive", "Modify Stat (Battle Only)", "Shield (Battle Only)", "Run (Battle Only)", "PP Boost", "Type Boost", "PP Restore", "Experience Share", "Fishing Rod", "Repel", "Escape", "TM", "HM", "Map", "Ball", "Itemfinder", "Bike", "Scope", "Coin", "Coin Case", "Berry", "Acorn"}; -const char* PokeMod::ItemEffect::RelativeStr[PokeMod::ItemEffect::R_End] = {"Absolute", "Relative"}; -const char* PokeMod::ItemEffect::EscapeStr[PokeMod::ItemEffect::ES_End] = {"Anywhere", "Dungeon"}; -const char* PokeMod::ItemEffect::RepelStr[PokeMod::ItemEffect::RP_End] = {"First", "Max", "All"}; -const char* PokeMod::ItemEffect::AmountStr[PokeMod::ItemEffect::A_End] = {"All", "One"}; -const char* PokeMod::ItemEffect::SpecialPhysicalStr[PokeMod::ItemEffect::SP_End] = {"Special", "Physical"}; -const char* PokeMod::ItemEffect::BallTypeStr[PokeMod::ItemEffect::B_End] = {"Regular", "Master", "Level", "Love", "Area", "Time", "Battle", "Friend", "Stat", "Type", "Weight"}; -const char* PokeMod::ItemEffect::BerryTypeStr[PokeMod::ItemEffect::B2_End] = {"HP Cure", "Status Cure"}; +const QStringList PokeMod::ItemEffect::EffectStr = QStringList() << "HP Cure" << "Revive" << "Cure Status" << "Level Boost" << "Stat Boost" << "Flinch" << "Go First" << "Keep Alive" << "Modify Stat (Battle Only)" << "Shield (Battle Only)" << "Run (Battle Only)" << "PP Boost" << "Type Boost" << "PP Restore" << "Experience Share" << "Fishing Rod" << "Repel" << "Escape" << "TM" << "HM" << "Map" << "Ball" << "Itemfinder" << "Bike" << "Scope" << "Coin" << "Coin Case" << "Berry" << "Acorn"; +const QStringList PokeMod::ItemEffect::RelativeStr = QStringList() << "Absolute" << "Relative"; +const QStringList PokeMod::ItemEffect::EscapeStr = QStringList() << "Anywhere" << "Dungeon"; +const QStringList PokeMod::ItemEffect::RepelStr = QStringList() << "First" << "Max" << "All"; +const QStringList PokeMod::ItemEffect::AmountStr = QStringList() << "All" << "One"; +const QStringList PokeMod::ItemEffect::SpecialPhysicalStr = QStringList() << "Special" << "Physical"; +const QStringList PokeMod::ItemEffect::BallTypeStr = QStringList() << "Regular" << "Master" << "Level" << "Love" << "Area" << "Time" << "Battle" << "Friend" << "Stat" << "Type" << "Weight"; +const QStringList PokeMod::ItemEffect::BerryTypeStr = QStringList() << "HP Cure" << "Status Cure"; PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/ItemEffect.h b/pokemod/ItemEffect.h index e714bfa3..951966a8 100644 --- a/pokemod/ItemEffect.h +++ b/pokemod/ItemEffect.h @@ -24,6 +24,7 @@ #define __POKEMOD_ITEMEFFECT__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" @@ -68,7 +69,7 @@ namespace PokeMod E_Evolution = 29, E_End = 30 }; - static const char* EffectStr[E_End]; + static const QStringList EffectStr; enum Relative { @@ -76,7 +77,7 @@ namespace PokeMod R_Relative = 1, R_End = 2 }; - static const char* RelativeStr[R_End]; + static const QStringList RelativeStr; enum Escape { @@ -84,7 +85,7 @@ namespace PokeMod ES_Dungeon = 1, ES_End = 2 }; - static const char* EscapeStr[ES_End]; + static const QStringList EscapeStr; enum Repel { @@ -93,7 +94,7 @@ namespace PokeMod RP_All = 2, RP_End = 3 }; - static const char* RepelStr[RP_End]; + static const QStringList RepelStr; enum Amount { @@ -101,7 +102,7 @@ namespace PokeMod A_One = 1, A_End = 2 }; - static const char* AmountStr[A_End]; + static const QStringList AmountStr; enum SpecialPhysical { @@ -109,7 +110,7 @@ namespace PokeMod SP_Physical = 1, SP_End = 2 }; - static const char* SpecialPhysicalStr[SP_End]; + static const QStringList SpecialPhysicalStr; enum BallType { @@ -126,7 +127,7 @@ namespace PokeMod B_Weight = 10, B_End = 11 }; - static const char* BallTypeStr[B_End]; + static const QStringList BallTypeStr; enum BerryType { @@ -134,7 +135,7 @@ namespace PokeMod B2_StatusCure = 1, B2_End = 2 }; - static const char* BerryTypeStr[B2_End]; + static const QStringList BerryTypeStr; ItemEffect(const Pokemod& par, const unsigned _id); ItemEffect(const Pokemod& par, const ItemEffect& e, const unsigned _id); diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp index bae10f19..fda0a7e9 100644 --- a/pokemod/Map.cpp +++ b/pokemod/Map.cpp @@ -23,12 +23,11 @@ #include <QDir> #include <QMap> #include <QMapIterator> -#include <QStringList> #include <QStringListIterator> #include "Pokemod.h" #include "Map.h" -const char* PokeMod::Map::TypeStr[PokeMod::Map::End] = {"Outdoor", "Dungeon", "Building"}; +const QStringList PokeMod::Map::TypeStr = QStringList() << "Outdoor" << "Dungeon" << "Building"; PokeMod::Map::Map(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/Map.h b/pokemod/Map.h index 14bc87de..9a77dbef 100644 --- a/pokemod/Map.h +++ b/pokemod/Map.h @@ -25,6 +25,7 @@ #include <QList> #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Matrix.h" #include "Object.h" @@ -47,7 +48,7 @@ namespace PokeMod Building = 2, End = 3 }; - static const char* TypeStr[End]; + static const QStringList TypeStr; Map(const Pokemod& par, const unsigned _id); Map(const Pokemod& par, const Map& m, const unsigned _id); diff --git a/pokemod/MapEffect.cpp b/pokemod/MapEffect.cpp index fe7c6914..28571fa0 100644 --- a/pokemod/MapEffect.cpp +++ b/pokemod/MapEffect.cpp @@ -24,8 +24,8 @@ #include "Dialog.h" #include "MapEffect.h" -const char* PokeMod::MapEffect::MapEffectStr[PokeMod::MapEffect::E_End] = {"Item", "PC", "Strength Block", "Button", "Slot Machine", "Card Flip Game"}; -const char* PokeMod::MapEffect::PCTypeStr[PokeMod::MapEffect::PC_End] = {"Item", "Pokémon", "PokéDex", "Hall of Fame", "All"}; +const QStringList PokeMod::MapEffect::MapEffectStr = QStringList() << "Item" << "PC" << "Strength Block" << "Button" << "Slot Machine" << "Card Flip Game"; +const QStringList PokeMod::MapEffect::PCTypeStr = QStringList() << "Item" << "Pokémon" << "PokéDex" << "Hall of Fame" << "All"; PokeMod::MapEffect::MapEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/MapEffect.h b/pokemod/MapEffect.h index 72235627..4933f409 100644 --- a/pokemod/MapEffect.h +++ b/pokemod/MapEffect.h @@ -24,6 +24,7 @@ #define __POKEMOD_MAPEFFECT__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Flag.h" #include "../general/Point.h" @@ -46,7 +47,7 @@ namespace PokeMod E_CardFlipGame = 5, E_End = 6 }; - static const char* MapEffectStr[E_End]; + static const QStringList MapEffectStr; enum PC { @@ -57,7 +58,7 @@ namespace PokeMod PC_All = 4, PC_End = 5, }; - static const char* PCTypeStr[PC_End]; + static const QStringList PCTypeStr; MapEffect(const Pokemod& par, const unsigned _id); MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id); diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index db48dae8..dc48c64e 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -25,7 +25,7 @@ #include "Map.h" #include "MapWarp.h" -const char* PokeMod::MapWarp::TypeStr[PokeMod::MapWarp::End] = {"Door/Stair", "Warp Pad", "Hole", "Boundary"}; +const QStringList PokeMod::MapWarp::TypeStr = QStringList() << "Door/Stair" << "Warp Pad" << "Hole" << "Boundary"; PokeMod::MapWarp::MapWarp(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/MapWarp.h b/pokemod/MapWarp.h index 71969422..8abc3ffd 100644 --- a/pokemod/MapWarp.h +++ b/pokemod/MapWarp.h @@ -24,6 +24,7 @@ #define __POKEMOD_MAPWARP__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Flag.h" #include "../general/Point.h" @@ -44,7 +45,7 @@ namespace PokeMod Boundary = 3, End = 4 }; - static const char* TypeStr[End]; + static const QStringList TypeStr; MapWarp(const Pokemod& par, const unsigned _id); MapWarp(const Pokemod& par, const MapWarp& w, const unsigned _id); diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index e64a92b4..8c85c72b 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -25,14 +25,13 @@ #include <QMap> #include <QMapIterator> #include <QMutableListIterator> -#include <QStringList> #include <QStringListIterator> #include "Pokemod.h" #include "Item.h" #include "ItemEffect.h" #include "MapWildList.h" -const char* PokeMod::MapWildList::ControlStr[PokeMod::MapWildList::End] = {"Grass", "Surfing", "Fishing", "Dive", "Headbutt", "Rock Smash"}; +const QStringList PokeMod::MapWildList::ControlStr = QStringList() << "Grass" << "Surfing" << "Fishing" << "Dive" << "Headbutt" << "Rock Smash"; PokeMod::MapWildList::MapWildList(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/MapWildList.h b/pokemod/MapWildList.h index f66453ea..f922eef4 100644 --- a/pokemod/MapWildList.h +++ b/pokemod/MapWildList.h @@ -25,6 +25,7 @@ #include <QList> #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" #include "MapWildListEncounter.h" @@ -46,7 +47,7 @@ namespace PokeMod RockSmash = 5, End = 6 }; - static const char* ControlStr[End]; + static const QStringList ControlStr; MapWildList(const Pokemod& par, const unsigned _id); MapWildList(const Pokemod& par, const MapWildList& w, const unsigned _id); diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index de1e4958..4eecccb1 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -24,13 +24,12 @@ #include <QListIterator> #include <QMap> #include <QMapIterator> -#include <QStringList> #include <QStringListIterator> #include "Pokemod.h" #include "Move.h" -const char* PokeMod::Move::TargetStr[PokeMod::Move::T_End] = {"Player", "Enemy", "Both", "Random"}; -const char* PokeMod::Move::ChoiceStr[PokeMod::Move::C_End] = {"Player", "Enemy", "Random"}; +const QStringList PokeMod::Move::TargetStr = QStringList() << "Player" << "Enemy" << "Both" << "Random"; +const QStringList PokeMod::Move::ChoiceStr = QStringList() << "Player" << "Enemy" << "Random"; PokeMod::Move::Move(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/Move.h b/pokemod/Move.h index 6d4aabb4..4eb327a5 100644 --- a/pokemod/Move.h +++ b/pokemod/Move.h @@ -25,6 +25,7 @@ #include <QList> #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" #include "MoveEffect.h" @@ -44,7 +45,7 @@ namespace PokeMod T_Random = 3, T_End = 4 }; - static const char* TargetStr[T_End]; + static const QStringList TargetStr; enum Choice { @@ -53,7 +54,7 @@ namespace PokeMod C_Random = 2, C_End = 3 }; - static const char* ChoiceStr[C_End]; + static const QStringList ChoiceStr; Move(const Pokemod& par, const unsigned _id); Move(const Pokemod& par, const Move& m, const unsigned _id); diff --git a/pokemod/MoveEffect.cpp b/pokemod/MoveEffect.cpp index 3eefdc88..b7f7c61a 100644 --- a/pokemod/MoveEffect.cpp +++ b/pokemod/MoveEffect.cpp @@ -24,7 +24,7 @@ #include "Pokemod.h" #include "MoveEffect.h" -const char* PokeMod::MoveEffect::EffectStr[PokeMod::MoveEffect::E_End_Overworld] = {"Damage", "Status", "Confuse", "Stat", "StealHP", "Counter", "Selfdestruct", "Need Status", "Mirror", "GetMoney", "Never Miss", "Steal Types", "Clear Effects", "Wait And Return", "Self Confuse", "Force Switch", "Hit Multiple", "Hit Multiple Turns", "Flinch", "One Hit K.O.", "Recoil", "Recover", "Rest", "Sheild", "Substitute", "Recharge", "Rage", "Mimic", "Random Move", "Seed", "Disable", "Cut HM", "Fly HM", "Surf HM", "Strength HM", "Flash HM", "Rock Smash HM", "Rock Climb HM", "Whirlpool HM", "Waterfall HM", "Share HP HM ", "Escape HM"}; +const QStringList PokeMod::MoveEffect::EffectStr = QStringList() << "Damage" << "Status" << "Confuse" << "Stat" << "StealHP" << "Counter" << "Selfdestruct" << "Need Status" << "Mirror" << "GetMoney" << "Never Miss" << "Steal Types" << "Clear Effects" << "Wait And Return" << "Self Confuse" << "Force Switch" << "Hit Multiple" << "Hit Multiple Turns" << "Flinch" << "One Hit K.O." << "Recoil" << "Recover" << "Rest" << "Sheild" << "Substitute" << "Recharge" << "Rage" << "Mimic" << "Random Move" << "Seed" << "Disable" << "Cut HM" << "Fly HM" << "Surf HM" << "Strength HM" << "Flash HM" << "Rock Smash HM" << "Rock Climb HM" << "Whirlpool HM" << "Waterfall HM" << "Share HP HM " << "Escape HM"; PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/MoveEffect.h b/pokemod/MoveEffect.h index d9f1f678..79919517 100644 --- a/pokemod/MoveEffect.h +++ b/pokemod/MoveEffect.h @@ -24,6 +24,7 @@ #define __POKEMOD_MOVEEFFECT__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Frac.h" #include "Object.h" @@ -83,7 +84,7 @@ namespace PokeMod E_EscapeHM,// = , E_End_Overworld// = }; - static const char* EffectStr[E_End_Overworld]; + static const QStringList EffectStr; enum Damage { @@ -94,7 +95,7 @@ namespace PokeMod D_Level = 4, D_End = 5 }; - static const char* DamageStr[D_End]; + static const QStringList DamageStr; enum MoveType { @@ -102,7 +103,7 @@ namespace PokeMod MT_Special = 1, MT_End = 2 }; - static const char* MoveTypeStr[MT_End]; + static const QStringList MoveTypeStr; enum Recoil { @@ -110,7 +111,7 @@ namespace PokeMod R_Miss = 1, R_End = 2 }; - static const char* RecoilStr[R_End]; + static const QStringList RecoilStr; MoveEffect(const Pokemod& par, const unsigned _id); MoveEffect(const Pokemod& par, const MoveEffect& e, const unsigned _id); diff --git a/pokemod/Species.cpp b/pokemod/Species.cpp index cb50d9f1..59f47a46 100644 --- a/pokemod/Species.cpp +++ b/pokemod/Species.cpp @@ -24,12 +24,11 @@ #include <QListIterator> #include <QMap> #include <QMapIterator> -#include <QStringList> #include <QStringListIterator> #include "Pokemod.h" #include "Species.h" -const char* PokeMod::Species::StyleStr[PokeMod::Species::End] = {"Fluctuating", "Fading", "Slow", "Normal", "Fast", "Erratic"}; +const QStringList PokeMod::Species::StyleStr = QStringList() << "Fluctuating" << "Fading" << "Slow" << "Normal" << "Fast" << "Erratic"; PokeMod::Species::Species(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/Species.h b/pokemod/Species.h index 440e3e35..418bd3a9 100644 --- a/pokemod/Species.h +++ b/pokemod/Species.h @@ -25,6 +25,7 @@ #include <QList> #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "../general/Frac.h" #include "../general/Ref.h" @@ -51,7 +52,7 @@ namespace PokeMod Erratic = 6, End = 7 }; - static const char* StyleStr[End]; + static const QStringList StyleStr; Species(const Pokemod& par, const unsigned _id); Species(const Pokemod& par, const Species& s, const unsigned _id); diff --git a/pokemod/SpeciesEvolution.cpp b/pokemod/SpeciesEvolution.cpp index 858d9e2d..224bddb8 100644 --- a/pokemod/SpeciesEvolution.cpp +++ b/pokemod/SpeciesEvolution.cpp @@ -26,8 +26,8 @@ #include "ItemEffect.h" #include "SpeciesEvolution.h" -const char* PokeMod::SpeciesEvolution::StyleStr[PokeMod::SpeciesEvolution::S_End] = {"Level", "Happiness", "Stat", "Item", "Trade", "TradeItem", "Personality", "Spare Slot"}; -const char* PokeMod::SpeciesEvolution::GiveHoldStr[PokeMod::SpeciesEvolution::G_End] = {"Give", "Hold"}; +const QStringList PokeMod::SpeciesEvolution::StyleStr = QStringList() << "Level" << "Happiness" << "Stat" << "Item" << "Trade" << "TradeItem" << "Personality" << "Spare Slot"; +const QStringList PokeMod::SpeciesEvolution::GiveHoldStr = QStringList() <<"Give" << "Hold"; PokeMod::SpeciesEvolution::SpeciesEvolution(const Pokemod& par, const unsigned _id) : Object(par, _id), diff --git a/pokemod/SpeciesEvolution.h b/pokemod/SpeciesEvolution.h index 984948b8..acdc4c6c 100644 --- a/pokemod/SpeciesEvolution.h +++ b/pokemod/SpeciesEvolution.h @@ -24,6 +24,7 @@ #define __POKEMOD_SPECIESEVOLUTION__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" @@ -46,7 +47,7 @@ namespace PokeMod S_SpareSlot = 7, S_End = 8 }; - static const char* StyleStr[S_End]; + static const QStringList StyleStr; enum GiveHold { @@ -54,7 +55,7 @@ namespace PokeMod G_Hold = 1, G_End = 2 }; - static const char* GiveHoldStr[G_End]; + static const QStringList GiveHoldStr; SpeciesEvolution(const Pokemod& par, const unsigned _id); SpeciesEvolution(const Pokemod& par, const SpeciesEvolution& e, const unsigned _id); diff --git a/pokemod/TODO b/pokemod/TODO index 82f9633f..e57c349d 100644 --- a/pokemod/TODO +++ b/pokemod/TODO @@ -20,15 +20,3 @@ Showstopper Validation
----------
MoveEffect
-
-=================
-Important
-=================
-Commenting
-
-=================
-Minor
-=================
-=================
-Preference
-=================
diff --git a/pokemod/Tile.cpp b/pokemod/Tile.cpp index 025782d4..d6d46440 100644 --- a/pokemod/Tile.cpp +++ b/pokemod/Tile.cpp @@ -24,9 +24,7 @@ #include "Pokemod.h" #include "Tile.h" -const char* PokeMod::Tile::HMTypeStr[PokeMod::Tile::H_End] = -{"None", "Surf", "Dive", "Waterfall", "Whirlpool", "Cut", "Headbutt", "Rock Climb", "Rock Smash"}; -const char* PokeMod::Tile::ForceStr[PokeMod::Tile::F_End] = {"None", "Slip", "Stop", "Force", "Push"}; +const QStringList PokeMod::Tile::ForceStr = QStringList() << "None" << "Slip" << "Stop" << "Force" << "Push"; PokeMod::Tile::Tile(const Pokemod& par, const unsigned _id) : Object(par, _id), @@ -69,29 +67,29 @@ bool PokeMod::Tile::validate() const pokemod.validationMsg("Cannot find tile image"); valid = false; } - if ((hmType == H_Waterfall) && (!from[D_Up] || !from[D_Down])) + if ((hmType == HM_Waterfall) && (!from[D_Up] || !from[D_Down])) { pokemod.validationMsg("A waterfall tile must be accessible from above and below"); valid = false; } - else if ((hmType == H_Whirlpool) && ((under == id) || (pokemod.getTileIndex(under) == UINT_MAX) || (pokemod.getTile(pokemod.getTileIndex(under)).getHMType() != H_Surf) || (pokemod.getTile(pokemod.getTileIndex(under)).getHMType() != H_Dive))) + else if ((hmType == HM_Whirlpool) && ((under == id) || (pokemod.getTileIndex(under) == UINT_MAX) || (pokemod.getTileByID(under).getHMType() != HM_Surf) || (pokemod.getTileByID(under).getHMType() != HM_Dive))) { pokemod.validationMsg("Invalid under tile"); valid = false; } - else if ((hmType == H_Whirlpool) && ((under == id) || (pokemod.getTileIndex(under) == UINT_MAX) || (pokemod.getTile(pokemod.getTileIndex(under)).getHMType() != H_None))) + else if ((hmType == HM_Whirlpool) && ((under == id) || (pokemod.getTileIndex(under) == UINT_MAX) || (pokemod.getTileByID(under).getHMType() != HM_End))) { pokemod.validationMsg("Invalid under tile"); valid = false; } - else if ((hmType == H_RockClimb) && (!from[D_Up] || !from[D_Down])) + else if ((hmType == HM_RockClimb) && (!from[D_Up] || !from[D_Down])) { pokemod.validationMsg("A rock climb tile must be accessible from above and below"); valid = false; } - if (forceType < F_End) + if (forceType < End) { - if (((forceType == F_Slip) || (forceType == F_Force) || (forceType == F_Push)) && (D_End <= forceDirection)) + if (((forceType == Slip) || (forceType == Force) || (forceType == Push)) && (D_End <= forceDirection)) { pokemod.validationMsg("Invalid force direction"); valid = false; @@ -184,7 +182,7 @@ void PokeMod::Tile::setWildChanceDenominator(const unsigned d) throw(Exception) void PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException) { - if (H_End <= h) + if (HM_End <= h) throw(BoundsException("Tile", "hmType")); hmType = h; under = UINT_MAX; @@ -192,7 +190,7 @@ void PokeMod::Tile::setHMType(const unsigned h) throw(BoundsException) void PokeMod::Tile::setUnder(const unsigned u) throw(Exception) { - if ((hmType != H_Whirlpool) || (hmType != H_Cut) || (hmType != H_RockSmash)) + if ((hmType != HM_Whirlpool) || (hmType != HM_Cut) || (hmType != HM_RockSmash)) throw(UnusedException("Tile", "under")); if ((u == id) || (pokemod.getTileIndex(u) == UINT_MAX)) throw(BoundsException("Tile", "under")); @@ -201,13 +199,15 @@ void PokeMod::Tile::setUnder(const unsigned u) throw(Exception) void PokeMod::Tile::setForceType(const unsigned f) throw(BoundsException) { - if (F_End <= f) + if (End <= f) throw(BoundsException("Tile", "forceType")); forceType = f; } -void PokeMod::Tile::setForceDirection(const unsigned f) throw(BoundsException) +void PokeMod::Tile::setForceDirection(const unsigned f) throw(Exception) { + if ((forceType == None) || (forceType == Stop)) + throw(UnusedException("Tile", "forceDirection")); if (D_End <= f) throw(BoundsException("Tile", "forceDirection")); forceDirection = f; diff --git a/pokemod/Tile.h b/pokemod/Tile.h index 9f0b8668..fe14ecdd 100644 --- a/pokemod/Tile.h +++ b/pokemod/Tile.h @@ -24,6 +24,7 @@ #define __POKEMOD_TILE__ #include <QString> +#include <QStringList> #include "../general/Exception.h" #include "Object.h" @@ -34,31 +35,16 @@ namespace PokeMod class Tile : public Object { public: - enum HMType - { - H_None = 0, - H_Surf = 1, - H_Dive = 2, - H_Waterfall = 3, - H_Whirlpool = 4, - H_Cut = 5, - H_Headbutt = 6, - H_RockClimb = 7, - H_RockSmash = 8, - H_End = 9 - }; - static const char* HMTypeStr[H_End]; - enum Force { - F_None = 0, - F_Slip = 1, - F_Stop = 2, - F_Force = 3, - F_Push = 4, - F_End = 5 + None = 0, + Slip = 1, + Stop = 2, + Force = 3, + Push = 4, + End = 5 }; - static const char* ForceStr[F_End]; + static const QStringList ForceStr; Tile(const Pokemod& par, const unsigned _id); Tile(const Pokemod& par, const Tile& t, const unsigned _id); @@ -76,7 +62,7 @@ namespace PokeMod void setHMType(const unsigned h) throw(BoundsException); void setUnder(const unsigned u) throw(Exception); void setForceType(const unsigned f) throw(BoundsException); - void setForceDirection(const unsigned f) throw(BoundsException); + void setForceDirection(const unsigned f) throw(Exception); QString getName() const; QString getPic() const; diff --git a/pokemod/pokemod_inc.h b/pokemod/pokemod_inc.h deleted file mode 100644 index 202972fb..00000000 --- a/pokemod/pokemod_inc.h +++ /dev/null @@ -1,67 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pokemod/pokemod_inc.h -// Purpose: Include header for the PokéMod library -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Thu Mar 22 20:53:22 2007 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// 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/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __POKEMOD_H__ -#define __POKEMOD_H__ - -namespace PokeMod -{ - class Ability; - class AbilityEffect; - class Author; - class Badge; - class CoinList; - class CoinListObject; - class Dialog; - class EggGroup; - class Item; - class ItemEffect; - class ItemType; - class Map; - class MapEffect; - class MapTrainer; - class MapTrainerTeamMember; - class MapWarp; - class MapWildList; - class MapWildListEncounter; - class Move; - class MoveEffect; - class Nature; - class Pokemod; - class Rules; - class Species; - class SpeciesAbility; - class SpeciesEvolution; - class SpeciesItem; - class SpeciesMove; - class Status; - class StatusEffect; - class Store; - class Tile; - class Time; - class Type; -} - -#include "Object.h" -#include "Pokemod.h" - -#endif |
