#include "keybindings.h" /* get_command_to_keycode(), get_keycode_to_command(),
* mod_selected_keyb(), move_keyb_selection()
*/
-#include "map.h" /* map_scroll(),toggle_lookmode(),lookmode_nav()*/
+#include "map.h" /* toggle_lookmode(), lookmode_nav()*/
#include "wincontrol.h" /* shift_active_win(), resize_active_win(),
* toggle_win_size_type(), toggle_window(),
* cycle_active_win(), scroll_v_screen(),
static uint8_t try_client_commands(struct Command * command)
{
- return ( try_1args(command, "map_u", map_scroll, '8')
- || try_1args(command, "map_d", map_scroll, '2')
- || try_1args(command, "map_r", map_scroll, '6')
- || try_1args(command, "map_l", map_scroll, '4')
- || try_1args(command, "inv_u", nav_inventory, 'u')
+ return ( try_1args(command, "inv_u", nav_inventory, 'u')
|| try_1args(command, "inv_d", nav_inventory, 'd')
|| try_1args(command, "cyc_win_f", cycle_active_win, 'f')
|| try_1args(command, "cyc_win_b", cycle_active_win, 'b')
#include <string.h> /* 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 */
#include <stdint.h> /* uint8_t */
-/* Try changing map window's focus into direction "d" (north = "N" etc.). Unset
- * world.focus_each_turn.
- */
-extern void map_scroll(char d);
-
/* Toggle world.look (moving look cursor instead of player over map). */
extern void toggle_lookmode();