summaryrefslogtreecommitdiffstats
path: root/pokemod/Point.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Point.h')
-rw-r--r--pokemod/Point.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/pokemod/Point.h b/pokemod/Point.h
new file mode 100644
index 00000000..9b220ca5
--- /dev/null
+++ b/pokemod/Point.h
@@ -0,0 +1,69 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: Point.h
+// Purpose: Define a coordinate point for use in a PokéMod
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Sun Apr 8 12:53:15 2007
+// Copyright: ©2007 Ben Boeckel and Nerdy Productions
+// Licence:
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 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, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POKEMOD_POINT__
+#define __POKEMOD_POINT__
+
+#include "Debug.h"
+#include "Xml.h"
+
+namespace PokeMod
+{
+ class Point
+ {
+ public:
+ inline Point(): x(0), y(0) {}
+ inline Point(int _x, int _y): x(_x), y(_y) {}
+
+ void ImportXml(XmlElement &xml);
+ XmlElement ExportXml(const String &val);
+
+ inline void Set(int _x, int _y)
+ {
+ x = _x;
+ y = _y;
+ }
+ inline void SetX(int _x)
+ {
+ x = _x;
+ }
+ inline void SetY(int _y)
+ {
+ y = _y;
+ }
+
+ inline int GetX()
+ {
+ return x;
+ }
+ inline int GetY()
+ {
+ return y;
+ }
+ private:
+ int x;
+ int y;
+ };
+}
+
+#endif