summaryrefslogtreecommitdiffstats
path: root/pokemod/MapEffect.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/MapEffect.h')
-rw-r--r--pokemod/MapEffect.h165
1 files changed, 81 insertions, 84 deletions
diff --git a/pokemod/MapEffect.h b/pokemod/MapEffect.h
index 42ba7915..43b9465b 100644
--- a/pokemod/MapEffect.h
+++ b/pokemod/MapEffect.h
@@ -30,92 +30,89 @@
#include "../general/Point.h"
#include "Dialog.h"
-namespace PokeGen
+namespace PokeMod
{
- namespace PokeMod
+ class MapEffect : public Object
{
- class MapEffect : public Object
- {
- public:
- enum Effect
- {
- E_Item = 0,
- E_PC = 1,
- E_StrengthBlock = 2,
- E_Button = 3,
- E_SlotMachine = 4,
- E_CardFlipGame = 5,
- E_End = 6
- };
- static const char* MapEffectStr[E_End];
-
- enum PC
- {
- PC_Item = 0,
- PC_Pokemon = 1,
- PC_Pokedex = 2,
- PC_HallOfFame = 3,
- PC_All = 4,
- PC_End = 5,
- };
- static const char* PCTypeStr[PC_End];
-
- MapEffect(const Pokemod& par, const unsigned _id);
- MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id);
- MapEffect(const Pokemod& par, const QString& fname, const unsigned _id = UINT_MAX);
-
- void load(const QString& fname, const unsigned _id = UINT_MAX) throw(Exception);
- void save(const QString& map) const throw(Exception);
-
- void setName(const QString& n);
- void setCoordinate(const unsigned x, const unsigned y);
- void setCoordinateX(const unsigned x);
- void setCoordinateY(const unsigned y);
- void setExistFlag(const unsigned f, const unsigned s);
- void setExistFlagFlag(const unsigned f);
- void setExistFlagStatus(const unsigned s);
- void setSkin(const QString& s) throw(Exception);
- void setEffect(const unsigned e) throw(BoundsException);
- void setVal1(const unsigned v1) throw(UnusedException);
- void setVal2(const unsigned v2) throw(Exception);
- void setDirection(const unsigned d) throw(BoundsException);
- void setIsTransparent(const bool i);
- void setCanMove(const bool c);
- void setDialog(const unsigned d) throw(BoundsException);
-
- QString getName() const;
- Point getCoordinate() const;
- unsigned getCoordinateX() const;
- unsigned getCoordinateY() const;
- Flag getExistFlag() const;
- unsigned getExistFlagFlag() const;
- unsigned getExistFlagStatus() const;
- QString getSkin() const;
- unsigned getEffect() const;
- unsigned getVal1() const;
- unsigned getVal2() const;
- unsigned getDirection() const;
- bool getIsTransparent() const;
- bool getCanMove() const;
- unsigned getDialog() const;
-
- MapEffect& operator=(const MapEffect& rhs);
- private:
- bool validate() const;
-
- QString name;
- Point coordinate;
- Flag existFlag;
- QString skin;
- unsigned effect;
- unsigned val1;
- unsigned val2;
- unsigned direction;
- bool isTransparent;
- bool canMove;
- unsigned dialog;
- };
- }
+ public:
+ enum Effect
+ {
+ E_Item = 0,
+ E_PC = 1,
+ E_StrengthBlock = 2,
+ E_Button = 3,
+ E_SlotMachine = 4,
+ E_CardFlipGame = 5,
+ E_End = 6
+ };
+ static const char* MapEffectStr[E_End];
+
+ enum PC
+ {
+ PC_Item = 0,
+ PC_Pokemon = 1,
+ PC_Pokedex = 2,
+ PC_HallOfFame = 3,
+ PC_All = 4,
+ PC_End = 5,
+ };
+ static const char* PCTypeStr[PC_End];
+
+ MapEffect(const Pokemod& par, const unsigned _id);
+ MapEffect(const Pokemod& par, const MapEffect& e, const unsigned _id);
+ MapEffect(const Pokemod& par, const QString& fname, const unsigned _id = UINT_MAX);
+
+ void load(const QString& fname, const unsigned _id = UINT_MAX) throw(Exception);
+ void save(const QString& map) const throw(Exception);
+
+ void setName(const QString& n);
+ void setCoordinate(const unsigned x, const unsigned y);
+ void setCoordinateX(const unsigned x);
+ void setCoordinateY(const unsigned y);
+ void setExistFlag(const unsigned f, const unsigned s);
+ void setExistFlagFlag(const unsigned f);
+ void setExistFlagStatus(const unsigned s);
+ void setSkin(const QString& s) throw(Exception);
+ void setEffect(const unsigned e) throw(BoundsException);
+ void setVal1(const unsigned v1) throw(UnusedException);
+ void setVal2(const unsigned v2) throw(Exception);
+ void setDirection(const unsigned d) throw(BoundsException);
+ void setIsTransparent(const bool i);
+ void setCanMove(const bool c);
+ void setDialog(const unsigned d) throw(BoundsException);
+
+ QString getName() const;
+ Point getCoordinate() const;
+ unsigned getCoordinateX() const;
+ unsigned getCoordinateY() const;
+ Flag getExistFlag() const;
+ unsigned getExistFlagFlag() const;
+ unsigned getExistFlagStatus() const;
+ QString getSkin() const;
+ unsigned getEffect() const;
+ unsigned getVal1() const;
+ unsigned getVal2() const;
+ unsigned getDirection() const;
+ bool getIsTransparent() const;
+ bool getCanMove() const;
+ unsigned getDialog() const;
+
+ MapEffect& operator=(const MapEffect& rhs);
+ private:
+ bool validate() const;
+
+ QString name;
+ Point coordinate;
+ Flag existFlag;
+ QString skin;
+ unsigned effect;
+ unsigned val1;
+ unsigned val2;
+ unsigned direction;
+ bool isTransparent;
+ bool canMove;
+ unsigned dialog;
+ };
}
#endif