src/Input.hh
changeset 235 0a0c729365ee
parent 233 ff4ecea83cf5
child 237 3d5465bcb67d
equal deleted inserted replaced
234:1dee8bd61c8e 235:0a0c729365ee
    33 };
    33 };
    34 
    34 
    35 typedef uint16_t PlayerInput;
    35 typedef uint16_t PlayerInput;
    36 typedef uint16_t GuiInput;
    36 typedef uint16_t GuiInput;
    37 
    37 
    38 /*
    38 template <typename BitEnumType> struct InputKeymapEntry;
    39  * Handle keycodes
    39 
    40  */
    40 class Input {
    41 PlayerInput handlePlayerInput (CL_InputDevice &keyboard);
    41     protected:
    42 GuiInput handleGuiInput (CL_InputDevice &keyboard);
    42         CL_InputDevice &keyboard;
       
    43 
       
    44     public:
       
    45         Input (CL_InputDevice &keyboard);
       
    46     
       
    47     private:
       
    48         bool checkKeycode (int keycode);
       
    49         template <typename BitEnumType, typename BitMaskType> BitMaskType buildMask (InputKeymapEntry<BitEnumType> *keymap);
       
    50 
       
    51     public:
       
    52         /*
       
    53          * Reads the keyboard to determine current state of the Player/Gui input
       
    54          */
       
    55         PlayerInput readPlayerInput (void);
       
    56         GuiInput readGuiInput (void);
       
    57 };
    43 
    58 
    44 #endif
    59 #endif