Handle arrow keys

This commit is contained in:
Paul_Arutyunov 2018-10-13 13:45:48 +03:00
parent 28cd69b501
commit c5f6ca6beb

View File

@ -39,18 +39,22 @@ get_new_key:;
switch (value) { switch (value) {
case 'h': case 'h':
case 'a': case 'a':
case INPUT_LEFT:
direction = dir_left; direction = dir_left;
break; break;
case 'l': case 'l':
case 'd': case 'd':
case INPUT_RIGHT:
direction = dir_right; direction = dir_right;
break; break;
case 'j': case 'j':
case 's': case 's':
case INPUT_DOWN:
direction = dir_down; direction = dir_down;
break; break;
case 'k': case 'k':
case 'w': case 'w':
case INPUT_UP:
direction = dir_up; direction = dir_up;
break; break;
case 'q': case 'q':