summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2022-02-27 19:37:36 -0700
committercflip <cflip@cflip.net>2022-02-27 19:37:36 -0700
commit8c8096dab1538592e6bacea6ba4e1f9882ae6e0b (patch)
tree35a69e588af9ace66a5b8c0211e05167ea40428b /src/util.h
parentbba66a0ccb7281cd6c717fe9784a04a4fcf72700 (diff)
Miscellaneous code cleanup
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