home · contact · privacy
Added primitive inventory system. Any objects may now own/contain/carry other objects.
[plomrogue] / src / main.c
index adeddceec5753080b9416d704b59aec3074631ca..90aa9dd5713c600e639ef63bf178a0782234db5b 100644 (file)
@@ -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);
@@ -165,6 +164,9 @@ int main(int argc, char *argv[])
     struct Win * win_map = get_win_by_id(&world, 'm');
     map_center_object(&map, player, win_map->frame.size);
 
+    /* Initialize player's inventory selection index to start position. */
+    world.inventory_select = 0;
+
     /* Replay mode. */
     int key;
     struct WinConf * wc;