X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=src%2Fclient%2Fcontrol.c;h=55dbd9e40d45a4062698031935d22c4555f3f804;hb=02b304cd9f900415c13dfd45c05503ed045d9c1c;hp=5d9091992762878f271637cdf125e62542d5b655;hpb=01e4e514cdebd1818aeb26ee78eed2a51fb5a322;p=plomrogue
diff --git a/src/client/control.c b/src/client/control.c
index 5d90919..55dbd9e 100644
--- a/src/client/control.c
+++ b/src/client/control.c
@@ -17,7 +17,7 @@
#include "keybindings.h" /* get_command_to_keycode(), get_keycode_to_command(),
* mod_selected_keyb(), move_keyb_selection()
*/
-#include "map.h" /* map_scroll(), map_center(), toggle_autofocus() */
+#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(),
@@ -134,13 +134,7 @@ static uint8_t try_kb_manip(char * command)
static uint8_t try_client_commands(struct Command * command)
{
- return ( try_0args(command, "map_c", map_center)
- || try_0args(command, "to_autofocus", toggle_autofocus)
- || 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')
@@ -166,6 +160,7 @@ static uint8_t try_client_commands(struct Command * command)
|| try_1args(command, "shift_b", shift_active_win, 'b')
|| try_0args(command, "reload_conf", reload_interface_conf)
|| try_0args(command, "save_conf", save_interface_conf)
+ || try_0args(command, "to_look", toggle_lookmode)
|| try_kb_manip(command->dsc_short));
}
@@ -263,7 +258,7 @@ extern uint8_t try_key(uint16_t key)
}
if (command)
{
- if (try_server_commands(command))
+ if (world.look && lookmode_nav(command->dsc_short))
{
return 1;
}
@@ -271,6 +266,10 @@ extern uint8_t try_key(uint16_t key)
{
return 1;
}
+ else if (try_server_commands(command))
+ {
+ return 1;
+ }
else if (!strcmp("quit", command->dsc_short))
{
return 2;