+ if (is_command_id_shortdsc(world, action, "wait"))
+ {
+ player_wait(world);
+ }
+ else if (is_command_id_shortdsc(world, action, "player_u"))
+ {
+ move_player(world, NORTH);
+ }
+ else if (is_command_id_shortdsc(world, action, "player_r"))
+ {
+ move_player(world, EAST);
+ }
+ else if (is_command_id_shortdsc(world, action, "player_d"))
+ {
+ move_player(world, SOUTH);
+ }
+ else if (is_command_id_shortdsc(world, action, "player_l"))
+ {
+ move_player(world, WEST);
+ }
+}
+
+
+
+extern uint8_t player_control(int key, struct World * world)
+{
+ if (key == get_action_key(world->keybindings, "player_u"))
+ {
+ move_player(world, NORTH);
+ }
+ else if (key == get_action_key(world->keybindings, "player_r"))
+ {
+ move_player(world, EAST);
+ }
+ else if (key == get_action_key(world->keybindings, "player_d"))
+ {
+ move_player(world, SOUTH);
+ }
+ else if (key == get_action_key(world->keybindings, "player_l"))
+ {
+ move_player(world, WEST);
+ }
+ else if (key == get_action_key(world->keybindings, "wait"))
+ {
+ player_wait(world);
+ }
+ else
+ {
+ return 1;
+ }
+ return 0;
+}
+
+
+
+extern uint8_t meta_control(int key, struct World * world)
+{
+ struct WinMeta * win_meta = world->wmeta;
+ struct Win * win_keys = get_win_by_id(world, 'k');
+ struct Win * win_map = get_win_by_id(world, 'm');
+ struct Win * win_info = get_win_by_id(world, 'i');
+ struct Win * win_log = get_win_by_id(world, 'l');