src/Input.hh
author nireco
Sat, 31 Jan 2009 12:33:08 +0200
changeset 443 5d1119729f58
parent 421 b5b9d2aafdcb
permissions -rw-r--r--
worm02 two pics to comment
#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