X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrtris;a=blobdiff_plain;f=src%2Fgamescr.c;h=66aa1fe865250966532e73ef9f6e667eec24cf7c;hp=a55f432657cf7fb2f68236d8ef069d13252c0575;hb=257b041b5f6f64b53bafe5b4d4f8ffa67a39c0e5;hpb=32d517e60844b73bc27ffb6ae67061d0429b7927 diff --git a/src/gamescr.c b/src/gamescr.c index a55f432..66aa1fe 100644 --- a/src/gamescr.c +++ b/src/gamescr.c @@ -319,6 +319,7 @@ static void keyboard(int key, int pressed) switch(key) { case 'a': + case KEY_LEFT: if(!pause) { next_pos[1] = pos[1] - 1; if(collision(cur_block, next_pos)) { @@ -330,6 +331,7 @@ static void keyboard(int key, int pressed) break; case 'd': + case KEY_RIGHT: if(!pause) { next_pos[1] = pos[1] + 1; if(collision(cur_block, next_pos)) { @@ -341,6 +343,8 @@ static void keyboard(int key, int pressed) break; case 'w': + case KEY_UP: + case ' ': if(!pause) { prev_rot = cur_rot; cur_rot = (cur_rot + 1) & 3; @@ -353,6 +357,7 @@ static void keyboard(int key, int pressed) break; case 's': + case KEY_DOWN: /* ignore drops until the first update after a spawn */ if(cur_block >= 0 && !just_spawned && !pause) { next_pos[0] = pos[0] + 1; @@ -366,6 +371,7 @@ static void keyboard(int key, int pressed) case '\n': case '\t': + case '0': if(!pause && cur_block >= 0) { next_pos[0] = pos[0] + 1; while(!collision(cur_block, next_pos)) {