home · contact · privacy
Overhauled large parts of window system to universalize scroll hints.
[plomrogue] / src / main.c
index adeddceec5753080b9416d704b59aec3074631ca..bb2ef43c438c931ff7df99d30f1823563ef6853d 100644 (file)
@@ -17,7 +17,7 @@
 #include "map_objects.h" /* for structs MapObj, init_map_object_defs(),
                           * build_map_objects(), get_player()
                           */
-#include "map.h" /* for struct Map, init_map(), map_center_object() */
+#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()
@@ -135,7 +135,6 @@ int main(int argc, char *argv[])
     if (0 == world.turn)
     {
         world.map_objs = NULL;
-        world.last_map_obj = NULL;
         add_map_objects(&world, 0, 1);
         add_map_objects(&world, 1, 1 + rrand() % 27);
         add_map_objects(&world, 2, 1 + rrand() % 9);
@@ -163,7 +162,10 @@ int main(int argc, char *argv[])
     /* Focus map on player. */
     struct MapObj * player = get_player(&world);
     struct Win * win_map = get_win_by_id(&world, 'm');
-    map_center_object(&map, player, win_map->frame.size);
+    win_map->center = player->pos;
+
+    /* Initialize player's inventory selection index to start position. */
+    world.inventory_select = 0;
 
     /* Replay mode. */
     int key;