diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
commit | 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 (patch) | |
tree | a2031b9d0016fcbd49a51c0d1a2292d1f2d8b566 /sigscript | |
parent | b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7 (diff) | |
download | sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.gz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.xz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.zip |
[FIX] Renamed everything (in use) away from Poké- prefixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript')
75 files changed, 1358 insertions, 1358 deletions
diff --git a/sigscript/AbilityWrapper.cpp b/sigscript/AbilityWrapper.cpp index c7641c87..5eb25bb9 100644 --- a/sigscript/AbilityWrapper.cpp +++ b/sigscript/AbilityWrapper.cpp @@ -18,45 +18,45 @@ // header include #include "AbilityWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::AbilityWrapper* Pokescripting::AbilityWrapper::create(const Pokemod::Ability* ability, PokemodWrapper* parent) +Sigscript::AbilityWrapper* Sigscript::AbilityWrapper::create(const Sigmod::Ability* ability, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, ability->id()))) m_instances[Signiture(parent, ability->id())] = new AbilityWrapper(ability, parent); return qobject_cast<AbilityWrapper*>(m_instances[Signiture(parent, ability->id())]); } -Pokescripting::AbilityWrapper::AbilityWrapper(const Pokemod::Ability* ability, PokemodWrapper* parent) : +Sigscript::AbilityWrapper::AbilityWrapper(const Sigmod::Ability* ability, SigmodWrapper* parent) : ObjectWrapper(ability, parent), m_ability(ability) { } -QString Pokescripting::AbilityWrapper::name() const +QString Sigscript::AbilityWrapper::name() const { return m_ability->name(); } -int Pokescripting::AbilityWrapper::priority() const +int Sigscript::AbilityWrapper::priority() const { if (value("priority").canConvert<int>()) return value("priority").toInt(); return m_ability->priority(); } -QString Pokescripting::AbilityWrapper::description() const +QString Sigscript::AbilityWrapper::description() const { return m_ability->description(); } -Pokemod::Script Pokescripting::AbilityWrapper::battleScript() const +Sigmod::Script Sigscript::AbilityWrapper::battleScript() const { return m_ability->battleScript(); } -Pokemod::Script Pokescripting::AbilityWrapper::worldScript() const +Sigmod::Script Sigscript::AbilityWrapper::worldScript() const { return m_ability->worldScript(); } diff --git a/sigscript/AbilityWrapper.h b/sigscript/AbilityWrapper.h index 1b1f040b..bb677555 100644 --- a/sigscript/AbilityWrapper.h +++ b/sigscript/AbilityWrapper.h @@ -15,36 +15,36 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_ABILITYWRAPPER__ -#define __POKESCRIPTING_ABILITYWRAPPER__ +#ifndef __SIGSCRIPT_ABILITYWRAPPER__ +#define __SIGSCRIPT_ABILITYWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Ability.h" +// Sigmod includes +#include "../sigmod/Ability.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT AbilityWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT AbilityWrapper : public ObjectWrapper { Q_OBJECT public: - static AbilityWrapper* create(const Pokemod::Ability* ability, PokemodWrapper* parent); + static AbilityWrapper* create(const Sigmod::Ability* ability, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE int priority() const; Q_SCRIPTABLE QString description() const; - Q_SCRIPTABLE Pokemod::Script battleScript() const; - Q_SCRIPTABLE Pokemod::Script worldScript() const; + Q_SCRIPTABLE Sigmod::Script battleScript() const; + Q_SCRIPTABLE Sigmod::Script worldScript() const; private: - AbilityWrapper(const Pokemod::Ability* ability, PokemodWrapper* parent); + AbilityWrapper(const Sigmod::Ability* ability, SigmodWrapper* parent); AbilityWrapper& operator=(const AbilityWrapper& rhs); - const Pokemod::Ability* m_ability; + const Sigmod::Ability* m_ability; }; } -Q_DECLARE_METATYPE(Pokescripting::AbilityWrapper*) +Q_DECLARE_METATYPE(Sigscript::AbilityWrapper*) #endif diff --git a/sigscript/AuthorWrapper.cpp b/sigscript/AuthorWrapper.cpp index 53834074..9398b1b8 100644 --- a/sigscript/AuthorWrapper.cpp +++ b/sigscript/AuthorWrapper.cpp @@ -18,33 +18,33 @@ // Header include #include "AuthorWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::AuthorWrapper* Pokescripting::AuthorWrapper::create(const Pokemod::Author* author, PokemodWrapper* parent) +Sigscript::AuthorWrapper* Sigscript::AuthorWrapper::create(const Sigmod::Author* author, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, author->id()))) m_instances[Signiture(parent, author->id())] = new AuthorWrapper(author, parent); return qobject_cast<AuthorWrapper*>(m_instances[Signiture(parent, author->id())]); } -Pokescripting::AuthorWrapper::AuthorWrapper(const Pokemod::Author* author, PokemodWrapper* parent) : +Sigscript::AuthorWrapper::AuthorWrapper(const Sigmod::Author* author, SigmodWrapper* parent) : ObjectWrapper(author, parent), m_author(author) { } -QString Pokescripting::AuthorWrapper::name() const +QString Sigscript::AuthorWrapper::name() const { return m_author->name(); } -QString Pokescripting::AuthorWrapper::email() const +QString Sigscript::AuthorWrapper::email() const { return m_author->email(); } -QString Pokescripting::AuthorWrapper::role() const +QString Sigscript::AuthorWrapper::role() const { return m_author->role(); } diff --git a/sigscript/AuthorWrapper.h b/sigscript/AuthorWrapper.h index 706f2d07..11e0661c 100644 --- a/sigscript/AuthorWrapper.h +++ b/sigscript/AuthorWrapper.h @@ -15,34 +15,34 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_AUTHORWRAPPER__ -#define __POKESCRIPTING_AUTHORWRAPPER__ +#ifndef __SIGSCRIPT_AUTHORWRAPPER__ +#define __SIGSCRIPT_AUTHORWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Author.h" +// Sigmod includes +#include "../sigmod/Author.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT AuthorWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT AuthorWrapper : public ObjectWrapper { Q_OBJECT public: - static AuthorWrapper* create(const Pokemod::Author* author, PokemodWrapper* parent); + static AuthorWrapper* create(const Sigmod::Author* author, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE QString email() const; Q_SCRIPTABLE QString role() const; private: - AuthorWrapper(const Pokemod::Author* author, PokemodWrapper* parent); + AuthorWrapper(const Sigmod::Author* author, SigmodWrapper* parent); AuthorWrapper& operator=(const AuthorWrapper& rhs); - const Pokemod::Author* m_author; + const Sigmod::Author* m_author; }; } -Q_DECLARE_METATYPE(Pokescripting::AuthorWrapper*) +Q_DECLARE_METATYPE(Sigscript::AuthorWrapper*) #endif diff --git a/sigscript/BadgeWrapper.cpp b/sigscript/BadgeWrapper.cpp index 0d495a15..d5444a31 100644 --- a/sigscript/BadgeWrapper.cpp +++ b/sigscript/BadgeWrapper.cpp @@ -18,43 +18,43 @@ // Header include #include "BadgeWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::BadgeWrapper* Pokescripting::BadgeWrapper::create(const Pokemod::Badge* badge, PokemodWrapper* parent) +Sigscript::BadgeWrapper* Sigscript::BadgeWrapper::create(const Sigmod::Badge* badge, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, badge->id()))) m_instances[Signiture(parent, badge->id())] = new BadgeWrapper(badge, parent); return qobject_cast<BadgeWrapper*>(m_instances[Signiture(parent, badge->id())]); } -Pokescripting::BadgeWrapper::BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent) : +Sigscript::BadgeWrapper::BadgeWrapper(const Sigmod::Badge* badge, SigmodWrapper* parent) : ObjectWrapper(badge, parent), m_badge(badge) { } -QString Pokescripting::BadgeWrapper::name() const +QString Sigscript::BadgeWrapper::name() const { return m_badge->name(); } -Pokescripting::SpriteWrapper* Pokescripting::BadgeWrapper::face() +Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::face() { - return pokemod()->sprite(m_badge->face()); + return sigmod()->sprite(m_badge->face()); } -Pokescripting::SpriteWrapper* Pokescripting::BadgeWrapper::badge() +Sigscript::SpriteWrapper* Sigscript::BadgeWrapper::badge() { - return pokemod()->sprite(m_badge->badge()); + return sigmod()->sprite(m_badge->badge()); } -int Pokescripting::BadgeWrapper::obey() const +int Sigscript::BadgeWrapper::obey() const { return m_badge->obey(); } -Pokemod::Fraction Pokescripting::BadgeWrapper::stat(const Pokemod::Stat stat) const +Sigmod::Fraction Sigscript::BadgeWrapper::stat(const Sigmod::Stat stat) const { return m_badge->stat(stat); } diff --git a/sigscript/BadgeWrapper.h b/sigscript/BadgeWrapper.h index 1feeb6e9..955e660f 100644 --- a/sigscript/BadgeWrapper.h +++ b/sigscript/BadgeWrapper.h @@ -15,39 +15,39 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_BADGEWRAPPER__ -#define __POKESCRIPTING_BADGEWRAPPER__ +#ifndef __SIGSCRIPT_BADGEWRAPPER__ +#define __SIGSCRIPT_BADGEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Badge.h" +// Sigmod includes +#include "../sigmod/Badge.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class SpriteWrapper; -class POKESCRIPTING_EXPORT BadgeWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT BadgeWrapper : public ObjectWrapper { Q_OBJECT public: - static BadgeWrapper* create(const Pokemod::Badge* badge, PokemodWrapper* parent); + static BadgeWrapper* create(const Sigmod::Badge* badge, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE SpriteWrapper* face(); Q_SCRIPTABLE SpriteWrapper* badge(); Q_SCRIPTABLE int obey() const; - Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const; + Q_SCRIPTABLE Sigmod::Fraction stat(const Sigmod::Stat stat) const; private: - BadgeWrapper(const Pokemod::Badge* badge, PokemodWrapper* parent); + BadgeWrapper(const Sigmod::Badge* badge, SigmodWrapper* parent); BadgeWrapper& operator=(const BadgeWrapper& rhs); - const Pokemod::Badge* m_badge; + const Sigmod::Badge* m_badge; }; } -Q_DECLARE_METATYPE(Pokescripting::BadgeWrapper*) +Q_DECLARE_METATYPE(Sigscript::BadgeWrapper*) #endif diff --git a/sigscript/CMakeLists.txt b/sigscript/CMakeLists.txt index 81308327..5d32b6fd 100644 --- a/sigscript/CMakeLists.txt +++ b/sigscript/CMakeLists.txt @@ -1,12 +1,12 @@ -PROJECT(pokescripting) +PROJECT(sigscript) IF(NOT BUILT_FROM_ROOT) MESSAGE(FATAL_ERROR "Not built from source root") ENDIF(NOT BUILT_FROM_ROOT) -ADD_DEFINITIONS(-DMAKE_POKESCRIPTING_LIB) +ADD_DEFINITIONS(-DMAKE_SIGSCRIPT_LIB) -SET(pokescripting_MOC_HEADERS +SET(sigscript_MOC_HEADERS Config.h AbilityWrapper.h AuthorWrapper.h @@ -27,8 +27,8 @@ SET(pokescripting_MOC_HEADERS MoveWrapper.h NatureWrapper.h ObjectWrapper.h - PokemodWrapper.h RulesWrapper.h + SigmodWrapper.h SkinWrapper.h SoundWrapper.h SpeciesWrapper.h @@ -44,14 +44,14 @@ SET(pokescripting_MOC_HEADERS TypeWrapper.h WeatherWrapper.h ) -QT4_WRAP_CPP(pokescripting_MOC_SRCS ${pokescripting_MOC_HEADERS}) -SET(pokescripting_HEADERS +QT4_WRAP_CPP(sigscript_MOC_SRCS ${sigscript_MOC_HEADERS}) +SET(sigscript_HEADERS ) -SET(pokescripting_DEVEL - ${pokescripting_HEADERS} - ${pokescripting_MOC_HEADERS} +SET(sigscript_DEVEL + ${sigscript_HEADERS} + ${sigscript_MOC_HEADERS} ) -SET(pokescripting_SRCS +SET(sigscript_SRCS Config.cpp AbilityWrapper.cpp AuthorWrapper.cpp @@ -72,8 +72,8 @@ SET(pokescripting_SRCS MoveWrapper.cpp NatureWrapper.cpp ObjectWrapper.cpp - PokemodWrapper.cpp RulesWrapper.cpp + SigmodWrapper.cpp SkinWrapper.cpp SoundWrapper.cpp SpeciesWrapper.cpp @@ -90,31 +90,31 @@ SET(pokescripting_SRCS WeatherWrapper.cpp ) -ADD_LIBRARY(pokescripting - ${pokescripting_SRCS} - ${pokescripting_MOC_SRCS} +ADD_LIBRARY(sigscript + ${sigscript_SRCS} + ${sigscript_MOC_SRCS} ) -SET_TARGET_PROPERTIES(pokescripting +SET_TARGET_PROPERTIES(sigscript PROPERTIES VERSION ${POKEGEN_VERSION} SOVERSION ${POKEGEN_SOVERSION} LINK_INTERFACE_LIBRARIES "" ) -TARGET_LINK_LIBRARIES(pokescripting +TARGET_LINK_LIBRARIES(sigscript ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${PHONON_LIBRARY} - pokemod + sigmod ) INSTALL( - TARGETS pokescripting + TARGETS sigscript DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} COMPONENT runtime ) INSTALL( - FILES ${pokescripting_DEVEL} + FILES ${sigscript_DEVEL} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}/${PROJECT_NAME} COMPONENT development ) diff --git a/sigscript/CoinListObjectWrapper.cpp b/sigscript/CoinListObjectWrapper.cpp index 9ebff168..a445fe09 100644 --- a/sigscript/CoinListObjectWrapper.cpp +++ b/sigscript/CoinListObjectWrapper.cpp @@ -18,59 +18,59 @@ // Header include #include "CoinListObjectWrapper.h" -// Pokescripting includes +// Sigscript includes #include "CoinListWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::CoinListObjectWrapper* Pokescripting::CoinListObjectWrapper::create(const Pokemod::CoinListObject* object, CoinListWrapper* parent) +Sigscript::CoinListObjectWrapper* Sigscript::CoinListObjectWrapper::create(const Sigmod::CoinListObject* object, CoinListWrapper* parent) { if (!m_instances.contains(Signiture(parent, object->id()))) m_instances[Signiture(parent, object->id())] = new CoinListObjectWrapper(object, parent); return qobject_cast<CoinListObjectWrapper*>(m_instances[Signiture(parent, object->id())]); } -Pokescripting::CoinListObjectWrapper::CoinListObjectWrapper(const Pokemod::CoinListObject* object, CoinListWrapper* parent) : +Sigscript::CoinListObjectWrapper::CoinListObjectWrapper(const Sigmod::CoinListObject* object, CoinListWrapper* parent) : ObjectWrapper(object, parent), m_object(object) { } -Pokemod::CoinListObject::Type Pokescripting::CoinListObjectWrapper::type(const QString& name) const +Sigmod::CoinListObject::Type Sigscript::CoinListObjectWrapper::type(const QString& name) const { if (name == "Item") - return Pokemod::CoinListObject::Item; + return Sigmod::CoinListObject::Item; else if (name == "Species") - return Pokemod::CoinListObject::Species; - return QVariant(-1).value<Pokemod::CoinListObject::Type>(); + return Sigmod::CoinListObject::Species; + return QVariant(-1).value<Sigmod::CoinListObject::Type>(); } -Pokemod::CoinListObject::Type Pokescripting::CoinListObjectWrapper::type() const +Sigmod::CoinListObject::Type Sigscript::CoinListObjectWrapper::type() const { return m_object->type(); } -Pokescripting::ItemWrapper* Pokescripting::CoinListObjectWrapper::itemObject() +Sigscript::ItemWrapper* Sigscript::CoinListObjectWrapper::itemObject() { - if (m_object->type() == Pokemod::CoinListObject::Item) - return pokemod()->item(m_object->object()); + if (m_object->type() == Sigmod::CoinListObject::Item) + return sigmod()->item(m_object->object()); return NULL; } -Pokescripting::SpeciesWrapper* Pokescripting::CoinListObjectWrapper::speciesObject() +Sigscript::SpeciesWrapper* Sigscript::CoinListObjectWrapper::speciesObject() { - if (m_object->type() == Pokemod::CoinListObject::Species) - return pokemod()->species(m_object->object()); + if (m_object->type() == Sigmod::CoinListObject::Species) + return sigmod()->species(m_object->object()); return NULL; } -int Pokescripting::CoinListObjectWrapper::amount() const +int Sigscript::CoinListObjectWrapper::amount() const { if (value("amount").canConvert<int>()) return value("amount").toInt(); return m_object->amount(); } -int Pokescripting::CoinListObjectWrapper::cost() const +int Sigscript::CoinListObjectWrapper::cost() const { if (value("cost").canConvert<int>()) return value("cost").toInt(); diff --git a/sigscript/CoinListObjectWrapper.h b/sigscript/CoinListObjectWrapper.h index 57a2330d..31bb915f 100644 --- a/sigscript/CoinListObjectWrapper.h +++ b/sigscript/CoinListObjectWrapper.h @@ -15,43 +15,43 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_COINLISTOBJECTWRAPPER__ -#define __POKESCRIPTING_COINLISTOBJECTWRAPPER__ +#ifndef __SIGSCRIPT_COINLISTOBJECTWRAPPER__ +#define __SIGSCRIPT_COINLISTOBJECTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/CoinListObject.h" +// Sigmod includes +#include "../sigmod/CoinListObject.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class CoinListWrapper; class ItemWrapper; class SpeciesWrapper; -class POKESCRIPTING_EXPORT CoinListObjectWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT CoinListObjectWrapper : public ObjectWrapper { Q_OBJECT public: - static CoinListObjectWrapper* create(const Pokemod::CoinListObject* object, CoinListWrapper* parent); + static CoinListObjectWrapper* create(const Sigmod::CoinListObject* object, CoinListWrapper* parent); - Q_SCRIPTABLE Pokemod::CoinListObject::Type type(const QString& name) const; + Q_SCRIPTABLE Sigmod::CoinListObject::Type type(const QString& name) const; - Q_SCRIPTABLE Pokemod::CoinListObject::Type type() const; + Q_SCRIPTABLE Sigmod::CoinListObject::Type type() const; Q_SCRIPTABLE ItemWrapper* itemObject(); Q_SCRIPTABLE SpeciesWrapper* speciesObject(); Q_SCRIPTABLE int amount() const; Q_SCRIPTABLE int cost() const; private: - CoinListObjectWrapper(const Pokemod::CoinListObject* object, CoinListWrapper* parent); + CoinListObjectWrapper(const Sigmod::CoinListObject* object, CoinListWrapper* parent); CoinListObjectWrapper& operator=(const CoinListObjectWrapper& rhs); - const Pokemod::CoinListObject* m_object; + const Sigmod::CoinListObject* m_object; }; } -Q_DECLARE_METATYPE(Pokescripting::CoinListObjectWrapper*) +Q_DECLARE_METATYPE(Sigscript::CoinListObjectWrapper*) #endif diff --git a/sigscript/CoinListWrapper.cpp b/sigscript/CoinListWrapper.cpp index 38807810..a15c25a3 100644 --- a/sigscript/CoinListWrapper.cpp +++ b/sigscript/CoinListWrapper.cpp @@ -18,39 +18,39 @@ // Header include #include "CoinListWrapper.h" -// Pokescripting includes +// Sigscript includes #include "CoinListObjectWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::CoinListWrapper* Pokescripting::CoinListWrapper::create(const Pokemod::CoinList* coinList, PokemodWrapper* parent) +Sigscript::CoinListWrapper* Sigscript::CoinListWrapper::create(const Sigmod::CoinList* coinList, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, coinList->id()))) m_instances[Signiture(parent, coinList->id())] = new CoinListWrapper(coinList, parent); return qobject_cast<CoinListWrapper*>(m_instances[Signiture(parent, coinList->id())]); } -Pokescripting::CoinListWrapper::CoinListWrapper(const Pokemod::CoinList* coinList, PokemodWrapper* parent) : +Sigscript::CoinListWrapper::CoinListWrapper(const Sigmod::CoinList* coinList, SigmodWrapper* parent) : ObjectWrapper(coinList, parent), m_coinList(coinList) { } -QString Pokescripting::CoinListWrapper::name() const +QString Sigscript::CoinListWrapper::name() const { return m_coinList->name(); } -Pokemod::Script Pokescripting::CoinListWrapper::script() const +Sigmod::Script Sigscript::CoinListWrapper::script() const { return m_coinList->script(); } -Pokescripting::CoinListObjectWrapper* Pokescripting::CoinListWrapper::object(const int index) +Sigscript::CoinListObjectWrapper* Sigscript::CoinListWrapper::object(const int index) { return CoinListObjectWrapper::create(m_coinList->object(index), this); } -int Pokescripting::CoinListWrapper::objectCount() const +int Sigscript::CoinListWrapper::objectCount() const { return m_coinList->objectCount(); } diff --git a/sigscript/CoinListWrapper.h b/sigscript/CoinListWrapper.h index 819a817e..63c3712a 100644 --- a/sigscript/CoinListWrapper.h +++ b/sigscript/CoinListWrapper.h @@ -15,40 +15,40 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_COINLISTWRAPPER__ -#define __POKESCRIPTING_COINLISTWRAPPER__ +#ifndef __SIGSCRIPT_COINLISTWRAPPER__ +#define __SIGSCRIPT_COINLISTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/CoinList.h" +// Sigmod includes +#include "../sigmod/CoinList.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class CoinListObjectWrapper; -class PokemodWrapper; +class SigmodWrapper; -class POKESCRIPTING_EXPORT CoinListWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT CoinListWrapper : public ObjectWrapper { Q_OBJECT public: - static CoinListWrapper* create(const Pokemod::CoinList* coinList, PokemodWrapper* parent); + static CoinListWrapper* create(const Sigmod::CoinList* coinList, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; Q_SCRIPTABLE CoinListObjectWrapper* object(const int index); Q_SCRIPTABLE int objectCount() const; private: - CoinListWrapper(const Pokemod::CoinList* coinList, PokemodWrapper* parent); + CoinListWrapper(const Sigmod::CoinList* coinList, SigmodWrapper* parent); CoinListWrapper& operator=(const CoinListWrapper& rhs); - const Pokemod::CoinList* m_coinList; + const Sigmod::CoinList* m_coinList; }; } -Q_DECLARE_METATYPE(Pokescripting::CoinListWrapper*) +Q_DECLARE_METATYPE(Sigscript::CoinListWrapper*) #endif diff --git a/sigscript/Config.cpp b/sigscript/Config.cpp index a0739591..6460053c 100644 --- a/sigscript/Config.cpp +++ b/sigscript/Config.cpp @@ -18,12 +18,12 @@ // Header include #include "Config.h" -Pokescripting::Config::Config(QObject* parent) : +Sigscript::Config::Config(QObject* parent) : QObject(parent) { } -void Pokescripting::Config::addValue(const QString& name, const QVariant& value, const bool temporary) +void Sigscript::Config::addValue(const QString& name, const QVariant& value, const bool temporary) { if (!m_values.contains(name)) { @@ -32,7 +32,7 @@ void Pokescripting::Config::addValue(const QString& name, const QVariant& value, } } -void Pokescripting::Config::setValue(const QString& name, const QVariant& value, const bool temporary) +void Sigscript::Config::setValue(const QString& name, const QVariant& value, const bool temporary) { const QVariant& oldValue = m_values[name]; m_values[name] = value; @@ -46,14 +46,14 @@ void Pokescripting::Config::setValue(const QString& name, const QVariant& value, emit(valueChanged(name, oldValue, value)); } -void Pokescripting::Config::removeValue(const QString& name) +void Sigscript::Config::removeValue(const QString& name) { m_values.remove(name); m_temporaries.removeAll(name); emit(valueRemoved(name)); } -QVariant Pokescripting::Config::value(const QString& name, const bool recursive) const +QVariant Sigscript::Config::value(const QString& name, const bool recursive) const { if (m_values.contains(name)) return m_values[name]; @@ -70,7 +70,7 @@ QVariant Pokescripting::Config::value(const QString& name, const bool recursive) return QVariant(); } -bool Pokescripting::Config::hasValue(const QString& name, const bool recursive) const +bool Sigscript::Config::hasValue(const QString& name, const bool recursive) const { if (m_values.contains(name)) return true; @@ -79,12 +79,12 @@ bool Pokescripting::Config::hasValue(const QString& name, const bool recursive) return false; } -void Pokescripting::Config::clearTemporary() +void Sigscript::Config::clearTemporary() { while (m_temporaries.size()) removeValue(m_temporaries[0]); } -void Pokescripting::Config::writeBack() +void Sigscript::Config::writeBack() { } diff --git a/sigscript/Config.h b/sigscript/Config.h index 16be5ade..6cfe95b9 100644 --- a/sigscript/Config.h +++ b/sigscript/Config.h @@ -15,10 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_CONFIG__ -#define __POKESCRIPTING_CONFIG__ +#ifndef __SIGSCRIPT_CONFIG__ +#define __SIGSCRIPT_CONFIG__ -// Pokescripting includes +// Sigscript includes #include "Global.h" // Qt includes @@ -29,14 +29,14 @@ #include <QtCore/QVariant> // Forward declarations -namespace Pokemod +namespace Sigmod { -class Pokemod; +class Sigmod; } -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT Config : public QObject +class SIGSCRIPT_EXPORT Config : public QObject { Q_OBJECT @@ -62,6 +62,6 @@ class POKESCRIPTING_EXPORT Config : public QObject QList<QString> m_temporaries; }; } -Q_DECLARE_METATYPE(Pokescripting::Config*) +Q_DECLARE_METATYPE(Sigscript::Config*) #endif diff --git a/sigscript/EggGroupWrapper.cpp b/sigscript/EggGroupWrapper.cpp index 2f3f9051..7ed1ddf2 100644 --- a/sigscript/EggGroupWrapper.cpp +++ b/sigscript/EggGroupWrapper.cpp @@ -18,23 +18,23 @@ // Header include #include "EggGroupWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::EggGroupWrapper* Pokescripting::EggGroupWrapper::create(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent) +Sigscript::EggGroupWrapper* Sigscript::EggGroupWrapper::create(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, eggGroup->id()))) m_instances[Signiture(parent, eggGroup->id())] = new EggGroupWrapper(eggGroup, parent); return qobject_cast<EggGroupWrapper*>(m_instances[Signiture(parent, eggGroup->id())]); } -Pokescripting::EggGroupWrapper::EggGroupWrapper(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent) : +Sigscript::EggGroupWrapper::EggGroupWrapper(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent) : ObjectWrapper(eggGroup, parent), m_eggGroup(eggGroup) { } -QString Pokescripting::EggGroupWrapper::name() const +QString Sigscript::EggGroupWrapper::name() const { return m_eggGroup->name(); } diff --git a/sigscript/EggGroupWrapper.h b/sigscript/EggGroupWrapper.h index 6c139c1e..7511da3c 100644 --- a/sigscript/EggGroupWrapper.h +++ b/sigscript/EggGroupWrapper.h @@ -15,32 +15,32 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_EGGGROUPWRAPPER__ -#define __POKESCRIPTING_EGGGROUPWRAPPER__ +#ifndef __SIGSCRIPT_EGGGROUPWRAPPER__ +#define __SIGSCRIPT_EGGGROUPWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/EggGroup.h" +// Sigmod includes +#include "../sigmod/EggGroup.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT EggGroupWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT EggGroupWrapper : public ObjectWrapper { Q_OBJECT public: - static EggGroupWrapper* create(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent); + static EggGroupWrapper* create(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; private: - EggGroupWrapper(const Pokemod::EggGroup* eggGroup, PokemodWrapper* parent); + EggGroupWrapper(const Sigmod::EggGroup* eggGroup, SigmodWrapper* parent); EggGroupWrapper& operator=(const EggGroupWrapper& rhs); - const Pokemod::EggGroup* m_eggGroup; + const Sigmod::EggGroup* m_eggGroup; }; } -Q_DECLARE_METATYPE(Pokescripting::EggGroupWrapper*) +Q_DECLARE_METATYPE(Sigscript::EggGroupWrapper*) #endif diff --git a/sigscript/Global.h b/sigscript/Global.h index d77ef326..fcba2b30 100644 --- a/sigscript/Global.h +++ b/sigscript/Global.h @@ -15,24 +15,24 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_GLOBAL__ -#define __POKESCRIPTING_GLOBAL__ +#ifndef __SIGSCRIPT_GLOBAL__ +#define __SIGSCRIPT_GLOBAL__ // KDE includes #include <kdemacros.h> -#ifndef POKESCRIPTING_EXPORT -# ifdef MAKE_POKESCRIPTING_LIB +#ifndef SIGSCRIPT_EXPORT +# ifdef MAKE_SIGSCRIPT_LIB /* We are building this library */ -# define POKESCRIPTING_EXPORT KDE_EXPORT +# define SIGSCRIPT_EXPORT KDE_EXPORT # else /* We are using this library */ -# define POKESCRIPTING_EXPORT KDE_IMPORT +# define SIGSCRIPT_EXPORT KDE_IMPORT # endif #endif -# ifndef POKESCRIPTING_EXPORT_DEPRECATED -# define POKESCRIPTING_EXPORT_DEPRECATED KDE_DEPRECATED POKESCRIPTING_EXPORT +# ifndef SIGSCRIPT_EXPORT_DEPRECATED +# define SIGSCRIPT_EXPORT_DEPRECATED KDE_DEPRECATED SIGSCRIPT_EXPORT # endif #endif diff --git a/sigscript/GlobalScriptWrapper.cpp b/sigscript/GlobalScriptWrapper.cpp index 34a3fa62..0be3e2ed 100644 --- a/sigscript/GlobalScriptWrapper.cpp +++ b/sigscript/GlobalScriptWrapper.cpp @@ -18,28 +18,28 @@ // Header include #include "GlobalScriptWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::GlobalScriptWrapper* Pokescripting::GlobalScriptWrapper::create(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent) +Sigscript::GlobalScriptWrapper* Sigscript::GlobalScriptWrapper::create(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, globalScript->id()))) m_instances[Signiture(parent, globalScript->id())] = new GlobalScriptWrapper(globalScript, parent); return qobject_cast<GlobalScriptWrapper*>(m_instances[Signiture(parent, globalScript->id())]); } -Pokescripting::GlobalScriptWrapper::GlobalScriptWrapper(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent) : +Sigscript::GlobalScriptWrapper::GlobalScriptWrapper(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent) : ObjectWrapper(globalScript, parent), m_globalScript(globalScript) { } -QString Pokescripting::GlobalScriptWrapper::name() const +QString Sigscript::GlobalScriptWrapper::name() const { return m_globalScript->name(); } -Pokemod::Script Pokescripting::GlobalScriptWrapper::script() const +Sigmod::Script Sigscript::GlobalScriptWrapper::script() const { return m_globalScript->script(); } diff --git a/sigscript/GlobalScriptWrapper.h b/sigscript/GlobalScriptWrapper.h index dd5f3e36..27a778ae 100644 --- a/sigscript/GlobalScriptWrapper.h +++ b/sigscript/GlobalScriptWrapper.h @@ -15,33 +15,33 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_GLOBALSCRIPTWRAPPER__ -#define __POKESCRIPTING_GLOBALSCRIPTWRAPPER__ +#ifndef __SIGSCRIPT_GLOBALSCRIPTWRAPPER__ +#define __SIGSCRIPT_GLOBALSCRIPTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/GlobalScript.h" +// Sigmod includes +#include "../sigmod/GlobalScript.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT GlobalScriptWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT GlobalScriptWrapper : public ObjectWrapper { Q_OBJECT public: - static GlobalScriptWrapper* create(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent); + static GlobalScriptWrapper* create(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - GlobalScriptWrapper(const Pokemod::GlobalScript* globalScript, PokemodWrapper* parent); + GlobalScriptWrapper(const Sigmod::GlobalScript* globalScript, SigmodWrapper* parent); GlobalScriptWrapper& operator=(const GlobalScriptWrapper& rhs); - const Pokemod::GlobalScript* m_globalScript; + const Sigmod::GlobalScript* m_globalScript; }; } -Q_DECLARE_METATYPE(Pokescripting::GlobalScriptWrapper*) +Q_DECLARE_METATYPE(Sigscript::GlobalScriptWrapper*) #endif diff --git a/sigscript/ItemTypeWrapper.cpp b/sigscript/ItemTypeWrapper.cpp index f9111db2..11808787 100644 --- a/sigscript/ItemTypeWrapper.cpp +++ b/sigscript/ItemTypeWrapper.cpp @@ -18,47 +18,47 @@ // Header include #include "ItemTypeWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::ItemTypeWrapper* Pokescripting::ItemTypeWrapper::create(const Pokemod::ItemType* itemType, PokemodWrapper* parent) +Sigscript::ItemTypeWrapper* Sigscript::ItemTypeWrapper::create(const Sigmod::ItemType* itemType, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, itemType->id()))) m_instances[Signiture(parent, itemType->id())] = new ItemTypeWrapper(itemType, parent); return qobject_cast<ItemTypeWrapper*>(m_instances[Signiture(parent, itemType->id())]); } -Pokescripting::ItemTypeWrapper::ItemTypeWrapper(const Pokemod::ItemType* itemType, PokemodWrapper* parent) : +Sigscript::ItemTypeWrapper::ItemTypeWrapper(const Sigmod::ItemType* itemType, SigmodWrapper* parent) : ObjectWrapper(itemType, parent), m_itemType(itemType) { } -Pokemod::ItemType::Count Pokescripting::ItemTypeWrapper::count(const QString& name) const +Sigmod::ItemType::Count Sigscript::ItemTypeWrapper::count(const QString& name) const { if (name == "Distinct") - return Pokemod::ItemType::Distinct; + return Sigmod::ItemType::Distinct; else if (name == "Total") - return Pokemod::ItemType::Total; - return QVariant(-1).value<Pokemod::ItemType::Count>(); + return Sigmod::ItemType::Total; + return QVariant(-1).value<Sigmod::ItemType::Count>(); } -QString Pokescripting::ItemTypeWrapper::name() const +QString Sigscript::ItemTypeWrapper::name() const { return m_itemType->name(); } -int Pokescripting::ItemTypeWrapper::computer() const +int Sigscript::ItemTypeWrapper::computer() const { return m_itemType->computer(); } -int Pokescripting::ItemTypeWrapper::player() const +int Sigscript::ItemTypeWrapper::player() const { return m_itemType->player(); } -int Pokescripting::ItemTypeWrapper::count() const +int Sigscript::ItemTypeWrapper::count() const { return m_itemType->count(); } diff --git a/sigscript/ItemTypeWrapper.h b/sigscript/ItemTypeWrapper.h index f9e61ccc..8b608456 100644 --- a/sigscript/ItemTypeWrapper.h +++ b/sigscript/ItemTypeWrapper.h @@ -15,37 +15,37 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_ITEMTYPEWRAPPER__ -#define __POKESCRIPTING_ITEMTYPEWRAPPER__ +#ifndef __SIGSCRIPT_ITEMTYPEWRAPPER__ +#define __SIGSCRIPT_ITEMTYPEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/ItemType.h" +// Sigmod includes +#include "../sigmod/ItemType.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT ItemTypeWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT ItemTypeWrapper : public ObjectWrapper { Q_OBJECT public: - static ItemTypeWrapper* create(const Pokemod::ItemType* itemType, PokemodWrapper* parent); + static ItemTypeWrapper* create(const Sigmod::ItemType* itemType, SigmodWrapper* parent); - Q_SCRIPTABLE Pokemod::ItemType::Count count(const QString& name) const; + Q_SCRIPTABLE Sigmod::ItemType::Count count(const QString& name) const; Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE int computer() const; Q_SCRIPTABLE int player() const; Q_SCRIPTABLE int count() const; private: - ItemTypeWrapper(const Pokemod::ItemType* itemType, PokemodWrapper* parent); + ItemTypeWrapper(const Sigmod::ItemType* itemType, SigmodWrapper* parent); ItemTypeWrapper& operator=(const ItemTypeWrapper& rhs); - const Pokemod::ItemType* m_itemType; + const Sigmod::ItemType* m_itemType; }; } -Q_DECLARE_METATYPE(Pokescripting::ItemTypeWrapper*) +Q_DECLARE_METATYPE(Sigscript::ItemTypeWrapper*) #endif diff --git a/sigscript/ItemWrapper.cpp b/sigscript/ItemWrapper.cpp index 002efea6..c1732e56 100644 --- a/sigscript/ItemWrapper.cpp +++ b/sigscript/ItemWrapper.cpp @@ -18,50 +18,50 @@ // Header include #include "ItemWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::ItemWrapper* Pokescripting::ItemWrapper::create(const Pokemod::Item* item, PokemodWrapper* parent) +Sigscript::ItemWrapper* Sigscript::ItemWrapper::create(const Sigmod::Item* item, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, item->id()))) m_instances[Signiture(parent, item->id())] = new ItemWrapper(item, parent); return qobject_cast<ItemWrapper*>(m_instances[Signiture(parent, item->id())]); } -Pokescripting::ItemWrapper::ItemWrapper(const Pokemod::Item* item, PokemodWrapper* parent) : +Sigscript::ItemWrapper::ItemWrapper(const Sigmod::Item* item, SigmodWrapper* parent) : ObjectWrapper(item, parent), m_item(item) { } -QString Pokescripting::ItemWrapper::name() const +QString Sigscript::ItemWrapper::name() const { return m_item->name(); } -bool Pokescripting::ItemWrapper::sellable() const +bool Sigscript::ItemWrapper::sellable() const { return m_item->sellable(); } -Pokescripting::ItemTypeWrapper* Pokescripting::ItemWrapper::type() +Sigscript::ItemTypeWrapper* Sigscript::ItemWrapper::type() { - return pokemod()->itemType(m_item->type()); + return sigmod()->itemType(m_item->type()); } -int Pokescripting::ItemWrapper::price() const +int Sigscript::ItemWrapper::price() const { if (value("price").canConvert<int>()) return value("price").toInt(); return m_item->price(); } -QString Pokescripting::ItemWrapper::description() const +QString Sigscript::ItemWrapper::description() const { return m_item->description(); } -Pokemod::Script Pokescripting::ItemWrapper::script() const +Sigmod::Script Sigscript::ItemWrapper::script() const { return m_item->script(); } diff --git a/sigscript/ItemWrapper.h b/sigscript/ItemWrapper.h index 1550c2f9..45edf11d 100644 --- a/sigscript/ItemWrapper.h +++ b/sigscript/ItemWrapper.h @@ -15,40 +15,40 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_ITEMWRAPPER__ -#define __POKESCRIPTING_ITEMWRAPPER__ +#ifndef __SIGSCRIPT_ITEMWRAPPER__ +#define __SIGSCRIPT_ITEMWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Item.h" +// Sigmod includes +#include "../sigmod/Item.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class ItemTypeWrapper; -class POKESCRIPTING_EXPORT ItemWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT ItemWrapper : public ObjectWrapper { Q_OBJECT public: - static ItemWrapper* create(const Pokemod::Item* item, PokemodWrapper* parent); + static ItemWrapper* create(const Sigmod::Item* item, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE bool sellable() const; Q_SCRIPTABLE ItemTypeWrapper* type(); Q_SCRIPTABLE int price() const; Q_SCRIPTABLE QString description() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - ItemWrapper(const Pokemod::Item* item, PokemodWrapper* parent); + ItemWrapper(const Sigmod::Item* item, SigmodWrapper* parent); ItemWrapper& operator=(const ItemWrapper& rhs); - const Pokemod::Item* m_item; + const Sigmod::Item* m_item; }; } -Q_DECLARE_METATYPE(Pokescripting::ItemWrapper*) +Q_DECLARE_METATYPE(Sigscript::ItemWrapper*) #endif diff --git a/sigscript/MapEffectWrapper.cpp b/sigscript/MapEffectWrapper.cpp index ac1d7c41..f1d135c8 100644 --- a/sigscript/MapEffectWrapper.cpp +++ b/sigscript/MapEffectWrapper.cpp @@ -18,48 +18,48 @@ // Header include #include "MapEffectWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapEffectWrapper* Pokescripting::MapEffectWrapper::create(const Pokemod::MapEffect* effect, MapWrapper* parent) +Sigscript::MapEffectWrapper* Sigscript::MapEffectWrapper::create(const Sigmod::MapEffect* effect, MapWrapper* parent) { if (!m_instances.contains(Signiture(parent, effect->id()))) m_instances[Signiture(parent, effect->id())] = new MapEffectWrapper(effect, parent); return qobject_cast<MapEffectWrapper*>(m_instances[Signiture(parent, effect->id())]); } -Pokescripting::MapEffectWrapper::MapEffectWrapper(const Pokemod::MapEffect* effect, MapWrapper* parent) : +Sigscript::MapEffectWrapper::MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent) : ObjectWrapper(effect, parent), m_effect(effect) { } -QString Pokescripting::MapEffectWrapper::name() const +QString Sigscript::MapEffectWrapper::name() const { return m_effect->name(); } -QPoint Pokescripting::MapEffectWrapper::coordinate() const +QPoint Sigscript::MapEffectWrapper::coordinate() const { if (value("coordinate").canConvert<QPoint>()) return value("coordinate").toPoint(); return m_effect->coordinate(); } -Pokescripting::SkinWrapper* Pokescripting::MapEffectWrapper::skin() +Sigscript::SkinWrapper* Sigscript::MapEffectWrapper::skin() { - return pokemod()->skin(m_effect->skin()); + return sigmod()->skin(m_effect->skin()); } -bool Pokescripting::MapEffectWrapper::isGhost() const +bool Sigscript::MapEffectWrapper::isGhost() const { if (value("ghost").canConvert<bool>()) return value("ghost").toBool(); return m_effect->isGhost(); } -Pokemod::Script Pokescripting::MapEffectWrapper::script() const +Sigmod::Script Sigscript::MapEffectWrapper::script() const { return m_effect->script(); } diff --git a/sigscript/MapEffectWrapper.h b/sigscript/MapEffectWrapper.h index 8ccb2781..206d0b0e 100644 --- a/sigscript/MapEffectWrapper.h +++ b/sigscript/MapEffectWrapper.h @@ -15,40 +15,40 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPEFFECTWRAPPER__ -#define __POKESCRIPTING_MAPEFFECTWRAPPER__ +#ifndef __SIGSCRIPT_MAPEFFECTWRAPPER__ +#define __SIGSCRIPT_MAPEFFECTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/MapEffect.h" +// Sigmod includes +#include "../sigmod/MapEffect.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class MapWrapper; class SkinWrapper; -class POKESCRIPTING_EXPORT MapEffectWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapEffectWrapper : public ObjectWrapper { Q_OBJECT public: - static MapEffectWrapper* create(const Pokemod::MapEffect* effect, MapWrapper* parent); + static MapEffectWrapper* create(const Sigmod::MapEffect* effect, MapWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE QPoint coordinate() const; Q_SCRIPTABLE SkinWrapper* skin(); Q_SCRIPTABLE bool isGhost() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - MapEffectWrapper(const Pokemod::MapEffect* effect, MapWrapper* parent); + MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent); MapEffectWrapper& operator=(const MapEffectWrapper& rhs); - const Pokemod::MapEffect* m_effect; + const Sigmod::MapEffect* m_effect; }; } -Q_DECLARE_METATYPE(Pokescripting::MapEffectWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapEffectWrapper*) #endif diff --git a/sigscript/MapTrainerTeamMemberWrapper.cpp b/sigscript/MapTrainerTeamMemberWrapper.cpp index a7b52c35..74966579 100644 --- a/sigscript/MapTrainerTeamMemberWrapper.cpp +++ b/sigscript/MapTrainerTeamMemberWrapper.cpp @@ -18,67 +18,67 @@ // Header include #include "MapTrainerTeamMemberWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapTrainerWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerTeamMemberWrapper::create(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) +Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerTeamMemberWrapper::create(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) { if (!m_instances.contains(Signiture(parent, teamMember->id()))) m_instances[Signiture(parent, teamMember->id())] = new MapTrainerTeamMemberWrapper(teamMember, parent); return qobject_cast<MapTrainerTeamMemberWrapper*>(m_instances[Signiture(parent, teamMember->id())]); } -Pokescripting::MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) : +Sigscript::MapTrainerTeamMemberWrapper::MapTrainerTeamMemberWrapper(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent) : ObjectWrapper(teamMember, parent), m_teamMember(teamMember) { } -Pokescripting::SpeciesWrapper* Pokescripting::MapTrainerTeamMemberWrapper::species() +Sigscript::SpeciesWrapper* Sigscript::MapTrainerTeamMemberWrapper::species() { - return pokemod()->species(m_teamMember->species()); + return sigmod()->species(m_teamMember->species()); } -int Pokescripting::MapTrainerTeamMemberWrapper::level() const +int Sigscript::MapTrainerTeamMemberWrapper::level() const { if (value("level").canConvert<int>()) return value("level").toInt(); return m_teamMember->level(); } -QList<Pokescripting::AbilityWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::abilities() +QList<Sigscript::AbilityWrapper*> Sigscript::MapTrainerTeamMemberWrapper::abilities() { QList<int> abilityIds = m_teamMember->abilities(); QList<AbilityWrapper*> abilities; foreach (int id, abilityIds) - abilities.append(pokemod()->ability(id)); + abilities.append(sigmod()->ability(id)); return abilities; } -QList<Pokescripting::ItemWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::items() +QList<Sigscript::ItemWrapper*> Sigscript::MapTrainerTeamMemberWrapper::items() { QList<int> itemIds = m_teamMember->items(); QList<ItemWrapper*> items; foreach (int id, itemIds) - items.append(pokemod()->item(id)); + items.append(sigmod()->item(id)); return items; } -QList<Pokescripting::MoveWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::moves() +QList<Sigscript::MoveWrapper*> Sigscript::MapTrainerTeamMemberWrapper::moves() { QList<int> moveIds = m_teamMember->moves(); QList<MoveWrapper*> moves; foreach (int id, moveIds) - moves.append(pokemod()->move(id)); + moves.append(sigmod()->move(id)); return moves; } -QList<Pokescripting::NatureWrapper*> Pokescripting::MapTrainerTeamMemberWrapper::natures() +QList<Sigscript::NatureWrapper*> Sigscript::MapTrainerTeamMemberWrapper::natures() { QList<int> natureIds = m_teamMember->natures(); QList<NatureWrapper*> natures; foreach (int id, natureIds) - natures.append(pokemod()->nature(id)); + natures.append(sigmod()->nature(id)); return natures; } diff --git a/sigscript/MapTrainerTeamMemberWrapper.h b/sigscript/MapTrainerTeamMemberWrapper.h index 313fe3f2..58409ea8 100644 --- a/sigscript/MapTrainerTeamMemberWrapper.h +++ b/sigscript/MapTrainerTeamMemberWrapper.h @@ -15,16 +15,16 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPTRAINERTEAMMEMBERWRAPPER__ -#define __POKESCRIPTING_MAPTRAINERTEAMMEMBERWRAPPER__ +#ifndef __SIGSCRIPT_MAPTRAINERTEAMMEMBERWRAPPER__ +#define __SIGSCRIPT_MAPTRAINERTEAMMEMBERWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/MapTrainerTeamMember.h" +// Sigmod includes +#include "../sigmod/MapTrainerTeamMember.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class AbilityWrapper; @@ -34,12 +34,12 @@ class MoveWrapper; class NatureWrapper; class SpeciesWrapper; -class POKESCRIPTING_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper { Q_OBJECT public: - static MapTrainerTeamMemberWrapper* create(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent); + static MapTrainerTeamMemberWrapper* create(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent); Q_SCRIPTABLE SpeciesWrapper* species(); Q_SCRIPTABLE int level() const; @@ -48,12 +48,12 @@ class POKESCRIPTING_EXPORT MapTrainerTeamMemberWrapper : public ObjectWrapper Q_SCRIPTABLE QList<MoveWrapper*> moves(); Q_SCRIPTABLE QList<NatureWrapper*> natures(); private: - MapTrainerTeamMemberWrapper(const Pokemod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent); + MapTrainerTeamMemberWrapper(const Sigmod::MapTrainerTeamMember* teamMember, MapTrainerWrapper* parent); MapTrainerTeamMemberWrapper& operator=(const MapTrainerTeamMemberWrapper& rhs); - const Pokemod::MapTrainerTeamMember* m_teamMember; + const Sigmod::MapTrainerTeamMember* m_teamMember; }; } -Q_DECLARE_METATYPE(Pokescripting::MapTrainerTeamMemberWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapTrainerTeamMemberWrapper*) #endif diff --git a/sigscript/MapTrainerWrapper.cpp b/sigscript/MapTrainerWrapper.cpp index a3ac6050..dc2830b4 100644 --- a/sigscript/MapTrainerWrapper.cpp +++ b/sigscript/MapTrainerWrapper.cpp @@ -18,55 +18,55 @@ // Header include #include "MapTrainerWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapWrapper.h" #include "MapTrainerTeamMemberWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapTrainerWrapper* Pokescripting::MapTrainerWrapper::create(const Pokemod::MapTrainer* trainer, MapWrapper* parent) +Sigscript::MapTrainerWrapper* Sigscript::MapTrainerWrapper::create(const Sigmod::MapTrainer* trainer, MapWrapper* parent) { if (!m_instances.contains(Signiture(parent, trainer->id()))) m_instances[Signiture(parent, trainer->id())] = new MapTrainerWrapper(trainer, parent); return qobject_cast<MapTrainerWrapper*>(m_instances[Signiture(parent, trainer->id())]); } -Pokescripting::MapTrainerWrapper::MapTrainerWrapper(const Pokemod::MapTrainer* trainer, MapWrapper* parent) : +Sigscript::MapTrainerWrapper::MapTrainerWrapper(const Sigmod::MapTrainer* trainer, MapWrapper* parent) : ObjectWrapper(trainer, parent), m_trainer(trainer) { } -QString Pokescripting::MapTrainerWrapper::name() const +QString Sigscript::MapTrainerWrapper::name() const { return m_trainer->name(); } -Pokescripting::TrainerWrapper* Pokescripting::MapTrainerWrapper::trainerClass() +Sigscript::TrainerWrapper* Sigscript::MapTrainerWrapper::trainerClass() { - return pokemod()->trainer(m_trainer->trainerClass()); + return sigmod()->trainer(m_trainer->trainerClass()); } -int Pokescripting::MapTrainerWrapper::numberFight() const +int Sigscript::MapTrainerWrapper::numberFight() const { return m_trainer->numberFight(); } -Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerWrapper::leadTeamMember() +Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerWrapper::leadTeamMember() { return teamMember(m_trainer->leadTeamMember()); } -Pokemod::Script Pokescripting::MapTrainerWrapper::script() const +Sigmod::Script Sigscript::MapTrainerWrapper::script() const { return m_trainer->script(); } -Pokescripting::MapTrainerTeamMemberWrapper* Pokescripting::MapTrainerWrapper::teamMember(const int index) +Sigscript::MapTrainerTeamMemberWrapper* Sigscript::MapTrainerWrapper::teamMember(const int index) { return MapTrainerTeamMemberWrapper::create(m_trainer->teamMember(index), this); } -int Pokescripting::MapTrainerWrapper::teamMemberCount() const +int Sigscript::MapTrainerWrapper::teamMemberCount() const { return m_trainer->teamMemberCount(); } diff --git a/sigscript/MapTrainerWrapper.h b/sigscript/MapTrainerWrapper.h index 0c65b186..0c83843b 100644 --- a/sigscript/MapTrainerWrapper.h +++ b/sigscript/MapTrainerWrapper.h @@ -15,44 +15,44 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPTRAINERWRAPPER__ -#define __POKESCRIPTING_MAPTRAINERWRAPPER__ +#ifndef __SIGSCRIPT_MAPTRAINERWRAPPER__ +#define __SIGSCRIPT_MAPTRAINERWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/MapTrainer.h" +// Sigmod includes +#include "../sigmod/MapTrainer.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class MapWrapper; class MapTrainerTeamMemberWrapper; class TrainerWrapper; -class POKESCRIPTING_EXPORT MapTrainerWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapTrainerWrapper : public ObjectWrapper { Q_OBJECT public: - static MapTrainerWrapper* create(const Pokemod::MapTrainer* trainer, MapWrapper* parent); + static MapTrainerWrapper* create(const Sigmod::MapTrainer* trainer, MapWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE TrainerWrapper* trainerClass(); Q_SCRIPTABLE int numberFight() const; Q_SCRIPTABLE MapTrainerTeamMemberWrapper* leadTeamMember(); - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; Q_SCRIPTABLE MapTrainerTeamMemberWrapper* teamMember(const int index); Q_SCRIPTABLE int teamMemberCount() const; private: - MapTrainerWrapper(const Pokemod::MapTrainer* trainer, MapWrapper* parent); + MapTrainerWrapper(const Sigmod::MapTrainer* trainer, MapWrapper* parent); MapTrainerWrapper& operator=(const MapTrainerWrapper& rhs); - const Pokemod::MapTrainer* m_trainer; + const Sigmod::MapTrainer* m_trainer; }; } -Q_DECLARE_METATYPE(Pokescripting::MapTrainerWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapTrainerWrapper*) #endif diff --git a/sigscript/MapWarpWrapper.cpp b/sigscript/MapWarpWrapper.cpp index 370ad6f5..fe6bdd42 100644 --- a/sigscript/MapWarpWrapper.cpp +++ b/sigscript/MapWarpWrapper.cpp @@ -18,59 +18,59 @@ // Header include #include "MapWarpWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapWarpWrapper* Pokescripting::MapWarpWrapper::create(const Pokemod::MapWarp* warp, MapWrapper* parent) +Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::create(const Sigmod::MapWarp* warp, MapWrapper* parent) { if (!m_instances.contains(Signiture(parent, warp->id()))) m_instances[Signiture(parent, warp->id())] = new MapWarpWrapper(warp, parent); return qobject_cast<MapWarpWrapper*>(m_instances[Signiture(parent, warp->id())]); } -Pokescripting::MapWarpWrapper::MapWarpWrapper(const Pokemod::MapWarp* warp, MapWrapper* parent) : +Sigscript::MapWarpWrapper::MapWarpWrapper(const Sigmod::MapWarp* warp, MapWrapper* parent) : ObjectWrapper(warp, parent), m_warp(warp) { } -Pokemod::MapWarp::Type Pokescripting::MapWarpWrapper::type(const QString& name) const +Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type(const QString& name) const { if (name == "Door") - return Pokemod::MapWarp::Door; + return Sigmod::MapWarp::Door; else if (name == "Warp") - return Pokemod::MapWarp::Warp; + return Sigmod::MapWarp::Warp; else if (name == "Hole") - return Pokemod::MapWarp::Hole; + return Sigmod::MapWarp::Hole; else if (name == "Boundary") - return Pokemod::MapWarp::Boundary; - return QVariant(-1).value<Pokemod::MapWarp::Type>(); + return Sigmod::MapWarp::Boundary; + return QVariant(-1).value<Sigmod::MapWarp::Type>(); } -QString Pokescripting::MapWarpWrapper::name() const +QString Sigscript::MapWarpWrapper::name() const { return m_warp->name(); } -QPoint Pokescripting::MapWarpWrapper::coordinate() const +QPoint Sigscript::MapWarpWrapper::coordinate() const { if (value("coordinate").canConvert<QPoint>()) return value("coordinate").toPoint(); return m_warp->coordinate(); } -Pokemod::MapWarp::Type Pokescripting::MapWarpWrapper::type() const +Sigmod::MapWarp::Type Sigscript::MapWarpWrapper::type() const { return m_warp->type(); } -Pokescripting::MapWarpWrapper* Pokescripting::MapWarpWrapper::toWarp() +Sigscript::MapWarpWrapper* Sigscript::MapWarpWrapper::toWarp() { - return pokemod()->map(m_warp->toMap())->warp(m_warp->toWarp()); + return sigmod()->map(m_warp->toMap())->warp(m_warp->toWarp()); } -Pokemod::Script Pokescripting::MapWarpWrapper::script() const +Sigmod::Script Sigscript::MapWarpWrapper::script() const { return m_warp->script(); } diff --git a/sigscript/MapWarpWrapper.h b/sigscript/MapWarpWrapper.h index ac894b04..422ab073 100644 --- a/sigscript/MapWarpWrapper.h +++ b/sigscript/MapWarpWrapper.h @@ -15,41 +15,41 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPWARPWRAPPER__ -#define __POKESCRIPTING_MAPWARPWRAPPER__ +#ifndef __SIGSCRIPT_MAPWARPWRAPPER__ +#define __SIGSCRIPT_MAPWARPWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/MapWarp.h" +// Sigmod includes +#include "../sigmod/MapWarp.h" -namespace Pokescripting +namespace Sigscript { // Forward declartions class MapWrapper; -class POKESCRIPTING_EXPORT MapWarpWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapWarpWrapper : public ObjectWrapper { Q_OBJECT public: - static MapWarpWrapper* create(const Pokemod::MapWarp* warp, MapWrapper* parent); + static MapWarpWrapper* create(const Sigmod::MapWarp* warp, MapWrapper* parent); - Q_SCRIPTABLE Pokemod::MapWarp::Type type(const QString& name) const; + Q_SCRIPTABLE Sigmod::MapWarp::Type type(const QString& name) const; Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE QPoint coordinate() const; - Q_SCRIPTABLE Pokemod::MapWarp::Type type() const; + Q_SCRIPTABLE Sigmod::MapWarp::Type type() const; Q_SCRIPTABLE MapWarpWrapper* toWarp(); - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - MapWarpWrapper(const Pokemod::MapWarp* warp, MapWrapper* parent); + MapWarpWrapper(const Sigmod::MapWarp* warp, MapWrapper* parent); MapWarpWrapper& operator=(const MapWarpWrapper& rhs); - const Pokemod::MapWarp* m_warp; + const Sigmod::MapWarp* m_warp; }; } -Q_DECLARE_METATYPE(Pokescripting::MapWarpWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapWarpWrapper*) #endif diff --git a/sigscript/MapWildListEncounterWrapper.cpp b/sigscript/MapWildListEncounterWrapper.cpp index 6d37d5ae..cf01d938 100644 --- a/sigscript/MapWildListEncounterWrapper.cpp +++ b/sigscript/MapWildListEncounterWrapper.cpp @@ -18,36 +18,36 @@ // Header include #include "MapWildListEncounterWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapWildListWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapWildListEncounterWrapper* Pokescripting::MapWildListEncounterWrapper::create(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent) +Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListEncounterWrapper::create(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent) { if (!m_instances.contains(Signiture(parent, encounter->id()))) m_instances[Signiture(parent, encounter->id())] = new MapWildListEncounterWrapper(encounter, parent); return qobject_cast<MapWildListEncounterWrapper*>(m_instances[Signiture(parent, encounter->id())]); } -Pokescripting::MapWildListEncounterWrapper::MapWildListEncounterWrapper(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent) : +Sigscript::MapWildListEncounterWrapper::MapWildListEncounterWrapper(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent) : ObjectWrapper(encounter, parent), m_encounter(encounter) { } -Pokescripting::SpeciesWrapper* Pokescripting::MapWildListEncounterWrapper::species() +Sigscript::SpeciesWrapper* Sigscript::MapWildListEncounterWrapper::species() { - return pokemod()->species(m_encounter->species()); + return sigmod()->species(m_encounter->species()); } -int Pokescripting::MapWildListEncounterWrapper::level() const +int Sigscript::MapWildListEncounterWrapper::level() const { if (value("level").canConvert<int>()) return value("level").toInt(); return m_encounter->level(); } -int Pokescripting::MapWildListEncounterWrapper::weight() const +int Sigscript::MapWildListEncounterWrapper::weight() const { if (value("weight").canConvert<int>()) return value("weight").toInt(); diff --git a/sigscript/MapWildListEncounterWrapper.h b/sigscript/MapWildListEncounterWrapper.h index c9459430..6bb28ff7 100644 --- a/sigscript/MapWildListEncounterWrapper.h +++ b/sigscript/MapWildListEncounterWrapper.h @@ -15,38 +15,38 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPWILDLISTENCOUNTERWRAPPER__ -#define __POKESCRIPTING_MAPWILDLISTENCOUNTERWRAPPER__ +#ifndef __SIGSCRIPT_MAPWILDLISTENCOUNTERWRAPPER__ +#define __SIGSCRIPT_MAPWILDLISTENCOUNTERWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/MapWildListEncounter.h" +// Sigmod includes +#include "../sigmod/MapWildListEncounter.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class MapWildListWrapper; class SpeciesWrapper; -class POKESCRIPTING_EXPORT MapWildListEncounterWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapWildListEncounterWrapper : public ObjectWrapper { Q_OBJECT public: - static MapWildListEncounterWrapper* create(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent); + static MapWildListEncounterWrapper* create(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent); Q_SCRIPTABLE SpeciesWrapper* species(); Q_SCRIPTABLE int level() const; Q_SCRIPTABLE int weight() const; private: - MapWildListEncounterWrapper(const Pokemod::MapWildListEncounter* encounter, MapWildListWrapper* parent); + MapWildListEncounterWrapper(const Sigmod::MapWildListEncounter* encounter, MapWildListWrapper* parent); MapWildListEncounterWrapper& operator=(const MapWildListEncounterWrapper& rhs); - const Pokemod::MapWildListEncounter* m_encounter; + const Sigmod::MapWildListEncounter* m_encounter; }; } -Q_DECLARE_METATYPE(Pokescripting::MapWildListEncounterWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapWildListEncounterWrapper*) #endif diff --git a/sigscript/MapWildListWrapper.cpp b/sigscript/MapWildListWrapper.cpp index 3b725b34..f00442da 100644 --- a/sigscript/MapWildListWrapper.cpp +++ b/sigscript/MapWildListWrapper.cpp @@ -18,42 +18,42 @@ // Header include #include "MapWildListWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapWrapper.h" #include "MapWildListEncounterWrapper.h" -Pokescripting::MapWildListWrapper* Pokescripting::MapWildListWrapper::create(const Pokemod::MapWildList* wildList, MapWrapper* parent) +Sigscript::MapWildListWrapper* Sigscript::MapWildListWrapper::create(const Sigmod::MapWildList* wildList, MapWrapper* parent) { if (!m_instances.contains(Signiture(parent, wildList->id()))) m_instances[Signiture(parent, wildList->id())] = new MapWildListWrapper(wildList, parent); return qobject_cast<MapWildListWrapper*>(m_instances[Signiture(parent, wildList->id())]); } -Pokescripting::MapWildListWrapper::MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent) : +Sigscript::MapWildListWrapper::MapWildListWrapper(const Sigmod::MapWildList* wildList, MapWrapper* parent) : ObjectWrapper(wildList, parent), m_wildList(wildList) { } -Pokemod::Hat<Pokescripting::MapWildListEncounterWrapper*> Pokescripting::MapWildListWrapper::encounterHat() +Sigmod::Hat<Sigscript::MapWildListEncounterWrapper*> Sigscript::MapWildListWrapper::encounterHat() { - Pokemod::Hat<MapWildListEncounterWrapper*> hat; + Sigmod::Hat<MapWildListEncounterWrapper*> hat; for (int i = 0; i < encounterCount(); ++i) hat.add(encounter(i), encounter(i)->weight()); return hat; } -QString Pokescripting::MapWildListWrapper::name() const +QString Sigscript::MapWildListWrapper::name() const { return m_wildList->name(); } -Pokescripting::MapWildListEncounterWrapper* Pokescripting::MapWildListWrapper::encounter(const int index) +Sigscript::MapWildListEncounterWrapper* Sigscript::MapWildListWrapper::encounter(const int index) { return MapWildListEncounterWrapper::create(m_wildList->encounter(index), this); } -int Pokescripting::MapWildListWrapper::encounterCount() const +int Sigscript::MapWildListWrapper::encounterCount() const { return m_wildList->encounterCount(); } diff --git a/sigscript/MapWildListWrapper.h b/sigscript/MapWildListWrapper.h index 661a3ef7..08707e03 100644 --- a/sigscript/MapWildListWrapper.h +++ b/sigscript/MapWildListWrapper.h @@ -15,42 +15,42 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPWILDLISTWRAPPER__ -#define __POKESCRIPTING_MAPWILDLISTWRAPPER__ +#ifndef __SIGSCRIPT_MAPWILDLISTWRAPPER__ +#define __SIGSCRIPT_MAPWILDLISTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Hat.h" -#include "../pokemod/MapWildList.h" +// Sigmod includes +#include "../sigmod/Hat.h" +#include "../sigmod/MapWildList.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class MapWrapper; class MapWildListEncounterWrapper; -class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapWildListWrapper : public ObjectWrapper { Q_OBJECT public: - static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, MapWrapper* parent); + static MapWildListWrapper* create(const Sigmod::MapWildList* wildList, MapWrapper* parent); - Pokemod::Hat<MapWildListEncounterWrapper*> encounterHat(); + Sigmod::Hat<MapWildListEncounterWrapper*> encounterHat(); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE MapWildListEncounterWrapper* encounter(const int index); Q_SCRIPTABLE int encounterCount() const; private: - MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent); + MapWildListWrapper(const Sigmod::MapWildList* wildList, MapWrapper* parent); MapWildListWrapper& operator=(const MapWildListWrapper& rhs); - const Pokemod::MapWildList* m_wildList; + const Sigmod::MapWildList* m_wildList; }; } -Q_DECLARE_METATYPE(Pokescripting::MapWildListWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapWildListWrapper*) #endif diff --git a/sigscript/MapWrapper.cpp b/sigscript/MapWrapper.cpp index ebd37ceb..279e0b58 100644 --- a/sigscript/MapWrapper.cpp +++ b/sigscript/MapWrapper.cpp @@ -18,83 +18,83 @@ // Header include #include "MapWrapper.h" -// Pokescripting includes +// Sigscript includes #include "MapEffectWrapper.h" #include "MapTrainerWrapper.h" #include "MapWarpWrapper.h" #include "MapWildListWrapper.h" -#include "PokemodWrapper.h" +#include "SigmodWrapper.h" -Pokescripting::MapWrapper* Pokescripting::MapWrapper::create(const Pokemod::Map* map, PokemodWrapper* parent) +Sigscript::MapWrapper* Sigscript::MapWrapper::create(const Sigmod::Map* map, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, map->id()))) m_instances[Signiture(parent, map->id())] = new MapWrapper(map, parent); return qobject_cast<MapWrapper*>(m_instances[Signiture(parent, map->id())]); } -Pokescripting::MapWrapper::MapWrapper(const Pokemod::Map* map, PokemodWrapper* parent) : +Sigscript::MapWrapper::MapWrapper(const Sigmod::Map* map, SigmodWrapper* parent) : ObjectWrapper(map, parent), m_map(map) { } -Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const int id) +Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const int id) { return MapEffectWrapper::create(m_map->effectById(id), this); } -Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const int id) +Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const int id) { return MapTrainerWrapper::create(m_map->trainerById(id), this); } -Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const int id) +Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const int id) { return MapWarpWrapper::create(m_map->warpById(id), this); } -Pokescripting::MapWildListWrapper* Pokescripting::MapWrapper::wildList(const int id) +Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const int id) { return MapWildListWrapper::create(m_map->wildListById(id), this); } -Pokemod::Map::Type Pokescripting::MapWrapper::type(const QString& name) const +Sigmod::Map::Type Sigscript::MapWrapper::type(const QString& name) const { if (name == "Outdoor") - return Pokemod::Map::Outdoor; + return Sigmod::Map::Outdoor; else if (name == "Dungeon") - return Pokemod::Map::Dungeon; + return Sigmod::Map::Dungeon; else if (name == "Building") - return Pokemod::Map::Building; - return QVariant(-1).value<Pokemod::Map::Type>(); + return Sigmod::Map::Building; + return QVariant(-1).value<Sigmod::Map::Type>(); } -QString Pokescripting::MapWrapper::name() const +QString Sigscript::MapWrapper::name() const { return m_map->name(); } -Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::flyWarp() +Sigscript::MapWarpWrapper* Sigscript::MapWrapper::flyWarp() { return MapWarpWrapper::create(m_map->warpById(m_map->flyWarp()), this); } -Pokemod::Map::Type Pokescripting::MapWrapper::type() const +Sigmod::Map::Type Sigscript::MapWrapper::type() const { return m_map->type(); } -Pokescripting::TileWrapper* Pokescripting::MapWrapper::tile(const int row, const int column) +Sigscript::TileWrapper* Sigscript::MapWrapper::tile(const int row, const int column) { - return pokemod()->tile(m_map->tile(row, column)); + return sigmod()->tile(m_map->tile(row, column)); } -QPoint Pokescripting::MapWrapper::mapSize() const +QPoint Sigscript::MapWrapper::mapSize() const { return m_map->size(); } -Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const QString& name) +Sigscript::MapEffectWrapper* Sigscript::MapWrapper::effect(const QString& name) { for (int i = 0; i < m_map->effectCount(); ++i) { @@ -104,7 +104,7 @@ Pokescripting::MapEffectWrapper* Pokescripting::MapWrapper::effect(const QString return NULL; } -Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const QString& name) +Sigscript::MapTrainerWrapper* Sigscript::MapWrapper::trainer(const QString& name) { for (int i = 0; i < m_map->trainerCount(); ++i) { @@ -114,7 +114,7 @@ Pokescripting::MapTrainerWrapper* Pokescripting::MapWrapper::trainer(const QStri return NULL; } -Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const QString& name) +Sigscript::MapWarpWrapper* Sigscript::MapWrapper::warp(const QString& name) { for (int i = 0; i < m_map->warpCount(); ++i) { @@ -124,7 +124,7 @@ Pokescripting::MapWarpWrapper* Pokescripting::MapWrapper::warp(const QString& na return NULL; } -Pokescripting::MapWildListWrapper* Pokescripting::MapWrapper::wildList(const QString& name) +Sigscript::MapWildListWrapper* Sigscript::MapWrapper::wildList(const QString& name) { for (int i = 0; i < m_map->wildListCount(); ++i) { diff --git a/sigscript/MapWrapper.h b/sigscript/MapWrapper.h index f0f8980f..e09520b2 100644 --- a/sigscript/MapWrapper.h +++ b/sigscript/MapWrapper.h @@ -15,16 +15,16 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MAPWRAPPER__ -#define __POKESCRIPTING_MAPWRAPPER__ +#ifndef __SIGSCRIPT_MAPWRAPPER__ +#define __SIGSCRIPT_MAPWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Map.h" +// Sigmod includes +#include "../sigmod/Map.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class MapEffectWrapper; @@ -33,23 +33,23 @@ class MapWarpWrapper; class MapWildListWrapper; class TileWrapper; -class POKESCRIPTING_EXPORT MapWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MapWrapper : public ObjectWrapper { Q_OBJECT public: - static MapWrapper* create(const Pokemod::Map* map, PokemodWrapper* parent); + static MapWrapper* create(const Sigmod::Map* map, SigmodWrapper* parent); MapEffectWrapper* effect(const int id); MapTrainerWrapper* trainer(const int id); MapWarpWrapper* warp(const int id); MapWildListWrapper* wildList(const int id); - Q_SCRIPTABLE Pokemod::Map::Type type(const QString& name) const; + Q_SCRIPTABLE Sigmod::Map::Type type(const QString& name) const; Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE MapWarpWrapper* flyWarp(); - Q_SCRIPTABLE Pokemod::Map::Type type() const; + Q_SCRIPTABLE Sigmod::Map::Type type() const; Q_SCRIPTABLE TileWrapper* tile(const int row, const int column); Q_SCRIPTABLE QPoint mapSize() const; @@ -58,12 +58,12 @@ class POKESCRIPTING_EXPORT MapWrapper : public ObjectWrapper Q_SCRIPTABLE MapWarpWrapper* warp(const QString& name); Q_SCRIPTABLE MapWildListWrapper* wildList(const QString& name); private: - MapWrapper(const Pokemod::Map* map, PokemodWrapper* parent); + MapWrapper(const Sigmod::Map* map, SigmodWrapper* parent); MapWrapper& operator=(const MapWrapper& rhs); - const Pokemod::Map* m_map; + const Sigmod::Map* m_map; }; } -Q_DECLARE_METATYPE(Pokescripting::MapWrapper*) +Q_DECLARE_METATYPE(Sigscript::MapWrapper*) #endif diff --git a/sigscript/MoveWrapper.cpp b/sigscript/MoveWrapper.cpp index 1bf5d3f8..8ddc47d1 100644 --- a/sigscript/MoveWrapper.cpp +++ b/sigscript/MoveWrapper.cpp @@ -18,74 +18,74 @@ // Header include #include "MoveWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::MoveWrapper* Pokescripting::MoveWrapper::create(const Pokemod::Move* move, PokemodWrapper* parent) +Sigscript::MoveWrapper* Sigscript::MoveWrapper::create(const Sigmod::Move* move, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, move->id()))) m_instances[Signiture(parent, move->id())] = new MoveWrapper(move, parent); return qobject_cast<MoveWrapper*>(m_instances[Signiture(parent, move->id())]); } -Pokescripting::MoveWrapper::MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent) : +Sigscript::MoveWrapper::MoveWrapper(const Sigmod::Move* move, SigmodWrapper* parent) : ObjectWrapper(move, parent), m_move(move) { } -QString Pokescripting::MoveWrapper::name() const +QString Sigscript::MoveWrapper::name() const { return m_move->name(); } -Pokemod::Fraction Pokescripting::MoveWrapper::accuracy() const +Sigmod::Fraction Sigscript::MoveWrapper::accuracy() const { - if (value("accuracy").canConvert<Pokemod::Fraction>()) - return value("accuracy").value<Pokemod::Fraction>(); + if (value("accuracy").canConvert<Sigmod::Fraction>()) + return value("accuracy").value<Sigmod::Fraction>(); return m_move->accuracy(); } -int Pokescripting::MoveWrapper::power() const +int Sigscript::MoveWrapper::power() const { if (value("power").canConvert<int>()) return value("power").toInt(); return m_move->power(); } -Pokescripting::TypeWrapper* Pokescripting::MoveWrapper::type() +Sigscript::TypeWrapper* Sigscript::MoveWrapper::type() { - return pokemod()->type(m_move->type()); + return sigmod()->type(m_move->type()); } -bool Pokescripting::MoveWrapper::special() const +bool Sigscript::MoveWrapper::special() const { return m_move->special(); } -int Pokescripting::MoveWrapper::powerPoints() const +int Sigscript::MoveWrapper::powerPoints() const { return m_move->powerPoints(); } -int Pokescripting::MoveWrapper::priority() const +int Sigscript::MoveWrapper::priority() const { if (value("priority").canConvert<int>()) return value("priority").toInt(); return m_move->priority(); } -QString Pokescripting::MoveWrapper::description() const +QString Sigscript::MoveWrapper::description() const { return m_move->description(); } -Pokemod::Script Pokescripting::MoveWrapper::battleScript() const +Sigmod::Script Sigscript::MoveWrapper::battleScript() const { return m_move->battleScript(); } -Pokemod::Script Pokescripting::MoveWrapper::worldScript() const +Sigmod::Script Sigscript::MoveWrapper::worldScript() const { return m_move->worldScript(); } diff --git a/sigscript/MoveWrapper.h b/sigscript/MoveWrapper.h index 37a7192f..0ae57288 100644 --- a/sigscript/MoveWrapper.h +++ b/sigscript/MoveWrapper.h @@ -15,44 +15,44 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_MOVEWRAPPER__ -#define __POKESCRIPTING_MOVEWRAPPER__ +#ifndef __SIGSCRIPT_MOVEWRAPPER__ +#define __SIGSCRIPT_MOVEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Move.h" +// Sigmod includes +#include "../sigmod/Move.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class TypeWrapper; -class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT MoveWrapper : public ObjectWrapper { Q_OBJECT public: - static MoveWrapper* create(const Pokemod::Move* move, PokemodWrapper* parent); + static MoveWrapper* create(const Sigmod::Move* move, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Fraction accuracy() const; + Q_SCRIPTABLE Sigmod::Fraction accuracy() const; Q_SCRIPTABLE int power() const; Q_SCRIPTABLE TypeWrapper* type(); Q_SCRIPTABLE bool special() const; Q_SCRIPTABLE int powerPoints() const; Q_SCRIPTABLE int priority() const; Q_SCRIPTABLE QString description() const; - Q_SCRIPTABLE Pokemod::Script battleScript() const; - Q_SCRIPTABLE Pokemod::Script worldScript() const; + Q_SCRIPTABLE Sigmod::Script battleScript() const; + Q_SCRIPTABLE Sigmod::Script worldScript() const; private: - MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent); + MoveWrapper(const Sigmod::Move* move, SigmodWrapper* parent); MoveWrapper& operator=(const MoveWrapper& rhs); - const Pokemod::Move* m_move; + const Sigmod::Move* m_move; }; } -Q_DECLARE_METATYPE(Pokescripting::MoveWrapper*) +Q_DECLARE_METATYPE(Sigscript::MoveWrapper*) #endif diff --git a/sigscript/NatureWrapper.cpp b/sigscript/NatureWrapper.cpp index fa9f1c06..49ca54a3 100644 --- a/sigscript/NatureWrapper.cpp +++ b/sigscript/NatureWrapper.cpp @@ -18,33 +18,33 @@ // Header include #include "NatureWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::NatureWrapper* Pokescripting::NatureWrapper::create(const Pokemod::Nature* nature, PokemodWrapper* parent) +Sigscript::NatureWrapper* Sigscript::NatureWrapper::create(const Sigmod::Nature* nature, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, nature->id()))) m_instances[Signiture(parent, nature->id())] = new NatureWrapper(nature, parent); return qobject_cast<NatureWrapper*>(m_instances[Signiture(parent, nature->id())]); } -Pokescripting::NatureWrapper::NatureWrapper(const Pokemod::Nature* nature, PokemodWrapper* parent) : +Sigscript::NatureWrapper::NatureWrapper(const Sigmod::Nature* nature, SigmodWrapper* parent) : ObjectWrapper(nature, parent), m_nature(nature) { } -QString Pokescripting::NatureWrapper::name() const +QString Sigscript::NatureWrapper::name() const { return m_nature->name(); } -Pokemod::Fraction Pokescripting::NatureWrapper::stat(const Pokemod::Stat stat) const +Sigmod::Fraction Sigscript::NatureWrapper::stat(const Sigmod::Stat stat) const { return m_nature->stat(stat); } -int Pokescripting::NatureWrapper::weight() const +int Sigscript::NatureWrapper::weight() const { return m_nature->weight(); } diff --git a/sigscript/NatureWrapper.h b/sigscript/NatureWrapper.h index 037a014c..c4b55272 100644 --- a/sigscript/NatureWrapper.h +++ b/sigscript/NatureWrapper.h @@ -15,34 +15,34 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_NATUREWRAPPER__ -#define __POKESCRIPTING_NATUREWRAPPER__ +#ifndef __SIGSCRIPT_NATUREWRAPPER__ +#define __SIGSCRIPT_NATUREWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Nature.h" +// Sigmod includes +#include "../sigmod/Nature.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT NatureWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT NatureWrapper : public ObjectWrapper { Q_OBJECT public: - static NatureWrapper* create(const Pokemod::Nature* nature, PokemodWrapper* parent); + static NatureWrapper* create(const Sigmod::Nature* nature, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Fraction stat(const Pokemod::Stat stat) const; + Q_SCRIPTABLE Sigmod::Fraction stat(const Sigmod::Stat stat) const; Q_SCRIPTABLE int weight() const; private: - NatureWrapper(const Pokemod::Nature* nature, PokemodWrapper* parent); + NatureWrapper(const Sigmod::Nature* nature, SigmodWrapper* parent); NatureWrapper& operator=(const NatureWrapper& rhs); - const Pokemod::Nature* m_nature; + const Sigmod::Nature* m_nature; }; } -Q_DECLARE_METATYPE(Pokescripting::NatureWrapper*) +Q_DECLARE_METATYPE(Sigscript::NatureWrapper*) #endif diff --git a/sigscript/ObjectWrapper.cpp b/sigscript/ObjectWrapper.cpp index d1af3220..8917c375 100644 --- a/sigscript/ObjectWrapper.cpp +++ b/sigscript/ObjectWrapper.cpp @@ -18,42 +18,42 @@ // Header include #include "ObjectWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -QMap<Pokescripting::ObjectWrapper::Signiture, Pokescripting::ObjectWrapper*> Pokescripting::ObjectWrapper::m_instances; +QMap<Sigscript::ObjectWrapper::Signiture, Sigscript::ObjectWrapper*> Sigscript::ObjectWrapper::m_instances; -Pokescripting::ObjectWrapper::ObjectWrapper(const Pokemod::Object* object, ObjectWrapper* parent) : +Sigscript::ObjectWrapper::ObjectWrapper(const Sigmod::Object* object, ObjectWrapper* parent) : Config(parent), m_object(object) { } -int Pokescripting::ObjectWrapper::id() const +int Sigscript::ObjectWrapper::id() const { return m_object->id(); } -const Pokescripting::ObjectWrapper* Pokescripting::ObjectWrapper::parent() const +const Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent() const { return m_parent; } -Pokescripting::ObjectWrapper* Pokescripting::ObjectWrapper::parent() +Sigscript::ObjectWrapper* Sigscript::ObjectWrapper::parent() { return m_parent; } -const Pokescripting::PokemodWrapper* Pokescripting::ObjectWrapper::pokemod() const +const Sigscript::SigmodWrapper* Sigscript::ObjectWrapper::sigmod() const { if (m_parent) - return m_parent->pokemod(); - return qobject_cast<const PokemodWrapper*>(m_parent); + return m_parent->sigmod(); + return qobject_cast<const SigmodWrapper*>(m_parent); } -Pokescripting::PokemodWrapper* Pokescripting::ObjectWrapper::pokemod() +Sigscript::SigmodWrapper* Sigscript::ObjectWrapper::sigmod() { if (m_parent) - return m_parent->pokemod(); - return qobject_cast<PokemodWrapper*>(m_parent); + return m_parent->sigmod(); + return qobject_cast<SigmodWrapper*>(m_parent); } diff --git a/sigscript/ObjectWrapper.h b/sigscript/ObjectWrapper.h index 648b693b..d5260b74 100644 --- a/sigscript/ObjectWrapper.h +++ b/sigscript/ObjectWrapper.h @@ -15,27 +15,27 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_OBJECTWRAPPER__ -#define __POKESCRIPTING_OBJECTWRAPPER__ +#ifndef __SIGSCRIPT_OBJECTWRAPPER__ +#define __SIGSCRIPT_OBJECTWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "Config.h" -// Pokemod includes -#include "../pokemod/Object.h" -#include "../pokemod/Pokemod.h" +// Sigmod includes +#include "../sigmod/Object.h" +#include "../sigmod/Sigmod.h" // Qt includes #include <QtCore/QMap> #include <QtCore/QObject> #include <QtCore/QPair> -namespace Pokescripting +namespace Sigscript { // Forward declarations -class PokemodWrapper; +class SigmodWrapper; -class POKESCRIPTING_EXPORT ObjectWrapper : public Config +class SIGSCRIPT_EXPORT ObjectWrapper : public Config { Q_OBJECT Q_PROPERTY(int id READ id) @@ -43,20 +43,20 @@ class POKESCRIPTING_EXPORT ObjectWrapper : public Config public: typedef QPair<ObjectWrapper*, int> Signiture; - ObjectWrapper(const Pokemod::Object* object, ObjectWrapper* parent); + ObjectWrapper(const Sigmod::Object* object, ObjectWrapper* parent); int id() const; const ObjectWrapper* parent() const; ObjectWrapper* parent(); - const PokemodWrapper* pokemod() const; - PokemodWrapper* pokemod(); + const SigmodWrapper* sigmod() const; + SigmodWrapper* sigmod(); protected: static QMap<Signiture, ObjectWrapper*> m_instances; private: ObjectWrapper* m_parent; - const Pokemod::Object* m_object; + const Sigmod::Object* m_object; }; } diff --git a/sigscript/PokemodWrapper.cpp b/sigscript/PokemodWrapper.cpp deleted file mode 100644 index 247fb409..00000000 --- a/sigscript/PokemodWrapper.cpp +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> - * - * 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/>. - */ - -// Header include -#include "PokemodWrapper.h" - -// Pokescripting includes -#include "AbilityWrapper.h" -#include "AuthorWrapper.h" -#include "BadgeWrapper.h" -#include "CoinListWrapper.h" -#include "EggGroupWrapper.h" -#include "GlobalScriptWrapper.h" -#include "ItemWrapper.h" -#include "ItemTypeWrapper.h" -#include "MapWrapper.h" -#include "MapWarpWrapper.h" -#include "MoveWrapper.h" -#include "NatureWrapper.h" -#include "RulesWrapper.h" -#include "SkinWrapper.h" -#include "SoundWrapper.h" -#include "SpeciesWrapper.h" -#include "SpriteWrapper.h" -#include "StatusWrapper.h" -#include "StoreWrapper.h" -#include "TileWrapper.h" -#include "TimeWrapper.h" -#include "TrainerWrapper.h" -#include "TypeWrapper.h" -#include "WeatherWrapper.h" - -Pokescripting::PokemodWrapper::PokemodWrapper(const Pokemod::Pokemod* pokemod) : - ObjectWrapper(pokemod, NULL), - m_pokemod(pokemod) -{ -} - -Pokemod::Hat<Pokescripting::NatureWrapper*> Pokescripting::PokemodWrapper::natureHat() -{ - Pokemod::Hat<NatureWrapper*> hat; - for (int i = 0; i < m_pokemod->natureCount(); ++i) - { - NatureWrapper* nature = NatureWrapper::create(m_pokemod->nature(i), this); - hat.add(nature, nature->weight()); - } - return hat; -} - -Pokescripting::AbilityWrapper* Pokescripting::PokemodWrapper::ability(const int id) -{ - return AbilityWrapper::create(m_pokemod->abilityById(id), this); -} - -Pokescripting::AuthorWrapper* Pokescripting::PokemodWrapper::author(const int id) -{ - return AuthorWrapper::create(m_pokemod->authorById(id), this); -} - -Pokescripting::BadgeWrapper* Pokescripting::PokemodWrapper::badge(const int id) -{ - return BadgeWrapper::create(m_pokemod->badgeById(id), this); -} - -Pokescripting::CoinListWrapper* Pokescripting::PokemodWrapper::coinList(const int id) -{ - return CoinListWrapper::create(m_pokemod->coinListById(id), this); -} - -Pokescripting::EggGroupWrapper* Pokescripting::PokemodWrapper::eggGroup(const int id) -{ - return EggGroupWrapper::create(m_pokemod->eggGroupById(id), this); -} - -Pokescripting::GlobalScriptWrapper* Pokescripting::PokemodWrapper::globalScript(const int id) -{ - return GlobalScriptWrapper::create(m_pokemod->globalScriptById(id), this); -} - -Pokescripting::ItemWrapper* Pokescripting::PokemodWrapper::item(const int id) -{ - return ItemWrapper::create(m_pokemod->itemById(id), this); -} - -Pokescripting::ItemTypeWrapper* Pokescripting::PokemodWrapper::itemType(const int id) -{ - return ItemTypeWrapper::create(m_pokemod->itemTypeById(id), this); -} - -Pokescripting::MapWrapper* Pokescripting::PokemodWrapper::map(const int id) -{ - return MapWrapper::create(m_pokemod->mapById(id), this); -} - -Pokescripting::MoveWrapper* Pokescripting::PokemodWrapper::move(const int id) -{ - return MoveWrapper::create(m_pokemod->moveById(id), this); -} - -Pokescripting::NatureWrapper* Pokescripting::PokemodWrapper::nature(const int id) -{ - return NatureWrapper::create(m_pokemod->natureById(id), this); -} - -Pokescripting::SkinWrapper* Pokescripting::PokemodWrapper::skin(const int id) -{ - return SkinWrapper::create(m_pokemod->skinById(id), this); -} - -Pokescripting::SoundWrapper* Pokescripting::PokemodWrapper::sound(const int id) -{ - return SoundWrapper::create(m_pokemod->soundById(id), this); -} - -Pokescripting::SpeciesWrapper* Pokescripting::PokemodWrapper::species(const int id) -{ - return SpeciesWrapper::create(m_pokemod->speciesById(id), this); -} - -Pokescripting::SpriteWrapper* Pokescripting::PokemodWrapper::sprite(const int id) -{ - return SpriteWrapper::create(m_pokemod->spriteById(id), this); -} - -Pokescripting::StatusWrapper* Pokescripting::PokemodWrapper::status(const int id) -{ - return StatusWrapper::create(m_pokemod->statusById(id), this); -} - -Pokescripting::StoreWrapper* Pokescripting::PokemodWrapper::store(const int id) -{ - return StoreWrapper::create(m_pokemod->storeById(id), this); -} - -Pokescripting::TileWrapper* Pokescripting::PokemodWrapper::tile(const int id) -{ - return TileWrapper::create(m_pokemod->tileById(id), this); -} - -Pokescripting::TimeWrapper* Pokescripting::PokemodWrapper::time(const int id) -{ - return TimeWrapper::create(m_pokemod->timeById(id), this); -} - -Pokescripting::TrainerWrapper* Pokescripting::PokemodWrapper::trainer(const int id) -{ - return TrainerWrapper::create(m_pokemod->trainerById(id), this); -} - -Pokescripting::TypeWrapper* Pokescripting::PokemodWrapper::type(const int id) -{ - return TypeWrapper::create(m_pokemod->typeById(id), this); -} - -Pokescripting::WeatherWrapper* Pokescripting::PokemodWrapper::weather(const int id) -{ - return WeatherWrapper::create(m_pokemod->weatherById(id), this); -} - -Pokemod::Stat Pokescripting::PokemodWrapper::stat(const QString& name) const -{ - if (name == "HP") - return Pokemod::ST_HP; - else if (name == "Attack") - return Pokemod::ST_Attack; - else if (name == "Defense") - return Pokemod::ST_Defense; - else if (name == "Speed") - return Pokemod::ST_Speed; - else if (name == "Special") - return Pokemod::ST_Special; - else if (name == "Special Attack") - return Pokemod::ST_SpecialAttack; - else if (name == "Special Defense") - return Pokemod::ST_SpecialAttack; - else if (name == "Accuracy") - return Pokemod::ST_Accuracy; - else if (name == "Evasion") - return Pokemod::ST_Evasion; - return QVariant(-1).value<Pokemod::Stat>(); -} - -Pokemod::Direction Pokescripting::PokemodWrapper::direction(const QString& name) const -{ - if (name == "Up") - return Pokemod::D_Up; - else if (name == "Down") - return Pokemod::D_Down; - else if (name == "Left") - return Pokemod::D_Left; - else if (name == "Right") - return Pokemod::D_Right; - else if (name == "None") - return Pokemod::D_None; - return QVariant(-1).value<Pokemod::Direction>(); -} - -QString Pokescripting::PokemodWrapper::title() const -{ - return m_pokemod->title(); -} - -QString Pokescripting::PokemodWrapper::version() const -{ - return m_pokemod->version(); -} - -QString Pokescripting::PokemodWrapper::description() const -{ - return m_pokemod->description(); -} - -Pokescripting::MapWarpWrapper* Pokescripting::PokemodWrapper::startWarp() -{ - return map(m_pokemod->startMap())->warp(m_pokemod->startWarp()); -} - -Pokemod::Fraction Pokescripting::PokemodWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const -{ - return m_pokemod->typechart(m_pokemod->typeIndex(attacker->id()), m_pokemod->typeIndex(defender->id())); -} - -Pokescripting::RulesWrapper* Pokescripting::PokemodWrapper::rules() -{ - return RulesWrapper::create(m_pokemod->rules(), this); -} - -Pokescripting::AbilityWrapper* Pokescripting::PokemodWrapper::ability(const QString& name) -{ - for (int i = 0; i < m_pokemod->abilityCount(); ++i) - { - if (m_pokemod->ability(i)->name() == name) - return AbilityWrapper::create(m_pokemod->ability(i), this); - } - return NULL; -} - -Pokescripting::AuthorWrapper* Pokescripting::PokemodWrapper::author(const QString& name) -{ - for (int i = 0; i < m_pokemod->authorCount(); ++i) - { - if (m_pokemod->author(i)->name() == name) - return AuthorWrapper::create(m_pokemod->author(i), this); - } - return NULL; -} - -Pokescripting::BadgeWrapper* Pokescripting::PokemodWrapper::badge(const QString& name) -{ - for (int i = 0; i < m_pokemod->badgeCount(); ++i) - { - if (m_pokemod->badge(i)->name() == name) - return BadgeWrapper::create(m_pokemod->badge(i), this); - } - return NULL; -} - -Pokescripting::CoinListWrapper* Pokescripting::PokemodWrapper::coinList(const QString& name) -{ - for (int i = 0; i < m_pokemod->coinListCount(); ++i) - { - if (m_pokemod->coinList(i)->name() == name) - return CoinListWrapper::create(m_pokemod->coinList(i), this); - } - return NULL; -} - -Pokescripting::EggGroupWrapper* Pokescripting::PokemodWrapper::eggGroup(const QString& name) -{ - for (int i = 0; i < m_pokemod->eggGroupCount(); ++i) - { - if (m_pokemod->eggGroup(i)->name() == name) - return EggGroupWrapper::create(m_pokemod->eggGroup(i), this); - } - return NULL; -} - -Pokescripting::GlobalScriptWrapper* Pokescripting::PokemodWrapper::globalScript(const QString& name) -{ - for (int i = 0; i < m_pokemod->globalScriptCount(); ++i) - { - if (m_pokemod->globalScript(i)->name() == name) - return GlobalScriptWrapper::create(m_pokemod->globalScript(i), this); - } - return NULL; -} - -Pokescripting::ItemWrapper* Pokescripting::PokemodWrapper::item(const QString& name) -{ - for (int i = 0; i < m_pokemod->itemCount(); ++i) - { - if (m_pokemod->item(i)->name() == name) - return ItemWrapper::create(m_pokemod->item(i), this); - } - return NULL; -} - -Pokescripting::ItemTypeWrapper* Pokescripting::PokemodWrapper::itemType(const QString& name) -{ - for (int i = 0; i < m_pokemod->itemTypeCount(); ++i) - { - if (m_pokemod->itemType(i)->name() == name) - return ItemTypeWrapper::create(m_pokemod->itemType(i), this); - } - return NULL; -} - -Pokescripting::MapWrapper* Pokescripting::PokemodWrapper::map(const QString& name) -{ - for (int i = 0; i < m_pokemod->mapCount(); ++i) - { - if (m_pokemod->map(i)->name() == name) - return MapWrapper::create(m_pokemod->map(i), this); - } - return NULL; -} - -Pokescripting::MoveWrapper* Pokescripting::PokemodWrapper::move(const QString& name) -{ - for (int i = 0; i < m_pokemod->moveCount(); ++i) - { - if (m_pokemod->move(i)->name() == name) - return MoveWrapper::create(m_pokemod->move(i), this); - } - return NULL; -} - -Pokescripting::NatureWrapper* Pokescripting::PokemodWrapper::nature(const QString& name) -{ - for (int i = 0; i < m_pokemod->natureCount(); ++i) - { - if (m_pokemod->nature(i)->name() == name) - return NatureWrapper::create(m_pokemod->nature(i), this); - } - return NULL; -} - -Pokescripting::SkinWrapper* Pokescripting::PokemodWrapper::skin(const QString& name) -{ - for (int i = 0; i < m_pokemod->skinCount(); ++i) - { - if (m_pokemod->skin(i)->name() == name) - return SkinWrapper::create(m_pokemod->skin(i), this); - } - return NULL; -} - -Pokescripting::SoundWrapper* Pokescripting::PokemodWrapper::sound(const QString& name) -{ - for (int i = 0; i < m_pokemod->soundCount(); ++i) - { - if (m_pokemod->sound(i)->name() == name) - return SoundWrapper::create(m_pokemod->sound(i), this); - } - return NULL; -} - -Pokescripting::SpeciesWrapper* Pokescripting::PokemodWrapper::species(const QString& name) -{ - for (int i = 0; i < m_pokemod->speciesCount(); ++i) - { - if (m_pokemod->species(i)->name() == name) - return SpeciesWrapper::create(m_pokemod->species(i), this); - } - return NULL; -} - -Pokescripting::SpriteWrapper* Pokescripting::PokemodWrapper::sprite(const QString& name) -{ - for (int i = 0; i < m_pokemod->spriteCount(); ++i) - { - if (m_pokemod->sprite(i)->name() == name) - return SpriteWrapper::create(m_pokemod->sprite(i), this); - } - return NULL; -} - -Pokescripting::StatusWrapper* Pokescripting::PokemodWrapper::status(const QString& name) -{ - for (int i = 0; i < m_pokemod->statusCount(); ++i) - { - if (m_pokemod->status(i)->name() == name) - return StatusWrapper::create(m_pokemod->status(i), this); - } - return NULL; -} - -Pokescripting::StoreWrapper* Pokescripting::PokemodWrapper::store(const QString& name) -{ - for (int i = 0; i < m_pokemod->storeCount(); ++i) - { - if (m_pokemod->store(i)->name() == name) - return StoreWrapper::create(m_pokemod->store(i), this); - } - return NULL; -} - -Pokescripting::TileWrapper* Pokescripting::PokemodWrapper::tile(const QString& name) -{ - for (int i = 0; i < m_pokemod->tileCount(); ++i) - { - if (m_pokemod->tile(i)->name() == name) - return TileWrapper::create(m_pokemod->tile(i), this); - } - return NULL; -} - -Pokescripting::TimeWrapper* Pokescripting::PokemodWrapper::time(const QString& name) -{ - for (int i = 0; i < m_pokemod->timeCount(); ++i) - { - if (m_pokemod->time(i)->name() == name) - return TimeWrapper::create(m_pokemod->time(i), this); - } - return NULL; -} - -Pokescripting::TrainerWrapper* Pokescripting::PokemodWrapper::trainer(const QString& name) -{ - for (int i = 0; i < m_pokemod->trainerCount(); ++i) - { - if (m_pokemod->trainer(i)->name() == name) - return TrainerWrapper::create(m_pokemod->trainer(i), this); - } - return NULL; -} - -Pokescripting::TypeWrapper* Pokescripting::PokemodWrapper::type(const QString& name) -{ - for (int i = 0; i < m_pokemod->typeCount(); ++i) - { - if (m_pokemod->type(i)->name() == name) - return TypeWrapper::create(m_pokemod->type(i), this); - } - return NULL; -} - -Pokescripting::WeatherWrapper* Pokescripting::PokemodWrapper::weather(const QString& name) -{ - for (int i = 0; i < m_pokemod->weatherCount(); ++i) - { - if (m_pokemod->weather(i)->name() == name) - return WeatherWrapper::create(m_pokemod->weather(i), this); - } - return NULL; -} diff --git a/sigscript/RulesWrapper.cpp b/sigscript/RulesWrapper.cpp index e70e4af0..aa2a2108 100644 --- a/sigscript/RulesWrapper.cpp +++ b/sigscript/RulesWrapper.cpp @@ -18,157 +18,157 @@ // Header include #include "RulesWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::RulesWrapper* Pokescripting::RulesWrapper::create(const Pokemod::Rules* rules, PokemodWrapper* parent) +Sigscript::RulesWrapper* Sigscript::RulesWrapper::create(const Sigmod::Rules* rules, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, rules->id()))) m_instances[Signiture(parent, rules->id())] = new RulesWrapper(rules, parent); return qobject_cast<RulesWrapper*>(m_instances[Signiture(parent, rules->id())]); } -Pokescripting::RulesWrapper::RulesWrapper(const Pokemod::Rules* rules, PokemodWrapper* parent) : +Sigscript::RulesWrapper::RulesWrapper(const Sigmod::Rules* rules, SigmodWrapper* parent) : ObjectWrapper(rules, parent), m_rules(rules) { } -bool Pokescripting::RulesWrapper::genderAllowed() const +bool Sigscript::RulesWrapper::genderAllowed() const { return m_rules->genderAllowed(); } -bool Pokescripting::RulesWrapper::breedingAllowed() const +bool Sigscript::RulesWrapper::breedingAllowed() const { return m_rules->breedingAllowed(); } -bool Pokescripting::RulesWrapper::criticalDomains() const +bool Sigscript::RulesWrapper::criticalDomains() const { return m_rules->criticalDomains(); } -bool Pokescripting::RulesWrapper::useTurns() const +bool Sigscript::RulesWrapper::useTurns() const { return m_rules->useTurns(); } -int Pokescripting::RulesWrapper::numBoxes() const +int Sigscript::RulesWrapper::numBoxes() const { if (value("numBoxes").canConvert<int>()) return value("numBoxes").toInt(); return m_rules->numBoxes(); } -int Pokescripting::RulesWrapper::boxSize() const +int Sigscript::RulesWrapper::boxSize() const { if (value("boxSize").canConvert<int>()) return value("boxSize").toInt(); return m_rules->boxSize(); } -int Pokescripting::RulesWrapper::maxParty() const +int Sigscript::RulesWrapper::maxParty() const { if (value("maxParty").canConvert<int>()) return value("maxParty").toInt(); return m_rules->maxParty(); } -int Pokescripting::RulesWrapper::maxFight() const +int Sigscript::RulesWrapper::maxFight() const { if (value("maxFight").canConvert<int>()) return value("maxFight").toInt(); return m_rules->maxFight(); } -int Pokescripting::RulesWrapper::maxPlayers() const +int Sigscript::RulesWrapper::maxPlayers() const { if (value("maxFight").canConvert<int>()) return value("maxFight").toInt(); return m_rules->maxPlayers(); } -int Pokescripting::RulesWrapper::maxHeldItems() const +int Sigscript::RulesWrapper::maxHeldItems() const { if (value("maxHeldItems").canConvert<int>()) return value("maxHeldItems").toInt(); return m_rules->maxHeldItems(); } -int Pokescripting::RulesWrapper::maxAbilities() const +int Sigscript::RulesWrapper::maxAbilities() const { return m_rules->maxAbilities(); } -int Pokescripting::RulesWrapper::maxNatures() const +int Sigscript::RulesWrapper::maxNatures() const { return m_rules->maxNatures(); } -int Pokescripting::RulesWrapper::maxMoves() const +int Sigscript::RulesWrapper::maxMoves() const { if (value("maxMoves").canConvert<int>()) return value("maxMoves").toInt(); return m_rules->maxMoves(); } -int Pokescripting::RulesWrapper::maxLevel() const +int Sigscript::RulesWrapper::maxLevel() const { if (value("maxLevel").canConvert<int>()) return value("maxLevel").toInt(); return m_rules->maxLevel(); } -int Pokescripting::RulesWrapper::maxStages() const +int Sigscript::RulesWrapper::maxStages() const { if (value("maxStages").canConvert<int>()) return value("maxStages").toInt(); return m_rules->maxStages(); } -int Pokescripting::RulesWrapper::maxMoney() const +int Sigscript::RulesWrapper::maxMoney() const { if (value("maxMoney").canConvert<int>()) return value("maxMoney").toInt(); return m_rules->maxMoney(); } -bool Pokescripting::RulesWrapper::hardCash() const +bool Sigscript::RulesWrapper::hardCash() const { return m_rules->hardCash(); } -bool Pokescripting::RulesWrapper::allowSwitchStyle() const +bool Sigscript::RulesWrapper::allowSwitchStyle() const { if (value("allowSwitchStyle").canConvert<bool>()) return value("allowSwitchStyle").toBool(); return m_rules->allowSwitchStyle(); } -bool Pokescripting::RulesWrapper::specialSplit() const +bool Sigscript::RulesWrapper::specialSplit() const { return m_rules->specialSplit(); } -bool Pokescripting::RulesWrapper::specialDVSplit() const +bool Sigscript::RulesWrapper::specialDVSplit() const { return m_rules->specialDVSplit(); } -bool Pokescripting::RulesWrapper::effortValuesAllowed() const +bool Sigscript::RulesWrapper::effortValuesAllowed() const { return m_rules->effortValuesAllowed(); } -int Pokescripting::RulesWrapper::maxTotalEV() const +int Sigscript::RulesWrapper::maxTotalEV() const { if (value("maxTotalEV").canConvert<int>()) return value("maxTotalEV").toInt(); return m_rules->maxTotalEV(); } -int Pokescripting::RulesWrapper::maxEVPerStat() const +int Sigscript::RulesWrapper::maxEVPerStat() const { if (value("maxEVPerStat").canConvert<int>()) return value("maxEVPerStat").toInt(); diff --git a/sigscript/RulesWrapper.h b/sigscript/RulesWrapper.h index a4492022..b5aeaad8 100644 --- a/sigscript/RulesWrapper.h +++ b/sigscript/RulesWrapper.h @@ -15,23 +15,23 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_RULESWRAPPER__ -#define __POKESCRIPTING_RULESWRAPPER__ +#ifndef __SIGSCRIPT_RULESWRAPPER__ +#define __SIGSCRIPT_RULESWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Rules.h" +// Sigmod includes +#include "../sigmod/Rules.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT RulesWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT RulesWrapper : public ObjectWrapper { Q_OBJECT public: - static RulesWrapper* create(const Pokemod::Rules* rules, PokemodWrapper* parent); + static RulesWrapper* create(const Sigmod::Rules* rules, SigmodWrapper* parent); Q_SCRIPTABLE bool genderAllowed() const; Q_SCRIPTABLE bool breedingAllowed() const; @@ -57,12 +57,12 @@ class POKESCRIPTING_EXPORT RulesWrapper : public ObjectWrapper Q_SCRIPTABLE int maxTotalEV() const; Q_SCRIPTABLE int maxEVPerStat() const; private: - RulesWrapper(const Pokemod::Rules* rules, PokemodWrapper* parent); + RulesWrapper(const Sigmod::Rules* rules, SigmodWrapper* parent); RulesWrapper& operator=(const RulesWrapper& rhs); - const Pokemod::Rules* m_rules; + const Sigmod::Rules* m_rules; }; } -Q_DECLARE_METATYPE(Pokescripting::RulesWrapper*) +Q_DECLARE_METATYPE(Sigscript::RulesWrapper*) #endif diff --git a/sigscript/SigmodWrapper.cpp b/sigscript/SigmodWrapper.cpp new file mode 100644 index 00000000..473ffddc --- /dev/null +++ b/sigscript/SigmodWrapper.cpp @@ -0,0 +1,460 @@ +/* + * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> + * + * 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/>. + */ + +// Header include +#include "SigmodWrapper.h" + +// Sigscript includes +#include "AbilityWrapper.h" +#include "AuthorWrapper.h" +#include "BadgeWrapper.h" +#include "CoinListWrapper.h" +#include "EggGroupWrapper.h" +#include "GlobalScriptWrapper.h" +#include "ItemWrapper.h" +#include "ItemTypeWrapper.h" +#include "MapWrapper.h" +#include "MapWarpWrapper.h" +#include "MoveWrapper.h" +#include "NatureWrapper.h" +#include "RulesWrapper.h" +#include "SkinWrapper.h" +#include "SoundWrapper.h" +#include "SpeciesWrapper.h" +#include "SpriteWrapper.h" +#include "StatusWrapper.h" +#include "StoreWrapper.h" +#include "TileWrapper.h" +#include "TimeWrapper.h" +#include "TrainerWrapper.h" +#include "TypeWrapper.h" +#include "WeatherWrapper.h" + +Sigscript::SigmodWrapper::SigmodWrapper(const Sigmod::Sigmod* sigmod) : + ObjectWrapper(sigmod, NULL), + m_sigmod(sigmod) +{ +} + +Sigmod::Hat<Sigscript::NatureWrapper*> Sigscript::SigmodWrapper::natureHat() +{ + Sigmod::Hat<NatureWrapper*> hat; + for (int i = 0; i < m_sigmod->natureCount(); ++i) + { + NatureWrapper* nature = NatureWrapper::create(m_sigmod->nature(i), this); + hat.add(nature, nature->weight()); + } + return hat; +} + +Sigscript::AbilityWrapper* Sigscript::SigmodWrapper::ability(const int id) +{ + return AbilityWrapper::create(m_sigmod->abilityById(id), this); +} + +Sigscript::AuthorWrapper* Sigscript::SigmodWrapper::author(const int id) +{ + return AuthorWrapper::create(m_sigmod->authorById(id), this); +} + +Sigscript::BadgeWrapper* Sigscript::SigmodWrapper::badge(const int id) +{ + return BadgeWrapper::create(m_sigmod->badgeById(id), this); +} + +Sigscript::CoinListWrapper* Sigscript::SigmodWrapper::coinList(const int id) +{ + return CoinListWrapper::create(m_sigmod->coinListById(id), this); +} + +Sigscript::EggGroupWrapper* Sigscript::SigmodWrapper::eggGroup(const int id) +{ + return EggGroupWrapper::create(m_sigmod->eggGroupById(id), this); +} + +Sigscript::GlobalScriptWrapper* Sigscript::SigmodWrapper::globalScript(const int id) +{ + return GlobalScriptWrapper::create(m_sigmod->globalScriptById(id), this); +} + +Sigscript::ItemWrapper* Sigscript::SigmodWrapper::item(const int id) +{ + return ItemWrapper::create(m_sigmod->itemById(id), this); +} + +Sigscript::ItemTypeWrapper* Sigscript::SigmodWrapper::itemType(const int id) +{ + return ItemTypeWrapper::create(m_sigmod->itemTypeById(id), this); +} + +Sigscript::MapWrapper* Sigscript::SigmodWrapper::map(const int id) +{ + return MapWrapper::create(m_sigmod->mapById(id), this); +} + +Sigscript::MoveWrapper* Sigscript::SigmodWrapper::move(const int id) +{ + return MoveWrapper::create(m_sigmod->moveById(id), this); +} + +Sigscript::NatureWrapper* Sigscript::SigmodWrapper::nature(const int id) +{ + return NatureWrapper::create(m_sigmod->natureById(id), this); +} + +Sigscript::SkinWrapper* Sigscript::SigmodWrapper::skin(const int id) +{ + return SkinWrapper::create(m_sigmod->skinById(id), this); +} + +Sigscript::SoundWrapper* Sigscript::SigmodWrapper::sound(const int id) +{ + return SoundWrapper::create(m_sigmod->soundById(id), this); +} + +Sigscript::SpeciesWrapper* Sigscript::SigmodWrapper::species(const int id) +{ + return SpeciesWrapper::create(m_sigmod->speciesById(id), this); +} + +Sigscript::SpriteWrapper* Sigscript::SigmodWrapper::sprite(const int id) +{ + return SpriteWrapper::create(m_sigmod->spriteById(id), this); +} + +Sigscript::StatusWrapper* Sigscript::SigmodWrapper::status(const int id) +{ + return StatusWrapper::create(m_sigmod->statusById(id), this); +} + +Sigscript::StoreWrapper* Sigscript::SigmodWrapper::store(const int id) +{ + return StoreWrapper::create(m_sigmod->storeById(id), this); +} + +Sigscript::TileWrapper* Sigscript::SigmodWrapper::tile(const int id) +{ + return TileWrapper::create(m_sigmod->tileById(id), this); +} + +Sigscript::TimeWrapper* Sigscript::SigmodWrapper::time(const int id) +{ + return TimeWrapper::create(m_sigmod->timeById(id), this); +} + +Sigscript::TrainerWrapper* Sigscript::SigmodWrapper::trainer(const int id) +{ + return TrainerWrapper::create(m_sigmod->trainerById(id), this); +} + +Sigscript::TypeWrapper* Sigscript::SigmodWrapper::type(const int id) +{ + return TypeWrapper::create(m_sigmod->typeById(id), this); +} + +Sigscript::WeatherWrapper* Sigscript::SigmodWrapper::weather(const int id) +{ + return WeatherWrapper::create(m_sigmod->weatherById(id), this); +} + +Sigmod::Stat Sigscript::SigmodWrapper::stat(const QString& name) const +{ + if (name == "HP") + return Sigmod::ST_HP; + else if (name == "Attack") + return Sigmod::ST_Attack; + else if (name == "Defense") + return Sigmod::ST_Defense; + else if (name == "Speed") + return Sigmod::ST_Speed; + else if (name == "Special") + return Sigmod::ST_Special; + else if (name == "Special Attack") + return Sigmod::ST_SpecialAttack; + else if (name == "Special Defense") + return Sigmod::ST_SpecialAttack; + else if (name == "Accuracy") + return Sigmod::ST_Accuracy; + else if (name == "Evasion") + return Sigmod::ST_Evasion; + return QVariant(-1).value<Sigmod::Stat>(); +} + +Sigmod::Direction Sigscript::SigmodWrapper::direction(const QString& name) const +{ + if (name == "Up") + return Sigmod::D_Up; + else if (name == "Down") + return Sigmod::D_Down; + else if (name == "Left") + return Sigmod::D_Left; + else if (name == "Right") + return Sigmod::D_Right; + else if (name == "None") + return Sigmod::D_None; + return QVariant(-1).value<Sigmod::Direction>(); +} + +QString Sigscript::SigmodWrapper::title() const +{ + return m_sigmod->title(); +} + +QString Sigscript::SigmodWrapper::version() const +{ + return m_sigmod->version(); +} + +QString Sigscript::SigmodWrapper::description() const +{ + return m_sigmod->description(); +} + +Sigscript::MapWarpWrapper* Sigscript::SigmodWrapper::startWarp() +{ + return map(m_sigmod->startMap())->warp(m_sigmod->startWarp()); +} + +Sigmod::Fraction Sigscript::SigmodWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const +{ + return m_sigmod->typechart(m_sigmod->typeIndex(attacker->id()), m_sigmod->typeIndex(defender->id())); +} + +Sigscript::RulesWrapper* Sigscript::SigmodWrapper::rules() +{ + return RulesWrapper::create(m_sigmod->rules(), this); +} + +Sigscript::AbilityWrapper* Sigscript::SigmodWrapper::ability(const QString& name) +{ + for (int i = 0; i < m_sigmod->abilityCount(); ++i) + { + if (m_sigmod->ability(i)->name() == name) + return AbilityWrapper::create(m_sigmod->ability(i), this); + } + return NULL; +} + +Sigscript::AuthorWrapper* Sigscript::SigmodWrapper::author(const QString& name) +{ + for (int i = 0; i < m_sigmod->authorCount(); ++i) + { + if (m_sigmod->author(i)->name() == name) + return AuthorWrapper::create(m_sigmod->author(i), this); + } + return NULL; +} + +Sigscript::BadgeWrapper* Sigscript::SigmodWrapper::badge(const QString& name) +{ + for (int i = 0; i < m_sigmod->badgeCount(); ++i) + { + if (m_sigmod->badge(i)->name() == name) + return BadgeWrapper::create(m_sigmod->badge(i), this); + } + return NULL; +} + +Sigscript::CoinListWrapper* Sigscript::SigmodWrapper::coinList(const QString& name) +{ + for (int i = 0; i < m_sigmod->coinListCount(); ++i) + { + if (m_sigmod->coinList(i)->name() == name) + return CoinListWrapper::create(m_sigmod->coinList(i), this); + } + return NULL; +} + +Sigscript::EggGroupWrapper* Sigscript::SigmodWrapper::eggGroup(const QString& name) +{ + for (int i = 0; i < m_sigmod->eggGroupCount(); ++i) + { + if (m_sigmod->eggGroup(i)->name() == name) + return EggGroupWrapper::create(m_sigmod->eggGroup(i), this); + } + return NULL; +} + +Sigscript::GlobalScriptWrapper* Sigscript::SigmodWrapper::globalScript(const QString& name) +{ + for (int i = 0; i < m_sigmod->globalScriptCount(); ++i) + { + if (m_sigmod->globalScript(i)->name() == name) + return GlobalScriptWrapper::create(m_sigmod->globalScript(i), this); + } + return NULL; +} + +Sigscript::ItemWrapper* Sigscript::SigmodWrapper::item(const QString& name) +{ + for (int i = 0; i < m_sigmod->itemCount(); ++i) + { + if (m_sigmod->item(i)->name() == name) + return ItemWrapper::create(m_sigmod->item(i), this); + } + return NULL; +} + +Sigscript::ItemTypeWrapper* Sigscript::SigmodWrapper::itemType(const QString& name) +{ + for (int i = 0; i < m_sigmod->itemTypeCount(); ++i) + { + if (m_sigmod->itemType(i)->name() == name) + return ItemTypeWrapper::create(m_sigmod->itemType(i), this); + } + return NULL; +} + +Sigscript::MapWrapper* Sigscript::SigmodWrapper::map(const QString& name) +{ + for (int i = 0; i < m_sigmod->mapCount(); ++i) + { + if (m_sigmod->map(i)->name() == name) + return MapWrapper::create(m_sigmod->map(i), this); + } + return NULL; +} + +Sigscript::MoveWrapper* Sigscript::SigmodWrapper::move(const QString& name) +{ + for (int i = 0; i < m_sigmod->moveCount(); ++i) + { + if (m_sigmod->move(i)->name() == name) + return MoveWrapper::create(m_sigmod->move(i), this); + } + return NULL; +} + +Sigscript::NatureWrapper* Sigscript::SigmodWrapper::nature(const QString& name) +{ + for (int i = 0; i < m_sigmod->natureCount(); ++i) + { + if (m_sigmod->nature(i)->name() == name) + return NatureWrapper::create(m_sigmod->nature(i), this); + } + return NULL; +} + +Sigscript::SkinWrapper* Sigscript::SigmodWrapper::skin(const QString& name) +{ + for (int i = 0; i < m_sigmod->skinCount(); ++i) + { + if (m_sigmod->skin(i)->name() == name) + return SkinWrapper::create(m_sigmod->skin(i), this); + } + return NULL; +} + +Sigscript::SoundWrapper* Sigscript::SigmodWrapper::sound(const QString& name) +{ + for (int i = 0; i < m_sigmod->soundCount(); ++i) + { + if (m_sigmod->sound(i)->name() == name) + return SoundWrapper::create(m_sigmod->sound(i), this); + } + return NULL; +} + +Sigscript::SpeciesWrapper* Sigscript::SigmodWrapper::species(const QString& name) +{ + for (int i = 0; i < m_sigmod->speciesCount(); ++i) + { + if (m_sigmod->species(i)->name() == name) + return SpeciesWrapper::create(m_sigmod->species(i), this); + } + return NULL; +} + +Sigscript::SpriteWrapper* Sigscript::SigmodWrapper::sprite(const QString& name) +{ + for (int i = 0; i < m_sigmod->spriteCount(); ++i) + { + if (m_sigmod->sprite(i)->name() == name) + return SpriteWrapper::create(m_sigmod->sprite(i), this); + } + return NULL; +} + +Sigscript::StatusWrapper* Sigscript::SigmodWrapper::status(const QString& name) +{ + for (int i = 0; i < m_sigmod->statusCount(); ++i) + { + if (m_sigmod->status(i)->name() == name) + return StatusWrapper::create(m_sigmod->status(i), this); + } + return NULL; +} + +Sigscript::StoreWrapper* Sigscript::SigmodWrapper::store(const QString& name) +{ + for (int i = 0; i < m_sigmod->storeCount(); ++i) + { + if (m_sigmod->store(i)->name() == name) + return StoreWrapper::create(m_sigmod->store(i), this); + } + return NULL; +} + +Sigscript::TileWrapper* Sigscript::SigmodWrapper::tile(const QString& name) +{ + for (int i = 0; i < m_sigmod->tileCount(); ++i) + { + if (m_sigmod->tile(i)->name() == name) + return TileWrapper::create(m_sigmod->tile(i), this); + } + return NULL; +} + +Sigscript::TimeWrapper* Sigscript::SigmodWrapper::time(const QString& name) +{ + for (int i = 0; i < m_sigmod->timeCount(); ++i) + { + if (m_sigmod->time(i)->name() == name) + return TimeWrapper::create(m_sigmod->time(i), this); + } + return NULL; +} + +Sigscript::TrainerWrapper* Sigscript::SigmodWrapper::trainer(const QString& name) +{ + for (int i = 0; i < m_sigmod->trainerCount(); ++i) + { + if (m_sigmod->trainer(i)->name() == name) + return TrainerWrapper::create(m_sigmod->trainer(i), this); + } + return NULL; +} + +Sigscript::TypeWrapper* Sigscript::SigmodWrapper::type(const QString& name) +{ + for (int i = 0; i < m_sigmod->typeCount(); ++i) + { + if (m_sigmod->type(i)->name() == name) + return TypeWrapper::create(m_sigmod->type(i), this); + } + return NULL; +} + +Sigscript::WeatherWrapper* Sigscript::SigmodWrapper::weather(const QString& name) +{ + for (int i = 0; i < m_sigmod->weatherCount(); ++i) + { + if (m_sigmod->weather(i)->name() == name) + return WeatherWrapper::create(m_sigmod->weather(i), this); + } + return NULL; +} diff --git a/sigscript/PokemodWrapper.h b/sigscript/SigmodWrapper.h index cf97c60c..1e946ac0 100644 --- a/sigscript/PokemodWrapper.h +++ b/sigscript/SigmodWrapper.h @@ -15,17 +15,17 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_POKEMODWRAPPER__ -#define __POKESCRIPTING_POKEMODWRAPPER__ +#ifndef __SIGSCRIPT_SIGMODWRAPPER__ +#define __SIGSCRIPT_SIGMODWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Hat.h" -#include "../pokemod/Pokemod.h" +// Sigmod includes +#include "../sigmod/Hat.h" +#include "../sigmod/Sigmod.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class AbilityWrapper; @@ -53,14 +53,14 @@ class TrainerWrapper; class TypeWrapper; class WeatherWrapper; -class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SigmodWrapper : public ObjectWrapper { Q_OBJECT public: - PokemodWrapper(const Pokemod::Pokemod* pokemod); + SigmodWrapper(const Sigmod::Sigmod* sigmod); - Pokemod::Hat<NatureWrapper*> natureHat(); + Sigmod::Hat<NatureWrapper*> natureHat(); AbilityWrapper* ability(const int id); AuthorWrapper* author(const int id); @@ -85,14 +85,14 @@ class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper TypeWrapper* type(const int id); WeatherWrapper* weather(const int id); - Q_SCRIPTABLE Pokemod::Stat stat(const QString& name) const; - Q_SCRIPTABLE Pokemod::Direction direction(const QString& direction) const; + Q_SCRIPTABLE Sigmod::Stat stat(const QString& name) const; + Q_SCRIPTABLE Sigmod::Direction direction(const QString& direction) const; Q_SCRIPTABLE QString title() const; Q_SCRIPTABLE QString version() const; Q_SCRIPTABLE QString description() const; Q_SCRIPTABLE MapWarpWrapper* startWarp(); - Q_SCRIPTABLE Pokemod::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const; + Q_SCRIPTABLE Sigmod::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const; Q_SCRIPTABLE RulesWrapper* rules(); Q_SCRIPTABLE AbilityWrapper* ability(const QString& name); @@ -118,11 +118,11 @@ class POKESCRIPTING_EXPORT PokemodWrapper : public ObjectWrapper Q_SCRIPTABLE TypeWrapper* type(const QString& name); Q_SCRIPTABLE WeatherWrapper* weather(const QString& name); private: - PokemodWrapper& operator=(const PokemodWrapper& rhs); + SigmodWrapper& operator=(const SigmodWrapper& rhs); - const Pokemod::Pokemod* m_pokemod; + const Sigmod::Sigmod* m_sigmod; }; } -Q_DECLARE_METATYPE(Pokescripting::PokemodWrapper*) +Q_DECLARE_METATYPE(Sigscript::SigmodWrapper*) #endif diff --git a/sigscript/SkinWrapper.cpp b/sigscript/SkinWrapper.cpp index be19a8f1..4fa49120 100644 --- a/sigscript/SkinWrapper.cpp +++ b/sigscript/SkinWrapper.cpp @@ -18,28 +18,28 @@ // Header include #include "SkinWrapper.h" -// Pokemod scripting -#include "PokemodWrapper.h" +// Sigmod scripting +#include "SigmodWrapper.h" -Pokescripting::SkinWrapper* Pokescripting::SkinWrapper::create(const Pokemod::Skin* skin, PokemodWrapper* parent) +Sigscript::SkinWrapper* Sigscript::SkinWrapper::create(const Sigmod::Skin* skin, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, skin->id()))) m_instances[Signiture(parent, skin->id())] = new SkinWrapper(skin, parent); return qobject_cast<SkinWrapper*>(m_instances[Signiture(parent, skin->id())]); } -Pokescripting::SkinWrapper::SkinWrapper(const Pokemod::Skin* skin, PokemodWrapper* parent) : +Sigscript::SkinWrapper::SkinWrapper(const Sigmod::Skin* skin, SigmodWrapper* parent) : ObjectWrapper(skin, parent), m_skin(skin) { } -QString Pokescripting::SkinWrapper::name() const +QString Sigscript::SkinWrapper::name() const { return m_skin->name(); } -Pokemod::Script Pokescripting::SkinWrapper::script() const +Sigmod::Script Sigscript::SkinWrapper::script() const { return m_skin->script(); } diff --git a/sigscript/SkinWrapper.h b/sigscript/SkinWrapper.h index 1604d3f4..75ee337e 100644 --- a/sigscript/SkinWrapper.h +++ b/sigscript/SkinWrapper.h @@ -15,33 +15,33 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SKINWRAPPER__ -#define __POKESCRIPTING_SKINWRAPPER__ +#ifndef __SIGSCRIPT_SKINWRAPPER__ +#define __SIGSCRIPT_SKINWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Skin.h" +// Sigmod includes +#include "../sigmod/Skin.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT SkinWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SkinWrapper : public ObjectWrapper { Q_OBJECT public: - static SkinWrapper* create(const Pokemod::Skin* skin, PokemodWrapper* parent); + static SkinWrapper* create(const Sigmod::Skin* skin, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - SkinWrapper(const Pokemod::Skin* skin, PokemodWrapper* parent); + SkinWrapper(const Sigmod::Skin* skin, SigmodWrapper* parent); SkinWrapper& operator=(const SkinWrapper& rhs); - const Pokemod::Skin* m_skin; + const Sigmod::Skin* m_skin; }; } -Q_DECLARE_METATYPE(Pokescripting::SkinWrapper*) +Q_DECLARE_METATYPE(Sigscript::SkinWrapper*) #endif diff --git a/sigscript/SoundWrapper.cpp b/sigscript/SoundWrapper.cpp index ebecdfc2..0e48d5cc 100644 --- a/sigscript/SoundWrapper.cpp +++ b/sigscript/SoundWrapper.cpp @@ -18,8 +18,8 @@ // Header include #include "SoundWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" // Qt includes #include <QtCore/QBuffer> @@ -28,39 +28,39 @@ #include <Phonon/MediaObject> #include <Phonon/MediaSource> -Pokescripting::SoundWrapper* Pokescripting::SoundWrapper::create(const Pokemod::Sound* sound, PokemodWrapper* parent) +Sigscript::SoundWrapper* Sigscript::SoundWrapper::create(const Sigmod::Sound* sound, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, sound->id()))) m_instances[Signiture(parent, sound->id())] = new SoundWrapper(sound, parent); return qobject_cast<SoundWrapper*>(m_instances[Signiture(parent, sound->id())]); } -Pokescripting::SoundWrapper::SoundWrapper(const Pokemod::Sound* sound, PokemodWrapper* parent) : +Sigscript::SoundWrapper::SoundWrapper(const Sigmod::Sound* sound, SigmodWrapper* parent) : ObjectWrapper(sound, parent), m_sound(sound) { } -Pokemod::Sound::Type Pokescripting::SoundWrapper::type(const QString& name) const +Sigmod::Sound::Type Sigscript::SoundWrapper::type(const QString& name) const { if (name == "Sound Effect") - return Pokemod::Sound::SoundEffect; + return Sigmod::Sound::SoundEffect; else if (name == "Music") - return Pokemod::Sound::Music; - return QVariant(-1).value<Pokemod::Sound::Type>(); + return Sigmod::Sound::Music; + return QVariant(-1).value<Sigmod::Sound::Type>(); } -QString Pokescripting::SoundWrapper::name() const +QString Sigscript::SoundWrapper::name() const { return m_sound->name(); } -Pokemod::Sound::Type Pokescripting::SoundWrapper::type() const +Sigmod::Sound::Type Sigscript::SoundWrapper::type() const { return m_sound->type(); } -Phonon::MediaObject* Pokescripting::SoundWrapper::audio() +Phonon::MediaObject* Sigscript::SoundWrapper::audio() { Phonon::MediaObject* media = new Phonon::MediaObject(this); QBuffer* buffer = new QBuffer(media); diff --git a/sigscript/SoundWrapper.h b/sigscript/SoundWrapper.h index 54ac3f38..a225f728 100644 --- a/sigscript/SoundWrapper.h +++ b/sigscript/SoundWrapper.h @@ -15,14 +15,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SOUNDWRAPPER__ -#define __POKESCRIPTING_SOUNDWRAPPER__ +#ifndef __SIGSCRIPT_SOUNDWRAPPER__ +#define __SIGSCRIPT_SOUNDWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Sound.h" +// Sigmod includes +#include "../sigmod/Sound.h" // Forward declarations namespace Phonon @@ -30,27 +30,27 @@ namespace Phonon class MediaObject; } -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT SoundWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SoundWrapper : public ObjectWrapper { Q_OBJECT public: - static SoundWrapper* create(const Pokemod::Sound* sound, PokemodWrapper* parent); + static SoundWrapper* create(const Sigmod::Sound* sound, SigmodWrapper* parent); - Q_SCRIPTABLE Pokemod::Sound::Type type(const QString& name) const; + Q_SCRIPTABLE Sigmod::Sound::Type type(const QString& name) const; Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Sound::Type type() const; + Q_SCRIPTABLE Sigmod::Sound::Type type() const; Q_SCRIPTABLE Phonon::MediaObject* audio(); private: - SoundWrapper(const Pokemod::Sound* sound, PokemodWrapper* parent); + SoundWrapper(const Sigmod::Sound* sound, SigmodWrapper* parent); SoundWrapper& operator=(const SoundWrapper& rhs); - const Pokemod::Sound* m_sound; + const Sigmod::Sound* m_sound; }; } -Q_DECLARE_METATYPE(Pokescripting::SoundWrapper*) +Q_DECLARE_METATYPE(Sigscript::SoundWrapper*) #endif diff --git a/sigscript/SpeciesAbilityWrapper.cpp b/sigscript/SpeciesAbilityWrapper.cpp index fb392653..e5aafc19 100644 --- a/sigscript/SpeciesAbilityWrapper.cpp +++ b/sigscript/SpeciesAbilityWrapper.cpp @@ -18,29 +18,29 @@ // Header include #include "SpeciesAbilityWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" #include "SpeciesWrapper.h" -Pokescripting::SpeciesAbilityWrapper* Pokescripting::SpeciesAbilityWrapper::create(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent) +Sigscript::SpeciesAbilityWrapper* Sigscript::SpeciesAbilityWrapper::create(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent) { if (!m_instances.contains(Signiture(parent, ability->id()))) m_instances[Signiture(parent, ability->id())] = new SpeciesAbilityWrapper(ability, parent); return qobject_cast<SpeciesAbilityWrapper*>(m_instances[Signiture(parent, ability->id())]); } -Pokescripting::SpeciesAbilityWrapper::SpeciesAbilityWrapper(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent) : +Sigscript::SpeciesAbilityWrapper::SpeciesAbilityWrapper(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent) : ObjectWrapper(ability, parent), m_ability(ability) { } -Pokescripting::AbilityWrapper* Pokescripting::SpeciesAbilityWrapper::ability() +Sigscript::AbilityWrapper* Sigscript::SpeciesAbilityWrapper::ability() { - return pokemod()->ability(m_ability->ability()); + return sigmod()->ability(m_ability->ability()); } -int Pokescripting::SpeciesAbilityWrapper::weight() const +int Sigscript::SpeciesAbilityWrapper::weight() const { return m_ability->weight(); } diff --git a/sigscript/SpeciesAbilityWrapper.h b/sigscript/SpeciesAbilityWrapper.h index dafe9dbe..b51980cc 100644 --- a/sigscript/SpeciesAbilityWrapper.h +++ b/sigscript/SpeciesAbilityWrapper.h @@ -15,37 +15,37 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SPECIESABILITYWRAPPER__ -#define __POKESCRIPTING_SPECIESABILITYWRAPPER__ +#ifndef __SIGSCRIPT_SPECIESABILITYWRAPPER__ +#define __SIGSCRIPT_SPECIESABILITYWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/SpeciesAbility.h" +// Sigmod includes +#include "../sigmod/SpeciesAbility.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class AbilityWrapper; class SpeciesWrapper; -class POKESCRIPTING_EXPORT SpeciesAbilityWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SpeciesAbilityWrapper : public ObjectWrapper { Q_OBJECT public: - static SpeciesAbilityWrapper* create(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent); + static SpeciesAbilityWrapper* create(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent); Q_SCRIPTABLE AbilityWrapper* ability(); Q_SCRIPTABLE int weight() const; private: - SpeciesAbilityWrapper(const Pokemod::SpeciesAbility* ability, SpeciesWrapper* parent); + SpeciesAbilityWrapper(const Sigmod::SpeciesAbility* ability, SpeciesWrapper* parent); SpeciesAbilityWrapper& operator=(const SpeciesAbilityWrapper& rhs); - const Pokemod::SpeciesAbility* m_ability; + const Sigmod::SpeciesAbility* m_ability; }; } -Q_DECLARE_METATYPE(Pokescripting::SpeciesAbilityWrapper*) +Q_DECLARE_METATYPE(Sigscript::SpeciesAbilityWrapper*) #endif diff --git a/sigscript/SpeciesItemWrapper.cpp b/sigscript/SpeciesItemWrapper.cpp index 23d4afa1..16807886 100644 --- a/sigscript/SpeciesItemWrapper.cpp +++ b/sigscript/SpeciesItemWrapper.cpp @@ -18,29 +18,29 @@ // Header include #include "SpeciesItemWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" #include "SpeciesWrapper.h" -Pokescripting::SpeciesItemWrapper* Pokescripting::SpeciesItemWrapper::create(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent) +Sigscript::SpeciesItemWrapper* Sigscript::SpeciesItemWrapper::create(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent) { if (!m_instances.contains(Signiture(parent, item->id()))) m_instances[Signiture(parent, item->id())] = new SpeciesItemWrapper(item, parent); return qobject_cast<SpeciesItemWrapper*>(m_instances[Signiture(parent, item->id())]); } -Pokescripting::SpeciesItemWrapper::SpeciesItemWrapper(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent) : +Sigscript::SpeciesItemWrapper::SpeciesItemWrapper(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent) : ObjectWrapper(item, parent), m_item(item) { } -Pokescripting::ItemWrapper* Pokescripting::SpeciesItemWrapper::item() +Sigscript::ItemWrapper* Sigscript::SpeciesItemWrapper::item() { - return pokemod()->item(m_item->item()); + return sigmod()->item(m_item->item()); } -int Pokescripting::SpeciesItemWrapper::weight() const +int Sigscript::SpeciesItemWrapper::weight() const { if (value("weight").canConvert<int>()) return value("weight").toInt(); diff --git a/sigscript/SpeciesItemWrapper.h b/sigscript/SpeciesItemWrapper.h index b172b32f..a02a6d3c 100644 --- a/sigscript/SpeciesItemWrapper.h +++ b/sigscript/SpeciesItemWrapper.h @@ -15,37 +15,37 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SPECIESITEMWRAPPER__ -#define __POKESCRIPTING_SPECIESITEMWRAPPER__ +#ifndef __SIGSCRIPT_SPECIESITEMWRAPPER__ +#define __SIGSCRIPT_SPECIESITEMWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/SpeciesItem.h" +// Sigmod includes +#include "../sigmod/SpeciesItem.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class ItemWrapper; class SpeciesWrapper; -class POKESCRIPTING_EXPORT SpeciesItemWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SpeciesItemWrapper : public ObjectWrapper { Q_OBJECT public: - static SpeciesItemWrapper* create(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent); + static SpeciesItemWrapper* create(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent); Q_SCRIPTABLE ItemWrapper* item(); Q_SCRIPTABLE int weight() const; private: - SpeciesItemWrapper(const Pokemod::SpeciesItem* item, SpeciesWrapper* parent); + SpeciesItemWrapper(const Sigmod::SpeciesItem* item, SpeciesWrapper* parent); SpeciesItemWrapper& operator=(const SpeciesItemWrapper& rhs); - const Pokemod::SpeciesItem* m_item; + const Sigmod::SpeciesItem* m_item; }; } -Q_DECLARE_METATYPE(Pokescripting::SpeciesItemWrapper*) +Q_DECLARE_METATYPE(Sigscript::SpeciesItemWrapper*) #endif diff --git a/sigscript/SpeciesMoveWrapper.cpp b/sigscript/SpeciesMoveWrapper.cpp index d1c33864..b98905a5 100644 --- a/sigscript/SpeciesMoveWrapper.cpp +++ b/sigscript/SpeciesMoveWrapper.cpp @@ -18,34 +18,34 @@ // Header include #include "SpeciesMoveWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" #include "SpeciesWrapper.h" -Pokescripting::SpeciesMoveWrapper* Pokescripting::SpeciesMoveWrapper::create(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent) +Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesMoveWrapper::create(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent) { if (!m_instances.contains(Signiture(parent, move->id()))) m_instances[Signiture(parent, move->id())] = new SpeciesMoveWrapper(move, parent); return qobject_cast<SpeciesMoveWrapper*>(m_instances[Signiture(parent, move->id())]); } -Pokescripting::SpeciesMoveWrapper::SpeciesMoveWrapper(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent) : +Sigscript::SpeciesMoveWrapper::SpeciesMoveWrapper(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent) : ObjectWrapper(move, parent), m_move(move) { } -Pokescripting::MoveWrapper* Pokescripting::SpeciesMoveWrapper::move() +Sigscript::MoveWrapper* Sigscript::SpeciesMoveWrapper::move() { - return pokemod()->move(m_move->move()); + return sigmod()->move(m_move->move()); } -int Pokescripting::SpeciesMoveWrapper::level() const +int Sigscript::SpeciesMoveWrapper::level() const { return m_move->level(); } -int Pokescripting::SpeciesMoveWrapper::wild() const +int Sigscript::SpeciesMoveWrapper::wild() const { return m_move->wild(); } diff --git a/sigscript/SpeciesMoveWrapper.h b/sigscript/SpeciesMoveWrapper.h index 6d575fda..bfc91613 100644 --- a/sigscript/SpeciesMoveWrapper.h +++ b/sigscript/SpeciesMoveWrapper.h @@ -15,38 +15,38 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SPECIESMOVEWRAPPER__ -#define __POKESCRIPTING_SPECIESMOVEWRAPPER__ +#ifndef __SIGSCRIPT_SPECIESMOVEWRAPPER__ +#define __SIGSCRIPT_SPECIESMOVEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "MoveWrapper.h" #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/SpeciesMove.h" +// Sigmod includes +#include "../sigmod/SpeciesMove.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class SpeciesWrapper; -class POKESCRIPTING_EXPORT SpeciesMoveWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SpeciesMoveWrapper : public ObjectWrapper { Q_OBJECT public: - static SpeciesMoveWrapper* create(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent); + static SpeciesMoveWrapper* create(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent); Q_SCRIPTABLE MoveWrapper* move(); Q_SCRIPTABLE int level() const; Q_SCRIPTABLE int wild() const; private: - SpeciesMoveWrapper(const Pokemod::SpeciesMove* move, SpeciesWrapper* parent); + SpeciesMoveWrapper(const Sigmod::SpeciesMove* move, SpeciesWrapper* parent); SpeciesMoveWrapper& operator=(const SpeciesMoveWrapper& rhs); - const Pokemod::SpeciesMove* m_move; + const Sigmod::SpeciesMove* m_move; }; } -Q_DECLARE_METATYPE(Pokescripting::SpeciesMoveWrapper*) +Q_DECLARE_METATYPE(Sigscript::SpeciesMoveWrapper*) #endif diff --git a/sigscript/SpeciesWrapper.cpp b/sigscript/SpeciesWrapper.cpp index e80c364d..6b730d30 100644 --- a/sigscript/SpeciesWrapper.cpp +++ b/sigscript/SpeciesWrapper.cpp @@ -18,220 +18,220 @@ // Header include #include "SpeciesWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" #include "SpeciesAbilityWrapper.h" #include "SpeciesItemWrapper.h" #include "SpeciesMoveWrapper.h" -Pokescripting::SpeciesWrapper* Pokescripting::SpeciesWrapper::create(const Pokemod::Species* species, PokemodWrapper* parent) +Sigscript::SpeciesWrapper* Sigscript::SpeciesWrapper::create(const Sigmod::Species* species, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, species->id()))) m_instances[Signiture(parent, species->id())] = new SpeciesWrapper(species, parent); return qobject_cast<SpeciesWrapper*>(m_instances[Signiture(parent, species->id())]); } -Pokescripting::SpeciesWrapper::SpeciesWrapper(const Pokemod::Species* species, PokemodWrapper* parent) : +Sigscript::SpeciesWrapper::SpeciesWrapper(const Sigmod::Species* species, SigmodWrapper* parent) : ObjectWrapper(species, parent), m_species(species) { } -Pokemod::Hat<Pokescripting::AbilityWrapper*> Pokescripting::SpeciesWrapper::abilityHat() +Sigmod::Hat<Sigscript::AbilityWrapper*> Sigscript::SpeciesWrapper::abilityHat() { - Pokemod::Hat<AbilityWrapper*> hat; + Sigmod::Hat<AbilityWrapper*> hat; for (int i = 0; i < abilityCount(); ++i) hat.add(ability(i)->ability(), ability(i)->weight()); return hat; } -Pokemod::Hat<Pokescripting::ItemWrapper*> Pokescripting::SpeciesWrapper::itemHat() +Sigmod::Hat<Sigscript::ItemWrapper*> Sigscript::SpeciesWrapper::itemHat() { - Pokemod::Hat<ItemWrapper*> hat; + Sigmod::Hat<ItemWrapper*> hat; for (int i = 0; i < itemCount(); ++i) hat.add(item(i)->item(), item(i)->weight()); return hat; } -Pokemod::Species::Style Pokescripting::SpeciesWrapper::growth(const QString& name) const +Sigmod::Species::Style Sigscript::SpeciesWrapper::growth(const QString& name) const { if (name == "Fluctuating") - return Pokemod::Species::Fluctuating; + return Sigmod::Species::Fluctuating; else if (name == "Fading") - return Pokemod::Species::Fading; + return Sigmod::Species::Fading; else if (name == "Slow") - return Pokemod::Species::Slow; + return Sigmod::Species::Slow; else if (name == "Normal") - return Pokemod::Species::Normal; + return Sigmod::Species::Normal; else if (name == "Fast") - return Pokemod::Species::Fast; + return Sigmod::Species::Fast; else if (name == "Erratic") - return Pokemod::Species::Erratic; - return QVariant(-1).value<Pokemod::Species::Style>(); + return Sigmod::Species::Erratic; + return QVariant(-1).value<Sigmod::Species::Style>(); } -QString Pokescripting::SpeciesWrapper::name() const +QString Sigscript::SpeciesWrapper::name() const { return m_species->name(); } -int Pokescripting::SpeciesWrapper::baseStat(const Pokemod::Stat stat) const +int Sigscript::SpeciesWrapper::baseStat(const Sigmod::Stat stat) const { return m_species->baseStat(stat); } -int Pokescripting::SpeciesWrapper::effortValue(const Pokemod::Stat stat) const +int Sigscript::SpeciesWrapper::effortValue(const Sigmod::Stat stat) const { return m_species->effortValue(stat); } -Pokemod::Species::Style Pokescripting::SpeciesWrapper::growth() const +Sigmod::Species::Style Sigscript::SpeciesWrapper::growth() const { return m_species->growth(); } -int Pokescripting::SpeciesWrapper::experienceValue() const +int Sigscript::SpeciesWrapper::experienceValue() const { return m_species->experienceValue(); } -int Pokescripting::SpeciesWrapper::catchValue() const +int Sigscript::SpeciesWrapper::catchValue() const { return m_species->catchValue(); } -Pokemod::Fraction Pokescripting::SpeciesWrapper::runChance() const +Sigmod::Fraction Sigscript::SpeciesWrapper::runChance() const { - if (value("runChance").canConvert<Pokemod::Fraction>()) - return value("runChance").value<Pokemod::Fraction>(); + if (value("runChance").canConvert<Sigmod::Fraction>()) + return value("runChance").value<Sigmod::Fraction>(); return m_species->runChance(); } -Pokemod::Fraction Pokescripting::SpeciesWrapper::fleeChance() const +Sigmod::Fraction Sigscript::SpeciesWrapper::fleeChance() const { - if (value("fleeChance").canConvert<Pokemod::Fraction>()) - return value("fleeChance").value<Pokemod::Fraction>(); + if (value("fleeChance").canConvert<Sigmod::Fraction>()) + return value("fleeChance").value<Sigmod::Fraction>(); return m_species->fleeChance(); } -Pokemod::Fraction Pokescripting::SpeciesWrapper::itemChance() const +Sigmod::Fraction Sigscript::SpeciesWrapper::itemChance() const { - if (value("itemChance").canConvert<Pokemod::Fraction>()) - return value("itemChance").value<Pokemod::Fraction>(); + if (value("itemChance").canConvert<Sigmod::Fraction>()) + return value("itemChance").value<Sigmod::Fraction>(); return m_species->itemChance(); } -int Pokescripting::SpeciesWrapper::pokedexNumber() const +int Sigscript::SpeciesWrapper::encyclopediaNumber() const { - return m_species->pokedexNumber(); + return m_species->encyclopediaNumber(); } -int Pokescripting::SpeciesWrapper::weight() const +int Sigscript::SpeciesWrapper::weight() const { return m_species->weight(); } -int Pokescripting::SpeciesWrapper::height() const +int Sigscript::SpeciesWrapper::height() const { return m_species->height(); } -QString Pokescripting::SpeciesWrapper::pokedexEntry() const +QString Sigscript::SpeciesWrapper::encyclopediaEntry() const { - return m_species->pokedexEntry(); + return m_species->encyclopediaEntry(); } -Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::frontMaleSprite() +Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontMaleSprite() { - return pokemod()->sprite(m_species->frontMaleSprite()); + return sigmod()->sprite(m_species->frontMaleSprite()); } -Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::backMaleSprite() +Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backMaleSprite() { - return pokemod()->sprite(m_species->backMaleSprite()); + return sigmod()->sprite(m_species->backMaleSprite()); } -Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::frontFemaleSprite() +Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::frontFemaleSprite() { - return pokemod()->sprite(m_species->frontFemaleSprite()); + return sigmod()->sprite(m_species->frontFemaleSprite()); } -Pokescripting::SpriteWrapper* Pokescripting::SpeciesWrapper::backFemaleSprite() +Sigscript::SpriteWrapper* Sigscript::SpeciesWrapper::backFemaleSprite() { - return pokemod()->sprite(m_species->backFemaleSprite()); + return sigmod()->sprite(m_species->backFemaleSprite()); } -Pokescripting::SkinWrapper* Pokescripting::SpeciesWrapper::skin() +Sigscript::SkinWrapper* Sigscript::SpeciesWrapper::skin() { - return pokemod()->skin(m_species->skin()); + return sigmod()->skin(m_species->skin()); } -Pokemod::Fraction Pokescripting::SpeciesWrapper::genderFactor() const +Sigmod::Fraction Sigscript::SpeciesWrapper::genderFactor() const { return m_species->genderFactor(); } -int Pokescripting::SpeciesWrapper::eggSpecies() const +int Sigscript::SpeciesWrapper::eggSpecies() const { if (value("eggSpecies").canConvert<int>()) return value("eggSpecies").toInt(); return m_species->eggSpecies(); } -int Pokescripting::SpeciesWrapper::eggSteps() const +int Sigscript::SpeciesWrapper::eggSteps() const { return m_species->eggSteps(); } -QList<Pokescripting::TypeWrapper*> Pokescripting::SpeciesWrapper::types() +QList<Sigscript::TypeWrapper*> Sigscript::SpeciesWrapper::types() { QList<int> typeIds = m_species->types(); QList<TypeWrapper*> types; foreach (int id, typeIds) - types.append(pokemod()->type(id)); + types.append(sigmod()->type(id)); return types; } -QList<Pokescripting::EggGroupWrapper*> Pokescripting::SpeciesWrapper::eggGroups() +QList<Sigscript::EggGroupWrapper*> Sigscript::SpeciesWrapper::eggGroups() { QList<int> eggGroupIds = m_species->eggGroups(); QList<EggGroupWrapper*> eggGroups; foreach (int id, eggGroupIds) - eggGroups.append(pokemod()->eggGroup(id)); + eggGroups.append(sigmod()->eggGroup(id)); return eggGroups; } -Pokemod::Script Pokescripting::SpeciesWrapper::evolution() const +Sigmod::Script Sigscript::SpeciesWrapper::evolution() const { return m_species->evolution(); } -Pokescripting::SpeciesAbilityWrapper* Pokescripting::SpeciesWrapper::ability(const int index) +Sigscript::SpeciesAbilityWrapper* Sigscript::SpeciesWrapper::ability(const int index) { return SpeciesAbilityWrapper::create(m_species->ability(index), this); } -int Pokescripting::SpeciesWrapper::abilityCount() const +int Sigscript::SpeciesWrapper::abilityCount() const { return m_species->abilityCount(); } -Pokescripting::SpeciesItemWrapper* Pokescripting::SpeciesWrapper::item(const int index) +Sigscript::SpeciesItemWrapper* Sigscript::SpeciesWrapper::item(const int index) { return SpeciesItemWrapper::create(m_species->item(index), this); } -int Pokescripting::SpeciesWrapper::itemCount() const +int Sigscript::SpeciesWrapper::itemCount() const { return m_species->itemCount(); } -Pokescripting::SpeciesMoveWrapper* Pokescripting::SpeciesWrapper::move(const int index) +Sigscript::SpeciesMoveWrapper* Sigscript::SpeciesWrapper::move(const int index) { return SpeciesMoveWrapper::create(m_species->move(index), this); } -int Pokescripting::SpeciesWrapper::moveCount() const +int Sigscript::SpeciesWrapper::moveCount() const { return m_species->moveCount(); } diff --git a/sigscript/SpeciesWrapper.h b/sigscript/SpeciesWrapper.h index f42e628d..ec157266 100644 --- a/sigscript/SpeciesWrapper.h +++ b/sigscript/SpeciesWrapper.h @@ -15,17 +15,17 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SPECIESWRAPPER__ -#define __POKESCRIPTING_SPECIESWRAPPER__ +#ifndef __SIGSCRIPT_SPECIESWRAPPER__ +#define __SIGSCRIPT_SPECIESWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Hat.h" -#include "../pokemod/Species.h" +// Sigmod includes +#include "../sigmod/Hat.h" +#include "../sigmod/Species.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class AbilityWrapper; @@ -38,42 +38,42 @@ class SpeciesMoveWrapper; class SpriteWrapper; class TypeWrapper; -class POKESCRIPTING_EXPORT SpeciesWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SpeciesWrapper : public ObjectWrapper { Q_OBJECT public: - static SpeciesWrapper* create(const Pokemod::Species* species, PokemodWrapper* parent); + static SpeciesWrapper* create(const Sigmod::Species* species, SigmodWrapper* parent); - Pokemod::Hat<AbilityWrapper*> abilityHat(); - Pokemod::Hat<ItemWrapper*> itemHat(); + Sigmod::Hat<AbilityWrapper*> abilityHat(); + Sigmod::Hat<ItemWrapper*> itemHat(); - Q_SCRIPTABLE Pokemod::Species::Style growth(const QString& name) const; + Q_SCRIPTABLE Sigmod::Species::Style growth(const QString& name) const; Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE int baseStat(const Pokemod::Stat stat) const; - Q_SCRIPTABLE int effortValue(const Pokemod::Stat stat) const; - Q_SCRIPTABLE Pokemod::Species::Style growth() const; + Q_SCRIPTABLE int baseStat(const Sigmod::Stat stat) const; + Q_SCRIPTABLE int effortValue(const Sigmod::Stat stat) const; + Q_SCRIPTABLE Sigmod::Species::Style growth() const; Q_SCRIPTABLE int experienceValue() const; Q_SCRIPTABLE int catchValue() const; - Q_SCRIPTABLE Pokemod::Fraction runChance() const; - Q_SCRIPTABLE Pokemod::Fraction fleeChance() const; - Q_SCRIPTABLE Pokemod::Fraction itemChance() const; - Q_SCRIPTABLE int pokedexNumber() const; + Q_SCRIPTABLE Sigmod::Fraction runChance() const; + Q_SCRIPTABLE Sigmod::Fraction fleeChance() const; + Q_SCRIPTABLE Sigmod::Fraction itemChance() const; + Q_SCRIPTABLE int encyclopediaNumber() const; Q_SCRIPTABLE int weight() const; Q_SCRIPTABLE int height() const; - Q_SCRIPTABLE QString pokedexEntry() const; + Q_SCRIPTABLE QString encyclopediaEntry() const; Q_SCRIPTABLE SpriteWrapper* frontMaleSprite(); Q_SCRIPTABLE SpriteWrapper* backMaleSprite(); Q_SCRIPTABLE SpriteWrapper* frontFemaleSprite(); Q_SCRIPTABLE SpriteWrapper* backFemaleSprite(); Q_SCRIPTABLE SkinWrapper* skin(); - Q_SCRIPTABLE Pokemod::Fraction genderFactor() const; + Q_SCRIPTABLE Sigmod::Fraction genderFactor() const; Q_SCRIPTABLE int eggSpecies() const; Q_SCRIPTABLE int eggSteps() const; Q_SCRIPTABLE QList<TypeWrapper*> types(); Q_SCRIPTABLE QList<EggGroupWrapper*> eggGroups(); - Q_SCRIPTABLE Pokemod::Script evolution() const; + Q_SCRIPTABLE Sigmod::Script evolution() const; Q_SCRIPTABLE SpeciesAbilityWrapper* ability(const int index); Q_SCRIPTABLE int abilityCount() const; @@ -84,12 +84,12 @@ class POKESCRIPTING_EXPORT SpeciesWrapper : public ObjectWrapper Q_SCRIPTABLE SpeciesMoveWrapper* move(const int index); Q_SCRIPTABLE int moveCount() const; private: - SpeciesWrapper(const Pokemod::Species* species, PokemodWrapper* parent); + SpeciesWrapper(const Sigmod::Species* species, SigmodWrapper* parent); SpeciesWrapper& operator=(const SpeciesWrapper& rhs); - const Pokemod::Species* m_species; + const Sigmod::Species* m_species; }; } -Q_DECLARE_METATYPE(Pokescripting::SpeciesWrapper*) +Q_DECLARE_METATYPE(Sigscript::SpeciesWrapper*) #endif diff --git a/sigscript/SpriteWrapper.cpp b/sigscript/SpriteWrapper.cpp index 0233e996..440d41fa 100644 --- a/sigscript/SpriteWrapper.cpp +++ b/sigscript/SpriteWrapper.cpp @@ -18,28 +18,28 @@ // Header include #include "SpriteWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::SpriteWrapper* Pokescripting::SpriteWrapper::create(const Pokemod::Sprite* sprite, PokemodWrapper* parent) +Sigscript::SpriteWrapper* Sigscript::SpriteWrapper::create(const Sigmod::Sprite* sprite, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, sprite->id()))) m_instances[Signiture(parent, sprite->id())] = new SpriteWrapper(sprite, parent); return qobject_cast<SpriteWrapper*>(m_instances[Signiture(parent, sprite->id())]); } -Pokescripting::SpriteWrapper::SpriteWrapper(const Pokemod::Sprite* sprite, PokemodWrapper* parent) : +Sigscript::SpriteWrapper::SpriteWrapper(const Sigmod::Sprite* sprite, SigmodWrapper* parent) : ObjectWrapper(sprite, parent), m_sprite(sprite) { } -QString Pokescripting::SpriteWrapper::name() const +QString Sigscript::SpriteWrapper::name() const { return m_sprite->name(); } -QImage Pokescripting::SpriteWrapper::sprite() const +QImage Sigscript::SpriteWrapper::sprite() const { return m_sprite->sprite(); } diff --git a/sigscript/SpriteWrapper.h b/sigscript/SpriteWrapper.h index 77db2e47..0b58c066 100644 --- a/sigscript/SpriteWrapper.h +++ b/sigscript/SpriteWrapper.h @@ -15,33 +15,33 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_SPRITEWRAPPER__ -#define __POKESCRIPTING_SPRITEWRAPPER__ +#ifndef __SIGSCRIPT_SPRITEWRAPPER__ +#define __SIGSCRIPT_SPRITEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Sprite.h" +// Sigmod includes +#include "../sigmod/Sprite.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT SpriteWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT SpriteWrapper : public ObjectWrapper { Q_OBJECT public: - static SpriteWrapper* create(const Pokemod::Sprite* sprite, PokemodWrapper* parent); + static SpriteWrapper* create(const Sigmod::Sprite* sprite, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE QImage sprite() const; private: - SpriteWrapper(const Pokemod::Sprite* sprite, PokemodWrapper* parent); + SpriteWrapper(const Sigmod::Sprite* sprite, SigmodWrapper* parent); SpriteWrapper& operator=(const SpriteWrapper& rhs); - const Pokemod::Sprite* m_sprite; + const Sigmod::Sprite* m_sprite; }; } -Q_DECLARE_METATYPE(Pokescripting::SpriteWrapper*) +Q_DECLARE_METATYPE(Sigscript::SpriteWrapper*) #endif diff --git a/sigscript/StatusWrapper.cpp b/sigscript/StatusWrapper.cpp index 4c5191ad..54269671 100644 --- a/sigscript/StatusWrapper.cpp +++ b/sigscript/StatusWrapper.cpp @@ -18,33 +18,33 @@ // Header include #include "StatusWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::StatusWrapper* Pokescripting::StatusWrapper::create(const Pokemod::Status* status, PokemodWrapper* parent) +Sigscript::StatusWrapper* Sigscript::StatusWrapper::create(const Sigmod::Status* status, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, status->id()))) m_instances[Signiture(parent, status->id())] = new StatusWrapper(status, parent); return qobject_cast<StatusWrapper*>(m_instances[Signiture(parent, status->id())]); } -Pokescripting::StatusWrapper::StatusWrapper(const Pokemod::Status* status, PokemodWrapper* parent) : +Sigscript::StatusWrapper::StatusWrapper(const Sigmod::Status* status, SigmodWrapper* parent) : ObjectWrapper(status, parent), m_status(status) { } -QString Pokescripting::StatusWrapper::name() const +QString Sigscript::StatusWrapper::name() const { return m_status->name(); } -Pokemod::Script Pokescripting::StatusWrapper::battleScript() const +Sigmod::Script Sigscript::StatusWrapper::battleScript() const { return m_status->battleScript(); } -Pokemod::Script Pokescripting::StatusWrapper::worldScript() const +Sigmod::Script Sigscript::StatusWrapper::worldScript() const { return m_status->worldScript(); } diff --git a/sigscript/StatusWrapper.h b/sigscript/StatusWrapper.h index 1a84e0a4..ef8bb2e8 100644 --- a/sigscript/StatusWrapper.h +++ b/sigscript/StatusWrapper.h @@ -15,34 +15,34 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_STATUSWRAPPER__ -#define __POKESCRIPTING_STATUSWRAPPER__ +#ifndef __SIGSCRIPT_STATUSWRAPPER__ +#define __SIGSCRIPT_STATUSWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Status.h" +// Sigmod includes +#include "../sigmod/Status.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT StatusWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT StatusWrapper : public ObjectWrapper { Q_OBJECT public: - static StatusWrapper* create(const Pokemod::Status* status, PokemodWrapper* parent); + static StatusWrapper* create(const Sigmod::Status* status, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Script battleScript() const; - Q_SCRIPTABLE Pokemod::Script worldScript() const; + Q_SCRIPTABLE Sigmod::Script battleScript() const; + Q_SCRIPTABLE Sigmod::Script worldScript() const; private: - StatusWrapper(const Pokemod::Status* status, PokemodWrapper* parent); + StatusWrapper(const Sigmod::Status* status, SigmodWrapper* parent); StatusWrapper& operator=(const StatusWrapper& rhs); - const Pokemod::Status* m_status; + const Sigmod::Status* m_status; }; } -Q_DECLARE_METATYPE(Pokescripting::StatusWrapper*) +Q_DECLARE_METATYPE(Sigscript::StatusWrapper*) #endif diff --git a/sigscript/StoreWrapper.cpp b/sigscript/StoreWrapper.cpp index 111d0bd0..c747b4eb 100644 --- a/sigscript/StoreWrapper.cpp +++ b/sigscript/StoreWrapper.cpp @@ -18,32 +18,32 @@ // Header include #include "StoreWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::StoreWrapper* Pokescripting::StoreWrapper::create(const Pokemod::Store* store, PokemodWrapper* parent) +Sigscript::StoreWrapper* Sigscript::StoreWrapper::create(const Sigmod::Store* store, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, store->id()))) m_instances[Signiture(parent, store->id())] = new StoreWrapper(store, parent); return qobject_cast<StoreWrapper*>(m_instances[Signiture(parent, store->id())]); } -Pokescripting::StoreWrapper::StoreWrapper(const Pokemod::Store* store, PokemodWrapper* parent) : +Sigscript::StoreWrapper::StoreWrapper(const Sigmod::Store* store, SigmodWrapper* parent) : ObjectWrapper(store, parent), m_store(store) { } -QString Pokescripting::StoreWrapper::name() const +QString Sigscript::StoreWrapper::name() const { return m_store->name(); } -QList<Pokescripting::ItemWrapper*> Pokescripting::StoreWrapper::items() +QList<Sigscript::ItemWrapper*> Sigscript::StoreWrapper::items() { QList<int> itemIds = m_store->items(); QList<ItemWrapper*> items; foreach (int id, itemIds) - items.append(pokemod()->item(id)); + items.append(sigmod()->item(id)); return items; } diff --git a/sigscript/StoreWrapper.h b/sigscript/StoreWrapper.h index 18892e8f..4938fb51 100644 --- a/sigscript/StoreWrapper.h +++ b/sigscript/StoreWrapper.h @@ -15,36 +15,36 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_STOREWRAPPER__ -#define __POKESCRIPTING_STOREWRAPPER__ +#ifndef __SIGSCRIPT_STOREWRAPPER__ +#define __SIGSCRIPT_STOREWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Store.h" +// Sigmod includes +#include "../sigmod/Store.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class ItemWrapper; -class POKESCRIPTING_EXPORT StoreWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT StoreWrapper : public ObjectWrapper { Q_OBJECT public: - static StoreWrapper* create(const Pokemod::Store* store, PokemodWrapper* parent); + static StoreWrapper* create(const Sigmod::Store* store, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE QList<ItemWrapper*> items(); private: - StoreWrapper(const Pokemod::Store* store, PokemodWrapper* parent); + StoreWrapper(const Sigmod::Store* store, SigmodWrapper* parent); StoreWrapper& operator=(const StoreWrapper& rhs); - const Pokemod::Store* m_store; + const Sigmod::Store* m_store; }; } -Q_DECLARE_METATYPE(Pokescripting::StoreWrapper*) +Q_DECLARE_METATYPE(Sigscript::StoreWrapper*) #endif diff --git a/sigscript/TileWrapper.cpp b/sigscript/TileWrapper.cpp index 648bd39d..8efbe209 100644 --- a/sigscript/TileWrapper.cpp +++ b/sigscript/TileWrapper.cpp @@ -18,47 +18,47 @@ // Header include #include "TileWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" #include "SpriteWrapper.h" -Pokescripting::TileWrapper* Pokescripting::TileWrapper::create(const Pokemod::Tile* tile, PokemodWrapper* parent) +Sigscript::TileWrapper* Sigscript::TileWrapper::create(const Sigmod::Tile* tile, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, tile->id()))) m_instances[Signiture(parent, tile->id())] = new TileWrapper(tile, parent); return qobject_cast<TileWrapper*>(m_instances[Signiture(parent, tile->id())]); } -Pokescripting::TileWrapper::TileWrapper(const Pokemod::Tile* tile, PokemodWrapper* parent) : +Sigscript::TileWrapper::TileWrapper(const Sigmod::Tile* tile, SigmodWrapper* parent) : ObjectWrapper(tile, parent), m_tile(tile) { } -QString Pokescripting::TileWrapper::name() const +QString Sigscript::TileWrapper::name() const { return m_tile->name(); } -Pokescripting::SpriteWrapper* Pokescripting::TileWrapper::sprite() +Sigscript::SpriteWrapper* Sigscript::TileWrapper::sprite() { if (value("sprite").canConvert<QString>()) { - SpriteWrapper* sprite = pokemod()->sprite(value("sprite").toString()); + SpriteWrapper* sprite = sigmod()->sprite(value("sprite").toString()); if (sprite && sprite->sprite().size() == QSize(64, 64)) return sprite; } - return pokemod()->sprite(m_tile->sprite()); + return sigmod()->sprite(m_tile->sprite()); } -bool Pokescripting::TileWrapper::from(const Pokemod::Direction direction) const +bool Sigscript::TileWrapper::from(const Sigmod::Direction direction) const { if (value(QString("direction-%1").arg(direction)).canConvert<bool>()) return value(QString("direction-%1").arg(direction)).toBool(); return m_tile->from(direction); } -Pokemod::Script Pokescripting::TileWrapper::script() const +Sigmod::Script Sigscript::TileWrapper::script() const { return m_tile->script(); } diff --git a/sigscript/TileWrapper.h b/sigscript/TileWrapper.h index a32d3594..b75352e9 100644 --- a/sigscript/TileWrapper.h +++ b/sigscript/TileWrapper.h @@ -15,38 +15,38 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_TILEWRAPPER__ -#define __POKESCRIPTING_TILEWRAPPER__ +#ifndef __SIGSCRIPT_TILEWRAPPER__ +#define __SIGSCRIPT_TILEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Tile.h" +// Sigmod includes +#include "../sigmod/Tile.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class SpriteWrapper; -class POKESCRIPTING_EXPORT TileWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT TileWrapper : public ObjectWrapper { Q_OBJECT public: - static TileWrapper* create(const Pokemod::Tile* tile, PokemodWrapper* parent); + static TileWrapper* create(const Sigmod::Tile* tile, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE SpriteWrapper* sprite(); - Q_SCRIPTABLE bool from(const Pokemod::Direction direction) const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE bool from(const Sigmod::Direction direction) const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - TileWrapper(const Pokemod::Tile* tile, PokemodWrapper* parent); + TileWrapper(const Sigmod::Tile* tile, SigmodWrapper* parent); TileWrapper& operator=(const TileWrapper& rhs); - const Pokemod::Tile* m_tile; + const Sigmod::Tile* m_tile; }; } -Q_DECLARE_METATYPE(Pokescripting::TileWrapper*) +Q_DECLARE_METATYPE(Sigscript::TileWrapper*) #endif diff --git a/sigscript/TimeWrapper.cpp b/sigscript/TimeWrapper.cpp index 1971582b..befcee9b 100644 --- a/sigscript/TimeWrapper.cpp +++ b/sigscript/TimeWrapper.cpp @@ -18,33 +18,33 @@ // Header include #include "TimeWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::TimeWrapper* Pokescripting::TimeWrapper::create(const Pokemod::Time* time, PokemodWrapper* parent) +Sigscript::TimeWrapper* Sigscript::TimeWrapper::create(const Sigmod::Time* time, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, time->id()))) m_instances[Signiture(parent, time->id())] = new TimeWrapper(time, parent); return qobject_cast<TimeWrapper*>(m_instances[Signiture(parent, time->id())]); } -Pokescripting::TimeWrapper::TimeWrapper(const Pokemod::Time* time, PokemodWrapper* parent) : +Sigscript::TimeWrapper::TimeWrapper(const Sigmod::Time* time, SigmodWrapper* parent) : ObjectWrapper(time, parent), m_time(time) { } -QString Pokescripting::TimeWrapper::TimeWrapper::name() const +QString Sigscript::TimeWrapper::TimeWrapper::name() const { return m_time->name(); } -int Pokescripting::TimeWrapper::TimeWrapper::hour() const +int Sigscript::TimeWrapper::TimeWrapper::hour() const { return m_time->hour(); } -int Pokescripting::TimeWrapper::TimeWrapper::minute() const +int Sigscript::TimeWrapper::TimeWrapper::minute() const { return m_time->minute(); } diff --git a/sigscript/TimeWrapper.h b/sigscript/TimeWrapper.h index e7326cfb..23835653 100644 --- a/sigscript/TimeWrapper.h +++ b/sigscript/TimeWrapper.h @@ -15,34 +15,34 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_TIMEWRAPPER__ -#define __POKESCRIPTING_TIMEWRAPPER__ +#ifndef __SIGSCRIPT_TIMEWRAPPER__ +#define __SIGSCRIPT_TIMEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Time.h" +// Sigmod includes +#include "../sigmod/Time.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT TimeWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT TimeWrapper : public ObjectWrapper { Q_OBJECT public: - static TimeWrapper* create(const Pokemod::Time* time, PokemodWrapper* parent); + static TimeWrapper* create(const Sigmod::Time* time, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE int hour() const; Q_SCRIPTABLE int minute() const; private: - TimeWrapper(const Pokemod::Time* time, PokemodWrapper* parent); + TimeWrapper(const Sigmod::Time* time, SigmodWrapper* parent); TimeWrapper& operator=(const TimeWrapper& rhs); - const Pokemod::Time* m_time; + const Sigmod::Time* m_time; }; } -Q_DECLARE_METATYPE(Pokescripting::TimeWrapper*) +Q_DECLARE_METATYPE(Sigscript::TimeWrapper*) #endif diff --git a/sigscript/TrainerWrapper.cpp b/sigscript/TrainerWrapper.cpp index d552070b..c3ca4c7a 100644 --- a/sigscript/TrainerWrapper.cpp +++ b/sigscript/TrainerWrapper.cpp @@ -18,80 +18,80 @@ // Header include #include "TrainerWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::TrainerWrapper* Pokescripting::TrainerWrapper::create(const Pokemod::Trainer* trainer, PokemodWrapper* parent) +Sigscript::TrainerWrapper* Sigscript::TrainerWrapper::create(const Sigmod::Trainer* trainer, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, trainer->id()))) m_instances[Signiture(parent, trainer->id())] = new TrainerWrapper(trainer, parent); return qobject_cast<TrainerWrapper*>(m_instances[Signiture(parent, trainer->id())]); } -Pokescripting::TrainerWrapper::TrainerWrapper(const Pokemod::Trainer* trainer, PokemodWrapper* parent) : +Sigscript::TrainerWrapper::TrainerWrapper(const Sigmod::Trainer* trainer, SigmodWrapper* parent) : ObjectWrapper(trainer, parent), m_trainer(trainer) { } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::intelligence(const QString& name) const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::intelligence(const QString& name) const { if (name == "Ignorant") - return Pokemod::Trainer::Ignorant; + return Sigmod::Trainer::Ignorant; else if (name == "Determine") - return Pokemod::Trainer::Determine; + return Sigmod::Trainer::Determine; else if (name == "Remember") - return Pokemod::Trainer::Remember; + return Sigmod::Trainer::Remember; else if (name == "Cheating") - return Pokemod::Trainer::Cheating; - return QVariant(-1).value<Pokemod::Trainer::Intelligence>(); + return Sigmod::Trainer::Cheating; + return QVariant(-1).value<Sigmod::Trainer::Intelligence>(); } -QString Pokescripting::TrainerWrapper::TrainerWrapper::name() const +QString Sigscript::TrainerWrapper::TrainerWrapper::name() const { return m_trainer->name(); } -int Pokescripting::TrainerWrapper::TrainerWrapper::moneyFactor() const +int Sigscript::TrainerWrapper::TrainerWrapper::moneyFactor() const { if (value("moneyFactor").canConvert<int>()) return value("moneyFactor").toInt(); return m_trainer->moneyFactor(); } -Pokescripting::SkinWrapper* Pokescripting::TrainerWrapper::TrainerWrapper::skin() +Sigscript::SkinWrapper* Sigscript::TrainerWrapper::TrainerWrapper::skin() { - return pokemod()->skin(m_trainer->skin()); + return sigmod()->skin(m_trainer->skin()); } -int Pokescripting::TrainerWrapper::TrainerWrapper::depth() const +int Sigscript::TrainerWrapper::TrainerWrapper::depth() const { if (value("depth").canConvert<int>()) return value("depth").toInt(); return m_trainer->depth(); } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::teamIntel() const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::teamIntel() const { return m_trainer->teamIntel(); } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::moveIntel() const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::moveIntel() const { return m_trainer->moveIntel(); } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::itemIntel() const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::itemIntel() const { return m_trainer->itemIntel(); } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::abilityIntel() const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::abilityIntel() const { return m_trainer->abilityIntel(); } -Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::TrainerWrapper::statIntel() const +Sigmod::Trainer::Intelligence Sigscript::TrainerWrapper::TrainerWrapper::statIntel() const { return m_trainer->statIntel(); } diff --git a/sigscript/TrainerWrapper.h b/sigscript/TrainerWrapper.h index c8ae6e85..96894f67 100644 --- a/sigscript/TrainerWrapper.h +++ b/sigscript/TrainerWrapper.h @@ -15,45 +15,45 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_TRAINERWRAPPER__ -#define __POKESCRIPTING_TRAINERWRAPPER__ +#ifndef __SIGSCRIPT_TRAINERWRAPPER__ +#define __SIGSCRIPT_TRAINERWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Trainer.h" +// Sigmod includes +#include "../sigmod/Trainer.h" -namespace Pokescripting +namespace Sigscript { // Forward declarations class SkinWrapper; -class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT TrainerWrapper : public ObjectWrapper { Q_OBJECT public: - static TrainerWrapper* create(const Pokemod::Trainer* trainer, PokemodWrapper* parent); + static TrainerWrapper* create(const Sigmod::Trainer* trainer, SigmodWrapper* parent); - Q_SCRIPTABLE Pokemod::Trainer::Intelligence intelligence(const QString& name) const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence intelligence(const QString& name) const; Q_SCRIPTABLE QString name() const; Q_SCRIPTABLE int moneyFactor() const; Q_SCRIPTABLE SkinWrapper* skin(); Q_SCRIPTABLE int depth() const; - Q_SCRIPTABLE Pokemod::Trainer::Intelligence teamIntel() const; - Q_SCRIPTABLE Pokemod::Trainer::Intelligence moveIntel() const; - Q_SCRIPTABLE Pokemod::Trainer::Intelligence itemIntel() const; - Q_SCRIPTABLE Pokemod::Trainer::Intelligence abilityIntel() const; - Q_SCRIPTABLE Pokemod::Trainer::Intelligence statIntel() const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence teamIntel() const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence moveIntel() const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence itemIntel() const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence abilityIntel() const; + Q_SCRIPTABLE Sigmod::Trainer::Intelligence statIntel() const; private: - TrainerWrapper(const Pokemod::Trainer* trainer, PokemodWrapper* parent); + TrainerWrapper(const Sigmod::Trainer* trainer, SigmodWrapper* parent); TrainerWrapper& operator=(const TrainerWrapper& rhs); - const Pokemod::Trainer* m_trainer; + const Sigmod::Trainer* m_trainer; }; } -Q_DECLARE_METATYPE(Pokescripting::TrainerWrapper*) +Q_DECLARE_METATYPE(Sigscript::TrainerWrapper*) #endif diff --git a/sigscript/TypeWrapper.cpp b/sigscript/TypeWrapper.cpp index d752a9fa..216916d4 100644 --- a/sigscript/TypeWrapper.cpp +++ b/sigscript/TypeWrapper.cpp @@ -18,28 +18,28 @@ // Header include #include "TypeWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::TypeWrapper* Pokescripting::TypeWrapper::create(const Pokemod::Type* type, PokemodWrapper* parent) +Sigscript::TypeWrapper* Sigscript::TypeWrapper::create(const Sigmod::Type* type, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, type->id()))) m_instances[Signiture(parent, type->id())] = new TypeWrapper(type, parent); return qobject_cast<TypeWrapper*>(m_instances[Signiture(parent, type->id())]); } -Pokescripting::TypeWrapper::TypeWrapper(const Pokemod::Type* type, PokemodWrapper* parent) : +Sigscript::TypeWrapper::TypeWrapper(const Sigmod::Type* type, SigmodWrapper* parent) : ObjectWrapper(type, parent), m_type(type) { } -QString Pokescripting::TypeWrapper::TypeWrapper::name() const +QString Sigscript::TypeWrapper::TypeWrapper::name() const { return m_type->name(); } -Pokemod::Fraction Pokescripting::TypeWrapper::TypeWrapper::stab() const +Sigmod::Fraction Sigscript::TypeWrapper::TypeWrapper::stab() const { return m_type->stab(); } diff --git a/sigscript/TypeWrapper.h b/sigscript/TypeWrapper.h index 02dba293..57a62bcd 100644 --- a/sigscript/TypeWrapper.h +++ b/sigscript/TypeWrapper.h @@ -15,33 +15,33 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_TYPEWRAPPER__ -#define __POKESCRIPTING_TYPEWRAPPER__ +#ifndef __SIGSCRIPT_TYPEWRAPPER__ +#define __SIGSCRIPT_TYPEWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Type.h" +// Sigmod includes +#include "../sigmod/Type.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT TypeWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT TypeWrapper : public ObjectWrapper { Q_OBJECT public: - static TypeWrapper* create(const Pokemod::Type* type, PokemodWrapper* parent); + static TypeWrapper* create(const Sigmod::Type* type, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Fraction stab() const; + Q_SCRIPTABLE Sigmod::Fraction stab() const; private: - TypeWrapper(const Pokemod::Type* type, PokemodWrapper* parent); + TypeWrapper(const Sigmod::Type* type, SigmodWrapper* parent); TypeWrapper& operator=(const TypeWrapper& rhs); - const Pokemod::Type* m_type; + const Sigmod::Type* m_type; }; } -Q_DECLARE_METATYPE(Pokescripting::TypeWrapper*) +Q_DECLARE_METATYPE(Sigscript::TypeWrapper*) #endif diff --git a/sigscript/WeatherWrapper.cpp b/sigscript/WeatherWrapper.cpp index ad7bc990..34965d9d 100644 --- a/sigscript/WeatherWrapper.cpp +++ b/sigscript/WeatherWrapper.cpp @@ -18,28 +18,28 @@ // Header include #include "WeatherWrapper.h" -// Pokescripting includes -#include "PokemodWrapper.h" +// Sigscript includes +#include "SigmodWrapper.h" -Pokescripting::WeatherWrapper* Pokescripting::WeatherWrapper::create(const Pokemod::Weather* weather, PokemodWrapper* parent) +Sigscript::WeatherWrapper* Sigscript::WeatherWrapper::create(const Sigmod::Weather* weather, SigmodWrapper* parent) { if (!m_instances.contains(Signiture(parent, weather->id()))) m_instances[Signiture(parent, weather->id())] = new WeatherWrapper(weather, parent); return qobject_cast<WeatherWrapper*>(m_instances[Signiture(parent, weather->id())]); } -Pokescripting::WeatherWrapper::WeatherWrapper(const Pokemod::Weather* weather, PokemodWrapper* parent) : +Sigscript::WeatherWrapper::WeatherWrapper(const Sigmod::Weather* weather, SigmodWrapper* parent) : ObjectWrapper(weather, parent), m_weather(weather) { } -QString Pokescripting::WeatherWrapper::name() const +QString Sigscript::WeatherWrapper::name() const { return m_weather->name(); } -Pokemod::Script Pokescripting::WeatherWrapper::script() const +Sigmod::Script Sigscript::WeatherWrapper::script() const { return m_weather->script(); } diff --git a/sigscript/WeatherWrapper.h b/sigscript/WeatherWrapper.h index 4a915af2..97b683f9 100644 --- a/sigscript/WeatherWrapper.h +++ b/sigscript/WeatherWrapper.h @@ -15,33 +15,33 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __POKESCRIPTING_WEATHERWRAPPER__ -#define __POKESCRIPTING_WEATHERWRAPPER__ +#ifndef __SIGSCRIPT_WEATHERWRAPPER__ +#define __SIGSCRIPT_WEATHERWRAPPER__ -// Pokescripting includes +// Sigscript includes #include "ObjectWrapper.h" -// Pokemod includes -#include "../pokemod/Weather.h" +// Sigmod includes +#include "../sigmod/Weather.h" -namespace Pokescripting +namespace Sigscript { -class POKESCRIPTING_EXPORT WeatherWrapper : public ObjectWrapper +class SIGSCRIPT_EXPORT WeatherWrapper : public ObjectWrapper { Q_OBJECT public: - static WeatherWrapper* create(const Pokemod::Weather* weather, PokemodWrapper* parent); + static WeatherWrapper* create(const Sigmod::Weather* weather, SigmodWrapper* parent); Q_SCRIPTABLE QString name() const; - Q_SCRIPTABLE Pokemod::Script script() const; + Q_SCRIPTABLE Sigmod::Script script() const; private: - WeatherWrapper(const Pokemod::Weather* weather, PokemodWrapper* parent); + WeatherWrapper(const Sigmod::Weather* weather, SigmodWrapper* parent); WeatherWrapper& operator=(const WeatherWrapper& rhs); - const Pokemod::Weather* m_weather; + const Sigmod::Weather* m_weather; }; } -Q_DECLARE_METATYPE(Pokescripting::WeatherWrapper*) +Q_DECLARE_METATYPE(Sigscript::WeatherWrapper*) #endif |