home · contact · privacy
Necessary C additions to make previous commit build.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 18:35:33 +0000 (19:35 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 18:35:33 +0000 (19:35 +0100)
src/server/libplomrogue.c

index c7fb5ce4fa67ddd757bc00a914a545fe6891a5af..ef1e4ce671a98febbbd2bdff52011c1d5e0cd6c3 100644 (file)
@@ -620,3 +620,19 @@ extern uint8_t set_cells_passable_on_memmap_to_65534_on_scoremap(char * mem_map)
     }
     return 0;
 }
+
+extern void update_mem_and_memdepthmap_via_fovmap(char * map, char * fovmap,
+                                                  char * memdepthmap,
+                                                  char * memmap)
+{
+    uint32_t map_size = maplength * maplength;
+    uint16_t pos;
+    for (pos = 0; pos < map_size; pos++)
+    {
+        if ('v' == fovmap[pos])
+        {
+            memdepthmap[pos] = '0';
+            memmap[pos] = map[pos];
+        }
+    }
+}