summaryrefslogtreecommitdiff
path: root/Coordinates.h
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2018-08-05 18:06:49 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2018-08-05 18:06:49 +0200
commitefc7020defa40c74a467442e6763df71c0783fd0 (patch)
treefa3f7cf7648e7e05ed0483cf25ead7712f2fc0da /Coordinates.h
parent6ecb59761ac940e66c9670d23dd65696df3df7cf (diff)
* Increased MAX_SELECTION_DISTANCE, but this should be done according to BaseUnit instead!HEADmaster
+ BaseUnit now takes a pointer to a Camera object. + Implemented Unit basic movement. + Initial stub for Coordinates class, meant to replace all manual X/Y coordinates handling between classes.
Diffstat (limited to 'Coordinates.h')
-rw-r--r--Coordinates.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/Coordinates.h b/Coordinates.h
new file mode 100644
index 0000000..8a5e05e
--- /dev/null
+++ b/Coordinates.h
@@ -0,0 +1,45 @@
+#ifndef COORDINATES_H__
+#define COORDINATES_H__
+
+/* *******************************************************************
+ * Includes
+ * ******************************************************************/
+
+#include <stdbool.h>
+#include <stdint.h>
+
+/* *******************************************************************
+ * Defines
+ * ******************************************************************/
+
+/* *******************************************************************
+ * Global types definition
+ * ******************************************************************/
+
+/* *******************************************************************
+ * Global variables declaration
+ * ******************************************************************/
+
+/* *******************************************************************
+ * Global functions declaration
+ * ******************************************************************/
+
+/* *******************************************************************
+ * Class definition
+ * ******************************************************************/
+
+class Coordinates
+{
+ public:
+ typedef uint16_t tPos;
+ explicit Coordinates(const tPos x, const tPos y);
+ Coordinates operator+(const Coordinates& c) const;
+ tPos getX(void) const;
+ tPos getY(void) const;
+
+ private:
+ tPos _x;
+ tPos _y;
+};
+
+#endif /* COORDINATES_H__ */