summaryrefslogtreecommitdiffstats
path: root/general/Point.h
diff options
context:
space:
mode:
Diffstat (limited to 'general/Point.h')
-rw-r--r--general/Point.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/general/Point.h b/general/Point.h
new file mode 100644
index 00000000..93fed968
--- /dev/null
+++ b/general/Point.h
@@ -0,0 +1,71 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: general/Point.h
+// Purpose: Define a coordinate point
+// Author: Ben Boeckel
+// Modified by: Ben Boeckel
+// Created: Sun Apr 8 12:53:15 2007
+// Copyright: ©2007 Nerdy Productions
+// Licence:
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program. If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __POINT__
+#define __POINT__
+
+#include <QFile>
+#include "Ini.h"
+
+namespace PokeGen
+{
+ class Point
+ {
+ public:
+ inline Point(const unsigned _x = 0, const unsigned _y = 0) :
+ x(_x),
+ y(_y)
+ {
+ }
+
+ void ImportIni(Ini& ini);
+ void ExportIni(QFile& fout, const QString& val) const;
+
+ inline void Set(const unsigned _x, const unsigned _y)
+ {
+ x = _x;
+ y = _y;
+ }
+ inline void SetX(const unsigned _x)
+ {
+ x = _x;
+ }
+ inline void SetY(const unsigned _y)
+ {
+ y = _y;
+ }
+
+ inline unsigned GetX() const
+ {
+ return x;
+ }
+ inline unsigned GetY() const
+ {
+ return y;
+ }
+ private:
+ unsigned x;
+ unsigned y;
+ };
+}
+
+#endif