home · contact · privacy
Center map on player at game start.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 17 Sep 2013 03:15:26 +0000 (05:15 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 17 Sep 2013 03:15:26 +0000 (05:15 +0200)
src/main.c

index 046ef1ad952f3cec1a8a2786a6117ee87cf44ce5..f261e39f94fd008912bee0379e345eebc0bb5921 100644 (file)
@@ -187,6 +187,10 @@ int main(int argc, char *argv[])
     sorted_wintoggle_and_activate(&world);
     err_winmem = "Trouble with draw_all_wins() in main().";
 
+    /* Focus map on player. */
+    struct Win * win_map = get_win_by_id(&world, 'm');
+    map_center_player(&map, &player, win_map->frame.size);
+
     /* Replay mode. */
     int key;
     struct WinConf * wc;