home · contact · privacy
Unify Map struct common to server and client in src/common/map.h.
[plomrogue] / src / server / map.c
index 36c446580205e67041237c3e950c8441d62b6ac4..464f6e2b3ac0060df3ac96952de556ba28228306 100644 (file)
@@ -156,3 +156,10 @@ extern uint8_t is_passable(struct yx_uint8 pos)
     }
     return passable;
 }
+
+
+
+extern uint16_t yx_to_map_pos(struct yx_uint8 * yx)
+{
+    return (yx->y * world.map.size.x) + yx->x;
+}