src/Input.hh
branchnew_graphics
changeset 415 c1069d23890b
child 421 b5b9d2aafdcb
equal deleted inserted replaced
414:cede5463b845 415:c1069d23890b
       
     1 #ifndef INPUT_HH
       
     2 #define INPUT_HH
       
     3 
       
     4 /**
       
     5  * Core game input events, used to control LocalPlayer
       
     6  */
       
     7 
       
     8 #include "Types.hh"
       
     9 
       
    10 /**
       
    11  * The bits used in the PlayerInput bitmask, each represents a separate action handled by LocalPlayer::handleInput.
       
    12  *
       
    13  * @see LocalPlayer::handleInput
       
    14  */
       
    15 enum PlayerInputBit {
       
    16     INPUT_NONE          = 0x0000,
       
    17 
       
    18     INPUT_AIM_UP        = 0x0001,
       
    19     INPUT_AIM_DOWN      = 0x0002,
       
    20 
       
    21     INPUT_MOVE_LEFT     = 0x0004,
       
    22     INPUT_MOVE_RIGHT    = 0x0008,
       
    23 
       
    24     INPUT_JUMP          = 0x0010,
       
    25     INPUT_DIG           = 0x0020,
       
    26     INPUT_SHOOT         = 0x0040,
       
    27     INPUT_CHANGE_NEXT   = 0x0080,
       
    28     INPUT_CHANGE_PREV   = 0x0100,
       
    29     INPUT_ROPE          = 0x0200,
       
    30     INPUT_UNROPE        = 0x0400,
       
    31     INPUT_ROPE_UP       = 0x0800,
       
    32     INPUT_ROPE_DOWN     = 0x1000,
       
    33 
       
    34     INPUT_SUICIDE       = 0x2000,
       
    35 };
       
    36 
       
    37 /**
       
    38  * Bitmask of PlayerInputBits
       
    39  *
       
    40  * @see PlayerInputBit
       
    41  */
       
    42 typedef uint16_t PlayerInput;
       
    43 
       
    44 #endif