home · contact · privacy
Reworked "actors" library as more inclusive "objects_on_map".
[plomrogue] / src / roguelike.c
index 68a593683be3525ec55a733c20707d4701fe2490..ac735ace1771aa7d4c20c00ed45aa6459c620487 100644 (file)
@@ -9,7 +9,7 @@
 #include "draw_wins.h"
 #include "keybindings.h"
 #include "readwrite.h"
-#include "actors.h"
+#include "objects_on_map.h"
 
 uint16_t rrand(char use_seed, uint32_t new_seed) {
 // Pseudo-random number generator (LGC algorithm). Use instead of rand() to ensure portable predictability.
@@ -70,14 +70,6 @@ struct Map init_map () {
       map.cells[y * map.size.x + x] = '.'; }
   return map; }
 
-struct yx_uint16 find_passable_pos (struct Map * map) {
-// Return a random passable position on map.
-  struct yx_uint16 pos;
-  for (pos.y = pos.x = 0; 0 == is_passable(map, pos);) {
-      pos.y = rrand(0, 0) % map->size.y;
-      pos.x = rrand(0, 0) % map->size.x; }
-  return pos; }
-
 void map_scroll (struct Map * map, char dir) {
 // Scroll map into direction dir if possible by changing the offset.
   if      (NORTH == dir && map->offset.y > 0) map->offset.y--;