mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
add capability of VI keybindings
This commit is contained in:
@@ -8,19 +8,25 @@
|
||||
// TODO: this'll likely be insufficient, due to no code delays being applied, or it registers *just* the keydown event
|
||||
__attribute__((const)) static int procscancode(SDL_Scancode code) {
|
||||
switch (code) {
|
||||
case SDL_SCANCODE_Q: return MOVRL;
|
||||
case SDL_SCANCODE_E: return MOVRR;
|
||||
case SDL_SCANCODE_Q:
|
||||
return MOVRL;
|
||||
|
||||
case SDL_SCANCODE_E:
|
||||
return MOVRR;
|
||||
|
||||
case SDL_SCANCODE_LEFT:
|
||||
case SDL_SCANCODE_A:
|
||||
case SDL_SCANCODE_H:
|
||||
return MOVL;
|
||||
|
||||
case SDL_SCANCODE_RIGHT:
|
||||
case SDL_SCANCODE_D:
|
||||
case SDL_SCANCODE_L:
|
||||
return MOVR;
|
||||
|
||||
case SDL_SCANCODE_DOWN:
|
||||
case SDL_SCANCODE_S:
|
||||
case SDL_SCANCODE_J:
|
||||
case SDL_SCANCODE_SPACE:
|
||||
return MOVD;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user