-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayerinput.h
More file actions
43 lines (36 loc) · 852 Bytes
/
playerinput.h
File metadata and controls
43 lines (36 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "splashkit.h"
#pragma once
// Updated controles to suit the Arcade Machines
struct player_input
{
key_code left_key;
key_code right_key;
key_code jump_key;
key_code jump_key2;
key_code crouch_key;
key_code attack_key;
};
// Player one input
player_input make_player1_input()
{
player_input input;
input.jump_key = UP_KEY;
input.jump_key2 = RIGHT_ALT_KEY;
input.right_key = RIGHT_KEY;
input.left_key = LEFT_KEY;
input.crouch_key = DOWN_KEY;
input.attack_key = RIGHT_CTRL_KEY;
return input;
}
// Player two input
player_input make_player2_input()
{
player_input input;
input.jump_key = R_KEY;
input.jump_key2 = LEFT_ALT_KEY;
input.right_key = G_KEY;
input.left_key = D_KEY;
input.crouch_key = F_KEY;
input.attack_key = LEFT_CTRL_KEY;
return input;
}