summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..80b7896
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <cmath>
+
+struct Point2D {
+ int x, y;
+};
+
+enum Direction {
+ North,
+ East,
+ South,
+ West
+};
+
+constexpr int TileSize = 24;
+
+/*
+ * Converts screen coordinates to a tile on the map
+ */
+Point2D ScreenToTile(Point2D); \ No newline at end of file