home · contact · privacy
Unify Map struct common to server and client in src/common/map.h.
[plomrogue] / src / server / field_of_view.c
index c92c11a86ec637b0248ebbaf5b1ad68e354fea9e..61ebf88df183ca649b28aef4d5d5eb7da0b09e01 100644 (file)
@@ -23,9 +23,6 @@ enum wraps
     WRAP_W = 0x08
 };
 
-/* Transform "yx" to an index position in the world map. */
-//static uint16_t yx_to_pos(struct yx_uint8 * yx);
-
 /* Move "yx" into hex direction "d". If this moves "yx" beyond the minimal (0)
  * or maximal (UINT8_MAX) column or row, it wraps to the opposite side. Such
  * wrapping is returned as a wraps enum value and stored, so that further calls
@@ -386,7 +383,7 @@ static char * eye_to_cell(struct yx_uint8 * yx_eye, struct yx_uint8 * yx_cell,
     int16_t diff_x = yx_cell->x - yx_eye->x;
     uint8_t indent = yx_eye->y % 2;
     char * dir = dir_from_delta(indent, diff_y, diff_x);
-    char * dirs;
+    char * dirs = NULL;
     if (1 == strlen(dir))
     {
         return strdup(dir);