X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fmap.c;h=e08e7b31af79f8858ccc85c6ccd7d7bbd7158764;hb=f934d0193c89585b9154210bf1ffb08aeebef12a;hp=7c2dcc384590df51b3dcfa46c9bcb577a6755e27;hpb=0438f2fc5df337e4264103a86c1765ace9c6565a;p=plomrogue
diff --git a/src/client/map.c b/src/client/map.c
index 7c2dcc3..e08e7b3 100644
--- a/src/client/map.c
+++ b/src/client/map.c
@@ -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 /* 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,5 +49,12 @@ 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);
+}
+
+
+
+extern void toggle_autofocus()
+{
+ world.focus_each_turn = world.focus_each_turn ? 0 : 1;
}