home · contact · privacy
7DRL: Add '_' altar symbol to map, declare it walkable.
[plomrogue] / src / server / libplomrogue.c
index 0e8f3fb54a74fcad65020257f661a10289a55f46..e8ff9ae950f7a90b05998cbf236d59e06232d1ed 100644 (file)
@@ -583,7 +583,7 @@ extern uint8_t zero_score_map_where_char_on_memdepthmap(char c,
 }
 
 extern void age_some_memdepthmap_on_nonfov_cells(char * memdepthmap,
-                                                     char * fovmap)
+                                                 char * fovmap)
 {
     uint32_t map_size = maplength * maplength;
     uint16_t pos;
@@ -599,3 +599,23 @@ extern void age_some_memdepthmap_on_nonfov_cells(char * memdepthmap,
         }
     }
 }
+
+extern uint8_t set_cells_passable_on_memmap_to_65534_on_scoremap(char * mem_map)
+{
+    if (!score_map)
+    {
+        return 1;
+    }
+    uint32_t map_size = maplength * maplength;
+    uint16_t pos;
+    for (pos = 0; pos < map_size; pos++)
+    {
+        char c = mem_map[pos]; //
+        if ('.' == c || ':' == c || '_' == c) //
+        //if ('.' == mem_map[pos])
+        {
+            score_map[pos] = 65534;
+        }
+    }
+    return 0;
+}