# HG changeset patch # User Tero Marttila # Date 1232576033 -7200 # Node ID c1069d23890ba17730c701986074e79d271344c5 # Parent cede5463b845ff8e6b71c0bc7e1bd2d119d80f07 add forgotten top-level Input.hh diff -r cede5463b845 -r c1069d23890b src/Input.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Input.hh Thu Jan 22 00:13:53 2009 +0200 @@ -0,0 +1,44 @@ +#ifndef INPUT_HH +#define INPUT_HH + +/** + * Core game input events, used to control LocalPlayer + */ + +#include "Types.hh" + +/** + * The bits used in the PlayerInput bitmask, each represents a separate action handled by LocalPlayer::handleInput. + * + * @see LocalPlayer::handleInput + */ +enum PlayerInputBit { + INPUT_NONE = 0x0000, + + INPUT_AIM_UP = 0x0001, + INPUT_AIM_DOWN = 0x0002, + + INPUT_MOVE_LEFT = 0x0004, + INPUT_MOVE_RIGHT = 0x0008, + + INPUT_JUMP = 0x0010, + INPUT_DIG = 0x0020, + INPUT_SHOOT = 0x0040, + INPUT_CHANGE_NEXT = 0x0080, + INPUT_CHANGE_PREV = 0x0100, + INPUT_ROPE = 0x0200, + INPUT_UNROPE = 0x0400, + INPUT_ROPE_UP = 0x0800, + INPUT_ROPE_DOWN = 0x1000, + + INPUT_SUICIDE = 0x2000, +}; + +/** + * Bitmask of PlayerInputBits + * + * @see PlayerInputBit + */ +typedef uint16_t PlayerInput; + +#endif