summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-05-27 08:35:07 +0200
committerest31 <MTest31@outlook.com>2016-06-03 19:42:57 +0200
commit2060fd9cbe587d7e8ffe0cecdd67925f13a56c05 (patch)
treef9f74c0a6609b0063fec6ed6f3d43fe42e43d5f1 /src/player.h
parent1e86c89f3614cf298916149a8f13d44ea671da64 (diff)
downloadminetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.tar.gz
minetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.tar.bz2
minetest-2060fd9cbe587d7e8ffe0cecdd67925f13a56c05.zip
Initial Gamepad support
Adds initial ingame gamepad support to minetest. Full Formspec support is not implemented yet and can be added by a later change.
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/player.h b/src/player.h
index b317cda4f..6687ca86e 100644
--- a/src/player.h
+++ b/src/player.h
@@ -46,6 +46,8 @@ struct PlayerControl
RMB = false;
pitch = 0;
yaw = 0;
+ sidew_move_joystick_axis = .0f;
+ forw_move_joystick_axis = .0f;
}
PlayerControl(
bool a_up,
@@ -58,7 +60,9 @@ struct PlayerControl
bool a_LMB,
bool a_RMB,
float a_pitch,
- float a_yaw
+ float a_yaw,
+ float a_sidew_move_joystick_axis,
+ float a_forw_move_joystick_axis
)
{
up = a_up;
@@ -72,6 +76,8 @@ struct PlayerControl
RMB = a_RMB;
pitch = a_pitch;
yaw = a_yaw;
+ sidew_move_joystick_axis = a_sidew_move_joystick_axis;
+ forw_move_joystick_axis = a_forw_move_joystick_axis;
}
bool up;
bool down;
@@ -84,6 +90,8 @@ struct PlayerControl
bool RMB;
float pitch;
float yaw;
+ float sidew_move_joystick_axis;
+ float forw_move_joystick_axis;
};
class Map;