#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()
#include "wincontrol.h" /* get_win_by_id(), get_winconf_by_win() */
#include "rrand.h" /* for rrand(), rrand_seed() */
#include "rexit.h" /* for exit_game(), exit_err() */
-#include "command_db.h" /* for init_command_db() */
+#include "command_db.h" /* for init_command_db(), is_command_id_shortdsc() */
#include "control.h" /* for *_control(), get_available_keycode_to_action() */
/* 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;
{
break;
}
+ if (is_command_id_shortdsc(&world, action, "drop"))
+ {
+ world.inventory_select = getc(file);
+ }
record_control(action, &world);
}
}
action = getc(file);
if (EOF != action)
{
+ if (is_command_id_shortdsc(&world, action, "drop"))
+ {
+ world.inventory_select = getc(file);
+ }
record_control(action, &world);
}
}