src/Input.hh
author ekku
Sat, 06 Dec 2008 19:38:01 +0000
changeset 225 22ecb9cb9245
parent 221 fbc5db6fce45
child 229 355e46effa41
permissions -rw-r--r--
Rope can be drawn.
#ifndef INPUT_HH
#define INPUT_HH

#include <stdint.h>
#include <ClanLib/Display/keys.h>

// const uint16_t INPUT_INTERVAL_MS = 20;

enum _PlayerInput {
    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        = 0x0080,
    INPUT_ROPE          = 0x0100
};

typedef uint16_t PlayerInput;

struct InputKeymapEntry {
    int keycode;
    enum _PlayerInput input;
};

/*
 * Get the global input keymap
 */
InputKeymapEntry* getGlobalInputKeymap (void);

#endif