summaryrefslogtreecommitdiff
path: root/source/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/keyboard.c')
-rw-r--r--source/keyboard.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/source/keyboard.c b/source/keyboard.c
index 31b39a1..786b32d 100644
--- a/source/keyboard.c
+++ b/source/keyboard.c
@@ -255,8 +255,49 @@ void SK_ClearKeys(void)
}
-void SK_DefineJoypad(void)
+void SK_DefinePad(SoftKey pad, SoftKey key)
{
+ switch(pad)
+ {
+ case SK_PAD_LEFT:
+ pad_left_key = key;
+ break;
+ case SK_PAD_RIGHT:
+ pad_right_key = key;
+ break;
+ case SK_PAD_UP:
+ pad_up_key = key;
+ break;
+ case SK_PAD_DOWN:
+ pad_down_key = key;
+ break;
+ case SK_PAD_A:
+ pad_A_key = key;
+ break;
+ case SK_PAD_B:
+ pad_B_key = key;
+ break;
+ case SK_PAD_X:
+ pad_X_key = key;
+ break;
+ case SK_PAD_Y:
+ pad_Y_key = key;
+ break;
+ case SK_PAD_R:
+ pad_R_key = key;
+ break;
+ case SK_PAD_L:
+ pad_L_key = key;
+ break;
+ case SK_PAD_START:
+ pad_start_key = key;
+ break;
+ case SK_PAD_SELECT:
+ pad_select_key = key;
+ break;
+ default:
+ break;
+ }
}