home · contact · privacy
Fixed bug that led to endless loop in nearest_enemy_dir().
[plomrogue] / src / main.c
index 2d096367c85192d34095cb2abd8935b98a4ca6ee..c9e468bbe3aab0d339792f61d66983d0bb6c42b6 100644 (file)
@@ -3,7 +3,7 @@
 #include "main.h" /* for world global */
 #include <stdlib.h> /* for atoi(), exit(), EXIT_FAILURE */
 #include <stdio.h> /* for FILE typedef, F_OK */
-#include <ncurses.h> /* for initscr(), noecho(), curs_set(), keypad(), raw() */
+#include <ncurses.h> /* for noecho(), curs_set(), keypad(), raw() */
 #include <time.h> /* for time() */
 #include <unistd.h> /* for getopt(), optarg */
 #include <stdint.h> /* for uint32_t */
                         * try_fclose_unlink_rename(), try_fgetc_noeof(),
                         */
 #include "map_objects.h" /* for structs MapObj, init_map_object_defs(),
-                          * build_map_objects(), get_player()
+                          * add_map_objects(), get_player()
                           */
 #include "map.h" /* for struct Map, init_map() */
-#include "misc.h" /* for update_log(), find_passable_pos(), save_game(),
-                   * try_calloc(), check_tempfile(), check_xor_files(),
-                   * load_interface_conf(), load_game(), rrand()
+#include "misc.h" /* for update_log(), save_game(), try_calloc(), load_game(),
+                   * check_tempfile(), check_files_xor(), load_interface_conf(),
+                   * rrand()
                    */
 #include "wincontrol.h" /* get_win_by_id(), get_winconf_by_win() */
 #include "rexit.h" /* for exit_game() */
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
     win_map->center = player->pos;
 
     /* Initialize player's inventory selection index to start position. */
-    world.inventory_select = 0;
+    world.inventory_sel = 0;
 
     /* Replay mode. */
     int key;
@@ -179,7 +179,7 @@ int main(int argc, char *argv[])
                 if (   is_command_id_shortdsc(action, "drop")
                     || is_command_id_shortdsc(action, "use"))
                 {
-                    world.inventory_select = try_fgetc_noeof(file, f_name);
+                    world.inventory_sel = try_fgetc_noeof(file, f_name);
                 }
                 player_control_by_id(action);
             }
@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
                     if (   is_command_id_shortdsc(action, "drop")
                         || is_command_id_shortdsc(action, "use"))
                     {
-                        world.inventory_select = try_fgetc_noeof(file, f_name);
+                        world.inventory_sel = try_fgetc_noeof(file, f_name);
                     }
                     player_control_by_id(action);
                 }