diff options
Diffstat (limited to '')
| -rw-r--r-- | platformer/src/controls.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/platformer/src/controls.h b/platformer/src/controls.h index fc2ac4d..972ce9e 100644 --- a/platformer/src/controls.h +++ b/platformer/src/controls.h @@ -20,6 +20,8 @@ * bool jump_held; A is down this tick * bool jump_pressed; A went down THIS tick (true for one tick only) * bool reset_pressed; Back/Select went down this tick (one tick only) + * bool recenter_pressed; right stick click went down this tick (one tick + * only): swing the camera behind the player, centered * bool quit_pressed; Start (or Esc) went down this tick (one tick only) * bool using_gamepad; true if a gamepad produced this Input (debug info) * } Input; @@ -48,13 +50,14 @@ #include "math3d.h" typedef struct Input { - Vec2 move; /* left stick after deadzone, length 0..1. +x = right, +y = forward */ - Vec2 look; /* right stick after deadzone, length 0..1. +x = orbit right, +y = tilt up */ - bool jump_held; /* A is down this tick */ - bool jump_pressed; /* A went down THIS tick (one tick only) */ - bool reset_pressed; /* Back/Select went down this tick (one tick only) */ - bool quit_pressed; /* Start (or Esc) went down this tick (one tick only) */ - bool using_gamepad; /* true if a gamepad produced this Input (debug info) */ + Vec2 move; /* left stick after deadzone, length 0..1. +x = right, +y = forward */ + Vec2 look; /* right stick after deadzone, length 0..1. +x = orbit right, +y = tilt up */ + bool jump_held; /* A is down this tick */ + bool jump_pressed; /* A went down THIS tick (one tick only) */ + bool reset_pressed; /* Back/Select went down this tick (one tick only) */ + bool recenter_pressed; /* right stick click went down this tick (one tick only) */ + bool quit_pressed; /* Start (or Esc) went down this tick (one tick only) */ + bool using_gamepad; /* true if a gamepad produced this Input (debug info) */ } Input; void controls_init(void); |
