X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fclient%2Fmap.c;h=7292c89151a8ecb62a0a0b6c7c3d53e7f67c4e79;hb=87aec00b668777cef82a9a43e490563e9c90f039;hp=a41903906dcc012bfedfbae7e1c71f6917664d85;hpb=e03020342a74aef143b1ec38c18966dac64181b5;p=plomrogue
diff --git a/src/client/map.c b/src/client/map.c
index a419039..7292c89 100644
--- a/src/client/map.c
+++ b/src/client/map.c
@@ -1,9 +1,8 @@
/* src/client/map.c */
#include "map.h"
-#include /* uint16_t */
-#include "misc.h" /* center_offset() */
-#include "windows.h" /* struct Win, get_win_by_id() */
+#include /* 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;
}