X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fmap.c;h=ab8148d25846a9f2594c6ebf0e61f187d7150f7f;hb=a4df5c24eca01a771060b130ed7f4c20d9f73778;hp=f8ff0616bc502d683fc63d8d96bc15ab0b69eef3;hpb=5efc409a3640bcc8b2b4d5310a7e09c1e22afeba;p=plomrogue
diff --git a/src/client/map.c b/src/client/map.c
index f8ff061..ab8148d 100644
--- a/src/client/map.c
+++ b/src/client/map.c
@@ -12,42 +12,8 @@
#include /* strlen(), strncmp() */
#include "../common/try_malloc.h" /* try_malloc() */
#include "../common/rexit.h" /* exit_trouble() */
-//#include "../common/yx_uint8.h" /* yx_uint8 */
#include "io.h" /* send() */
-#include "windows.h" /* struct Win, center_offset(), get_win_by_id() */
-#include "world.h" /* for global world */
-
-
-
-extern void map_scroll(char d)
-{
- struct Win * win = get_win_by_id('m');
- uint16_t offset;
- if (('8' == d || '2' == d) && world.map.length > win->frame_size.y)
- {
- offset = center_offset(win->center.y,
- world.map.length, win->frame_size.y);
- win->center.y = offset + (win->frame_size.y / 2);
- if ('2' == d && win->center.y < world.map.length - 1)
- {
- win->center.y++;
- return;
- }
- win->center.y = win->center.y - ('8' == d && win->center.y > 0);
- }
- else if (('4' == d || '6' == d) && (world.map.length*2) > win->frame_size.x)
- {
- offset = center_offset(win->center.x,
- world.map.length*2, win->frame_size.x);
- win->center.x = offset + (win->frame_size.x / 2);
- if ('6' == d && win->center.x < (world.map.length * 2) - 1)
- {
- win->center.x++;
- return;
- }
- win->center.x = win->center.x - ('4' == d && win->center.x > 0);
- }
-}
+#include "world.h" /* for world */