diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2007-09-21 15:36:22 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2007-09-21 15:36:22 +0000 |
commit | 5b55d13ead7e352ee1feaae72009e8abf5bd071a (patch) | |
tree | 6c2838312dd7f42769280e24e8abc16b53c165cb /pokemod/MapEffect.h | |
parent | e94d9893b8753e72adb92b2c5eb203830ddf641c (diff) | |
download | sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.tar.gz sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.tar.xz sigen-5b55d13ead7e352ee1feaae72009e8abf5bd071a.zip |
[FIX] Neural Network methods complete
[FIX] Wrapped Node up into the layer
[FIX] Wrapped NatureEffect into Nature
[FIX] Getting around to fixing up the design of the PokéMod stuff
[FIX] Creating new subclasses now returns pointer to new subclass
[FIX] Simplified interfaces
[FIX] Minor style issues
[FIX] Renamed CoinItem to CoinListObject
[FIX] Renamed MapTrainerTeam to MapTrainerPokemon
[FIX] Renamed MapWildPokemon to MapWildListPokemon
[FIX] Moved global enums to relevant classes
[FIX] Removed general logging features
[DEL] pokemod/Debug.{h, cpp}
[DEL] pokemod/Path.{h, cpp}
[FIX] Using QFile rather than custom Path class for checking for files
[FIX] Set* methods now return a bool to let the caller know if anything actually changed (if it can fail, otherwise it is void)
[ADD] Compliation without errors is required for pokemod from now on before commits
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@24 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapEffect.h')
-rw-r--r-- | pokemod/MapEffect.h | 230 |
1 files changed, 122 insertions, 108 deletions
diff --git a/pokemod/MapEffect.h b/pokemod/MapEffect.h index 46c8863a..b1a83a9e 100644 --- a/pokemod/MapEffect.h +++ b/pokemod/MapEffect.h @@ -1,108 +1,122 @@ -/////////////////////////////////////////////////////////////////////////////
-// Name: pokemod/MapEffect.h
-// Purpose: Define an effect on a map
-// Author: Ben Boeckel
-// Modified by: Ben Boeckel
-// Created: Fri June 1 2007 19:57:47
-// Copyright: ©2007 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_MAPEFFECT__
-#define __POKEMOD_MAPEFFECT__
-
-#include <QFile>
-#include <QString>
-#include "Object.h"
-#include "Flag.h"
-#include "Path.h"
-#include "Point.h"
-#include "Dialog.h"
-
-namespace PokeGen
-{
- namespace PokeMod
- {
- class MapEffect : public Object
- {
- public:
- MapEffect(const Pokemod *par, const unsigned _id);
- MapEffect(const Pokemod *par, Ini &ini, const unsigned _id = UINT_MAX);
- ~MapEffect();
-
- void ImportIni(Ini &ini, const unsigned _id = UINT_MAX);
- void ExportIni(QFile &fout, const QString &map) const;
-
- void SetName(const QString &n);
- void SetCoordinate(const Point &c);
- void SetCoordinate(const unsigned x, const unsigned y);
- void SetCoordinateX(const unsigned x);
- void SetCoordinateY(const unsigned y);
- void SetExistFlag(const Flag &e);
- void SetExistFlag(const unsigned f, const unsigned s);
- void SetExistFlagFlag(const unsigned f);
- void SetExistFlagStatus(const unsigned s);
- void SetExistFlagStatus(const QString &s);
- void SetSkin(const Path &s);
- void SetEffect(const unsigned e);
- void SetEffect(const QString &e);
- void SetVal1(const unsigned v1);
- void SetVal2(const unsigned v2);
- void SetVal2(const QString &v2);
- void SetDirection(const unsigned d);
- void SetDirection(const QString &d);
- void SetIsTransparent(const bool i);
- void SetCanMove(const bool c);
- void SetDialog(const unsigned d);
-
- QString GetName() const;
- Point GetCoordinate() const;
- unsigned GetCoordinateX() const;
- unsigned GetCoordinateY() const;
- Flag GetExistFlag() const;
- unsigned GetExistFlagFlag() const;
- unsigned GetExistFlagStatus() const;
- QString GetExistFlagStatusString() const;
- Path GetSkin() const;
- unsigned GetEffect() const;
- QString GetEffectString() const;
- unsigned GetVal1() const;
- unsigned GetVal2() const;
- QString GetVal2String() const;
- unsigned GetDirection() const;
- QString GetDirectionString() const;
- bool GetIsTransparent() const;
- bool GetCanMove() const;
- unsigned GetDialog() const;
- QString GetDialogString() const;
- private:
- void Validate();
-
- QString name;
- Point coordinate;
- Flag existFlag;
- Path skin;
- unsigned effect;
- unsigned val1;
- unsigned val2;
- unsigned direction;
- bool isTransparent;
- bool canMove;
- unsigned dialog;
- };
- }
-}
-
-#endif
+///////////////////////////////////////////////////////////////////////////// +// Name: pokemod/MapEffect.h +// Purpose: Define an effect on a map +// Author: Ben Boeckel +// Modified by: Ben Boeckel +// Created: Fri June 1 2007 19:57:47 +// Copyright: ©2007 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_MAPEFFECT__ +#define __POKEMOD_MAPEFFECT__ + +#include <QFile> +#include <QString> +#include "Object.h" +#include "Flag.h" +#include "Point.h" +#include "Dialog.h" + +namespace PokeGen +{ + namespace PokeMod + { + class MapEffect : public Object + { + public: + enum Effect + { + E_Item = 0, + E_PC = 1, + E_StrengthBlock = 2, + E_Button = 3, + E_RockSmash = 4, + E_SlotMachine = 5, + E_CardFlipGame = 6, + E_End = 7 + }; + 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, Ini& ini, const unsigned _id = UINT_MAX); + + void ImportIni(Ini& ini, const unsigned _id = UINT_MAX); + void ExportIni(QFile& fout, const QString& map) const; + + 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); + bool SetExistFlagStatus(const unsigned s); + bool SetSkin(const QString& s); + bool SetEffect(const unsigned e); + bool SetVal1(const unsigned v1); + bool SetVal2(const unsigned v2); + bool SetDirection(const unsigned d); + void SetIsTransparent(const bool i); + void SetCanMove(const bool c); + bool SetDialog(const unsigned d); + + 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; + private: + bool Validate(); + + QString name; + Point coordinate; + Flag existFlag; + QString skin; + unsigned effect; + unsigned val1; + unsigned val2; + unsigned direction; + bool isTransparent; + bool canMove; + unsigned dialog; + }; + + const char* MapEffectStr[MapEffect::E_End] = {"Item", "PC", "Strength Block", "Button", "Rock Smash", "Slot Machine", "Card Flip Game"}; + const char* PCTypeStr[MapEffect::PC_End] = {"Item", "Pokémon", "PokéDex", "Hall of Fame", "All"}; + } +} + +#endif |