home · contact · privacy
Client: Fit interface_conf to new config file style. Also, refactorings.
[plomrogue] / src / client / map.c
index a41903906dcc012bfedfbae7e1c71f6917664d85..7292c89151a8ecb62a0a0b6c7c3d53e7f67c4e79 100644 (file)
@@ -1,9 +1,8 @@
 /* src/client/map.c */
 
 #include "map.h"
-#include <stdint.h> /* uint16_t */
-#include "misc.h" /* center_offset() */
-#include "windows.h" /* struct Win, get_win_by_id() */
+#include <stdint.h> /* uint8_t */
+#include "windows.h" /* struct Win, center_offset(), get_win_by_id() */
 #include "world.h" /* for global world */
 
 
@@ -11,7 +10,7 @@
 extern void map_scroll(char d)
 {
     struct Win * win = get_win_by_id('m');
-    uint16_t offset;
+    uint8_t offset;
     if (('8' == d || '2' == d) && world.map.size.y > win->frame_size.y)
     {
         offset = center_offset(win->center.y,
@@ -43,5 +42,6 @@ extern void map_scroll(char d)
 extern void map_center()
 {
     struct Win * win_map = get_win_by_id('m');
-    win_map->center = world.player_pos;
+    win_map->center.y = world.player_pos.y;
+    win_map->center.x = world.player_pos.x;
 }