src/Input.hh
author Tero Marttila <terom@fixme.fi>
Thu, 22 Jan 2009 00:13:53 +0200
branchnew_graphics
changeset 415 c1069d23890b
child 421 b5b9d2aafdcb
permissions -rw-r--r--
add forgotten top-level Input.hh
#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