From 8c8096dab1538592e6bacea6ba4e1f9882ae6e0b Mon Sep 17 00:00:00 2001 From: cflip Date: Sun, 27 Feb 2022 19:37:36 -0700 Subject: Miscellaneous code cleanup --- src/util.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/util.h (limited to 'src/util.h') 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 + +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 -- cgit v1.2.3