home · contact · privacy
License everything (GPL).
[plomrogue] / src / client / map.c
index 2a1d66f300a90d02eb09a0d9752b16dbbadfff38..e08e7b31af79f8858ccc85c6ccd7d7bbd7158764 100644 (file)
@@ -1,4 +1,9 @@
-/* src/client/map.c */
+/* src/client/map.c
+ *
+ * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+ * or any later version. For details on its copyright, license, and warranties,
+ * see the file NOTICE in the root directory of the PlomRogue source package.
+ */
 
 #include "map.h"
 #include <stdint.h> /* uint8_t */
@@ -9,6 +14,7 @@
 
 extern void map_scroll(char d)
 {
+    world.focus_each_turn = 0;
     struct Win * win = get_win_by_id('m');
     uint16_t offset;
     if (('8' == d || '2' == d) && world.map.length > win->frame_size.y)
@@ -43,7 +49,7 @@ extern void map_center()
 {
     struct Win * win_map = get_win_by_id('m');
     win_map->center.y = world.player_pos.y;
-    win_map->center.x = world.player_pos.x * 2;
+    win_map->center.x = world.player_pos.x * 2 + (world.player_pos.y % 2);
 }