summaryrefslogtreecommitdiffstats
path: root/sigscript
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-01 02:15:35 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-01 02:15:35 -0400
commitea97b53e8e934f54a646f52eff94fea5316160f2 (patch)
tree856b841fa23182d0c5a7eb8f20a72144b7860f8b /sigscript
parent11fb74db1d0095e9f61d4c6106182f48310babb7 (diff)
downloadsigen-ea97b53e8e934f54a646f52eff94fea5316160f2.tar.gz
sigen-ea97b53e8e934f54a646f52eff94fea5316160f2.tar.xz
sigen-ea97b53e8e934f54a646f52eff94fea5316160f2.zip
Add mapPosition storage to Game
Diffstat (limited to 'sigscript')
-rw-r--r--sigscript/GameWrapper.cpp5
-rw-r--r--sigscript/GameWrapper.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/sigscript/GameWrapper.cpp b/sigscript/GameWrapper.cpp
index d93aee86..82355b44 100644
--- a/sigscript/GameWrapper.cpp
+++ b/sigscript/GameWrapper.cpp
@@ -263,6 +263,11 @@ Fraction GameWrapper::effectiveness(const TypeWrapper* attacker, const TypeWrapp
return m_game->typechart(m_game->typeIndex(attacker->id()), m_game->typeIndex(defender->id()));
}
+QPoint GameWrapper::mapPosition(const MapWrapper* map) const
+{
+ return m_game->mapPosition(map->id());
+}
+
RulesWrapper* GameWrapper::rules()
{
return RulesWrapper::create(m_game->rules(), this);
diff --git a/sigscript/GameWrapper.h b/sigscript/GameWrapper.h
index 179d77f8..efff7de3 100644
--- a/sigscript/GameWrapper.h
+++ b/sigscript/GameWrapper.h
@@ -29,6 +29,9 @@
#include <sigmod/Direction.h>
#include <sigmod/Stat.h>
+// Qt includes
+#include <QtCore/QPoint>
+
// Forward declarations
namespace Sigmod
{
@@ -103,6 +106,7 @@ class SIGSCRIPT_EXPORT GameWrapper : public ObjectWrapper
Q_SCRIPTABLE bool singlePlayer() const;
Q_SCRIPTABLE Sigcore::Script startScript();
Q_SCRIPTABLE Sigcore::Fraction effectiveness(const TypeWrapper* attacker, const TypeWrapper* defender) const;
+ Q_SCRIPTABLE QPoint mapPosition(const MapWrapper* map) const;
Q_SCRIPTABLE RulesWrapper* rules();
Q_SCRIPTABLE AbilityWrapper* ability(const QString& name);